Contract 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc54c98104a2b3892e31788ae724e792d3f1e3b0fe2aecf11b2f7378237fc5429Safe Transfer Fr...358421272022-11-20 11:53:0713 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002408658502 34.902024315
0x17d6268310de6243eaa5dc99f0a3f0cc50268921cb7280b8d6d2d4a09fee6579Safe Transfer Fr...355631982022-11-13 17:30:4920 days 2 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.009116895284 175.581528466
0x2fc1f28635828122507f8dd301135224f49074a97e47ef1f63408263128c3535Safe Transfer Fr...355281842022-11-12 20:55:1420 days 23 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002162904706 31.335545702
0xdaf19f415fb37049ebc43d215b1445c3cfa645a1d1f4b8dfc81c524944cfb96eSafe Transfer Fr...355278222022-11-12 20:39:3420 days 23 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.00282294701 40.898050104
0x13cc44fe6f85c73fefaf862325434472b9d127e5ebc3f7a40a2afa702a783ca1Withdraw Fees354546622022-11-10 22:42:0422 days 21 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.001655188307 50.338746006
0xb49cdb39354c9b27efd5be8f0c5ff4e681da05500ca844497976e0e638694acdMint354545892022-11-10 22:39:3022 days 21 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.005003802872 72.073904191
0xfcf6d81237bb38da3635ad7a55fb35ca27bd4b4e57ebad3f8db94369dfe59c55Update Config354543502022-11-10 22:31:2022 days 21 hrs ago0x5bf0bc7c30dfdb27cd64ef334638ebf83c906bc8 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.0167316422 118.3
0xb615175d9743448ae34370c7facdc13d267f2c1946ffcd2b43acd9c8e8a05851Safe Transfer Fr...344937612022-10-18 10:40:5146 days 9 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.003934692938 57.004707612
0x77aa5f7de5710fb3b6a4829f2eccffdd6d2d6923dde0dbdef4c60f1d7ac36cefWithdraw Fees344643202022-10-17 16:48:1847 days 3 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002127981427 64.717661497
0x21982057644384928c68abe1a4eea3ae161c077f2c5d5ea03946adaec51d4340Mint344642392022-10-17 16:45:2747 days 3 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.006181485761 89.037043211
0xe4b0071d7966d3dec009db6bb1aa3937ee8fd8d96ada42ec89cbab646f2343acWithdraw Fees344165002022-10-16 12:54:4148 days 7 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002939774693 89.406486844
0xbaa71da34e8d80f71432d550d0b9bde755cdb991d3cc8efb4c3abec151c2bddaMint344164572022-10-16 12:53:1548 days 7 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.010926563728 157.384318972
0x8c8236f3c47c0dc85ebb3af301c92fabbb58a6b7f5f619eec1315cca633eaf9bWithdraw Fees344164362022-10-16 12:52:2948 days 7 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002165945712 82.729678503
0x880d5c6f1e35598cb72b24dd6e2749de5b4ab31dcd4d9cc60613edcb47fd6170Withdraw Fees344164362022-10-16 12:52:2948 days 7 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002165945712 82.729678503
0x8d68d99084e91807ff7d8ae0777b1f268bdeb75461f22b6b7396aed542f1a88aWithdraw Fees344164312022-10-16 12:52:1948 days 7 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.002720234558 82.729678503
0xb0695994d6fd85d91a29baed037d22e1f6851a1b4dfa63e329013fe582feef08Mint344163682022-10-16 12:50:0948 days 7 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.005892587942 84.875809387
0x8ee1c7aaeeb7e6d51ce3592a2221ea4048ed371003180fed3e94482fa0c41382Safe Transfer Fr...342914942022-10-13 11:57:0251 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.006871674373 132.341005573
0xe1a0ba5f488da62e17f00522e3049c5d7cf6dddadc1febc83e56ad47621defd8Withdraw Fees342914312022-10-13 11:54:5051 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.004206701682 127.937157709
0x43a6d0f67695778c1a8342633218e92d1f7d40d3c2c3f79dda209becd85ec2b9Mint342913422022-10-13 11:51:4851 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.014457017289 208.236356546
0x900688d48a1e2ec6fb4c5e9c58b86189a9d3e7fda09b38b8d3a66de0f3061221Withdraw Fees342906692022-10-13 11:28:3851 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.004305390051 164.447120096
0x482c2f0205056fc92ad432c62343a914f7e3ff831cfdf8a777f4ff2ac6c2e366Withdraw Fees342906682022-10-13 11:28:3651 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.004323863621 131.500368633
0x98a3d2ec7654d9d316fff54176f79e5682600cc8c07dcebc695afce2628dfb92Mint342903492022-10-13 11:17:3851 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.011748911207 169.229268678
0xdce082c02946dc227c21001dc14e6575aa5990d2423cd9ff0757b6ee44f448c3Withdraw Fees342903302022-10-13 11:17:0051 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.005564427583 169.229268678
0x035eacf89f2b00450434ba4bdc383311b01f7160af1a59f63162a75bccc9728fMint342903012022-10-13 11:15:5851 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e0160 MATIC0.010139430674 146.046591682
0xa072415b1f1904db56ef943b62b67b492e4a4344cebf3d78c8ba3c314b9d69a9Withdraw Fees342902562022-10-13 11:14:2851 days 8 hrs ago0xe699e0c162934633291067fab10b528054f87e97 IN  0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00 MATIC0.005030239711 152.983173006
[ Download CSV Export 
Latest 10 internal transactions
Parent Txn Hash Block From To Value
0x13cc44fe6f85c73fefaf862325434472b9d127e5ebc3f7a40a2afa702a783ca1354546622022-11-10 22:42:0422 days 21 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0x77aa5f7de5710fb3b6a4829f2eccffdd6d2d6923dde0dbdef4c60f1d7ac36cef344643202022-10-17 16:48:1847 days 3 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0xe4b0071d7966d3dec009db6bb1aa3937ee8fd8d96ada42ec89cbab646f2343ac344165002022-10-16 12:54:4148 days 7 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0x8d68d99084e91807ff7d8ae0777b1f268bdeb75461f22b6b7396aed542f1a88a344164312022-10-16 12:52:1948 days 7 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0xe1a0ba5f488da62e17f00522e3049c5d7cf6dddadc1febc83e56ad47621defd8342914312022-10-13 11:54:5051 days 8 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0x482c2f0205056fc92ad432c62343a914f7e3ff831cfdf8a777f4ff2ac6c2e366342906682022-10-13 11:28:3651 days 8 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0xdce082c02946dc227c21001dc14e6575aa5990d2423cd9ff0757b6ee44f448c3342903302022-10-13 11:17:0051 days 8 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0xa072415b1f1904db56ef943b62b67b492e4a4344cebf3d78c8ba3c314b9d69a9342902562022-10-13 11:14:2851 days 8 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
0x2145287d2528987cb8fabb61961fb49ec63a8e61d153537e74faa7ef4ec586de329826812022-09-11 19:48:4183 days 18 mins ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97480 MATIC
0x8df8a158045662b93294ec4254386a7cf05878356d193bb56f69e38d2049b872329488032022-09-11 0:04:4183 days 20 hrs ago 0x9a0c9ac9f076a31ac1ec84faad4dc82186a776e00xe699e0c162934633291067fab10b528054f87e97160 MATIC
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x8Bf113a2a5a8e050F7B051c7A71a7D8C7513297a

Contract Name:
NFTCollectionContract

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 2 of 19 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 3 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 4 of 19 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/Address.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = _setInitializedVersion(1);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        bool isTopLevelCall = _setInitializedVersion(version);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(version);
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        _setInitializedVersion(type(uint8).max);
    }

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !Address.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

File 5 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 6 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 7 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 8 of 19 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 9 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 11 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 12 of 19 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 13 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 15 of 19 : NFTCollectionContract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./templates/NFTCollection.sol";

contract NFTCollectionContract is NFTCollection {
    constructor(
        DeploymentConfig memory deploymentConfig,
        RuntimeConfig memory runtimeConfig
    ) {
        _preventInitialization = false;
        initialize(deploymentConfig, runtimeConfig);
    }
}

File 16 of 19 : Base64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
    bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /// @notice Encodes some bytes to the base64 representation
    function encode(bytes memory data) internal pure returns (string memory) {
        uint256 len = data.length;
        if (len == 0) return "";

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((len + 2) / 3);

        // Add some extra buffer at the end
        bytes memory result = new bytes(encodedLen + 32);

        bytes memory table = TABLE;

        // solium-disable-next-line security/no-inline-assembly
        assembly {
            let tablePtr := add(table, 1)
            let resultPtr := add(result, 32)

            for {
                let i := 0
            } lt(i, len) {

            } {
                i := add(i, 3)
                let input := and(mload(add(data, i)), 0xffffff)

                let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
                out := shl(8, out)
                out := add(
                    out,
                    and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)
                )
                out := shl(8, out)
                out := add(
                    out,
                    and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)
                )
                out := shl(8, out)
                out := add(
                    out,
                    and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)
                )
                out := shl(224, out)

                mstore(resultPtr, out)

                resultPtr := add(resultPtr, 4)
            }

            switch mod(len, 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }

            mstore(result, encodedLen)
        }

        return string(result);
    }
}

File 17 of 19 : ERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {IERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";

abstract contract ERC2981 is IERC165, IERC2981 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return interfaceId == type(IERC2981).interfaceId;
    }
}

File 18 of 19 : NFTCollection.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

import "../lib/ERC2981.sol";
import "../lib/Base64.sol";

contract NFTCollection is ERC721A, ERC2981, AccessControl, Initializable {
    using Address for address payable;
    using Strings for uint256;

    /// Fixed at deployment time
    struct DeploymentConfig {
        // Name of the NFT contract.
        string name;
        // Symbol of the NFT contract.
        string symbol;
        // The contract owner address. If you wish to own the contract, then set it as your wallet address.
        // This is also the wallet that can manage the contract on NFT marketplaces. Use `transferOwnership()`
        // to update the contract owner.
        address owner;
        // The maximum number of tokens that can be minted in this collection.
        uint256 maxSupply;
        // The number of free token mints reserved for the contract owner
        uint256 reservedSupply;
        // Minting price per token.
        uint256 mintPrice;
        // The maximum number of tokens the user can mint per transaction.
        uint256 tokensPerMint;
        // Treasury address is the address where minting fees can be withdrawn to.
        // Use `withdrawFees()` to transfer the entire contract balance to the treasury address.
        address payable treasuryAddress;
    }

    /// Updatable by admins and owner
    struct RuntimeConfig {
        // Metadata base URI for tokens, NFTs minted in this contract will have metadata URI of `baseURI` + `tokenID`.
        // Set this to reveal token metadata.
        string baseURI;
        // If true, the base URI of the NFTs minted in the specified contract can be updated after minting (token URIs
        // are not frozen on the contract level). This is useful for revealing NFTs after the drop. If false, all the
        // NFTs minted in this contract are frozen by default which means token URIs are non-updatable.
        bool metadataUpdatable;
        // Starting timestamp for public minting.
        uint256 publicMintStart;
        // Starting timestamp for whitelisted/presale minting.
        uint256 presaleMintStart;
        // Pre-reveal token URI for placholder metadata. This will be returned for all token IDs until a `baseURI`
        // has been set.
        string prerevealTokenURI;
        // Root of the Merkle tree of whitelisted addresses. This is used to check if a wallet has been whitelisted
        // for presale minting.
        bytes32 presaleMerkleRoot;
        // Secondary market royalties in basis points (100 bps = 1%)
        uint256 royaltiesBps;
        // Address for royalties
        address royaltiesAddress;
    }

    struct ContractInfo {
        uint256 version;
        DeploymentConfig deploymentConfig;
        RuntimeConfig runtimeConfig;
    }

    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /*************
     * Constants *
     *************/

    /// Contract version, semver-style uint X_YY_ZZ
    uint256 public constant VERSION = 1_02_02;

    /// Admin role
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    // Basis for calculating royalties.
    // This has to be 10k for royaltiesBps to be in basis points.
    uint16 public constant ROYALTIES_BASIS = 10000;

    /********************
     * Public variables *
     ********************/

    /// The number of tokens remaining in the reserve
    /// @dev Managed by the contract
    uint256 public reserveRemaining;

    /***************************
     * Contract initialization *
     ***************************/

    constructor() ERC721A("", "") {
        _preventInitialization = true;
    }

    /// Contract initializer
    function initialize(
        DeploymentConfig memory deploymentConfig,
        RuntimeConfig memory runtimeConfig
    ) public initializer {
        require(!_preventInitialization, "Cannot be initialized");
        _validateDeploymentConfig(deploymentConfig);

        _grantRole(ADMIN_ROLE, msg.sender);
        _transferOwnership(deploymentConfig.owner);

        _deploymentConfig = deploymentConfig;
        _runtimeConfig = runtimeConfig;

        reserveRemaining = deploymentConfig.reservedSupply;
    }

    /****************
     * User actions *
     ****************/

    /// Mint tokens
    function mint(uint256 amount) external payable paymentProvided(amount) {
        require(mintingActive(), "Minting has not started yet");

        _mintTokens(msg.sender, amount);
    }

    /// Mint tokens if the wallet has been whitelisted
    function presaleMint(uint256 amount, bytes32[] calldata proof)
        external
        payable
        paymentProvided(amount)
    {
        require(presaleActive(), "Presale has not started yet");
        require(
            isWhitelisted(msg.sender, proof),
            "Not whitelisted for presale"
        );

        _presaleMinted[msg.sender] = true;
        _mintTokens(msg.sender, amount);
    }

    /******************
     * View functions *
     ******************/

    /// Check if public minting is active
    function mintingActive() public view returns (bool) {
        // We need to rely on block.timestamp since it's
        // asier to configure across different chains
        // solhint-disable-next-line not-rely-on-time
        return block.timestamp > _runtimeConfig.publicMintStart;
    }

    /// Check if presale minting is active
    function presaleActive() public view returns (bool) {
        // We need to rely on block.timestamp since it's
        // easier to configure across different chains
        // solhint-disable-next-line not-rely-on-time
        return block.timestamp > _runtimeConfig.presaleMintStart;
    }

    /// Get the number of tokens still available for minting
    function availableSupply() public view returns (uint256) {
        return _deploymentConfig.maxSupply - totalSupply() - reserveRemaining;
    }

    /// Check if the wallet is whitelisted for the presale
    function isWhitelisted(address wallet, bytes32[] calldata proof)
        public
        view
        returns (bool)
    {
        require(!_presaleMinted[wallet], "Already minted");

        bytes32 leaf = keccak256(abi.encodePacked(wallet));

        return
            MerkleProof.verify(proof, _runtimeConfig.presaleMerkleRoot, leaf);
    }

    /// Contract owner address
    /// @dev Required for easy integration with OpenSea
    function owner() public view returns (address) {
        return _deploymentConfig.owner;
    }

    /*******************
     * Access controls *
     *******************/

    /// Transfer contract ownership
    function transferOwnership(address newOwner)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(newOwner != _deploymentConfig.owner, "Already the owner");
        _transferOwnership(newOwner);
    }

    /// Transfer contract ownership
    function transferAdminRights(address to) external onlyRole(ADMIN_ROLE) {
        require(!hasRole(ADMIN_ROLE, to), "Already an admin");
        require(msg.sender != _deploymentConfig.owner, "Use transferOwnership");

        _revokeRole(ADMIN_ROLE, msg.sender);
        _grantRole(ADMIN_ROLE, to);
    }

    /*****************
     * Admin actions *
     *****************/

    /// Mint a token from the reserve
    function reserveMint(address to, uint256 amount)
        external
        onlyRole(ADMIN_ROLE)
    {
        require(amount <= reserveRemaining, "Not enough reserved");

        reserveRemaining -= amount;
        _mintTokens(to, amount);
    }

    /// Get full contract information
    /// @dev Convenience helper
    function getInfo() external view returns (ContractInfo memory info) {
        info.version = VERSION;
        info.deploymentConfig = _deploymentConfig;
        info.runtimeConfig = _runtimeConfig;
    }

    /// Update contract configuration
    /// @dev Callable by admin roles only
    function updateConfig(RuntimeConfig calldata newConfig)
        external
        onlyRole(ADMIN_ROLE)
    {
        _validateRuntimeConfig(newConfig);
        _runtimeConfig = newConfig;
    }

    /// Withdraw minting fees to the treasury address
    /// @dev Callable by admin roles only
    function withdrawFees() external onlyRole(ADMIN_ROLE) {
        _deploymentConfig.treasuryAddress.sendValue(address(this).balance);
    }

    /*************
     * Internals *
     *************/

    /// Contract configuration
    RuntimeConfig internal _runtimeConfig;
    DeploymentConfig internal _deploymentConfig;

    /// Flag for disabling initalization for template contracts
    bool internal _preventInitialization;

    /// Mapping for tracking presale mint status
    mapping(address => bool) internal _presaleMinted;

    /// @dev Internal function for performing token mints
    function _mintTokens(address to, uint256 amount) internal {
        require(amount <= _deploymentConfig.tokensPerMint, "Amount too large");
        require(amount <= availableSupply(), "Not enough tokens left");

        _safeMint(to, amount);
    }

    /// Validate deployment config
    function _validateDeploymentConfig(DeploymentConfig memory config)
        internal
        pure
    {
        require(config.maxSupply > 0, "Maximum supply must be non-zero");
        require(config.tokensPerMint > 0, "Tokens per mint must be non-zero");
        require(
            config.treasuryAddress != address(0),
            "Treasury address cannot be null"
        );
        require(config.owner != address(0), "Contract must have an owner");
        require(
            config.reservedSupply <= config.maxSupply,
            "Reserve greater than supply"
        );
    }

    /// Validate a runtime configuration change
    function _validateRuntimeConfig(RuntimeConfig calldata config)
        internal
        view
    {
        // Can't set royalties to more than 100%
        require(config.royaltiesBps <= ROYALTIES_BASIS, "Royalties too high");

        // If metadata is updatable, we don't have any other limitations
        if (_runtimeConfig.metadataUpdatable) return;

        // If it isn't, has we can't allow the flag to change anymore
        require(
            _runtimeConfig.metadataUpdatable == config.metadataUpdatable,
            "Cannot unfreeze metadata"
        );

        // We also can't allow base URI to change
        require(
            keccak256(abi.encodePacked(_runtimeConfig.baseURI)) ==
                keccak256(abi.encodePacked(config.baseURI)),
            "Metadata is frozen"
        );
    }

    /// Internal function without any checks for performing the ownership transfer
    function _transferOwnership(address newOwner) internal {
        address previousOwner = _deploymentConfig.owner;
        _revokeRole(ADMIN_ROLE, previousOwner);
        _revokeRole(DEFAULT_ADMIN_ROLE, previousOwner);

        _deploymentConfig.owner = newOwner;
        _grantRole(ADMIN_ROLE, newOwner);
        _grantRole(DEFAULT_ADMIN_ROLE, newOwner);

        emit OwnershipTransferred(previousOwner, newOwner);
    }

    /// @dev See {IERC165-supportsInterface}.
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721A, AccessControl, ERC2981)
        returns (bool)
    {
        return
            ERC721A.supportsInterface(interfaceId) ||
            AccessControl.supportsInterface(interfaceId) ||
            ERC2981.supportsInterface(interfaceId);
    }

    /// Get the token metadata URI
    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(_exists(tokenId), "Token does not exist");

        return
            bytes(_runtimeConfig.baseURI).length > 0
                ? string(
                    abi.encodePacked(_runtimeConfig.baseURI, tokenId.toString())
                )
                : _runtimeConfig.prerevealTokenURI;
    }

    /// @dev Need name() to support setting it in the initializer instead of constructor
    function name() public view override returns (string memory) {
        return _deploymentConfig.name;
    }

    /// @dev Need symbol() to support setting it in the initializer instead of constructor
    function symbol() public view override returns (string memory) {
        return _deploymentConfig.symbol;
    }

    /// @dev ERC2981 token royalty info
    function royaltyInfo(uint256, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount)
    {
        receiver = _runtimeConfig.royaltiesAddress;
        royaltyAmount =
            (_runtimeConfig.royaltiesBps * salePrice) /
            ROYALTIES_BASIS;
    }

    /// @dev OpenSea contract metadata
    function contractURI() external view returns (string memory) {
        string memory json = Base64.encode(
            bytes(
                string(
                    abi.encodePacked(
                        '{"seller_fee_basis_points": ', // solhint-disable-line quotes
                        _runtimeConfig.royaltiesBps.toString(),
                        ', "fee_recipient": "', // solhint-disable-line quotes
                        uint256(uint160(_runtimeConfig.royaltiesAddress))
                            .toHexString(20),
                        '"}' // solhint-disable-line quotes
                    )
                )
            )
        );

        string memory output = string(
            abi.encodePacked("data:application/json;base64,", json)
        );

        return output;
    }

    /// Check if enough payment was provided to mint `amount` number of tokens
    modifier paymentProvided(uint256 amount) {
        require(
            msg.value >= amount * _deploymentConfig.mintPrice,
            "Payment too small"
        );
        _;
    }

    /***********************
     * Convenience getters *
     ***********************/

    function maxSupply() public view returns (uint256) {
        return _deploymentConfig.maxSupply;
    }

    function reservedSupply() public view returns (uint256) {
        return _deploymentConfig.reservedSupply;
    }

    function mintPrice() public view returns (uint256) {
        return _deploymentConfig.mintPrice;
    }

    function tokensPerMint() public view returns (uint256) {
        return _deploymentConfig.tokensPerMint;
    }

    function treasuryAddress() public view returns (address) {
        return _deploymentConfig.treasuryAddress;
    }

    function publicMintStart() public view returns (uint256) {
        return _runtimeConfig.publicMintStart;
    }

    function presaleMintStart() public view returns (uint256) {
        return _runtimeConfig.presaleMintStart;
    }

    function presaleMerkleRoot() public view returns (bytes32) {
        return _runtimeConfig.presaleMerkleRoot;
    }

    function baseURI() public view returns (string memory) {
        return _runtimeConfig.baseURI;
    }

    function metadataUpdatable() public view returns (bool) {
        return _runtimeConfig.metadataUpdatable;
    }

    function prerevealTokenURI() public view returns (string memory) {
        return _runtimeConfig.prerevealTokenURI;
    }
}

File 19 of 19 : ERC721A.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr && curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex != end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev This is equivalent to _burn(tokenId, false)
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"reservedSupply","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"tokensPerMint","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"internalType":"struct NFTCollection.DeploymentConfig","name":"deploymentConfig","type":"tuple"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"runtimeConfig","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTIES_BASIS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInfo","outputs":[{"components":[{"internalType":"uint256","name":"version","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"reservedSupply","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"tokensPerMint","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"internalType":"struct NFTCollection.DeploymentConfig","name":"deploymentConfig","type":"tuple"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"runtimeConfig","type":"tuple"}],"internalType":"struct NFTCollection.ContractInfo","name":"info","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"reservedSupply","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"tokensPerMint","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"internalType":"struct NFTCollection.DeploymentConfig","name":"deploymentConfig","type":"tuple"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"runtimeConfig","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataUpdatable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prerevealTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleMintStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reserveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferAdminRights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"newConfig","type":"tuple"}],"name":"updateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200488438038062004884833981016040819052620000349162000a4d565b604080516020808201808452600080845284519283019094529281528151919290916200006491600291620007ad565b5080516200007a906003906020840190620007ad565b50600080555050601b805460ff191690556200009782826200009f565b505062000b9d565b6000620000ad6001620002e4565b90508015620000c6576009805461ff0019166101001790555b601b5460ff16156200011f5760405162461bcd60e51b815260206004820152601560248201527f43616e6e6f7420626520696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6200012a83620003f9565b620001456000805160206200486483398151915233620005ba565b604083015162000155906200065f565b82518051849160139162000171918391602090910190620007ad565b5060208281015180516200018c9260018501920190620007ad565b5060408201516002820180546001600160a01b03199081166001600160a01b0393841617909155606084015160038401556080840151600484015560a0840151600584015560c0840151600684015560e090930151600790920180549093169116179055815180518391600b916200020c918391602090910190620007ad565b5060208281015160018301805460ff1916911515919091179055604083015160028301556060830151600383015560808301518051620002539260048501920190620007ad565b5060a0820151600582015560c0820151600682015560e090910151600790910180546001600160a01b0319166001600160a01b039092169190911790556080830151600a558015620002df576009805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b600954600090610100900460ff16156200037b578160ff1660011480156200031f57506200031d306200071a60201b6200196a1760201c565b155b620003735760405162461bcd60e51b815260206004820152602e60248201526000805160206200484483398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840162000116565b506000919050565b60095460ff808416911610620003da5760405162461bcd60e51b815260206004820152602e60248201526000805160206200484483398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840162000116565b506009805460ff191660ff92909216919091179055600190565b919050565b60008160600151116200044f5760405162461bcd60e51b815260206004820152601f60248201527f4d6178696d756d20737570706c79206d757374206265206e6f6e2d7a65726f00604482015260640162000116565b60008160c0015111620004a55760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320706572206d696e74206d757374206265206e6f6e2d7a65726f604482015260640162000116565b60e08101516001600160a01b0316620005015760405162461bcd60e51b815260206004820152601f60248201527f547265617375727920616464726573732063616e6e6f74206265206e756c6c00604482015260640162000116565b60408101516001600160a01b03166200055d5760405162461bcd60e51b815260206004820152601b60248201527f436f6e7472616374206d757374206861766520616e206f776e65720000000000604482015260640162000116565b806060015181608001511115620005b75760405162461bcd60e51b815260206004820152601b60248201527f526573657276652067726561746572207468616e20737570706c790000000000604482015260640162000116565b50565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff166200065b5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200061a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6015546001600160a01b031662000686600080516020620048648339815191528262000729565b6200069360008262000729565b601580546001600160a01b0319166001600160a01b038416179055620006c96000805160206200486483398151915283620005ba565b620006d6600083620005ba565b816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001600160a01b03163b151590565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16156200065b5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b828054620007bb9062000b60565b90600052602060002090601f016020900481019282620007df57600085556200082a565b82601f10620007fa57805160ff19168380011785556200082a565b828001600101855582156200082a579182015b828111156200082a5782518255916020019190600101906200080d565b50620008389291506200083c565b5090565b5b808211156200083857600081556001016200083d565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b03811182821017156200088f576200088f62000853565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620008c057620008c062000853565b604052919050565b600082601f830112620008da57600080fd5b81516001600160401b03811115620008f657620008f662000853565b60206200090c601f8301601f1916820162000895565b82815285828487010111156200092157600080fd5b60005b838110156200094157858101830151828201840152820162000924565b83811115620009535760008385840101525b5095945050505050565b80516001600160a01b0381168114620003f457600080fd5b80518015158114620003f457600080fd5b600061010082840312156200099a57600080fd5b620009a462000869565b82519091506001600160401b0380821115620009bf57600080fd5b620009cd85838601620008c8565b8352620009dd6020850162000975565b60208401526040840151604084015260608401516060840152608084015191508082111562000a0b57600080fd5b5062000a1a84828501620008c8565b60808301525060a082015160a082015260c082015160c082015262000a4260e083016200095d565b60e082015292915050565b6000806040838503121562000a6157600080fd5b82516001600160401b038082111562000a7957600080fd5b90840190610100828703121562000a8f57600080fd5b62000a9962000869565b82518281111562000aa957600080fd5b62000ab788828601620008c8565b82525060208301518281111562000acd57600080fd5b62000adb88828601620008c8565b60208301525062000aef604084016200095d565b6040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015262000b2a60e084016200095d565b60e0820152602086015190945091508082111562000b4757600080fd5b5062000b568582860162000986565b9150509250929050565b600181811c9082168062000b7557607f821691505b6020821081141562000b9757634e487b7160e01b600052602260045260246000fd5b50919050565b613c978062000bad6000396000f3fe6080604052600436106102e45760003560e01c806370a0823111610190578063b5106add116100dc578063e3e1e8ef11610095578063eec1b5d51161006f578063eec1b5d514610891578063f2fde38b146108b1578063f4ad0f97146108d1578063ffa1ad74146108e657600080fd5b8063e3e1e8ef14610820578063e8a3d48514610833578063e985e9c51461084857600080fd5b8063b5106add1461076d578063b88d4fde1461078d578063c5f956af146107ad578063c87b56dd146107cb578063d547741f146107eb578063d5abeb011461080b57600080fd5b806391d1485411610149578063a0712d6811610123578063a0712d6814610705578063a217fddf14610718578063a22cb4651461072d578063b0ea18021461074d57600080fd5b806391d14854146106a757806395d89b41146106c75780639da5b0a5146106dc57600080fd5b806370a08231146105fd57806375b238fc1461061d5780637ecc2b561461063f578063877bb1ae146106545780638cfec4c0146106745780638da5cb5b1461068957600080fd5b806336568abe1161024f57806353135ca0116102085780635c629f4c116101e25780635c629f4c1461059d5780636352211e146105b35780636817c76c146105d35780636c0360eb146105e857600080fd5b806353135ca0146105445780635a23dd991461055b5780635a9b0b891461057b57600080fd5b806336568abe146104ad57806342842e0e146104cd57806344d19d2b146104ed5780634653124b14610502578063476343ee146105175780634e6f9dd61461052c57600080fd5b806322212e2b116102a157806322212e2b146103d257806323b872dd146103e7578063248a9ca3146104075780632a55205a146104375780632f2ff15d1461047657806331f9c9191461049657600080fd5b806301ffc9a7146102e957806306fdde031461031e5780630807b9e214610340578063081812fc1461035f578063095ea7b31461039757806318160ddd146103b9575b600080fd5b3480156102f557600080fd5b50610309610304366004612ddd565b6108fc565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b50610333610937565b6040516103159190612e52565b34801561034c57600080fd5b506019545b604051908152602001610315565b34801561036b57600080fd5b5061037f61037a366004612e65565b6109cc565b6040516001600160a01b039091168152602001610315565b3480156103a357600080fd5b506103b76103b2366004612e9e565b610a10565b005b3480156103c557600080fd5b5060015460005403610351565b3480156103de57600080fd5b50601054610351565b3480156103f357600080fd5b506103b7610402366004612eca565b610a9e565b34801561041357600080fd5b50610351610422366004612e65565b60009081526008602052604090206001015490565b34801561044357600080fd5b50610457610452366004612f0b565b610aa9565b604080516001600160a01b039093168352602083019190915201610315565b34801561048257600080fd5b506103b7610491366004612f2d565b610ae0565b3480156104a257600080fd5b50600d544211610309565b3480156104b957600080fd5b506103b76104c8366004612f2d565b610b05565b3480156104d957600080fd5b506103b76104e8366004612eca565b610b88565b3480156104f957600080fd5b50601754610351565b34801561050e57600080fd5b50600e54610351565b34801561052357600080fd5b506103b7610ba3565b34801561053857600080fd5b50600c5460ff16610309565b34801561055057600080fd5b50600e544211610309565b34801561056757600080fd5b50610309610576366004612fa8565b610bd4565b34801561058757600080fd5b50610590610cb2565b604051610315919061307f565b3480156105a957600080fd5b50610351600a5481565b3480156105bf57600080fd5b5061037f6105ce366004612e65565b610fd4565b3480156105df57600080fd5b50601854610351565b3480156105f457600080fd5b50610333610fe6565b34801561060957600080fd5b50610351610618366004613147565b610ff8565b34801561062957600080fd5b50610351600080516020613c4283398151915281565b34801561064b57600080fd5b50610351611046565b34801561066057600080fd5b506103b761066f366004613164565b611074565b34801561068057600080fd5b50600d54610351565b34801561069557600080fd5b506015546001600160a01b031661037f565b3480156106b357600080fd5b506103096106c2366004612f2d565b6110a8565b3480156106d357600080fd5b506103336110d3565b3480156106e857600080fd5b506106f261271081565b60405161ffff9091168152602001610315565b6103b7610713366004612e65565b6110e5565b34801561072457600080fd5b50610351600081565b34801561073957600080fd5b506103b76107483660046131b8565b611192565b34801561075957600080fd5b506103b7610768366004612e9e565b611228565b34801561077957600080fd5b506103b7610788366004613147565b6112aa565b34801561079957600080fd5b506103b76107a836600461329a565b61139d565b3480156107b957600080fd5b50601a546001600160a01b031661037f565b3480156107d757600080fd5b506103336107e6366004612e65565b6113e8565b3480156107f757600080fd5b506103b7610806366004612f2d565b611510565b34801561081757600080fd5b50601654610351565b6103b761082e366004613319565b611535565b34801561083f57600080fd5b50610333611653565b34801561085457600080fd5b5061030961086336600461334b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561089d57600080fd5b506103b76108ac366004613452565b6116d0565b3480156108bd57600080fd5b506103b76108cc366004613147565b6118f2565b3480156108dd57600080fd5b50610333611958565b3480156108f257600080fd5b506103516127da81565b600061090782611979565b806109165750610916826119c9565b80610931575063152a902d60e11b6001600160e01b03198316145b92915050565b60606013600001805461094990613552565b80601f016020809104026020016040519081016040528092919081815260200182805461097590613552565b80156109c25780601f10610997576101008083540402835291602001916109c2565b820191906000526020600020905b8154815290600101906020018083116109a557829003601f168201915b5050505050905090565b60006109d7826119fe565b6109f4576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a1b82610fd4565b9050806001600160a01b0316836001600160a01b03161415610a505760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610a705750610a6e8133610863565b155b15610a8e576040516367d9dca160e11b815260040160405180910390fd5b610a99838383611a29565b505050565b610a99838383611a85565b6012546011546001600160a01b039091169060009061271090610acd9085906135a3565b610ad791906135d8565b90509250929050565b600082815260086020526040902060010154610afb81611c73565b610a998383611c7d565b6001600160a01b0381163314610b7a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610b848282611d03565b5050565b610a998383836040518060200160405280600081525061139d565b600080516020613c42833981519152610bbb81611c73565b601a54610bd1906001600160a01b031647611d6a565b50565b6001600160a01b0383166000908152601c602052604081205460ff1615610c2e5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610b71565b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050610ca9848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506010549150849050611e83565b95945050505050565b610cba612c62565b6127da81526040805161010081019091526013805482908290610cdc90613552565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0890613552565b8015610d555780601f10610d2a57610100808354040283529160200191610d55565b820191906000526020600020905b815481529060010190602001808311610d3857829003601f168201915b50505050508152602001600182018054610d6e90613552565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9a90613552565b8015610de75780601f10610dbc57610100808354040283529160200191610de7565b820191906000526020600020905b815481529060010190602001808311610dca57829003601f168201915b505050918352505060028201546001600160a01b0390811660208084019190915260038401546040808501919091526004850154606085015260058501546080850152600685015460a085015260079094015490911660c09092019190915283019190915280516101008101909152600b805482908290610e6790613552565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9390613552565b8015610ee05780601f10610eb557610100808354040283529160200191610ee0565b820191906000526020600020905b815481529060010190602001808311610ec357829003601f168201915b5050509183525050600182015460ff16151560208201526002820154604082015260038201546060820152600482018054608090920191610f2090613552565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4c90613552565b8015610f995780601f10610f6e57610100808354040283529160200191610f99565b820191906000526020600020905b815481529060010190602001808311610f7c57829003601f168201915b50505091835250506005820154602082015260068201546040808301919091526007909201546001600160a01b031660609091015282015290565b6000610fdf82611e99565b5192915050565b6060600b600001805461094990613552565b60006001600160a01b038216611021576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6000600a546110586001546000540390565b60165461106591906135ec565b61106f91906135ec565b905090565b600080516020613c4283398151915261108c81611c73565b61109582611fb3565b81600b6110a28282613770565b50505050565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606013600101805461094990613552565b60185481906110f490826135a3565b3410156111375760405162461bcd60e51b815260206004820152601160248201527014185e5b595b9d081d1bdbc81cdb585b1b607a1b6044820152606401610b71565b600d5442116111885760405162461bcd60e51b815260206004820152601b60248201527f4d696e74696e6720686173206e6f7420737461727465642079657400000000006044820152606401610b71565b610b84338361210e565b6001600160a01b0382163314156111bc5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080516020613c4283398151915261124081611c73565b600a548211156112885760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da081c995cd95c9d9959606a1b6044820152606401610b71565b81600a600082825461129a91906135ec565b90915550610a999050838361210e565b600080516020613c428339815191526112c281611c73565b6112da600080516020613c42833981519152836110a8565b1561131a5760405162461bcd60e51b815260206004820152601060248201526f20b63932b0b23c9030b71030b236b4b760811b6044820152606401610b71565b6015546001600160a01b031633141561136d5760405162461bcd60e51b81526020600482015260156024820152740557365207472616e736665724f776e65727368697605c1b6044820152606401610b71565b611385600080516020613c4283398151915233611d03565b610b84600080516020613c4283398151915283611c7d565b6113a8848484611a85565b6001600160a01b0383163b151580156113ca57506113c8848484846121ad565b155b156110a2576040516368d2bf6b60e11b815260040160405180910390fd5b60606113f3826119fe565b6114365760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610b71565b6000600b600001805461144890613552565b9050116114df57600f805461145c90613552565b80601f016020809104026020016040519081016040528092919081815260200182805461148890613552565b80156114d55780601f106114aa576101008083540402835291602001916114d5565b820191906000526020600020905b8154815290600101906020018083116114b857829003601f168201915b5050505050610931565b600b6114ea836122a5565b6040516020016114fb929190613946565b60405160208183030381529060405292915050565b60008281526008602052604090206001015461152b81611c73565b610a998383611d03565b601854839061154490826135a3565b3410156115875760405162461bcd60e51b815260206004820152601160248201527014185e5b595b9d081d1bdbc81cdb585b1b607a1b6044820152606401610b71565b600e5442116115d85760405162461bcd60e51b815260206004820152601b60248201527f50726573616c6520686173206e6f7420737461727465642079657400000000006044820152606401610b71565b6115e3338484610bd4565b61162f5760405162461bcd60e51b815260206004820152601b60248201527f4e6f742077686974656c697374656420666f722070726573616c6500000000006044820152606401610b71565b336000818152601c60205260409020805460ff191660011790556110a2908561210e565b606060006116a4611668600b600601546122a5565b60125461167f906001600160a01b031660146123a2565b60405160200161169092919061396b565b604051602081830303815290604052612544565b90506000816040516020016116b991906139f2565b60408051601f198184030181529190529392505050565b60006116dc60016126a9565b905080156116f4576009805461ff0019166101001790555b601b5460ff161561173f5760405162461bcd60e51b815260206004820152601560248201527410d85b9b9bdd081899481a5b9a5d1a585b1a5e9959605a1b6044820152606401610b71565b61174883612738565b611760600080516020613c4283398151915233611c7d565b61176d83604001516128ec565b825180518491601391611787918391602090910190612d2e565b5060208281015180516117a09260018501920190612d2e565b5060408201516002820180546001600160a01b03199081166001600160a01b0393841617909155606084015160038401556080840151600484015560a0840151600584015560c0840151600684015560e090930151600790920180549093169116179055815180518391600b9161181e918391602090910190612d2e565b5060208281015160018301805460ff19169115159190911790556040830151600283015560608301516003830155608083015180516118639260048501920190612d2e565b5060a0820151600582015560c0820151600682015560e090910151600790910180546001600160a01b0319166001600160a01b039092169190911790556080830151600a558015610a99576009805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60006118fd81611c73565b6015546001600160a01b038381169116141561194f5760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903a34329037bbb732b960791b6044820152606401610b71565b610b84826128ec565b6060600b600401805461094990613552565b6001600160a01b03163b151590565b60006001600160e01b031982166380ac58cd60e01b14806119aa57506001600160e01b03198216635b5e139f60e01b145b8061093157506301ffc9a760e01b6001600160e01b0319831614610931565b60006001600160e01b03198216637965db0b60e01b1480610931575063152a902d60e11b6001600160e01b0319831614610931565b6000805482108015610931575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000611a9082611e99565b9050836001600160a01b031681600001516001600160a01b031614611ac75760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611ae55750611ae58533610863565b80611b00575033611af5846109cc565b6001600160a01b0316145b905080611b2057604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611b4757604051633a954ecd60e21b815260040160405180910390fd5b611b5360008487611a29565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611c27576000548214611c2757805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610bd1813361299d565b611c8782826110a8565b610b845760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611cbf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611d0d82826110a8565b15610b845760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80471015611dba5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b71565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e07576040519150601f19603f3d011682016040523d82523d6000602084013e611e0c565b606091505b5050905080610a995760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b71565b600082611e908584612a01565b14949350505050565b604080516060810182526000808252602082018190529181019190915281600054811015611f9a57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611f985780516001600160a01b031615611f2f579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611f93579392505050565b611f2f565b505b604051636f96cda160e11b815260040160405180910390fd5b61271060c08201351115611ffe5760405162461bcd60e51b81526020600482015260126024820152710a4def2c2d8e8d2cae640e8dede40d0d2ced60731b6044820152606401610b71565b600c5460ff161561200c5750565b61201c6040820160208301613a37565b600c5460ff161515901515146120745760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420756e667265657a65206d6574616461746100000000000000006044820152606401610b71565b61207e8180613603565b60405160200161208f929190613a54565b60408051601f19818403018152908290528051602091820120916120b691600b9101613a64565b6040516020818303038152906040528051906020012014610bd15760405162461bcd60e51b815260206004820152601260248201527126b2ba30b230ba309034b990333937bd32b760711b6044820152606401610b71565b6019548111156121535760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610b71565b61215b611046565b8111156121a35760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b6044820152606401610b71565b610b848282612a75565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906121e2903390899088908890600401613a70565b602060405180830381600087803b1580156121fc57600080fd5b505af192505050801561222c575060408051601f3d908101601f1916820190925261222991810190613aad565b60015b612287573d80801561225a576040519150601f19603f3d011682016040523d82523d6000602084013e61225f565b606091505b50805161227f576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816122c95750506040805180820190915260018152600360fc1b602082015290565b8160005b81156122f357806122dd81613aca565b91506122ec9050600a836135d8565b91506122cd565b6000816001600160401b0381111561230d5761230d6131e6565b6040519080825280601f01601f191660200182016040528015612337576020820181803683370190505b5090505b841561229d5761234c6001836135ec565b9150612359600a86613ae5565b612364906030613af9565b60f81b81838151811061237957612379613b11565b60200101906001600160f81b031916908160001a90535061239b600a866135d8565b945061233b565b606060006123b18360026135a3565b6123bc906002613af9565b6001600160401b038111156123d3576123d36131e6565b6040519080825280601f01601f1916602001820160405280156123fd576020820181803683370190505b509050600360fc1b8160008151811061241857612418613b11565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061244757612447613b11565b60200101906001600160f81b031916908160001a905350600061246b8460026135a3565b612476906001613af9565b90505b60018111156124ee576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124aa576124aa613b11565b1a60f81b8282815181106124c0576124c0613b11565b60200101906001600160f81b031916908160001a90535060049490941c936124e781613b27565b9050612479565b50831561253d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b71565b9392505050565b805160609080612564575050604080516020810190915260008152919050565b60006003612573836002613af9565b61257d91906135d8565b6125889060046135a3565b90506000612597826020613af9565b6001600160401b038111156125ae576125ae6131e6565b6040519080825280601f01601f1916602001820160405280156125d8576020820181803683370190505b5090506000604051806060016040528060408152602001613c02604091399050600181016020830160005b86811015612664576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612603565b50600386066001811461267e576002811461268f5761269b565b613d3d60f01b60011983015261269b565b603d60f81b6000198301525b505050918152949350505050565b600954600090610100900460ff16156126f2578160ff1660011480156126ce5750303b155b6126ea5760405162461bcd60e51b8152600401610b7190613b3e565b506000919050565b60095460ff8084169116106127195760405162461bcd60e51b8152600401610b7190613b3e565b506009805460ff191660ff92909216919091179055600190565b919050565b600081606001511161278c5760405162461bcd60e51b815260206004820152601f60248201527f4d6178696d756d20737570706c79206d757374206265206e6f6e2d7a65726f006044820152606401610b71565b60008160c00151116127e05760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320706572206d696e74206d757374206265206e6f6e2d7a65726f6044820152606401610b71565b60e08101516001600160a01b031661283a5760405162461bcd60e51b815260206004820152601f60248201527f547265617375727920616464726573732063616e6e6f74206265206e756c6c006044820152606401610b71565b60408101516001600160a01b03166128945760405162461bcd60e51b815260206004820152601b60248201527f436f6e7472616374206d757374206861766520616e206f776e657200000000006044820152606401610b71565b806060015181608001511115610bd15760405162461bcd60e51b815260206004820152601b60248201527f526573657276652067726561746572207468616e20737570706c7900000000006044820152606401610b71565b6015546001600160a01b0316612910600080516020613c4283398151915282611d03565b61291b600082611d03565b601580546001600160a01b0319166001600160a01b03841617905561294e600080516020613c4283398151915283611c7d565b612959600083611c7d565b816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6129a782826110a8565b610b84576129bf816001600160a01b031660146123a2565b6129ca8360206123a2565b6040516020016129db929190613b8c565b60408051601f198184030181529082905262461bcd60e51b8252610b7191600401612e52565b600081815b8451811015612a6d576000858281518110612a2357612a23613b11565b60200260200101519050808311612a495760008381526020829052604090209250612a5a565b600081815260208490526040902092505b5080612a6581613aca565b915050612a06565b509392505050565b610b84828260405180602001604052806000815250610a9983838360016000546001600160a01b038516612abb57604051622e076360e81b815260040160405180910390fd5b83612ad95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612b8a57506001600160a01b0387163b15155b15612c13575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612bdb60008884806001019550886121ad565b612bf8576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612b90578260005414612c0e57600080fd5b612c59565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612c14575b50600055611c6c565b604051806060016040528060008152602001612cce604051806101000160405280606081526020016060815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b8152602001612d2960405180610100016040528060608152602001600015158152602001600081526020016000815260200160608152602001600080191681526020016000815260200160006001600160a01b031681525090565b905290565b828054612d3a90613552565b90600052602060002090601f016020900481019282612d5c5760008555612da2565b82601f10612d7557805160ff1916838001178555612da2565b82800160010185558215612da2579182015b82811115612da2578251825591602001919060010190612d87565b50612dae929150612db2565b5090565b5b80821115612dae5760008155600101612db3565b6001600160e01b031981168114610bd157600080fd5b600060208284031215612def57600080fd5b813561253d81612dc7565b60005b83811015612e15578181015183820152602001612dfd565b838111156110a25750506000910152565b60008151808452612e3e816020860160208601612dfa565b601f01601f19169290920160200192915050565b60208152600061253d6020830184612e26565b600060208284031215612e7757600080fd5b5035919050565b6001600160a01b0381168114610bd157600080fd5b803561273381612e7e565b60008060408385031215612eb157600080fd5b8235612ebc81612e7e565b946020939093013593505050565b600080600060608486031215612edf57600080fd5b8335612eea81612e7e565b92506020840135612efa81612e7e565b929592945050506040919091013590565b60008060408385031215612f1e57600080fd5b50508035926020909101359150565b60008060408385031215612f4057600080fd5b823591506020830135612f5281612e7e565b809150509250929050565b60008083601f840112612f6f57600080fd5b5081356001600160401b03811115612f8657600080fd5b6020830191508360208260051b8501011115612fa157600080fd5b9250929050565b600080600060408486031215612fbd57600080fd5b8335612fc881612e7e565b925060208401356001600160401b03811115612fe357600080fd5b612fef86828701612f5d565b9497909650939450505050565b6000610100825181855261301282860182612e26565b91505060208301511515602085015260408301516040850152606083015160608501526080830151848203608086015261304c8282612e26565b60a0858101519087015260c0808601519087015260e0948501516001600160a01b03169490950193909352509192915050565b6020815281516020820152600060208301516060604084015280516101008060808601526130b1610180860183612e26565b91506020830151607f198684030160a08701526130ce8382612e26565b92505060018060a01b0360408401511660c0860152606083015160e08601526080830151818601525060a082015161012085015260c082015161014085015260e0820151915061312a6101608501836001600160a01b03169052565b6040850151848203601f190160608601529150610ca98183612ffc565b60006020828403121561315957600080fd5b813561253d81612e7e565b60006020828403121561317657600080fd5b81356001600160401b0381111561318c57600080fd5b8201610100818503121561253d57600080fd5b8015158114610bd157600080fd5b80356127338161319f565b600080604083850312156131cb57600080fd5b82356131d681612e7e565b91506020830135612f528161319f565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b038111828210171561321f5761321f6131e6565b60405290565b60006001600160401b038084111561323f5761323f6131e6565b604051601f8501601f19908116603f01168101908282118183101715613267576132676131e6565b8160405280935085815286868601111561328057600080fd5b858560208301376000602087830101525050509392505050565b600080600080608085870312156132b057600080fd5b84356132bb81612e7e565b935060208501356132cb81612e7e565b92506040850135915060608501356001600160401b038111156132ed57600080fd5b8501601f810187136132fe57600080fd5b61330d87823560208401613225565b91505092959194509250565b60008060006040848603121561332e57600080fd5b8335925060208401356001600160401b03811115612fe357600080fd5b6000806040838503121561335e57600080fd5b823561336981612e7e565b91506020830135612f5281612e7e565b600082601f83011261338a57600080fd5b61253d83833560208501613225565b600061010082840312156133ac57600080fd5b6133b46131fc565b905081356001600160401b03808211156133cd57600080fd5b6133d985838601613379565b83526133e7602085016131ad565b60208401526040840135604084015260608401356060840152608084013591508082111561341457600080fd5b5061342184828501613379565b60808301525060a082013560a082015260c082013560c082015261344760e08301612e93565b60e082015292915050565b6000806040838503121561346557600080fd5b82356001600160401b038082111561347c57600080fd5b90840190610100828703121561349157600080fd5b6134996131fc565b8235828111156134a857600080fd5b6134b488828601613379565b8252506020830135828111156134c957600080fd5b6134d588828601613379565b6020830152506134e760408401612e93565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015261352060e08401612e93565b60e08201529350602085013591508082111561353b57600080fd5b5061354885828601613399565b9150509250929050565b600181811c9082168061356657607f821691505b6020821081141561358757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156135bd576135bd61358d565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135e7576135e76135c2565b500490565b6000828210156135fe576135fe61358d565b500390565b6000808335601e1984360301811261361a57600080fd5b8301803591506001600160401b0382111561363457600080fd5b602001915036819003821315612fa157600080fd5b601f821115610a9957600081815260208120601f850160051c810160208610156136705750805b601f850160051c820191505b8181101561368f5782815560010161367c565b505050505050565b6001600160401b038311156136ae576136ae6131e6565b6136c2836136bc8354613552565b83613649565b6000601f8411600181146136f657600085156136de5750838201355b600019600387901b1c1916600186901b178355611c6c565b600083815260209020601f19861690835b828110156137275786850135825560209485019460019092019101613707565b50868210156137445760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600081356109318161319f565b6000813561093181612e7e565b61377a8283613603565b6001600160401b03811115613791576137916131e6565b6137a58161379f8554613552565b85613649565b6000601f8211600181146137d957600083156137c15750838201355b600019600385901b1c1916600184901b178555613833565b600085815260209020601f19841690835b8281101561380a57868501358255602094850194600190920191016137ea565b50848210156138275760001960f88660031b161c19848701351681555b505060018360011b0185555b5050505061385f61384660208401613756565b6001830160ff1981541660ff8315151681178255505050565b60408201356002820155606082013560038201556138806080830183613603565b61388e818360048601613697565b505060a0820135600582015560c08201356006820155610b846138b360e08401613763565b6007830180546001600160a01b0319166001600160a01b0392909216919091179055565b600081546138e481613552565b600182811680156138fc576001811461390d5761393c565b60ff1984168752828701945061393c565b8560005260208060002060005b858110156139335781548a82015290840190820161391a565b50505082870194505b5050505092915050565b600061395282856138d7565b8351613962818360208801612dfa565b01949350505050565b7f7b2273656c6c65725f6665655f62617369735f706f696e7473223a20000000008152600083516139a381601c850160208801612dfa565b731610113332b2afb932b1b4b834b2b73a111d101160611b601c9184019182015283516139d7816030840160208801612dfa565b61227d60f01b60309290910191820152603201949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613a2a81601d850160208701612dfa565b91909101601d0192915050565b600060208284031215613a4957600080fd5b813561253d8161319f565b8183823760009101908152919050565b600061253d82846138d7565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613aa390830184612e26565b9695505050505050565b600060208284031215613abf57600080fd5b815161253d81612dc7565b6000600019821415613ade57613ade61358d565b5060010190565b600082613af457613af46135c2565b500690565b60008219821115613b0c57613b0c61358d565b500190565b634e487b7160e01b600052603260045260246000fd5b600081613b3657613b3661358d565b506000190190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613bc4816017850160208801612dfa565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613bf5816028840160208801612dfa565b0160280194935050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220e81c0879a232fc10643df52877e0b862099715e336c7a0b28064da6d34f7ccee64736f6c63430008090033496e697469616c697a61626c653a20636f6e747261637420697320616c726561a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000e7d7696c8f11278124f39fb7cdd39fd9442d502600000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000e7d7696c8f11278124f39fb7cdd39fd9442d5026000000000000000000000000000000000000000000000000000000000000000d4e4654436f6c6c656374696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e4654000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000e7d7696c8f11278124f39fb7cdd39fd9442d502600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.