MATIC Price: $1.02 (+0.11%)
Gas: 116 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Set Approval For...416329312023-04-17 11:19:30345 days ago1681730370IN
0x95dd58f8...43ab5eDDa
0 MATIC0.00489054200.41584547
Set Approval For...375820572023-01-02 12:50:16450 days ago1672663816IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0018489539.99477392
Withdraw Fees331384902022-09-15 13:40:54559 days ago1663249254IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0014431443.92871473
Set Approval For...309292152022-07-20 8:12:06617 days ago1658304726IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0016676536.00750065
Transfer From309264592022-07-20 6:30:31617 days ago1658298631IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0022480536.00000002
Set Approval For...308646932022-07-18 15:02:05618 days ago1658156525IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0020633544.55137565
Safe Transfer Fr...308477172022-07-18 4:31:08619 days ago1658118668IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0013039730.05803518
Safe Transfer Fr...308477142022-07-18 4:31:02619 days ago1658118662IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0014482530.05803518
Safe Transfer Fr...308477102022-07-18 4:30:54619 days ago1658118654IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308477072022-07-18 4:30:48619 days ago1658118648IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308477072022-07-18 4:30:48619 days ago1658118648IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308476992022-07-18 4:30:32619 days ago1658118632IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308476952022-07-18 4:30:24619 days ago1658118624IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308476922022-07-18 4:30:18619 days ago1658118618IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308476872022-07-18 4:30:08619 days ago1658118608IN
0x95dd58f8...43ab5eDDa
0 MATIC0.001448530.06322319
Safe Transfer Fr...308476842022-07-18 4:30:02619 days ago1658118602IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0019625830.06322319
Mint294378582022-06-11 13:41:45655 days ago1654954905IN
0x95dd58f8...43ab5eDDa
25 MATIC0.0031760238.47859153
Safe Transfer Fr...291839902022-06-05 5:41:40662 days ago1654407700IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0024078136.88328
Mint291420062022-06-04 5:02:24663 days ago1654318944IN
0x95dd58f8...43ab5eDDa
25 MATIC0.0020312531.03999999
Withdraw Fees291419852022-06-04 5:01:42663 days ago1654318902IN
0x95dd58f8...43ab5eDDa
0 MATIC0.0010305631.36980001
Mint291419012022-06-04 4:58:50663 days ago1654318730IN
0x95dd58f8...43ab5eDDa
25 MATIC0.0019841930.32084398
Mint291415922022-06-04 4:48:12663 days ago1654318092IN
0x95dd58f8...43ab5eDDa
25 MATIC0.001963230.00000001
Mint291414422022-06-04 4:43:04663 days ago1654317784IN
0x95dd58f8...43ab5eDDa
25 MATIC0.001963230.00000017
Mint289548412022-05-30 13:57:29667 days ago1653919049IN
0x95dd58f8...43ab5eDDa
50 MATIC0.0027250230.00000001
Mint289127742022-05-29 12:53:05668 days ago1653828785IN
0x95dd58f8...43ab5eDDa
25 MATIC0.0023062335.24197404
View all transactions

Latest 5 internal transactions

Parent Txn Hash Block From To Value
331384902022-09-15 13:40:54559 days ago1663249254
0x95dd58f8...43ab5eDDa
50 MATIC
291419852022-06-04 5:01:42663 days ago1654318902
0x95dd58f8...43ab5eDDa
150 MATIC
288772782022-05-28 15:48:07669 days ago1653752887
0x95dd58f8...43ab5eDDa
175 MATIC
288194252022-05-27 5:06:55671 days ago1653628015
0x95dd58f8...43ab5eDDa
1,075 MATIC
287525702022-05-25 12:46:07672 days ago1653482767
0x95dd58f8...43ab5eDDa
325 MATIC
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x19Aa68cd...c013d2D28
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
NFTCollectionContract

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : 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 2 of 20 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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, _msgSender());
        _;
    }

    /**
     * @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 `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 3 of 20 : 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 4 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 5 of 20 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./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 payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 6 of 20 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

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.
 *
 * 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 initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // 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, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

    function _isConstructor() private view returns (bool) {
        return !Address.isContract(address(this));
    }
}

File 7 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // 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;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @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 virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_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 {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _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 {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @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`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * 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
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a 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 _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 8 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

    /**
     * @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;
}

File 9 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 10 of 20 : 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 11 of 20 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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)
        external
        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 12 of 20 : 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 13 of 20 : 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 14 of 20 : 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 15 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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.
 */
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 Merklee 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 16 of 20 : 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 17 of 20 : 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 18 of 20 : Base64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @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;

        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 19 of 20 : 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 20 of 20 : NFTCollection.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.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 ERC721, 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;
        /// 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_01_00;

    /// 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 constant ROYALTIES_BASIS = 10000;

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

    /// The number of currently minted tokens
    /// @dev Managed by the contract
    uint256 public totalSupply;

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

    constructor() ERC721("", "") {
        _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);
        _grantRole(ADMIN_ROLE, deploymentConfig.owner);
        _grantRole(DEFAULT_ADMIN_ROLE, deploymentConfig.owner);

        _deploymentConfig = deploymentConfig;
        _runtimeConfig = runtimeConfig;
    }

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

    /// Mint tokens
    function mint(uint256 amount) external payable {
        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
    {
        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) {
        return block.timestamp > _runtimeConfig.publicMintStart;
    }

    /// Check if presale minting is active
    function presaleActive() public view returns (bool) {
        return block.timestamp > _runtimeConfig.presaleMintStart;
    }

    /// 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");

        _revokeRole(ADMIN_ROLE, _deploymentConfig.owner);
        _revokeRole(DEFAULT_ADMIN_ROLE, _deploymentConfig.owner);

        address previousOwner = _deploymentConfig.owner;
        _deploymentConfig.owner = newOwner;

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

        emit OwnershipTransferred(previousOwner, 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 *
     *****************/

    /// 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(
            msg.value >= amount * _deploymentConfig.mintPrice,
            "Payment too small"
        );

        uint256 newSupply = totalSupply + amount;
        require(
            newSupply <= _deploymentConfig.maxSupply,
            "Maximum supply reached"
        );

        // Update totalSupply only once with the total minted amount
        totalSupply = newSupply;
        // Mint the required amount of tokens,
        // starting with the highest token ID
        for (uint256 i = 1; i <= amount; i++) {
            _safeMint(to, totalSupply - i);
        }
    }

    /// 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 the null address"
        );
        require(config.owner != address(0), "Contract must have an owner");
    }

    /// 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"
        );
    }

    /// @dev See {IERC165-supportsInterface}.
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, AccessControl, ERC2981)
        returns (bool)
    {
        return
            ERC721.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": ',
                        _runtimeConfig.royaltiesBps.toString(),
                        ', "fee_recipient": "',
                        uint256(uint160(_runtimeConfig.royaltiesAddress))
                            .toHexString(20),
                        '"}'
                    )
                )
            )
        );

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

        return output;
    }

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

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

    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;
    }
}

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":"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"},{"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":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":"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":[{"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":"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":"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":"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"}]

Deployed Bytecode

0x60806040526004361061027d5760003560e01c806370a082311161014f578063b88d4fde116100c1578063e8a3d4851161007a578063e8a3d48514610740578063e985e9c514610755578063f2fde38b1461079e578063f4ad0f97146107be578063fa0440b6146107d3578063ffa1ad74146107f357600080fd5b8063b88d4fde1461069a578063c5f956af146106ba578063c87b56dd146106d8578063d547741f146106f8578063d5abeb0114610718578063e3e1e8ef1461072d57600080fd5b806391d148541161011357806391d14854146105fd57806395d89b411461061d578063a0712d6814610632578063a217fddf14610645578063a22cb4651461065a578063b5106add1461067a57600080fd5b806370a082311461056857806375b238fc14610588578063877bb1ae146105aa5780638cfec4c0146105ca5780638da5cb5b146105df57600080fd5b806331f9c919116101f357806353135ca0116101ac57806353135ca0146104c55780635a23dd99146104dc5780635a9b0b89146104fc5780636352211e1461051e5780636817c76c1461053e5780636c0360eb1461055357600080fd5b806331f9c9191461042c57806336568abe1461044357806342842e0e146104635780634653124b14610483578063476343ee146104985780634e6f9dd6146104ad57600080fd5b806318160ddd1161024557806318160ddd1461035257806322212e2b1461036857806323b872dd1461037d578063248a9ca31461039d5780632a55205a146103cd5780632f2ff15d1461040c57600080fd5b806301ffc9a71461028257806306fdde03146102b75780630807b9e2146102d9578063081812fc146102f8578063095ea7b314610330575b600080fd5b34801561028e57600080fd5b506102a261029d366004612cd1565b610809565b60405190151581526020015b60405180910390f35b3480156102c357600080fd5b506102cc610844565b6040516102ae9190612d46565b3480156102e557600080fd5b506016545b6040519081526020016102ae565b34801561030457600080fd5b50610318610313366004612d59565b6108d9565b6040516001600160a01b0390911681526020016102ae565b34801561033c57600080fd5b5061035061034b366004612d97565b610973565b005b34801561035e57600080fd5b506102ea60085481565b34801561037457600080fd5b50600e546102ea565b34801561038957600080fd5b50610350610398366004612dc3565b610a89565b3480156103a957600080fd5b506102ea6103b8366004612d59565b60009081526006602052604090206001015490565b3480156103d957600080fd5b506103ed6103e8366004612e04565b610aba565b604080516001600160a01b0390931683526020830191909152016102ae565b34801561041857600080fd5b50610350610427366004612e26565b610af1565b34801561043857600080fd5b50600b5442116102a2565b34801561044f57600080fd5b5061035061045e366004612e26565b610b17565b34801561046f57600080fd5b5061035061047e366004612dc3565b610b95565b34801561048f57600080fd5b50600c546102ea565b3480156104a457600080fd5b50610350610bb0565b3480156104b957600080fd5b50600a5460ff166102a2565b3480156104d157600080fd5b50600c5442116102a2565b3480156104e857600080fd5b506102a26104f7366004612ea1565b610be2565b34801561050857600080fd5b50610511610cc0565b6040516102ae9190612f78565b34801561052a57600080fd5b50610318610539366004612d59565b610fd7565b34801561054a57600080fd5b506015546102ea565b34801561055f57600080fd5b506102cc61104e565b34801561057457600080fd5b506102ea610583366004613029565b611060565b34801561059457600080fd5b506102ea600080516020613b9183398151915281565b3480156105b657600080fd5b506103506105c5366004613046565b6110e7565b3480156105d657600080fd5b50600b546102ea565b3480156105eb57600080fd5b506013546001600160a01b0316610318565b34801561060957600080fd5b506102a2610618366004612e26565b61111c565b34801561062957600080fd5b506102cc611147565b610350610640366004612d59565b611159565b34801561065157600080fd5b506102ea600081565b34801561066657600080fd5b5061035061067536600461309a565b6111b4565b34801561068657600080fd5b50610350610695366004613029565b6111bf565b3480156106a657600080fd5b506103506106b536600461319e565b6112b3565b3480156106c657600080fd5b506017546001600160a01b0316610318565b3480156106e457600080fd5b506102cc6106f3366004612d59565b6112e5565b34801561070457600080fd5b50610350610713366004612e26565b61141d565b34801561072457600080fd5b506014546102ea565b61035061073b36600461321d565b611443565b34801561074c57600080fd5b506102cc61150f565b34801561076157600080fd5b506102a261077036600461324f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156107aa57600080fd5b506103506107b9366004613029565b61158c565b3480156107ca57600080fd5b506102cc6116be565b3480156107df57600080fd5b506103506107ee366004613356565b6116d0565b3480156107ff57600080fd5b506102ea61277481565b60006108148261195b565b806108235750610823826119ab565b8061083e575063152a902d60e11b6001600160e01b03198316145b92915050565b6060601160000180546108569061344b565b80601f01602080910402602001604051908101604052809291908181526020018280546108829061344b565b80156108cf5780601f106108a4576101008083540402835291602001916108cf565b820191906000526020600020905b8154815290600101906020018083116108b257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109575760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061097e82610fd7565b9050806001600160a01b0316836001600160a01b031614156109ec5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161094e565b336001600160a01b0382161480610a085750610a088133610770565b610a7a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161094e565b610a8483836119e0565b505050565b610a933382611a4e565b610aaf5760405162461bcd60e51b815260040161094e90613486565b610a84838383611b45565b601054600f546001600160a01b039091169060009061271090610ade9085906134ed565b610ae89190613522565b90509250929050565b600082815260066020526040902060010154610b0d8133611ce1565b610a848383611d45565b6001600160a01b0381163314610b875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161094e565b610b918282611dcb565b5050565b610a84838383604051806020016040528060008152506112b3565b600080516020613b91833981519152610bc98133611ce1565b601754610bdf906001600160a01b031647611e32565b50565b6001600160a01b03831660009081526019602052604081205460ff1615610c3c5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b604482015260640161094e565b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050610cb784848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050611f4b565b95945050505050565b610cc8612b5e565b61277481526040805160e081019091526011805482908290610ce99061344b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d159061344b565b8015610d625780601f10610d3757610100808354040283529160200191610d62565b820191906000526020600020905b815481529060010190602001808311610d4557829003601f168201915b50505050508152602001600182018054610d7b9061344b565b80601f0160208091040260200160405190810160405280929190818152602001828054610da79061344b565b8015610df45780601f10610dc957610100808354040283529160200191610df4565b820191906000526020600020905b815481529060010190602001808311610dd757829003601f168201915b505050918352505060028201546001600160a01b039081166020808401919091526003840154604080850191909152600485015460608501526005850154608085015260069094015490911660a090920191909152830191909152805161010081019091526009805482908290610e6a9061344b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e969061344b565b8015610ee35780601f10610eb857610100808354040283529160200191610ee3565b820191906000526020600020905b815481529060010190602001808311610ec657829003601f168201915b5050509183525050600182015460ff16151560208201526002820154604082015260038201546060820152600482018054608090920191610f239061344b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4f9061344b565b8015610f9c5780601f10610f7157610100808354040283529160200191610f9c565b820191906000526020600020905b815481529060010190602001808311610f7f57829003601f168201915b50505091835250506005820154602082015260068201546040808301919091526007909201546001600160a01b031660609091015282015290565b6000818152600260205260408120546001600160a01b03168061083e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161094e565b6060600960000180546108569061344b565b60006001600160a01b0382166110cb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161094e565b506001600160a01b031660009081526003602052604090205490565b600080516020613b918339815191526111008133611ce1565b61110982611f61565b81600961111682826136a4565b50505050565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060601160010180546108569061344b565b600b5442116111aa5760405162461bcd60e51b815260206004820152601b60248201527f4d696e74696e6720686173206e6f742073746172746564207965740000000000604482015260640161094e565b610bdf33826120bc565b610b913383836121e7565b600080516020613b918339815191526111d88133611ce1565b6111f0600080516020613b918339815191528361111c565b156112305760405162461bcd60e51b815260206004820152601060248201526f20b63932b0b23c9030b71030b236b4b760811b604482015260640161094e565b6013546001600160a01b03163314156112835760405162461bcd60e51b81526020600482015260156024820152740557365207472616e736665724f776e65727368697605c1b604482015260640161094e565b61129b600080516020613b9183398151915233611dcb565b610b91600080516020613b9183398151915283611d45565b6112bd3383611a4e565b6112d95760405162461bcd60e51b815260040161094e90613486565b611116848484846122b6565b6000818152600260205260409020546060906001600160a01b03166113435760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161094e565b6000600960000180546113559061344b565b9050116113ec57600d80546113699061344b565b80601f01602080910402602001604051908101604052809291908181526020018280546113959061344b565b80156113e25780601f106113b7576101008083540402835291602001916113e2565b820191906000526020600020905b8154815290600101906020018083116113c557829003601f168201915b505050505061083e565b60096113f7836122e9565b60405160200161140892919061387a565b60405160208183030381529060405292915050565b6000828152600660205260409020600101546114398133611ce1565b610a848383611dcb565b600c5442116114945760405162461bcd60e51b815260206004820152601b60248201527f50726573616c6520686173206e6f742073746172746564207965740000000000604482015260640161094e565b61149f338383610be2565b6114eb5760405162461bcd60e51b815260206004820152601b60248201527f4e6f742077686974656c697374656420666f722070726573616c650000000000604482015260640161094e565b336000818152601960205260409020805460ff19166001179055610a8490846120bc565b606060006115606115246009600601546122e9565b60105461153b906001600160a01b031660146123e6565b60405160200161154c92919061389f565b604051602081830303815290604052612588565b90506000816040516020016115759190613926565b60408051601f198184030181529190529392505050565b60006115988133611ce1565b6013546001600160a01b03838116911614156115ea5760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903a34329037bbb732b960791b604482015260640161094e565b60135461160f90600080516020613b91833981519152906001600160a01b0316611dcb565b601354611627906000906001600160a01b0316611dcb565b601380546001600160a01b038481166001600160a01b031983168117909355169061166190600080516020613b9183398151915290611d45565b601354611679906000906001600160a01b0316611d45565b826001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6060600960040180546108569061344b565b600754610100900460ff166116eb5760075460ff16156116ef565b303b155b6117525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161094e565b600754610100900460ff16158015611774576007805461ffff19166101011790555b60185460ff16156117bf5760405162461bcd60e51b815260206004820152601560248201527410d85b9b9bdd081899481a5b9a5d1a585b1a5e9959605a1b604482015260640161094e565b6117c8836126ed565b6117e0600080516020613b9183398151915233611d45565b6117fc600080516020613b918339815191528460400151611d45565b61180d6000801b8460400151611d45565b825180518491601191611827918391602090910190612c22565b5060208281015180516118409260018501920190612c22565b5060408201516002820180546001600160a01b03199081166001600160a01b0393841617909155606084015160038401556080840151600484015560a0840151600584015560c0909301516006909201805490931691161790558151805183916009916118b4918391602090910190612c22565b5060208281015160018301805460ff19169115159190911790556040830151600283015560608301516003830155608083015180516118f99260048501920190612c22565b5060a0820151600582015560c0820151600682015560e090910151600790910180546001600160a01b0319166001600160a01b039092169190911790558015610a84576007805461ff0019169055505050565b6001600160a01b03163b151590565b60006001600160e01b031982166380ac58cd60e01b148061198c57506001600160e01b03198216635b5e139f60e01b145b8061083e57506301ffc9a760e01b6001600160e01b031983161461083e565b60006001600160e01b03198216637965db0b60e01b148061083e575063152a902d60e11b6001600160e01b031983161461083e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a1582610fd7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611ac75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161094e565b6000611ad283610fd7565b9050806001600160a01b0316846001600160a01b03161480611b0d5750836001600160a01b0316611b02846108d9565b6001600160a01b0316145b80611b3d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611b5882610fd7565b6001600160a01b031614611bbc5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161094e565b6001600160a01b038216611c1e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161094e565b611c296000826119e0565b6001600160a01b0383166000908152600360205260408120805460019290611c5290849061396b565b90915550506001600160a01b0382166000908152600360205260408120805460019290611c80908490613982565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611ceb828261111c565b610b9157611d03816001600160a01b031660146123e6565b611d0e8360206123e6565b604051602001611d1f92919061399a565b60408051601f198184030181529082905262461bcd60e51b825261094e91600401612d46565b611d4f828261111c565b610b915760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611d873390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611dd5828261111c565b15610b915760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80471015611e825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161094e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611ecf576040519150601f19603f3d011682016040523d82523d6000602084013e611ed4565b606091505b5050905080610a845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161094e565b600082611f58858461285d565b14949350505050565b61271060c08201351115611fac5760405162461bcd60e51b81526020600482015260126024820152710a4def2c2d8e8d2cae640e8dede40d0d2ced60731b604482015260640161094e565b600a5460ff1615611fba5750565b611fca6040820160208301613a0f565b600a5460ff161515901515146120225760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420756e667265657a65206d657461646174610000000000000000604482015260640161094e565b61202c8180613536565b60405160200161203d929190613a2c565b60408051601f19818403018152908290528051602091820120916120649160099101613a3c565b6040516020818303038152906040528051906020012014610bdf5760405162461bcd60e51b815260206004820152601260248201527126b2ba30b230ba309034b990333937bd32b760711b604482015260640161094e565b6016548111156121015760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b604482015260640161094e565b60155461210e90826134ed565b3410156121515760405162461bcd60e51b815260206004820152601160248201527014185e5b595b9d081d1bdbc81cdb585b1b607a1b604482015260640161094e565b6000816008546121619190613982565b6014549091508111156121af5760405162461bcd60e51b815260206004820152601660248201527513585e1a5b5d5b481cdd5c1c1b1e481c995858da195960521b604482015260640161094e565b600881905560015b828111611116576121d584826008546121d0919061396b565b6128d1565b806121df81613a48565b9150506121b7565b816001600160a01b0316836001600160a01b031614156122495760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161094e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6122c1848484611b45565b6122cd848484846128eb565b6111165760405162461bcd60e51b815260040161094e90613a63565b60608161230d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612337578061232181613a48565b91506123309050600a83613522565b9150612311565b6000816001600160401b03811115612351576123516130c8565b6040519080825280601f01601f19166020018201604052801561237b576020820181803683370190505b5090505b8415611b3d5761239060018361396b565b915061239d600a86613ab5565b6123a8906030613982565b60f81b8183815181106123bd576123bd613ac9565b60200101906001600160f81b031916908160001a9053506123df600a86613522565b945061237f565b606060006123f58360026134ed565b612400906002613982565b6001600160401b03811115612417576124176130c8565b6040519080825280601f01601f191660200182016040528015612441576020820181803683370190505b509050600360fc1b8160008151811061245c5761245c613ac9565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061248b5761248b613ac9565b60200101906001600160f81b031916908160001a90535060006124af8460026134ed565b6124ba906001613982565b90505b6001811115612532576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124ee576124ee613ac9565b1a60f81b82828151811061250457612504613ac9565b60200101906001600160f81b031916908160001a90535060049490941c9361252b81613adf565b90506124bd565b5083156125815760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161094e565b9392505050565b8051606090806125a8575050604080516020810190915260008152919050565b600060036125b7836002613982565b6125c19190613522565b6125cc9060046134ed565b905060006125db826020613982565b6001600160401b038111156125f2576125f26130c8565b6040519080825280601f01601f19166020018201604052801561261c576020820181803683370190505b5090506000604051806060016040528060408152602001613b51604091399050600181016020830160005b868110156126a8576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612647565b5060038606600181146126c257600281146126d3576126df565b613d3d60f01b6001198301526126df565b603d60f81b6000198301525b505050918152949350505050565b60008160600151116127415760405162461bcd60e51b815260206004820152601f60248201527f4d6178696d756d20737570706c79206d757374206265206e6f6e2d7a65726f00604482015260640161094e565b60008160a00151116127955760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320706572206d696e74206d757374206265206e6f6e2d7a65726f604482015260640161094e565b60c08101516001600160a01b03166128035760405162461bcd60e51b815260206004820152602b60248201527f547265617375727920616464726573732063616e6e6f7420626520746865206e60448201526a756c6c206164647265737360a81b606482015260840161094e565b60408101516001600160a01b0316610bdf5760405162461bcd60e51b815260206004820152601b60248201527f436f6e7472616374206d757374206861766520616e206f776e65720000000000604482015260640161094e565b600081815b84518110156128c957600085828151811061287f5761287f613ac9565b602002602001015190508083116128a557600083815260208290526040902092506128b6565b600081815260208490526040902092505b50806128c181613a48565b915050612862565b509392505050565b610b918282604051806020016040528060008152506129e9565b60006001600160a01b0384163b156129de57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061292f903390899088908890600401613af6565b6020604051808303816000875af192505050801561296a575060408051601f3d908101601f1916820190925261296791810190613b33565b60015b6129c4573d808015612998576040519150601f19603f3d011682016040523d82523d6000602084013e61299d565b606091505b5080516129bc5760405162461bcd60e51b815260040161094e90613a63565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b3d565b506001949350505050565b6129f38383612a1c565b612a0060008484846128eb565b610a845760405162461bcd60e51b815260040161094e90613a63565b6001600160a01b038216612a725760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161094e565b6000818152600260205260409020546001600160a01b031615612ad75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161094e565b6001600160a01b0382166000908152600360205260408120805460019290612b00908490613982565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b604051806060016040528060008152602001612bc26040518060e00160405280606081526020016060815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b8152602001612c1d60405180610100016040528060608152602001600015158152602001600081526020016000815260200160608152602001600080191681526020016000815260200160006001600160a01b031681525090565b905290565b828054612c2e9061344b565b90600052602060002090601f016020900481019282612c505760008555612c96565b82601f10612c6957805160ff1916838001178555612c96565b82800160010185558215612c96579182015b82811115612c96578251825591602001919060010190612c7b565b50612ca2929150612ca6565b5090565b5b80821115612ca25760008155600101612ca7565b6001600160e01b031981168114610bdf57600080fd5b600060208284031215612ce357600080fd5b813561258181612cbb565b60005b83811015612d09578181015183820152602001612cf1565b838111156111165750506000910152565b60008151808452612d32816020860160208601612cee565b601f01601f19169290920160200192915050565b6020815260006125816020830184612d1a565b600060208284031215612d6b57600080fd5b5035919050565b6001600160a01b0381168114610bdf57600080fd5b8035612d9281612d72565b919050565b60008060408385031215612daa57600080fd5b8235612db581612d72565b946020939093013593505050565b600080600060608486031215612dd857600080fd5b8335612de381612d72565b92506020840135612df381612d72565b929592945050506040919091013590565b60008060408385031215612e1757600080fd5b50508035926020909101359150565b60008060408385031215612e3957600080fd5b823591506020830135612e4b81612d72565b809150509250929050565b60008083601f840112612e6857600080fd5b5081356001600160401b03811115612e7f57600080fd5b6020830191508360208260051b8501011115612e9a57600080fd5b9250929050565b600080600060408486031215612eb657600080fd5b8335612ec181612d72565b925060208401356001600160401b03811115612edc57600080fd5b612ee886828701612e56565b9497909650939450505050565b60006101008251818552612f0b82860182612d1a565b915050602083015115156020850152604083015160408501526060830151606085015260808301518482036080860152612f458282612d1a565b60a0858101519087015260c0808601519087015260e0948501516001600160a01b03169490950193909352509192915050565b60208152815160208201526000602083015160606040840152805160e06080850152612fa8610160850182612d1a565b90506020820151607f198583030160a0860152612fc58282612d1a565b6040848101516001600160a01b0390811660c08981019190915260608088015160e08b015260808801516101008b015260a08801516101208b015296015116610140880152870151868203601f1901948701949094529150610cb790508183612ef5565b60006020828403121561303b57600080fd5b813561258181612d72565b60006020828403121561305857600080fd5b81356001600160401b0381111561306e57600080fd5b8201610100818503121561258157600080fd5b8015158114610bdf57600080fd5b8035612d9281613081565b600080604083850312156130ad57600080fd5b82356130b881612d72565b91506020830135612e4b81613081565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715613101576131016130c8565b60405290565b60405160e081016001600160401b0381118282101715613101576131016130c8565b60006001600160401b0380841115613143576131436130c8565b604051601f8501601f19908116603f0116810190828211818310171561316b5761316b6130c8565b8160405280935085815286868601111561318457600080fd5b858560208301376000602087830101525050509392505050565b600080600080608085870312156131b457600080fd5b84356131bf81612d72565b935060208501356131cf81612d72565b92506040850135915060608501356001600160401b038111156131f157600080fd5b8501601f8101871361320257600080fd5b61321187823560208401613129565b91505092959194509250565b60008060006040848603121561323257600080fd5b8335925060208401356001600160401b03811115612edc57600080fd5b6000806040838503121561326257600080fd5b823561326d81612d72565b91506020830135612e4b81612d72565b600082601f83011261328e57600080fd5b61258183833560208501613129565b600061010082840312156132b057600080fd5b6132b86130de565b905081356001600160401b03808211156132d157600080fd5b6132dd8583860161327d565b83526132eb6020850161308f565b60208401526040840135604084015260608401356060840152608084013591508082111561331857600080fd5b506133258482850161327d565b60808301525060a082013560a082015260c082013560c082015261334b60e08301612d87565b60e082015292915050565b6000806040838503121561336957600080fd5b82356001600160401b038082111561338057600080fd5b9084019060e0828703121561339457600080fd5b61339c613107565b8235828111156133ab57600080fd5b6133b78882860161327d565b8252506020830135828111156133cc57600080fd5b6133d88882860161327d565b6020830152506133ea60408401612d87565b6040820152606083013560608201526080830135608082015260a083013560a082015261341960c08401612d87565b60c08201529350602085013591508082111561343457600080fd5b506134418582860161329d565b9150509250929050565b600181811c9082168061345f57607f821691505b6020821081141561348057634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613507576135076134d7565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135315761353161350c565b500490565b6000808335601e1984360301811261354d57600080fd5b8301803591506001600160401b0382111561356757600080fd5b602001915036819003821315612e9a57600080fd5b601f821115610a8457600081815260208120601f850160051c810160208610156135a35750805b601f850160051c820191505b818110156135c2578281556001016135af565b505050505050565b6001600160401b038311156135e1576135e16130c8565b6135f5836135ef835461344b565b8361357c565b6000601f84116001811461362957600085156136115750838201355b600019600387901b1c1916600186901b178355613683565b600083815260209020601f19861690835b8281101561365a578685013582556020948501946001909201910161363a565b50868210156136775760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000813561083e81613081565b6000813561083e81612d72565b6136ae8283613536565b6001600160401b038111156136c5576136c56130c8565b6136d9816136d3855461344b565b8561357c565b6000601f82116001811461370d57600083156136f55750838201355b600019600385901b1c1916600184901b178555613767565b600085815260209020601f19841690835b8281101561373e578685013582556020948501946001909201910161371e565b508482101561375b5760001960f88660031b161c19848701351681555b505060018360011b0185555b5050505061379361377a6020840161368a565b6001830160ff1981541660ff8315151681178255505050565b60408201356002820155606082013560038201556137b46080830183613536565b6137c28183600486016135ca565b505060a0820135600582015560c08201356006820155610b916137e760e08401613697565b6007830180546001600160a01b0319166001600160a01b0392909216919091179055565b600081546138188161344b565b60018281168015613830576001811461384157613870565b60ff19841687528287019450613870565b8560005260208060002060005b858110156138675781548a82015290840190820161384e565b50505082870194505b5050505092915050565b6000613886828561380b565b8351613896818360208801612cee565b01949350505050565b7f7b2273656c6c65725f6665655f62617369735f706f696e7473223a20000000008152600083516138d781601c850160208801612cee565b731610113332b2afb932b1b4b834b2b73a111d101160611b601c91840191820152835161390b816030840160208801612cee565b61227d60f01b60309290910191820152603201949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161395e81601d850160208701612cee565b91909101601d0192915050565b60008282101561397d5761397d6134d7565b500390565b60008219821115613995576139956134d7565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516139d2816017850160208801612cee565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613a03816028840160208801612cee565b01602801949350505050565b600060208284031215613a2157600080fd5b813561258181613081565b8183823760009101908152919050565b6000612581828461380b565b6000600019821415613a5c57613a5c6134d7565b5060010190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613ac457613ac461350c565b500690565b634e487b7160e01b600052603260045260246000fd5b600081613aee57613aee6134d7565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b2990830184612d1a565b9695505050505050565b600060208284031215613b4557600080fd5b815161258181612cbb56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a26469706673582212202e87d85bd9df02566ad03b421d7d5f548b207d8e3c5ff8be1686a93c03b67ac164736f6c634300080b0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.