ETH Price: $2,601.89 (+0.37%)

Token

Holey People (HOLEY)
 

Overview

Max Total Supply

91 HOLEY

Holders

44

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
2 HOLEY
0xDc0a486eFaA04E033da5EBD6f5CaF3D924f3a159
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HoleyPeople

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion, MIT license
File 1 of 22 : HoleyPeople.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.6;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/INOwnerResolver.sol";
import "./interfaces/IN.sol";
import "./ERC2981ContractWideRoyalties.sol";

/**
 * @title Holey People
 * @author zhark; Art by Daniel Leighton
 */

contract HoleyPeople is ERC721Enumerable, ReentrancyGuard, AccessControl, ERC2981ContractWideRoyalties {
    uint256 private _tokenId;
    bytes32 public root;
    address private _owner;

    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");

    bool public nHolderSaleActive;
    bool public presaleListSaleActive;
    bool public publicSaleActive;
    bool public isSalePaused;

    uint256 public constant MAX_SUPPLY = 8888;

    uint256 public tempSaleLimit = 1111;

    uint256 public nHolderMintLimit = 2;
    uint256 public presaleListMintLimit = 5;
    uint256 public publicMintLimit = 10;

    uint256 public nHolderPrice = 0.03499 ether;
    uint256 public presaleListPrice = 0.03999 ether;
    uint256 public publicPrice = 0.06999 ether;

    IN public immutable n;
    INOwnerResolver public immutable nOwnerResolver;

    constructor(
        address _nContractAddress,
        address nOwnersRegistry,
        bytes32 merkleroot
    ) ERC721("Holey People", "HOLEY") {
        _setupRole(ADMIN_ROLE, msg.sender);
        _setupRole(ADMIN_ROLE, 0xB7D2EFED6D2B0F080e3B96D10f6259B8A958E88e);
        _setupRole(ADMIN_ROLE, 0x84b30ec1EE3e8905279C7aDF1e944BCA3dE3603B); 
        _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);
        _owner = msg.sender;
        baseTokenURI = "";
        metadataExtension = ".json";
        n = IN(_nContractAddress);
        nOwnerResolver = INOwnerResolver(nOwnersRegistry);
        root = merkleroot;
    }

    modifier onlyAdmin() {
        require(hasRole(ADMIN_ROLE, msg.sender), "HoleyPeople:ACCESS_DENIED");
        _;
    }

    /** Royalties **/
     function setRoyalties(address recipient, uint256 value) public onlyAdmin {
        _setRoyalties(recipient, value);
    }

    /** OpenSea Owner Hack */

    function owner() external view returns (address) {
        return _owner;
    }

    function transferOwner(address newOwner) public onlyAdmin {
        _owner = newOwner;
    }

    /** Dev Functions **/

    function setMerkleRoot(bytes32 _merkleRoot) public onlyAdmin {
        root = _merkleRoot;
    }

    function devMint(address addr, uint256 amount) public onlyAdmin {
        require(_tokenId + amount <= MAX_SUPPLY, "HoleyPeople:MAX_SUPPLY_REACHED");
        for (uint256 i = 0; i < amount; i++) {
            _tokenId++;
            _safeMint(addr, _tokenId);
        }
    }

    /** Set States **/

    // Sale States

    function setnHolderSaleState(bool _nHolderSaleState) public onlyAdmin {
        nHolderSaleActive = _nHolderSaleState;
    }

    function setpresaleListSaleState(bool presaleListSaleState) public onlyAdmin {
        presaleListSaleActive = presaleListSaleState;
    }

    function setPublicSaleState(bool _publicSaleActiveState) public onlyAdmin {
        publicSaleActive = _publicSaleActiveState;
    }

    function setSalePausedState(bool _salePausedState) public onlyAdmin {
        isSalePaused = _salePausedState;
    }

    // Sale Price

    function setnHolderSalePrice(uint256 _nHolderSalePrice) public onlyAdmin {
        nHolderPrice = _nHolderSalePrice;
    }

    function setpresaleListSalePrice(uint256 presaleSalePrice) public onlyAdmin {
        presaleListPrice = presaleSalePrice;
    }

    function setPublicSalePrice(uint256 _publicSalePrice) public onlyAdmin {
        publicPrice = _publicSalePrice;
    }

    // Mint Limits

    function setnHolderMintLimit(uint256 _nHolderMintLimit) public onlyAdmin {
        nHolderMintLimit = _nHolderMintLimit;
    }

    function setpresaleListMintLimit(uint256 _presaleMintLimit) public onlyAdmin {
        presaleListMintLimit = _presaleMintLimit;
    }
    
    function setPublicMintLimit(uint256 _publicMintLimit) public onlyAdmin {
        publicMintLimit = _publicMintLimit;
    }

    // Sale Limits

    function setTempSaleLimit(uint256 _tempSaleLimit) public onlyAdmin {
        tempSaleLimit = _tempSaleLimit;
    }

    /** Internal **/

    function _ispresaleListSaleActive() internal view returns (bool) {
        return presaleListSaleActive && !isSalePaused;
    }

    function _isnHolderSaleActive() internal view returns (bool) {
        return nHolderSaleActive && !isSalePaused;
    }

    function _isPublicSaleActive() internal view returns (bool) {
        return publicSaleActive && !isSalePaused;
    }

    /**
     * @notice Calculate the total available number of mints
     * @return total mint available
     */
    function totalMintsAvailable() public view returns (uint256) {
        return tempSaleLimit - _tokenId;
    }

    /** MINTING **/
    
    function mint(uint8 amount) public payable virtual nonReentrant {
        bool canNMint = (_isPublicSaleActive() || (_isnHolderSaleActive() && nOwnerResolver.balanceOf(msg.sender) > 0));
        uint256 price = _isPublicSaleActive() ? publicPrice : nHolderPrice;
        uint256 mintLimit = _isPublicSaleActive() ? publicMintLimit: nHolderMintLimit;
        require((_isPublicSaleActive() || _isnHolderSaleActive()), "HoleyPeople:USER_NOT_ALLOWED_TO_MINT");
        require(canNMint, "HoleyPeople:USER_DOES_NOT_OWN_N");
        require(amount <= totalMintsAvailable(), "HoleyPeople:MAX_ALLOCATION_REACHED");
        require(balanceOf(msg.sender) + amount <= mintLimit, "HoleyPeople:MINT_ABOVE_MAX_MINT_ALLOWANCE");

        require(msg.value == price * amount, "NPass:INVALID_PRICE");

        for (uint256 i = 0; i < amount; i++) {
            _tokenId++;
            _safeMint(msg.sender, _tokenId);
        }
    }

    function mintpresaleList(bytes32[] calldata proof, uint8 amount)
    external payable nonReentrant
    {
        require(balanceOf(msg.sender) + amount <= presaleListMintLimit,"HoleyPeople:MINT_ABOVE_MAX_MINT_ALLOWANCE");
        require(_ispresaleListSaleActive(), "HoleyPeople:USER_NOT_ALLOWED_TO_MINT");
        require(amount <= totalMintsAvailable(), "HoleyPeople:MAX_ALLOCATION_REACHED");
        require(_verify(_leaf(msg.sender), proof), "HoleyPeople:Invalid merkle proof");
        require(msg.value == presaleListPrice * amount, "HoleyPeople:INVALID_PRICE");

        for (uint256 i = 0; i < amount; i++) {
            _tokenId++;
            _safeMint(msg.sender, _tokenId);
        }
    }

    function _leaf(address account)
    internal pure returns (bytes32)
    {
        return keccak256(abi.encodePacked(account));
    }

    function _verify(bytes32 leaf, bytes32[] memory proof)
    public view returns (bool)
    {
        return MerkleProof.verify(proof, root, leaf);
    }

    /** URI HANDLING **/

    string public baseTokenURI;
    string public metadataExtension;

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        return string(abi.encodePacked(super.tokenURI(tokenId), metadataExtension));
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    function setBaseTokenURIAndExtension(string calldata baseTokenUri_, string calldata metadataExtension_)
        external
        onlyAdmin
    {
        baseTokenURI = baseTokenUri_;
        metadataExtension = metadataExtension_;
    }

    /** PAYOUT **/

    address private constant devAddress = 0xB6fE450D565F99066D44692Ede257cD179a0C846;
    address private constant artistAddress1 = 0xFe5F90756BF715B55774E18EC4EE26424e56c3B9;
    address private constant artistAddress2 = 0x8DFdD0FF4661abd44B06b1204C6334eACc8575af;
    uint256 private devfee = 0 ether;

    function withdraw() public onlyAdmin nonReentrant {
        uint256 balance = address(this).balance;

        if (devfee >= 2 ether) {
            payable(artistAddress1).transfer(address(this).balance * 875 / 1000);
            payable(artistAddress2).transfer(address(this).balance);
        } else if(devfee + balance/2 > 2 ether) { 
            payable(devAddress).transfer(2 ether - devfee); 
            devfee = 2 ether;
            payable(artistAddress1).transfer(address(this).balance * 875 / 1000);
            payable(artistAddress2).transfer(address(this).balance);
        } else {
            payable(devAddress).transfer(balance/2);
            devfee = devfee + balance/2;
            payable(artistAddress1).transfer(address(this).balance * 875 / 1000);
            payable(artistAddress2).transfer(address(this).balance);
        }
    }

    bool private devLock = false;

    function unlock(bool _lockState) public {
        require(msg.sender == 0xB6fE450D565F99066D44692Ede257cD179a0C846, "HoleyPeople:NOT_DEV");
        devLock = _lockState;
    }

    function altWithdraw() public onlyAdmin {
        require(devLock, "HoleyPeople: locked");
        payable(artistAddress1).transfer(address(this).balance * 875 / 1000);
        payable(artistAddress2).transfer(address(this).balance);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Enumerable, AccessControl, ERC2981Base)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

File 2 of 22 : AccessControl.sol
// SPDX-License-Identifier: MIT

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 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 {
        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 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 granted `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}.
     * ====
     */
    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);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 22 : IAccessControl.sol
// SPDX-License-Identifier: MIT

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 22 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 22 : ERC721.sol
// SPDX-License-Identifier: MIT

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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

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

File 7 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT

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 8 of 22 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 9 of 22 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 10 of 22 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 11 of 22 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 12 of 22 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 22 : Context.sol
// SPDX-License-Identifier: MIT

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 22 : Strings.sol
// SPDX-License-Identifier: MIT

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 22 : MerkleProof.sol
// SPDX-License-Identifier: MIT

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) {
        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 = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 16 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT

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 22 : IERC165.sol
// SPDX-License-Identifier: MIT

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 22 : ERC2981Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

import "./interfaces/IERC2981Royalties.sol";

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981Base is ERC165, IERC2981Royalties {
    struct RoyaltyInfo {
        address recipient;
        uint24 amount;
    }

    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Royalties).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 19 of 22 : ERC2981ContractWideRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

import "./ERC2981Base.sol";

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
/// @dev This implementation has the same royalties for each and every tokens
abstract contract ERC2981ContractWideRoyalties is ERC2981Base {
    RoyaltyInfo private _royalties;

    /// @dev Sets token royalties
    /// @param recipient recipient of the royalties
    /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
    function _setRoyalties(address recipient, uint256 value) internal {
        require(value <= 10000, "ERC2981Royalties: Too high");
        _royalties = RoyaltyInfo(recipient, uint24(value));
    }

    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256 value)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        RoyaltyInfo memory royalties = _royalties;
        receiver = royalties.recipient;
        royaltyAmount = (value * royalties.amount) / 10000;
    }
}

File 20 of 22 : IERC2981Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

/// @title IERC2981Royalties
/// @dev Interface for the ERC2981 - Token Royalty standard
interface IERC2981Royalties {
    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _value - the sale price of the NFT asset specified by _tokenId
    /// @return _receiver - address of who should be sent the royalty payment
    /// @return _royaltyAmount - the royalty payment amount for value sale price
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        returns (address _receiver, uint256 _royaltyAmount);
}

File 21 of 22 : IN.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";

interface IN is IERC721Enumerable, IERC721Metadata {
    function getFirst(uint256 tokenId) external view returns (uint256);

    function getSecond(uint256 tokenId) external view returns (uint256);

    function getThird(uint256 tokenId) external view returns (uint256);

    function getFourth(uint256 tokenId) external view returns (uint256);

    function getFifth(uint256 tokenId) external view returns (uint256);

    function getSixth(uint256 tokenId) external view returns (uint256);

    function getSeventh(uint256 tokenId) external view returns (uint256);

    function getEight(uint256 tokenId) external view returns (uint256);
}

File 22 of 22 : INOwnerResolver.sol
// SPDX-License-Identifier: MIT
/**
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(     (@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@           @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(   @@@@@@@@@@@@@@@@@@@@(            @@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@         @@@@@@@@@@@@@@@             @@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@           @@@@@@@@@@@(            @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@      @@@@@@@@@@@@             @@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@(            @@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@     @@@@@@@     @@@@@@@             @@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@(         @@(         @@(            @@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@          @@          @@           @@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@     @@@@@@@     @@@@@@@     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(     @@@@@@@     @@@@@@@     @@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@           @           @           @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@(            @@@         @@@         @@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@             @@@@@@@     @@@@@@@     @@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@(            @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@             @@@@@@@@@@@       @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@(            @@@@@@@@@@@@           @@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@             @@@@@@@@@@@@@@@         @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@(            @@@@@@@@@@@@@@@@@@@@@   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@           @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@(     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 */
pragma solidity 0.8.6;

interface INOwnerResolver {
    function ownerOf(uint256 nid) external view returns (address);

    function balanceOf(address account) external view returns (uint256);

    function nOwned(address owner) external view returns (uint256[] memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nContractAddress","type":"address"},{"internalType":"address","name":"nOwnersRegistry","type":"address"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"}],"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":"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":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leaf","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"_verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"altWithdraw","outputs":[],"stateMutability":"nonpayable","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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"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":[],"name":"isSalePaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"mintpresaleList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"n","outputs":[{"internalType":"contract IN","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nHolderMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nHolderPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nHolderSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nOwnerResolver","outputs":[{"internalType":"contract INOwnerResolver","name":"","type":"address"}],"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":"presaleListMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleListPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleListSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","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":"string","name":"baseTokenUri_","type":"string"},{"internalType":"string","name":"metadataExtension_","type":"string"}],"name":"setBaseTokenURIAndExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicMintLimit","type":"uint256"}],"name":"setPublicMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSalePrice","type":"uint256"}],"name":"setPublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_publicSaleActiveState","type":"bool"}],"name":"setPublicSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_salePausedState","type":"bool"}],"name":"setSalePausedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tempSaleLimit","type":"uint256"}],"name":"setTempSaleLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nHolderMintLimit","type":"uint256"}],"name":"setnHolderMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nHolderSalePrice","type":"uint256"}],"name":"setnHolderSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_nHolderSaleState","type":"bool"}],"name":"setnHolderSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleMintLimit","type":"uint256"}],"name":"setpresaleListMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"presaleSalePrice","type":"uint256"}],"name":"setpresaleListSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"presaleListSaleState","type":"bool"}],"name":"setpresaleListSaleState","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":[],"name":"tempSaleLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"totalMintsAvailable","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":"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":"transferOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_lockState","type":"bool"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405261045760105560026011556005601255600a601355667c4f3838b0e000601455668e12b17091600060155566f8a788bfd460006016556000601955601a805460ff191690553480156200005657600080fd5b5060405162004769380380620047698339810160408190526200007991620003c4565b604080518082018252600c81526b486f6c65792050656f706c6560a01b602080830191825283518085019094526005845264484f4c455960d81b908401528151919291620000ca9160009162000301565b508051620000e090600190602084019062000301565b50506001600a555062000103600080516020620047498339815191523362000202565b620001326000805160206200474983398151915273b7d2efed6d2b0f080e3b96d10f6259b8a958e88e62000202565b62000161600080516020620047498339815191527384b30ec1ee3e8905279c7adf1e944bca3de3603b62000202565b6200017c600080516020620047498339815191528062000212565b600f80546001600160a01b03191633179055604080516020810191829052600090819052620001ae9160179162000301565b5060408051808201909152600580825264173539b7b760d91b6020909201918252620001dd9160189162000301565b506001600160601b0319606093841b81166080529190921b1660a052600e5562000442565b6200020e82826200025d565b5050565b6000828152600b6020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166200020e576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002bd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280546200030f9062000405565b90600052602060002090601f0160209004810192826200033357600085556200037e565b82601f106200034e57805160ff19168380011785556200037e565b828001600101855582156200037e579182015b828111156200037e57825182559160200191906001019062000361565b506200038c92915062000390565b5090565b5b808211156200038c576000815560010162000391565b80516001600160a01b0381168114620003bf57600080fd5b919050565b600080600060608486031215620003da57600080fd5b620003e584620003a7565b9250620003f560208501620003a7565b9150604084015190509250925092565b600181811c908216806200041a57607f821691505b602082108114156200043c57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160601c6142d4620004756000396000818161070b01526118a6015260006105b601526142d46000f3fe6080604052600436106103dd5760003560e01c80637cb647591161020d578063adba8bb711610128578063cb50c12e116100bb578063e985e9c51161008a578063ebf72a5f1161006f578063ebf72a5f14610bd8578063ef3e067c14610bed578063fbac89f614610c0d57600080fd5b8063e985e9c514610b79578063ebf0c71714610bc257600080fd5b8063cb50c12e14610b0f578063d547741f14610b2f578063d547cfb714610b4f578063d96cf1a914610b6457600080fd5b8063b9d5626e116100f7578063b9d5626e14610aa5578063bb485b8814610ab8578063bc8893b414610ace578063c87b56dd14610aef57600080fd5b8063adba8bb714610a25578063b3f55f4914610a45578063b88d4fde14610a65578063b9a5c70914610a8557600080fd5b80639293a5c7116101a0578063a217fddf1161016f578063a217fddf146109c5578063a22cb465146109da578063a6875cf6146109fa578063a945bf8014610a0f57600080fd5b80639293a5c71461095a57806394db8b781461097a57806395d89b411461099a578063a02c1e01146109af57600080fd5b80638d6dd78a116101dc5780638d6dd78a146108ca5780638da5cb5b146108e05780638ebea3f9146108fe57806391d148541461091457600080fd5b80637cb647591461085457806382991ead1461087457806383708f82146108945780638c7ea24b146108aa57600080fd5b806333b0b587116102fd5780634fb2e45d116102905780636ecd23061161025f5780636ecd2306146107cd57806370a08231146107e057806375b238fc14610800578063791a25191461083457600080fd5b80634fb2e45d1461074d5780635887f7041461076d578063627804af1461078d5780636352211e146107ad57600080fd5b806342842e0e116102cc57806342842e0e146106b957806346f265fd146106d95780634d1d1bc4146106f95780634f6ccce71461072d57600080fd5b806333b0b5871461064e57806336568abe146106645780633befa247146106845780633ccfd60b146106a457600080fd5b806323b872dd116103755780632f2ff15d116103445780632f2ff15d146105d85780632f745c59146105f8578063325d56a11461061857806332cb6b0c1461063857600080fd5b806323b872dd14610515578063248a9ca3146105355780632a55205a146105655780632e52d606146105a457600080fd5b8063081812fc116103b1578063081812fc1461047b578063095ea7b3146104b3578063159e2a57146104d557806318160ddd146104f657600080fd5b80628ca816146103e257806301ffc9a71461041857806306fdde0314610438578063074c6e5e1461045a575b600080fd5b3480156103ee57600080fd5b50600f5461040390600160b81b900460ff1681565b60405190151581526020015b60405180910390f35b34801561042457600080fd5b50610403610433366004613deb565b610c2d565b34801561044457600080fd5b5061044d610c3e565b60405161040f91906140b0565b34801561046657600080fd5b50600f5461040390600160a81b900460ff1681565b34801561048757600080fd5b5061049b610496366004613cf6565b610cd0565b6040516001600160a01b03909116815260200161040f565b3480156104bf57600080fd5b506104d36104ce366004613c2d565b610d6a565b005b3480156104e157600080fd5b50600f5461040390600160a01b900460ff1681565b34801561050257600080fd5b506008545b60405190815260200161040f565b34801561052157600080fd5b506104d3610530366004613b07565b610e80565b34801561054157600080fd5b50610507610550366004613cf6565b6000908152600b602052604090206001015490565b34801561057157600080fd5b50610585610580366004613eaa565b610f07565b604080516001600160a01b03909316835260208301919091520161040f565b3480156105b057600080fd5b5061049b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e457600080fd5b506104d36105f3366004613d0f565b610f5c565b34801561060457600080fd5b50610507610613366004613c2d565b610f82565b34801561062457600080fd5b506104d3610633366004613e25565b61102a565b34801561064457600080fd5b506105076122b881565b34801561065a57600080fd5b5061050760155481565b34801561067057600080fd5b506104d361067f366004613d0f565b6110a4565b34801561069057600080fd5b506104d361069f366004613cdb565b611130565b3480156106b057600080fd5b506104d36111c3565b3480156106c557600080fd5b506104d36106d4366004613b07565b6114e5565b3480156106e557600080fd5b506104036106f4366004613d32565b611500565b34801561070557600080fd5b5061049b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561073957600080fd5b50610507610748366004613cf6565b611516565b34801561075957600080fd5b506104d3610768366004613ab9565b6115ba565b34801561077957600080fd5b506104d3610788366004613cf6565b611636565b34801561079957600080fd5b506104d36107a8366004613c2d565b611695565b3480156107b957600080fd5b5061049b6107c8366004613cf6565b61178c565b6104d36107db366004613ecc565b611817565b3480156107ec57600080fd5b506105076107fb366004613ab9565b611ba4565b34801561080c57600080fd5b506105077fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b34801561084057600080fd5b506104d361084f366004613cf6565b611c3e565b34801561086057600080fd5b506104d361086f366004613cf6565b611c9d565b34801561088057600080fd5b506104d361088f366004613cdb565b611cfc565b3480156108a057600080fd5b5061050760125481565b3480156108b657600080fd5b506104d36108c5366004613c2d565b611d8f565b3480156108d657600080fd5b5061050760115481565b3480156108ec57600080fd5b50600f546001600160a01b031661049b565b34801561090a57600080fd5b5061050760105481565b34801561092057600080fd5b5061040361092f366004613d0f565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561096657600080fd5b506104d3610975366004613cdb565b611df3565b34801561098657600080fd5b506104d3610995366004613cdb565b611e86565b3480156109a657600080fd5b5061044d611f19565b3480156109bb57600080fd5b5061050760145481565b3480156109d157600080fd5b50610507600081565b3480156109e657600080fd5b506104d36109f5366004613c03565b611f28565b348015610a0657600080fd5b506104d3611fed565b348015610a1b57600080fd5b5061050760165481565b348015610a3157600080fd5b506104d3610a40366004613cf6565b612136565b348015610a5157600080fd5b506104d3610a60366004613cf6565b612195565b348015610a7157600080fd5b506104d3610a80366004613b43565b6121f4565b348015610a9157600080fd5b506104d3610aa0366004613cf6565b612282565b6104d3610ab3366004613c57565b6122e1565b348015610ac457600080fd5b5061050760135481565b348015610ada57600080fd5b50600f5461040390600160b01b900460ff1681565b348015610afb57600080fd5b5061044d610b0a366004613cf6565b6125e3565b348015610b1b57600080fd5b506104d3610b2a366004613cf6565b612694565b348015610b3b57600080fd5b506104d3610b4a366004613d0f565b6126f3565b348015610b5b57600080fd5b5061044d612719565b348015610b7057600080fd5b506105076127a7565b348015610b8557600080fd5b50610403610b94366004613ad4565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610bce57600080fd5b50610507600e5481565b348015610be457600080fd5b5061044d6127be565b348015610bf957600080fd5b506104d3610c08366004613cf6565b6127cb565b348015610c1957600080fd5b506104d3610c28366004613cdb565b61282a565b6000610c38826128a0565b92915050565b606060008054610c4d90614199565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7990614199565b8015610cc65780601f10610c9b57610100808354040283529160200191610cc6565b820191906000526020600020905b815481529060010190602001808311610ca957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d4e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610d758261178c565b9050806001600160a01b0316836001600160a01b03161415610de35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d45565b336001600160a01b0382161480610dff5750610dff8133610b94565b610e715760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d45565b610e7b83836128c5565b505050565b610e8a3382612933565b610efc5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d45565b610e7b838383612a2a565b60408051808201909152600c546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610f489086614120565b610f52919061410c565b9150509250929050565b6000828152600b6020526040902060010154610f788133612be9565b610e7b8383612c69565b6000610f8d83611ba4565b82106110015760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610d45565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b3360009081526000805160206142a8833981519152602052604090205460ff166110845760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b6110906017858561399a565b5061109d6018838361399a565b5050505050565b6001600160a01b03811633146111225760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610d45565b61112c8282612d0b565b5050565b3360009081526000805160206142a8833981519152602052604090205460ff1661118a5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160b81b027fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff1661121d5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b6002600a5414156112705760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d45565b6002600a556019544790671bc16d674ec80000116113285773fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86112af4761036b614120565b6112b9919061410c565b6040518115909202916000818181858888f193505050501580156112e1573d6000803e3d6000fd5b50604051738dfdd0ff4661abd44b06b1204c6334eacc8575af904780156108fc02916000818181858888f19350505050158015611322573d6000803e3d6000fd5b506114dd565b671bc16d674ec8000061133c60028361410c565b60195461134991906140f4565b11156113da5760195473b6fe450d565f99066d44692ede257cd179a0c846906108fc9061137e90671bc16d674ec8000061413f565b6040518115909202916000818181858888f193505050501580156113a6573d6000803e3d6000fd5b50671bc16d674ec8000060195573fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86112af4761036b614120565b73b6fe450d565f99066d44692ede257cd179a0c8466108fc6113fd60028461410c565b6040518115909202916000818181858888f19350505050158015611425573d6000803e3d6000fd5b5061143160028261410c565b60195461143e91906140f4565b60195573fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86114684761036b614120565b611472919061410c565b6040518115909202916000818181858888f1935050505015801561149a573d6000803e3d6000fd5b50604051738dfdd0ff4661abd44b06b1204c6334eacc8575af904780156108fc02916000818181858888f193505050501580156114db573d6000803e3d6000fd5b505b506001600a55565b610e7b838383604051806020016040528060008152506121f4565b600061150f82600e5485612d8e565b9392505050565b600061152160085490565b82106115955760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610d45565b600882815481106115a8576115a8614245565b90600052602060002001549050919050565b3360009081526000805160206142a8833981519152602052604090205460ff166116145760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff166116905760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601055565b3360009081526000805160206142a8833981519152602052604090205460ff166116ef5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b6122b881600d5461170091906140f4565b111561174e5760405162461bcd60e51b815260206004820152601e60248201527f486f6c657950656f706c653a4d41585f535550504c595f5245414348454400006044820152606401610d45565b60005b81811015610e7b57600d8054906000611769836141d4565b919050555061177a83600d54612e3d565b80611784816141d4565b915050611751565b6000818152600260205260408120546001600160a01b031680610c385760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610d45565b6002600a54141561186a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d45565b6002600a556000611879612e57565b8061192a5750611887612e80565b801561192a57506040516370a0823160e01b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156118f057600080fd5b505afa158015611904573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119289190613e91565b115b90506000611936612e57565b61194257601454611946565b6016545b90506000611952612e57565b61195e57601154611962565b6013545b905061196c612e57565b8061197a575061197a612e80565b6119d25760405162461bcd60e51b8152602060048201526024808201527f486f6c657950656f706c653a555345525f4e4f545f414c4c4f5745445f544f5f6044820152631352539560e21b6064820152608401610d45565b82611a1f5760405162461bcd60e51b815260206004820152601f60248201527f486f6c657950656f706c653a555345525f444f45535f4e4f545f4f574e5f4e006044820152606401610d45565b611a276127a7565b8460ff161115611a845760405162461bcd60e51b815260206004820152602260248201527f486f6c657950656f706c653a4d41585f414c4c4f434154494f4e5f5245414348604482015261115160f21b6064820152608401610d45565b808460ff16611a9233611ba4565b611a9c91906140f4565b1115611afc5760405162461bcd60e51b815260206004820152602960248201527f486f6c657950656f706c653a4d494e545f41424f56455f4d41585f4d494e545f604482015268414c4c4f57414e434560b81b6064820152608401610d45565b611b0960ff851683614120565b3414611b575760405162461bcd60e51b815260206004820152601360248201527f4e506173733a494e56414c49445f5052494345000000000000000000000000006044820152606401610d45565b60005b8460ff16811015611b9857600d8054906000611b75836141d4565b9190505550611b8633600d54612e3d565b80611b90816141d4565b915050611b5a565b50506001600a55505050565b60006001600160a01b038216611c225760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610d45565b506001600160a01b031660009081526003602052604090205490565b3360009081526000805160206142a8833981519152602052604090205460ff16611c985760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601655565b3360009081526000805160206142a8833981519152602052604090205460ff16611cf75760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600e55565b3360009081526000805160206142a8833981519152602052604090205460ff16611d565760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff16611de95760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b61112c8282612ea9565b3360009081526000805160206142a8833981519152602052604090205460ff16611e4d5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160b01b027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff16611ee05760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b606060018054610c4d90614199565b6001600160a01b038216331415611f815760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d45565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3360009081526000805160206142a8833981519152602052604090205460ff166120475760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601a5460ff166120995760405162461bcd60e51b815260206004820152601360248201527f486f6c657950656f706c653a206c6f636b6564000000000000000000000000006044820152606401610d45565b73fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86120c04761036b614120565b6120ca919061410c565b6040518115909202916000818181858888f193505050501580156120f2573d6000803e3d6000fd5b50604051738dfdd0ff4661abd44b06b1204c6334eacc8575af904780156108fc02916000818181858888f19350505050158015612133573d6000803e3d6000fd5b50565b3360009081526000805160206142a8833981519152602052604090205460ff166121905760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601155565b3360009081526000805160206142a8833981519152602052604090205460ff166121ef5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601555565b6121fe3383612933565b6122705760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d45565b61227c84848484612f5d565b50505050565b3360009081526000805160206142a8833981519152602052604090205460ff166122dc5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601455565b6002600a5414156123345760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d45565b6002600a5560125460ff821661234933611ba4565b61235391906140f4565b11156123b35760405162461bcd60e51b815260206004820152602960248201527f486f6c657950656f706c653a4d494e545f41424f56455f4d41585f4d494e545f604482015268414c4c4f57414e434560b81b6064820152608401610d45565b6123bb612fdb565b6124135760405162461bcd60e51b8152602060048201526024808201527f486f6c657950656f706c653a555345525f4e4f545f414c4c4f5745445f544f5f6044820152631352539560e21b6064820152608401610d45565b61241b6127a7565b8160ff1611156124785760405162461bcd60e51b815260206004820152602260248201527f486f6c657950656f706c653a4d41585f414c4c4f434154494f4e5f5245414348604482015261115160f21b6064820152608401610d45565b604080513360601b6bffffffffffffffffffffffff191660208083019190915282516014818403018152603490920190925280519101206124ec9084848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061150092505050565b6125385760405162461bcd60e51b815260206004820181905260248201527f486f6c657950656f706c653a496e76616c6964206d65726b6c652070726f6f666044820152606401610d45565b8060ff166015546125499190614120565b34146125975760405162461bcd60e51b815260206004820152601960248201527f486f6c657950656f706c653a494e56414c49445f5052494345000000000000006044820152606401610d45565b60005b8160ff168110156125d857600d80549060006125b5836141d4565b91905055506125c633600d54612e3d565b806125d0816141d4565b91505061259a565b50506001600a555050565b6000818152600260205260409020546060906001600160a01b03166126625760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d45565b61266b82613004565b601860405160200161267e929190613f42565b6040516020818303038152906040529050919050565b3360009081526000805160206142a8833981519152602052604090205460ff166126ee5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601255565b6000828152600b602052604090206001015461270f8133612be9565b610e7b8383612d0b565b6017805461272690614199565b80601f016020809104026020016040519081016040528092919081815260200182805461275290614199565b801561279f5780601f106127745761010080835404028352916020019161279f565b820191906000526020600020905b81548152906001019060200180831161278257829003601f168201915b505050505081565b6000600d546010546127b9919061413f565b905090565b6018805461272690614199565b3360009081526000805160206142a8833981519152602052604090205460ff166128255760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601355565b73b6fe450d565f99066d44692ede257cd179a0c846331461288d5760405162461bcd60e51b815260206004820152601360248201527f486f6c657950656f706c653a4e4f545f444556000000000000000000000000006044820152606401610d45565b601a805460ff1916911515919091179055565b60006001600160e01b0319821663152a902d60e11b1480610c385750610c38826130de565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906128fa8261178c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166129ac5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d45565b60006129b78361178c565b9050806001600160a01b0316846001600160a01b031614806129f25750836001600160a01b03166129e784610cd0565b6001600160a01b0316145b80612a2257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612a3d8261178c565b6001600160a01b031614612ab95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610d45565b6001600160a01b038216612b1b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d45565b612b26838383613103565b612b316000826128c5565b6001600160a01b0383166000908152600360205260408120805460019290612b5a90849061413f565b90915550506001600160a01b0382166000908152600360205260408120805460019290612b889084906140f4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff1661112c57612c27816001600160a01b031660146131bb565b612c328360206131bb565b604051602001612c43929190613ff3565b60408051601f198184030181529082905262461bcd60e51b8252610d45916004016140b0565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff1661112c576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612cc73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff161561112c576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815b8551811015612e32576000868281518110612db057612db0614245565b60200260200101519050808311612df2576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612e1f565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612e2a816141d4565b915050612d93565b509092149392505050565b61112c828260405180602001604052806000815250613364565b600f54600090600160b01b900460ff1680156127b9575050600f54600160b81b900460ff161590565b600f54600090600160a01b900460ff1680156127b9575050600f54600160b81b900460ff161590565b612710811115612efb5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610d45565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600c8054600160a01b9093027fffffffffffffffffff0000000000000000000000000000000000000000000000909316909117919091179055565b612f68848484612a2a565b612f74848484846133e2565b61227c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610d45565b600f54600090600160a81b900460ff1680156127b9575050600f54600160b81b900460ff161590565b6000818152600260205260409020546060906001600160a01b03166130835760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d45565b600061308d61353a565b905060008151116130ad576040518060200160405280600081525061150f565b806130b784613549565b6040516020016130c8929190613f13565b6040516020818303038152906040529392505050565b60006001600160e01b03198216637965db0b60e01b1480610c385750610c3882613647565b6001600160a01b03831661315e5761315981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613181565b816001600160a01b0316836001600160a01b03161461318157613181838261366c565b6001600160a01b03821661319857610e7b81613709565b826001600160a01b0316826001600160a01b031614610e7b57610e7b82826137b8565b606060006131ca836002614120565b6131d59060026140f4565b67ffffffffffffffff8111156131ed576131ed61425b565b6040519080825280601f01601f191660200182016040528015613217576020820181803683370190505b509050600360fc1b8160008151811061323257613232614245565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061326157613261614245565b60200101906001600160f81b031916908160001a9053506000613285846002614120565b6132909060016140f4565b90505b6001811115613315577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106132d1576132d1614245565b1a60f81b8282815181106132e7576132e7614245565b60200101906001600160f81b031916908160001a90535060049490941c9361330e81614182565b9050613293565b50831561150f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d45565b61336e83836137fc565b61337b60008484846133e2565b610e7b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610d45565b60006001600160a01b0384163b1561352f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613426903390899088908890600401614074565b602060405180830381600087803b15801561344057600080fd5b505af1925050508015613470575060408051601f3d908101601f1916820190925261346d91810190613e08565b60015b613515573d80801561349e576040519150601f19603f3d011682016040523d82523d6000602084013e6134a3565b606091505b50805161350d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610d45565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a22565b506001949350505050565b606060178054610c4d90614199565b60608161356d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156135975780613581816141d4565b91506135909050600a8361410c565b9150613571565b60008167ffffffffffffffff8111156135b2576135b261425b565b6040519080825280601f01601f1916602001820160405280156135dc576020820181803683370190505b5090505b8415612a22576135f160018361413f565b91506135fe600a866141ef565b6136099060306140f4565b60f81b81838151811061361e5761361e614245565b60200101906001600160f81b031916908160001a905350613640600a8661410c565b94506135e0565b60006001600160e01b0319821663780e9d6360e01b1480610c385750610c388261394a565b6000600161367984611ba4565b613683919061413f565b6000838152600760205260409020549091508082146136d6576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061371b9060019061413f565b6000838152600960205260408120546008805493945090928490811061374357613743614245565b90600052602060002001549050806008838154811061376457613764614245565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061379c5761379c61422f565b6001900381819060005260206000200160009055905550505050565b60006137c383611ba4565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166138525760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d45565b6000818152600260205260409020546001600160a01b0316156138b75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d45565b6138c360008383613103565b6001600160a01b03821660009081526003602052604081208054600192906138ec9084906140f4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b031982166380ac58cd60e01b148061397b57506001600160e01b03198216635b5e139f60e01b145b80610c3857506301ffc9a760e01b6001600160e01b0319831614610c38565b8280546139a690614199565b90600052602060002090601f0160209004810192826139c85760008555613a0e565b82601f106139e15782800160ff19823516178555613a0e565b82800160010185558215613a0e579182015b82811115613a0e5782358255916020019190600101906139f3565b50613a1a929150613a1e565b5090565b5b80821115613a1a5760008155600101613a1f565b80356001600160a01b0381168114613a4a57600080fd5b919050565b80358015158114613a4a57600080fd5b60008083601f840112613a7157600080fd5b50813567ffffffffffffffff811115613a8957600080fd5b602083019150836020828501011115613aa157600080fd5b9250929050565b803560ff81168114613a4a57600080fd5b600060208284031215613acb57600080fd5b61150f82613a33565b60008060408385031215613ae757600080fd5b613af083613a33565b9150613afe60208401613a33565b90509250929050565b600080600060608486031215613b1c57600080fd5b613b2584613a33565b9250613b3360208501613a33565b9150604084013590509250925092565b60008060008060808587031215613b5957600080fd5b613b6285613a33565b93506020613b71818701613a33565b935060408601359250606086013567ffffffffffffffff80821115613b9557600080fd5b818801915088601f830112613ba957600080fd5b813581811115613bbb57613bbb61425b565b613bcd601f8201601f191685016140c3565b91508082528984828501011115613be357600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060408385031215613c1657600080fd5b613c1f83613a33565b9150613afe60208401613a4f565b60008060408385031215613c4057600080fd5b613c4983613a33565b946020939093013593505050565b600080600060408486031215613c6c57600080fd5b833567ffffffffffffffff80821115613c8457600080fd5b818601915086601f830112613c9857600080fd5b813581811115613ca757600080fd5b8760208260051b8501011115613cbc57600080fd5b602092830195509350613cd29186019050613aa8565b90509250925092565b600060208284031215613ced57600080fd5b61150f82613a4f565b600060208284031215613d0857600080fd5b5035919050565b60008060408385031215613d2257600080fd5b82359150613afe60208401613a33565b60008060408385031215613d4557600080fd5b8235915060208084013567ffffffffffffffff80821115613d6557600080fd5b818601915086601f830112613d7957600080fd5b813581811115613d8b57613d8b61425b565b8060051b9150613d9c8483016140c3565b8181528481019084860184860187018b1015613db757600080fd5b600095505b83861015613dda578035835260019590950194918601918601613dbc565b508096505050505050509250929050565b600060208284031215613dfd57600080fd5b813561150f81614271565b600060208284031215613e1a57600080fd5b815161150f81614271565b60008060008060408587031215613e3b57600080fd5b843567ffffffffffffffff80821115613e5357600080fd5b613e5f88838901613a5f565b90965094506020870135915080821115613e7857600080fd5b50613e8587828801613a5f565b95989497509550505050565b600060208284031215613ea357600080fd5b5051919050565b60008060408385031215613ebd57600080fd5b50508035926020909101359150565b600060208284031215613ede57600080fd5b61150f82613aa8565b60008151808452613eff816020860160208601614156565b601f01601f19169290920160200192915050565b60008351613f25818460208801614156565b835190830190613f39818360208801614156565b01949350505050565b600083516020613f558285838901614156565b845491840191600090600181811c9080831680613f7357607f831692505b858310811415613f9157634e487b7160e01b85526022600452602485fd5b808015613fa55760018114613fb657613fe3565b60ff19851688528388019550613fe3565b60008b81526020902060005b85811015613fdb5781548a820152908401908801613fc2565b505083880195505b50939a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161402b816017850160208801614156565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614068816028840160208801614156565b01602801949350505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526140a66080830184613ee7565b9695505050505050565b60208152600061150f6020830184613ee7565b604051601f8201601f1916810167ffffffffffffffff811182821017156140ec576140ec61425b565b604052919050565b6000821982111561410757614107614203565b500190565b60008261411b5761411b614219565b500490565b600081600019048311821515161561413a5761413a614203565b500290565b60008282101561415157614151614203565b500390565b60005b83811015614171578181015183820152602001614159565b8381111561227c5750506000910152565b60008161419157614191614203565b506000190190565b600181811c908216806141ad57607f821691505b602082108114156141ce57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156141e8576141e8614203565b5060010190565b6000826141fe576141fe614219565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461213357600080fdfe486f6c657950656f706c653a4143434553535f44454e49454400000000000000c95e36e7d138d7f7746dd268500efba0e7b562881b6fceb028c25eb9f900ad8da164736f6c6343000806000adf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4200000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d6000000000000000000000000731b19acaa0ae77aea8bf8515f6dcdb894c248c2c201603ef5547f632a146c306cc496afaa9c110c6928614454514af37346252f

Deployed Bytecode

0x6080604052600436106103dd5760003560e01c80637cb647591161020d578063adba8bb711610128578063cb50c12e116100bb578063e985e9c51161008a578063ebf72a5f1161006f578063ebf72a5f14610bd8578063ef3e067c14610bed578063fbac89f614610c0d57600080fd5b8063e985e9c514610b79578063ebf0c71714610bc257600080fd5b8063cb50c12e14610b0f578063d547741f14610b2f578063d547cfb714610b4f578063d96cf1a914610b6457600080fd5b8063b9d5626e116100f7578063b9d5626e14610aa5578063bb485b8814610ab8578063bc8893b414610ace578063c87b56dd14610aef57600080fd5b8063adba8bb714610a25578063b3f55f4914610a45578063b88d4fde14610a65578063b9a5c70914610a8557600080fd5b80639293a5c7116101a0578063a217fddf1161016f578063a217fddf146109c5578063a22cb465146109da578063a6875cf6146109fa578063a945bf8014610a0f57600080fd5b80639293a5c71461095a57806394db8b781461097a57806395d89b411461099a578063a02c1e01146109af57600080fd5b80638d6dd78a116101dc5780638d6dd78a146108ca5780638da5cb5b146108e05780638ebea3f9146108fe57806391d148541461091457600080fd5b80637cb647591461085457806382991ead1461087457806383708f82146108945780638c7ea24b146108aa57600080fd5b806333b0b587116102fd5780634fb2e45d116102905780636ecd23061161025f5780636ecd2306146107cd57806370a08231146107e057806375b238fc14610800578063791a25191461083457600080fd5b80634fb2e45d1461074d5780635887f7041461076d578063627804af1461078d5780636352211e146107ad57600080fd5b806342842e0e116102cc57806342842e0e146106b957806346f265fd146106d95780634d1d1bc4146106f95780634f6ccce71461072d57600080fd5b806333b0b5871461064e57806336568abe146106645780633befa247146106845780633ccfd60b146106a457600080fd5b806323b872dd116103755780632f2ff15d116103445780632f2ff15d146105d85780632f745c59146105f8578063325d56a11461061857806332cb6b0c1461063857600080fd5b806323b872dd14610515578063248a9ca3146105355780632a55205a146105655780632e52d606146105a457600080fd5b8063081812fc116103b1578063081812fc1461047b578063095ea7b3146104b3578063159e2a57146104d557806318160ddd146104f657600080fd5b80628ca816146103e257806301ffc9a71461041857806306fdde0314610438578063074c6e5e1461045a575b600080fd5b3480156103ee57600080fd5b50600f5461040390600160b81b900460ff1681565b60405190151581526020015b60405180910390f35b34801561042457600080fd5b50610403610433366004613deb565b610c2d565b34801561044457600080fd5b5061044d610c3e565b60405161040f91906140b0565b34801561046657600080fd5b50600f5461040390600160a81b900460ff1681565b34801561048757600080fd5b5061049b610496366004613cf6565b610cd0565b6040516001600160a01b03909116815260200161040f565b3480156104bf57600080fd5b506104d36104ce366004613c2d565b610d6a565b005b3480156104e157600080fd5b50600f5461040390600160a01b900460ff1681565b34801561050257600080fd5b506008545b60405190815260200161040f565b34801561052157600080fd5b506104d3610530366004613b07565b610e80565b34801561054157600080fd5b50610507610550366004613cf6565b6000908152600b602052604090206001015490565b34801561057157600080fd5b50610585610580366004613eaa565b610f07565b604080516001600160a01b03909316835260208301919091520161040f565b3480156105b057600080fd5b5061049b7f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d681565b3480156105e457600080fd5b506104d36105f3366004613d0f565b610f5c565b34801561060457600080fd5b50610507610613366004613c2d565b610f82565b34801561062457600080fd5b506104d3610633366004613e25565b61102a565b34801561064457600080fd5b506105076122b881565b34801561065a57600080fd5b5061050760155481565b34801561067057600080fd5b506104d361067f366004613d0f565b6110a4565b34801561069057600080fd5b506104d361069f366004613cdb565b611130565b3480156106b057600080fd5b506104d36111c3565b3480156106c557600080fd5b506104d36106d4366004613b07565b6114e5565b3480156106e557600080fd5b506104036106f4366004613d32565b611500565b34801561070557600080fd5b5061049b7f000000000000000000000000731b19acaa0ae77aea8bf8515f6dcdb894c248c281565b34801561073957600080fd5b50610507610748366004613cf6565b611516565b34801561075957600080fd5b506104d3610768366004613ab9565b6115ba565b34801561077957600080fd5b506104d3610788366004613cf6565b611636565b34801561079957600080fd5b506104d36107a8366004613c2d565b611695565b3480156107b957600080fd5b5061049b6107c8366004613cf6565b61178c565b6104d36107db366004613ecc565b611817565b3480156107ec57600080fd5b506105076107fb366004613ab9565b611ba4565b34801561080c57600080fd5b506105077fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b34801561084057600080fd5b506104d361084f366004613cf6565b611c3e565b34801561086057600080fd5b506104d361086f366004613cf6565b611c9d565b34801561088057600080fd5b506104d361088f366004613cdb565b611cfc565b3480156108a057600080fd5b5061050760125481565b3480156108b657600080fd5b506104d36108c5366004613c2d565b611d8f565b3480156108d657600080fd5b5061050760115481565b3480156108ec57600080fd5b50600f546001600160a01b031661049b565b34801561090a57600080fd5b5061050760105481565b34801561092057600080fd5b5061040361092f366004613d0f565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561096657600080fd5b506104d3610975366004613cdb565b611df3565b34801561098657600080fd5b506104d3610995366004613cdb565b611e86565b3480156109a657600080fd5b5061044d611f19565b3480156109bb57600080fd5b5061050760145481565b3480156109d157600080fd5b50610507600081565b3480156109e657600080fd5b506104d36109f5366004613c03565b611f28565b348015610a0657600080fd5b506104d3611fed565b348015610a1b57600080fd5b5061050760165481565b348015610a3157600080fd5b506104d3610a40366004613cf6565b612136565b348015610a5157600080fd5b506104d3610a60366004613cf6565b612195565b348015610a7157600080fd5b506104d3610a80366004613b43565b6121f4565b348015610a9157600080fd5b506104d3610aa0366004613cf6565b612282565b6104d3610ab3366004613c57565b6122e1565b348015610ac457600080fd5b5061050760135481565b348015610ada57600080fd5b50600f5461040390600160b01b900460ff1681565b348015610afb57600080fd5b5061044d610b0a366004613cf6565b6125e3565b348015610b1b57600080fd5b506104d3610b2a366004613cf6565b612694565b348015610b3b57600080fd5b506104d3610b4a366004613d0f565b6126f3565b348015610b5b57600080fd5b5061044d612719565b348015610b7057600080fd5b506105076127a7565b348015610b8557600080fd5b50610403610b94366004613ad4565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610bce57600080fd5b50610507600e5481565b348015610be457600080fd5b5061044d6127be565b348015610bf957600080fd5b506104d3610c08366004613cf6565b6127cb565b348015610c1957600080fd5b506104d3610c28366004613cdb565b61282a565b6000610c38826128a0565b92915050565b606060008054610c4d90614199565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7990614199565b8015610cc65780601f10610c9b57610100808354040283529160200191610cc6565b820191906000526020600020905b815481529060010190602001808311610ca957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d4e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610d758261178c565b9050806001600160a01b0316836001600160a01b03161415610de35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d45565b336001600160a01b0382161480610dff5750610dff8133610b94565b610e715760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d45565b610e7b83836128c5565b505050565b610e8a3382612933565b610efc5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d45565b610e7b838383612a2a565b60408051808201909152600c546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610f489086614120565b610f52919061410c565b9150509250929050565b6000828152600b6020526040902060010154610f788133612be9565b610e7b8383612c69565b6000610f8d83611ba4565b82106110015760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610d45565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b3360009081526000805160206142a8833981519152602052604090205460ff166110845760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b6110906017858561399a565b5061109d6018838361399a565b5050505050565b6001600160a01b03811633146111225760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610d45565b61112c8282612d0b565b5050565b3360009081526000805160206142a8833981519152602052604090205460ff1661118a5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160b81b027fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff1661121d5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b6002600a5414156112705760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d45565b6002600a556019544790671bc16d674ec80000116113285773fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86112af4761036b614120565b6112b9919061410c565b6040518115909202916000818181858888f193505050501580156112e1573d6000803e3d6000fd5b50604051738dfdd0ff4661abd44b06b1204c6334eacc8575af904780156108fc02916000818181858888f19350505050158015611322573d6000803e3d6000fd5b506114dd565b671bc16d674ec8000061133c60028361410c565b60195461134991906140f4565b11156113da5760195473b6fe450d565f99066d44692ede257cd179a0c846906108fc9061137e90671bc16d674ec8000061413f565b6040518115909202916000818181858888f193505050501580156113a6573d6000803e3d6000fd5b50671bc16d674ec8000060195573fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86112af4761036b614120565b73b6fe450d565f99066d44692ede257cd179a0c8466108fc6113fd60028461410c565b6040518115909202916000818181858888f19350505050158015611425573d6000803e3d6000fd5b5061143160028261410c565b60195461143e91906140f4565b60195573fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86114684761036b614120565b611472919061410c565b6040518115909202916000818181858888f1935050505015801561149a573d6000803e3d6000fd5b50604051738dfdd0ff4661abd44b06b1204c6334eacc8575af904780156108fc02916000818181858888f193505050501580156114db573d6000803e3d6000fd5b505b506001600a55565b610e7b838383604051806020016040528060008152506121f4565b600061150f82600e5485612d8e565b9392505050565b600061152160085490565b82106115955760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610d45565b600882815481106115a8576115a8614245565b90600052602060002001549050919050565b3360009081526000805160206142a8833981519152602052604090205460ff166116145760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff166116905760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601055565b3360009081526000805160206142a8833981519152602052604090205460ff166116ef5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b6122b881600d5461170091906140f4565b111561174e5760405162461bcd60e51b815260206004820152601e60248201527f486f6c657950656f706c653a4d41585f535550504c595f5245414348454400006044820152606401610d45565b60005b81811015610e7b57600d8054906000611769836141d4565b919050555061177a83600d54612e3d565b80611784816141d4565b915050611751565b6000818152600260205260408120546001600160a01b031680610c385760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610d45565b6002600a54141561186a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d45565b6002600a556000611879612e57565b8061192a5750611887612e80565b801561192a57506040516370a0823160e01b81523360048201526000907f000000000000000000000000731b19acaa0ae77aea8bf8515f6dcdb894c248c26001600160a01b0316906370a082319060240160206040518083038186803b1580156118f057600080fd5b505afa158015611904573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119289190613e91565b115b90506000611936612e57565b61194257601454611946565b6016545b90506000611952612e57565b61195e57601154611962565b6013545b905061196c612e57565b8061197a575061197a612e80565b6119d25760405162461bcd60e51b8152602060048201526024808201527f486f6c657950656f706c653a555345525f4e4f545f414c4c4f5745445f544f5f6044820152631352539560e21b6064820152608401610d45565b82611a1f5760405162461bcd60e51b815260206004820152601f60248201527f486f6c657950656f706c653a555345525f444f45535f4e4f545f4f574e5f4e006044820152606401610d45565b611a276127a7565b8460ff161115611a845760405162461bcd60e51b815260206004820152602260248201527f486f6c657950656f706c653a4d41585f414c4c4f434154494f4e5f5245414348604482015261115160f21b6064820152608401610d45565b808460ff16611a9233611ba4565b611a9c91906140f4565b1115611afc5760405162461bcd60e51b815260206004820152602960248201527f486f6c657950656f706c653a4d494e545f41424f56455f4d41585f4d494e545f604482015268414c4c4f57414e434560b81b6064820152608401610d45565b611b0960ff851683614120565b3414611b575760405162461bcd60e51b815260206004820152601360248201527f4e506173733a494e56414c49445f5052494345000000000000000000000000006044820152606401610d45565b60005b8460ff16811015611b9857600d8054906000611b75836141d4565b9190505550611b8633600d54612e3d565b80611b90816141d4565b915050611b5a565b50506001600a55505050565b60006001600160a01b038216611c225760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610d45565b506001600160a01b031660009081526003602052604090205490565b3360009081526000805160206142a8833981519152602052604090205460ff16611c985760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601655565b3360009081526000805160206142a8833981519152602052604090205460ff16611cf75760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600e55565b3360009081526000805160206142a8833981519152602052604090205460ff16611d565760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff16611de95760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b61112c8282612ea9565b3360009081526000805160206142a8833981519152602052604090205460ff16611e4d5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160b01b027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360009081526000805160206142a8833981519152602052604090205460ff16611ee05760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b600f8054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b606060018054610c4d90614199565b6001600160a01b038216331415611f815760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d45565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3360009081526000805160206142a8833981519152602052604090205460ff166120475760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601a5460ff166120995760405162461bcd60e51b815260206004820152601360248201527f486f6c657950656f706c653a206c6f636b6564000000000000000000000000006044820152606401610d45565b73fe5f90756bf715b55774e18ec4ee26424e56c3b96108fc6103e86120c04761036b614120565b6120ca919061410c565b6040518115909202916000818181858888f193505050501580156120f2573d6000803e3d6000fd5b50604051738dfdd0ff4661abd44b06b1204c6334eacc8575af904780156108fc02916000818181858888f19350505050158015612133573d6000803e3d6000fd5b50565b3360009081526000805160206142a8833981519152602052604090205460ff166121905760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601155565b3360009081526000805160206142a8833981519152602052604090205460ff166121ef5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601555565b6121fe3383612933565b6122705760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d45565b61227c84848484612f5d565b50505050565b3360009081526000805160206142a8833981519152602052604090205460ff166122dc5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601455565b6002600a5414156123345760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d45565b6002600a5560125460ff821661234933611ba4565b61235391906140f4565b11156123b35760405162461bcd60e51b815260206004820152602960248201527f486f6c657950656f706c653a4d494e545f41424f56455f4d41585f4d494e545f604482015268414c4c4f57414e434560b81b6064820152608401610d45565b6123bb612fdb565b6124135760405162461bcd60e51b8152602060048201526024808201527f486f6c657950656f706c653a555345525f4e4f545f414c4c4f5745445f544f5f6044820152631352539560e21b6064820152608401610d45565b61241b6127a7565b8160ff1611156124785760405162461bcd60e51b815260206004820152602260248201527f486f6c657950656f706c653a4d41585f414c4c4f434154494f4e5f5245414348604482015261115160f21b6064820152608401610d45565b604080513360601b6bffffffffffffffffffffffff191660208083019190915282516014818403018152603490920190925280519101206124ec9084848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061150092505050565b6125385760405162461bcd60e51b815260206004820181905260248201527f486f6c657950656f706c653a496e76616c6964206d65726b6c652070726f6f666044820152606401610d45565b8060ff166015546125499190614120565b34146125975760405162461bcd60e51b815260206004820152601960248201527f486f6c657950656f706c653a494e56414c49445f5052494345000000000000006044820152606401610d45565b60005b8160ff168110156125d857600d80549060006125b5836141d4565b91905055506125c633600d54612e3d565b806125d0816141d4565b91505061259a565b50506001600a555050565b6000818152600260205260409020546060906001600160a01b03166126625760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d45565b61266b82613004565b601860405160200161267e929190613f42565b6040516020818303038152906040529050919050565b3360009081526000805160206142a8833981519152602052604090205460ff166126ee5760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601255565b6000828152600b602052604090206001015461270f8133612be9565b610e7b8383612d0b565b6017805461272690614199565b80601f016020809104026020016040519081016040528092919081815260200182805461275290614199565b801561279f5780601f106127745761010080835404028352916020019161279f565b820191906000526020600020905b81548152906001019060200180831161278257829003601f168201915b505050505081565b6000600d546010546127b9919061413f565b905090565b6018805461272690614199565b3360009081526000805160206142a8833981519152602052604090205460ff166128255760405162461bcd60e51b815260206004820152601960248201526000805160206142888339815191526044820152606401610d45565b601355565b73b6fe450d565f99066d44692ede257cd179a0c846331461288d5760405162461bcd60e51b815260206004820152601360248201527f486f6c657950656f706c653a4e4f545f444556000000000000000000000000006044820152606401610d45565b601a805460ff1916911515919091179055565b60006001600160e01b0319821663152a902d60e11b1480610c385750610c38826130de565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906128fa8261178c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166129ac5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d45565b60006129b78361178c565b9050806001600160a01b0316846001600160a01b031614806129f25750836001600160a01b03166129e784610cd0565b6001600160a01b0316145b80612a2257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612a3d8261178c565b6001600160a01b031614612ab95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610d45565b6001600160a01b038216612b1b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d45565b612b26838383613103565b612b316000826128c5565b6001600160a01b0383166000908152600360205260408120805460019290612b5a90849061413f565b90915550506001600160a01b0382166000908152600360205260408120805460019290612b889084906140f4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff1661112c57612c27816001600160a01b031660146131bb565b612c328360206131bb565b604051602001612c43929190613ff3565b60408051601f198184030181529082905262461bcd60e51b8252610d45916004016140b0565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff1661112c576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612cc73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff161561112c576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815b8551811015612e32576000868281518110612db057612db0614245565b60200260200101519050808311612df2576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612e1f565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612e2a816141d4565b915050612d93565b509092149392505050565b61112c828260405180602001604052806000815250613364565b600f54600090600160b01b900460ff1680156127b9575050600f54600160b81b900460ff161590565b600f54600090600160a01b900460ff1680156127b9575050600f54600160b81b900460ff161590565b612710811115612efb5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610d45565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600c8054600160a01b9093027fffffffffffffffffff0000000000000000000000000000000000000000000000909316909117919091179055565b612f68848484612a2a565b612f74848484846133e2565b61227c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610d45565b600f54600090600160a81b900460ff1680156127b9575050600f54600160b81b900460ff161590565b6000818152600260205260409020546060906001600160a01b03166130835760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d45565b600061308d61353a565b905060008151116130ad576040518060200160405280600081525061150f565b806130b784613549565b6040516020016130c8929190613f13565b6040516020818303038152906040529392505050565b60006001600160e01b03198216637965db0b60e01b1480610c385750610c3882613647565b6001600160a01b03831661315e5761315981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613181565b816001600160a01b0316836001600160a01b03161461318157613181838261366c565b6001600160a01b03821661319857610e7b81613709565b826001600160a01b0316826001600160a01b031614610e7b57610e7b82826137b8565b606060006131ca836002614120565b6131d59060026140f4565b67ffffffffffffffff8111156131ed576131ed61425b565b6040519080825280601f01601f191660200182016040528015613217576020820181803683370190505b509050600360fc1b8160008151811061323257613232614245565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061326157613261614245565b60200101906001600160f81b031916908160001a9053506000613285846002614120565b6132909060016140f4565b90505b6001811115613315577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106132d1576132d1614245565b1a60f81b8282815181106132e7576132e7614245565b60200101906001600160f81b031916908160001a90535060049490941c9361330e81614182565b9050613293565b50831561150f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d45565b61336e83836137fc565b61337b60008484846133e2565b610e7b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610d45565b60006001600160a01b0384163b1561352f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613426903390899088908890600401614074565b602060405180830381600087803b15801561344057600080fd5b505af1925050508015613470575060408051601f3d908101601f1916820190925261346d91810190613e08565b60015b613515573d80801561349e576040519150601f19603f3d011682016040523d82523d6000602084013e6134a3565b606091505b50805161350d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610d45565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a22565b506001949350505050565b606060178054610c4d90614199565b60608161356d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156135975780613581816141d4565b91506135909050600a8361410c565b9150613571565b60008167ffffffffffffffff8111156135b2576135b261425b565b6040519080825280601f01601f1916602001820160405280156135dc576020820181803683370190505b5090505b8415612a22576135f160018361413f565b91506135fe600a866141ef565b6136099060306140f4565b60f81b81838151811061361e5761361e614245565b60200101906001600160f81b031916908160001a905350613640600a8661410c565b94506135e0565b60006001600160e01b0319821663780e9d6360e01b1480610c385750610c388261394a565b6000600161367984611ba4565b613683919061413f565b6000838152600760205260409020549091508082146136d6576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061371b9060019061413f565b6000838152600960205260408120546008805493945090928490811061374357613743614245565b90600052602060002001549050806008838154811061376457613764614245565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061379c5761379c61422f565b6001900381819060005260206000200160009055905550505050565b60006137c383611ba4565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166138525760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d45565b6000818152600260205260409020546001600160a01b0316156138b75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d45565b6138c360008383613103565b6001600160a01b03821660009081526003602052604081208054600192906138ec9084906140f4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b031982166380ac58cd60e01b148061397b57506001600160e01b03198216635b5e139f60e01b145b80610c3857506301ffc9a760e01b6001600160e01b0319831614610c38565b8280546139a690614199565b90600052602060002090601f0160209004810192826139c85760008555613a0e565b82601f106139e15782800160ff19823516178555613a0e565b82800160010185558215613a0e579182015b82811115613a0e5782358255916020019190600101906139f3565b50613a1a929150613a1e565b5090565b5b80821115613a1a5760008155600101613a1f565b80356001600160a01b0381168114613a4a57600080fd5b919050565b80358015158114613a4a57600080fd5b60008083601f840112613a7157600080fd5b50813567ffffffffffffffff811115613a8957600080fd5b602083019150836020828501011115613aa157600080fd5b9250929050565b803560ff81168114613a4a57600080fd5b600060208284031215613acb57600080fd5b61150f82613a33565b60008060408385031215613ae757600080fd5b613af083613a33565b9150613afe60208401613a33565b90509250929050565b600080600060608486031215613b1c57600080fd5b613b2584613a33565b9250613b3360208501613a33565b9150604084013590509250925092565b60008060008060808587031215613b5957600080fd5b613b6285613a33565b93506020613b71818701613a33565b935060408601359250606086013567ffffffffffffffff80821115613b9557600080fd5b818801915088601f830112613ba957600080fd5b813581811115613bbb57613bbb61425b565b613bcd601f8201601f191685016140c3565b91508082528984828501011115613be357600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060408385031215613c1657600080fd5b613c1f83613a33565b9150613afe60208401613a4f565b60008060408385031215613c4057600080fd5b613c4983613a33565b946020939093013593505050565b600080600060408486031215613c6c57600080fd5b833567ffffffffffffffff80821115613c8457600080fd5b818601915086601f830112613c9857600080fd5b813581811115613ca757600080fd5b8760208260051b8501011115613cbc57600080fd5b602092830195509350613cd29186019050613aa8565b90509250925092565b600060208284031215613ced57600080fd5b61150f82613a4f565b600060208284031215613d0857600080fd5b5035919050565b60008060408385031215613d2257600080fd5b82359150613afe60208401613a33565b60008060408385031215613d4557600080fd5b8235915060208084013567ffffffffffffffff80821115613d6557600080fd5b818601915086601f830112613d7957600080fd5b813581811115613d8b57613d8b61425b565b8060051b9150613d9c8483016140c3565b8181528481019084860184860187018b1015613db757600080fd5b600095505b83861015613dda578035835260019590950194918601918601613dbc565b508096505050505050509250929050565b600060208284031215613dfd57600080fd5b813561150f81614271565b600060208284031215613e1a57600080fd5b815161150f81614271565b60008060008060408587031215613e3b57600080fd5b843567ffffffffffffffff80821115613e5357600080fd5b613e5f88838901613a5f565b90965094506020870135915080821115613e7857600080fd5b50613e8587828801613a5f565b95989497509550505050565b600060208284031215613ea357600080fd5b5051919050565b60008060408385031215613ebd57600080fd5b50508035926020909101359150565b600060208284031215613ede57600080fd5b61150f82613aa8565b60008151808452613eff816020860160208601614156565b601f01601f19169290920160200192915050565b60008351613f25818460208801614156565b835190830190613f39818360208801614156565b01949350505050565b600083516020613f558285838901614156565b845491840191600090600181811c9080831680613f7357607f831692505b858310811415613f9157634e487b7160e01b85526022600452602485fd5b808015613fa55760018114613fb657613fe3565b60ff19851688528388019550613fe3565b60008b81526020902060005b85811015613fdb5781548a820152908401908801613fc2565b505083880195505b50939a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161402b816017850160208801614156565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614068816028840160208801614156565b01602801949350505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526140a66080830184613ee7565b9695505050505050565b60208152600061150f6020830184613ee7565b604051601f8201601f1916810167ffffffffffffffff811182821017156140ec576140ec61425b565b604052919050565b6000821982111561410757614107614203565b500190565b60008261411b5761411b614219565b500490565b600081600019048311821515161561413a5761413a614203565b500290565b60008282101561415157614151614203565b500390565b60005b83811015614171578181015183820152602001614159565b8381111561227c5750506000910152565b60008161419157614191614203565b506000190190565b600181811c908216806141ad57607f821691505b602082108114156141ce57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156141e8576141e8614203565b5060010190565b6000826141fe576141fe614219565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461213357600080fdfe486f6c657950656f706c653a4143434553535f44454e49454400000000000000c95e36e7d138d7f7746dd268500efba0e7b562881b6fceb028c25eb9f900ad8da164736f6c6343000806000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d6000000000000000000000000731b19acaa0ae77aea8bf8515f6dcdb894c248c2c201603ef5547f632a146c306cc496afaa9c110c6928614454514af37346252f

-----Decoded View---------------
Arg [0] : _nContractAddress (address): 0x05a46f1E545526FB803FF974C790aCeA34D1f2D6
Arg [1] : nOwnersRegistry (address): 0x731B19acAA0aE77aEa8bf8515F6DCdB894c248C2
Arg [2] : merkleroot (bytes32): 0xc201603ef5547f632a146c306cc496afaa9c110c6928614454514af37346252f

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d6
Arg [1] : 000000000000000000000000731b19acaa0ae77aea8bf8515f6dcdb894c248c2
Arg [2] : c201603ef5547f632a146c306cc496afaa9c110c6928614454514af37346252f


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.