ETH Price: $3,892.19 (-0.61%)

Token

Metadventure Gen 1 (MAGEN1)
 

Overview

Max Total Supply

333 MAGEN1

Holders

226

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 MAGEN1
0x400bcb08aeda22862577ca2bd23c91af78a1ee6b
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:
MetadventureGen1

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 19 : MetadventureGen1.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import '@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol';
import '@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol';
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

contract MetadventureGen1 is ERC721Enumerable, ERC721Royalty, VRFConsumerBaseV2, Ownable {
    using Strings for uint256;

    VRFCoordinatorV2Interface COORDINATOR;

    uint256 public cost = 0.04 ether;
    uint256 public whitelistedCost = 0.02 ether;
    uint256 public maxSupply = 8000;
    uint256 public maxMintAmount = 4;
    bool public paused = false;
    uint public releaseDate = 1670173200;
    uint public whitelistReleaseDate = 1670173200;

    string public allInitialMetadataEncrypted;
    string public initialIpfsBaseUri;
    string public initialArdriveBaseUri;
    string public allMetadataEncrypted;
    string public baseURI;
    string public ipfsBaseURI;
    string public ardriveBaseURI;
    bytes32 private whitelistRoot;
    uint256 public tokenGap;
    uint256 private requestId;

    uint64 subscriptionId;
    bytes32 keyHash;

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _initBaseURI,
        bytes32 _whitelistRoot,
        string memory _allInitialMetadataEncrypted,
        address _vrfCoordinator,
        uint64 _subscriptionId,
        bytes32 _keyHash
    )
    VRFConsumerBaseV2(_vrfCoordinator)
    ERC721(_name, _symbol) {
        setBaseURI(_initBaseURI);
        setRoyalty(msg.sender, 5000);
        whitelistRoot = _whitelistRoot;
        allInitialMetadataEncrypted = _allInitialMetadataEncrypted;

        COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator);
        subscriptionId = _subscriptionId;
        keyHash = _keyHash;
    }

    // internal

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

    function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override {
        tokenGap = (_randomWords[0] % 8000) + 1;
        requestId = _requestId;
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function _burn(uint256 tokenId) internal override(ERC721, ERC721Royalty) {
        super._burn(tokenId);
    }

    // public

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "Undefined token");

        string memory currentBaseURI = _baseURI();
        return
            bytes(currentBaseURI).length > 0
                ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), ".json"))
                : "";
    }

    function tokenURIByServices(uint256 tokenId, bool permanent) public view virtual returns (string memory) {
        require(_exists(tokenId), "Undefined token");

        string memory serviceUri = permanent ? ardriveBaseURI : ipfsBaseURI;

        return
            bytes(serviceUri).length > 0
                ? string(abi.encodePacked(serviceUri, tokenId.toString(), ".json"))
                : "";
    }

    function mint(address _to, uint256 _mintAmount) public payable {
        require(!paused, "Contract in pause..");
        require(releaseDate <= block.timestamp, "Mint isn't opened");
        require(tx.origin == _to);
        uint256 supply = totalSupply();
        require(_mintAmount > 0, "Lower mint amount");
        require(supply + _mintAmount <= maxSupply, "No enough supply");
        require(balanceOf(msg.sender) + _mintAmount <= maxMintAmount, "Mint limit reached");
        require(msg.value == cost*_mintAmount, "Invalid amount of eth");

        for (uint256 i = 1; i <= _mintAmount;) {
            _safeMint(_to, supply + i);
            unchecked { i++; }
        }
    }

    function isWhitelisted(bytes32[] calldata _proof, bytes32 _leaf) public view returns (bool) {
        return MerkleProof.verify(_proof, whitelistRoot, _leaf);
    }

    function whitelistedMint(bytes32[] calldata _proof, uint256 _mintAmount) public payable {
        require(!paused, "Contract in pause..");
        require(whitelistReleaseDate <= block.timestamp, "Whitelist mint isn't opened");
        require(tx.origin == msg.sender);
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(isWhitelisted(_proof, leaf), "Address not whitelisted");

        uint256 supply = totalSupply();

        require(_mintAmount > 0, "Lower mint amount");
        require(supply + _mintAmount <= maxSupply, "No enough supply");
        require(balanceOf(msg.sender) + _mintAmount <= maxMintAmount, "Mint limit reached");

        uint256 amount = 0;

        if (balanceOf(msg.sender) > 0) {
            amount = _mintAmount * cost;
        } else {
            amount = whitelistedCost + ((_mintAmount-1)*cost);
        }

        require(msg.value == amount, "Invalid amount of eth");

        for (uint256 i = 1; i <= _mintAmount;) {
            _safeMint(msg.sender, supply + i);
            unchecked { i++; }
        }
    }

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

    //only owner
    function setCost(uint256 _newCost) public onlyOwner {
        cost = _newCost;
    }

    function setWhitelistedCost(uint256 _newCost) public onlyOwner {
        whitelistedCost = _newCost;
    }

    function setMaxMintAmount(uint8 _newMaxMintAmount) public onlyOwner {
        maxMintAmount = _newMaxMintAmount;
    }

    function setReleaseDate(uint _newReleaseDate) public onlyOwner {
        releaseDate = _newReleaseDate;
    }

    function setWhitelistReleaseDate(uint _newWhitelistReleaseDate) public onlyOwner {
        whitelistReleaseDate = _newWhitelistReleaseDate;
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseURI = _newBaseURI;
    }

    function setInitialIpfsBaseURI(string calldata _newBaseUri) public onlyOwner {
        initialIpfsBaseUri = _newBaseUri;
    }

    function setInitialArdriveBaseURI(string calldata _newBaseUri) public onlyOwner {
        initialArdriveBaseUri = _newBaseUri;
    }

    function setIpfsBaseURI(string calldata _newBaseUri) public onlyOwner {
        ipfsBaseURI = _newBaseUri;
    }

    function setArdriveBaseURI(string calldata _newBaseUri) public onlyOwner {
        ardriveBaseURI = _newBaseUri;
    }

    function setAllMetadataEncrypted(string calldata _newAllMetadataEncrypted) public onlyOwner {
        require(bytes(allMetadataEncrypted).length == 0, "Hash already setted");
        allMetadataEncrypted = _newAllMetadataEncrypted;
    }

    function setSubscriptionId(uint64 _subscriptionId) public onlyOwner {
        subscriptionId = _subscriptionId;
    }

    function pause(bool _state) public onlyOwner {
        paused = _state;
    }

    function defineTokenGap() public onlyOwner returns (uint256 _requestId) {
        require(tokenGap == 0, "Already defined");
        // Will revert if subscription is not set and funded.
        _requestId = COORDINATOR.requestRandomWords(
            keyHash,
            subscriptionId,
            3,
            100000,
            1
        );

        return _requestId;
    }

    function setRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function ownerMint(address _to, uint256 _mintAmount) public onlyOwner {
        require(!paused, "Contract in pause..");

        uint256 supply = totalSupply();
        require(_mintAmount > 0, "Lower mint amount");
        require(supply + _mintAmount <= maxSupply, "No enough supply");

        for (uint256 i = 1; i <= _mintAmount;) {
            _safeMint(_to, supply + i);
            unchecked { i++; }
        }
    }

    function withdraw() public payable onlyOwner {
        require(payable(msg.sender).send(address(this).balance));
    }
}

File 2 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 19 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

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 6 of 19 : ERC721Royalty.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/ERC721Royalty.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "../../common/ERC2981.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment
 * information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC721Royalty is ERC2981, ERC721 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);
        _resetTokenRoyalty(tokenId);
    }
}

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

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        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: invalid token ID");
        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) {
        _requireMinted(tokenId);

        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 overridden 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 token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token 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: caller is not token 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) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @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 {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 10 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

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

    /**
     * @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 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"bytes32","name":"_whitelistRoot","type":"bytes32"},{"internalType":"string","name":"_allInitialMetadataEncrypted","type":"string"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"allInitialMetadataEncrypted","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allMetadataEncrypted","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ardriveBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defineTokenGap","outputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialArdriveBaseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialIpfsBaseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ipfsBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"bytes32","name":"_leaf","type":"bytes32"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","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":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releaseDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"string","name":"_newAllMetadataEncrypted","type":"string"}],"name":"setAllMetadataEncrypted","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":"_newBaseUri","type":"string"}],"name":"setArdriveBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseUri","type":"string"}],"name":"setInitialArdriveBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseUri","type":"string"}],"name":"setInitialIpfsBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseUri","type":"string"}],"name":"setIpfsBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_newMaxMintAmount","type":"uint8"}],"name":"setMaxMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newReleaseDate","type":"uint256"}],"name":"setReleaseDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_subscriptionId","type":"uint64"}],"name":"setSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newWhitelistReleaseDate","type":"uint256"}],"name":"setWhitelistReleaseDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setWhitelistedCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenGap","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"permanent","type":"bool"}],"name":"tokenURIByServices","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistReleaseDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistedCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"whitelistedMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

60a0604052668e1bc9bf040000600e5566470de4df820000600f55611f4060105560046011556012805460ff1916905563638cd21060138190556014553480156200004957600080fd5b5060405162003d4d38038062003d4d8339810160408190526200006c9162000404565b82888860026200007d838262000585565b5060036200008c828262000585565b5050506001600160a01b0316608052620000a63362000123565b620000b18662000175565b620000bf3361138862000191565b601c8590556015620000d2858262000585565b50600d80546001600160a01b0319166001600160a01b039490941693909317909255601f80546001600160401b0319166001600160401b039290921691909117905560205550620006519350505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200017f620001a7565b60196200018d828262000585565b5050565b6200019b620001a7565b6200018d828262000209565b600c546001600160a01b03163314620002075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b565b6127106001600160601b0382161115620002795760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401620001fe565b6001600160a01b038216620002d15760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001fe565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200033257600080fd5b81516001600160401b03808211156200034f576200034f6200030a565b604051601f8301601f19908116603f011681019082821181831017156200037a576200037a6200030a565b816040528381526020925086838588010111156200039757600080fd5b600091505b83821015620003bb57858201830151818301840152908201906200039c565b600093810190920192909252949350505050565b80516001600160a01b0381168114620003e757600080fd5b919050565b80516001600160401b0381168114620003e757600080fd5b600080600080600080600080610100898b0312156200042257600080fd5b88516001600160401b03808211156200043a57600080fd5b620004488c838d0162000320565b995060208b01519150808211156200045f57600080fd5b6200046d8c838d0162000320565b985060408b01519150808211156200048457600080fd5b620004928c838d0162000320565b975060608b0151965060808b0151915080821115620004b057600080fd5b50620004bf8b828c0162000320565b945050620004d060a08a01620003cf565b9250620004e060c08a01620003ec565b915060e089015190509295985092959890939650565b600181811c908216806200050b57607f821691505b6020821081036200052c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200058057600081815260208120601f850160051c810160208610156200055b5750805b601f850160051c820191505b818110156200057c5782815560010162000567565b5050505b505050565b81516001600160401b03811115620005a157620005a16200030a565b620005b981620005b28454620004f6565b8462000532565b602080601f831160018114620005f15760008415620005d85750858301515b600019600386901b1c1916600185901b1785556200057c565b600085815260208120601f198616915b82811015620006225788860151825594840194600190910190840162000601565b5085821015620006415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6080516136d96200067460003960008181610ce20152610d3d01526136d96000f3fe6080604052600436106103765760003560e01c806349094948116101d15780639f85864211610102578063d5abeb01116100a0578063ee8cc7401161006f578063ee8cc740146109be578063f0fb21b0146109d4578063f2fde38b146109e9578063fd46d78714610a0957600080fd5b8063d5abeb011461092a578063e985e9c514610940578063e9e57d2f14610989578063ea7b4f771461099e57600080fd5b8063b9e3e2db116100dc578063b9e3e2db146108bf578063bf6db8bc146108d5578063c18f233a146108ea578063c87b56dd1461090a57600080fd5b80639f8586421461086a578063a22cb4651461087f578063b88d4fde1461089f57600080fd5b806370a082311161016f57806376837b5f1161014957806376837b5f146108025780638da5cb5b146108175780638f2fc60b1461083557806395d89b411461085557600080fd5b806370a08231146107ad578063715018a6146107cd5780637397727a146107e257600080fd5b80635779ed4a116101ab5780635779ed4a1461073e5780635c975abb1461075e5780636352211e146107785780636c0360eb1461079857600080fd5b806349094948146106e85780634f6ccce7146106fe57806355f804b31461071e57600080fd5b80632a55205a116102ab5780633ccfd60b1161024957806342842e0e1161022357806342842e0e1461067357806344a0d68a1461069357806347aea9dd146106b3578063484b973c146106c857600080fd5b80633ccfd60b146106435780633f6353561461064b57806340c10f191461066057600080fd5b80632f745c59116102855780632f745c59146105d057806330e406b1146105f057806336308f8d1461061057806336c5ae881461062357600080fd5b80632a55205a146105515780632ddb26ce146105905780632e403e4a146105b057600080fd5b806313faede6116103185780631cad77f8116102f25780631cad77f8146104db5780631fe543e3146104fb578063239c70ae1461051b57806323b872dd1461053157600080fd5b806313faede61461048c57806318160ddd146104b05780631bd4b7f0146104c557600080fd5b8063081812fc11610354578063081812fc146103f4578063095ea7b31461042c57806311d3ecd71461044c5780631352faec1461046c57600080fd5b806301ffc9a71461037b57806302329a29146103b057806306fdde03146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004612d4a565b610a29565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103d06103cb366004612d7c565b610a3a565b005b3480156103de57600080fd5b506103e7610a55565b6040516103a79190612de7565b34801561040057600080fd5b5061041461040f366004612dfa565b610ae7565b6040516001600160a01b0390911681526020016103a7565b34801561043857600080fd5b506103d0610447366004612e2a565b610b0e565b34801561045857600080fd5b506103d0610467366004612e54565b610c44565b34801561047857600080fd5b506103d0610487366004612dfa565b610c59565b34801561049857600080fd5b506104a2600e5481565b6040519081526020016103a7565b3480156104bc57600080fd5b50600a546104a2565b3480156104d157600080fd5b506104a2600f5481565b3480156104e757600080fd5b506103d06104f6366004612e54565b610c66565b34801561050757600080fd5b506103d0610516366004612f0d565b610cd7565b34801561052757600080fd5b506104a260115481565b34801561053d57600080fd5b506103d061054c366004612fbf565b610d78565b34801561055d57600080fd5b5061057161056c366004612ffb565b610dff565b604080516001600160a01b0390931683526020830191909152016103a7565b34801561059c57600080fd5b506103d06105ab366004612e54565b610ebc565b3480156105bc57600080fd5b506103e76105cb36600461301d565b610ed1565b3480156105dc57600080fd5b506104a26105eb366004612e2a565b611025565b3480156105fc57600080fd5b506103d061060b366004612dfa565b6110cd565b6103d061061e36600461308e565b6110da565b34801561062f57600080fd5b506103d061063e366004612dfa565b6113ea565b6103d06113f7565b34801561065757600080fd5b506103e7611425565b6103d061066e366004612e2a565b6114b3565b34801561067f57600080fd5b506103d061068e366004612fbf565b6116f3565b34801561069f57600080fd5b506103d06106ae366004612dfa565b61170e565b3480156106bf57600080fd5b506103e761171b565b3480156106d457600080fd5b506103d06106e3366004612e2a565b611728565b3480156106f457600080fd5b506104a2601d5481565b34801561070a57600080fd5b506104a2610719366004612dfa565b611842565b34801561072a57600080fd5b506103d0610739366004613132565b6118e6565b34801561074a57600080fd5b506103d0610759366004612e54565b6118fa565b34801561076a57600080fd5b5060125461039b9060ff1681565b34801561078457600080fd5b50610414610793366004612dfa565b61190f565b3480156107a457600080fd5b506103e7611974565b3480156107b957600080fd5b506104a26107c836600461317b565b611981565b3480156107d957600080fd5b506103d0611a1b565b3480156107ee57600080fd5b5061039b6107fd36600461308e565b611a2d565b34801561080e57600080fd5b506104a2611a70565b34801561082357600080fd5b50600c546001600160a01b0316610414565b34801561084157600080fd5b506103d0610850366004613196565b611b84565b34801561086157600080fd5b506103e7611b96565b34801561087657600080fd5b506103e7611ba5565b34801561088b57600080fd5b506103d061089a3660046131de565b611bb2565b3480156108ab57600080fd5b506103d06108ba366004613208565b611bbd565b3480156108cb57600080fd5b506104a260135481565b3480156108e157600080fd5b506103e7611c45565b3480156108f657600080fd5b506103d0610905366004612e54565b611c52565b34801561091657600080fd5b506103e7610925366004612dfa565b611c67565b34801561093657600080fd5b506104a260105481565b34801561094c57600080fd5b5061039b61095b366004613284565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561099557600080fd5b506103e7611d2a565b3480156109aa57600080fd5b506103d06109b93660046132ae565b611d37565b3480156109ca57600080fd5b506104a260145481565b3480156109e057600080fd5b506103e7611d63565b3480156109f557600080fd5b506103d0610a0436600461317b565b611d70565b348015610a1557600080fd5b506103d0610a243660046132d8565b611e00565b6000610a3482611e10565b92915050565b610a42611e1b565b6012805460ff1916911515919091179055565b606060028054610a64906132fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a90906132fb565b8015610add5780601f10610ab257610100808354040283529160200191610add565b820191906000526020600020905b815481529060010190602001808311610ac057829003601f168201915b5050505050905090565b6000610af282611e75565b506000908152600660205260409020546001600160a01b031690565b6000610b198261190f565b9050806001600160a01b0316836001600160a01b031603610ba75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b0382161480610bc35750610bc3813361095b565b610c355760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610b9e565b610c3f8383611ed9565b505050565b610c4c611e1b565b6016610c3f828483613383565b610c61611e1b565b601355565b610c6e611e1b565b60188054610c7b906132fb565b159050610cca5760405162461bcd60e51b815260206004820152601360248201527f4861736820616c726561647920736574746564000000000000000000000000006044820152606401610b9e565b6018610c3f828483613383565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d6a576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610b9e565b610d748282611f54565b5050565b610d823382611f90565b610df45760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610b9e565b610c3f83838361200e565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610e7e5750604080518082019091526000546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610ea2906bffffffffffffffffffffffff168761345a565b610eac9190613487565b91519350909150505b9250929050565b610ec4611e1b565b601a610c3f828483613383565b6000828152600460205260409020546060906001600160a01b0316610f385760405162461bcd60e51b815260206004820152600f60248201527f556e646566696e656420746f6b656e00000000000000000000000000000000006044820152606401610b9e565b600082610f4657601a610f49565b601b5b8054610f54906132fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f80906132fb565b8015610fcd5780601f10610fa257610100808354040283529160200191610fcd565b820191906000526020600020905b815481529060010190602001808311610fb057829003601f168201915b505050505090506000815111610ff2576040518060200160405280600081525061101d565b80610ffc856121f3565b60405160200161100d92919061349b565b6040516020818303038152906040525b949350505050565b600061103083611981565b82106110a45760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b9e565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6110d5611e1b565b601455565b60125460ff161561112d5760405162461bcd60e51b815260206004820152601360248201527f436f6e747261637420696e2070617573652e2e000000000000000000000000006044820152606401610b9e565b42601454111561117f5760405162461bcd60e51b815260206004820152601b60248201527f57686974656c697374206d696e742069736e2774206f70656e656400000000006044820152606401610b9e565b32331461118b57600080fd5b6040516bffffffffffffffffffffffff193360601b1660208201526000906034016040516020818303038152906040528051906020012090506111cf848483611a2d565b61121b5760405162461bcd60e51b815260206004820152601760248201527f41646472657373206e6f742077686974656c69737465640000000000000000006044820152606401610b9e565b6000611226600a5490565b90506000831161126c5760405162461bcd60e51b8152602060048201526011602482015270131bddd95c881b5a5b9d08185b5bdd5b9d607a1b6044820152606401610b9e565b60105461127984836134f2565b11156112ba5760405162461bcd60e51b815260206004820152601060248201526f4e6f20656e6f75676820737570706c7960801b6044820152606401610b9e565b601154836112c733611981565b6112d191906134f2565b111561131f5760405162461bcd60e51b815260206004820152601260248201527f4d696e74206c696d6974207265616368656400000000000000000000000000006044820152606401610b9e565b60008061132b33611981565b111561134557600e5461133e908561345a565b905061136d565b600e54611353600186613505565b61135d919061345a565b600f5461136a91906134f2565b90505b8034146113bc5760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420616d6f756e74206f662065746800000000000000000000006044820152606401610b9e565b60015b8481116113e1576113d9336113d483866134f2565b612328565b6001016113bf565b50505050505050565b6113f2611e1b565b600f55565b6113ff611e1b565b60405133904780156108fc02916000818181858888f1935050505061142357600080fd5b565b60168054611432906132fb565b80601f016020809104026020016040519081016040528092919081815260200182805461145e906132fb565b80156114ab5780601f10611480576101008083540402835291602001916114ab565b820191906000526020600020905b81548152906001019060200180831161148e57829003601f168201915b505050505081565b60125460ff16156115065760405162461bcd60e51b815260206004820152601360248201527f436f6e747261637420696e2070617573652e2e000000000000000000000000006044820152606401610b9e565b4260135411156115585760405162461bcd60e51b815260206004820152601160248201527f4d696e742069736e2774206f70656e65640000000000000000000000000000006044820152606401610b9e565b326001600160a01b0383161461156d57600080fd5b6000611578600a5490565b9050600082116115be5760405162461bcd60e51b8152602060048201526011602482015270131bddd95c881b5a5b9d08185b5bdd5b9d607a1b6044820152606401610b9e565b6010546115cb83836134f2565b111561160c5760405162461bcd60e51b815260206004820152601060248201526f4e6f20656e6f75676820737570706c7960801b6044820152606401610b9e565b6011548261161933611981565b61162391906134f2565b11156116715760405162461bcd60e51b815260206004820152601260248201527f4d696e74206c696d6974207265616368656400000000000000000000000000006044820152606401610b9e565b81600e5461167f919061345a565b34146116cd5760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420616d6f756e74206f662065746800000000000000000000006044820152606401610b9e565b60015b8281116116ed576116e5846113d483856134f2565b6001016116d0565b50505050565b610c3f83838360405180602001604052806000815250611bbd565b611716611e1b565b600e55565b60188054611432906132fb565b611730611e1b565b60125460ff16156117835760405162461bcd60e51b815260206004820152601360248201527f436f6e747261637420696e2070617573652e2e000000000000000000000000006044820152606401610b9e565b600061178e600a5490565b9050600082116117d45760405162461bcd60e51b8152602060048201526011602482015270131bddd95c881b5a5b9d08185b5bdd5b9d607a1b6044820152606401610b9e565b6010546117e183836134f2565b11156118225760405162461bcd60e51b815260206004820152601060248201526f4e6f20656e6f75676820737570706c7960801b6044820152606401610b9e565b60015b8281116116ed5761183a846113d483856134f2565b600101611825565b600061184d600a5490565b82106118c15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b9e565b600a82815481106118d4576118d4613518565b90600052602060002001549050919050565b6118ee611e1b565b6019610d74828261352e565b611902611e1b565b6017610c3f828483613383565b6000818152600460205260408120546001600160a01b031680610a345760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b9e565b60198054611432906132fb565b60006001600160a01b0382166119ff5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610b9e565b506001600160a01b031660009081526005602052604090205490565b611a23611e1b565b6114236000612342565b600061101d84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c5491508590506123a1565b6000611a7a611e1b565b601d5415611aca5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920646566696e656400000000000000000000000000000000006044820152606401610b9e565b600d54602054601f546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff16602482015260036044820152620186a06064820152600160848201526001600160a01b0390911690635d3b1d309060a4016020604051808303816000875af1158015611b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7f91906135ee565b905090565b611b8c611e1b565b610d7482826123b7565b606060038054610a64906132fb565b60178054611432906132fb565b610d743383836124d1565b611bc73383611f90565b611c395760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610b9e565b6116ed8484848461259f565b60158054611432906132fb565b611c5a611e1b565b601b610c3f828483613383565b6000818152600460205260409020546060906001600160a01b0316611cce5760405162461bcd60e51b815260206004820152600f60248201527f556e646566696e656420746f6b656e00000000000000000000000000000000006044820152606401610b9e565b6000611cd861261d565b90506000815111611cf85760405180602001604052806000815250611d23565b80611d02846121f3565b604051602001611d1392919061349b565b6040516020818303038152906040525b9392505050565b601b8054611432906132fb565b611d3f611e1b565b601f805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b601a8054611432906132fb565b611d78611e1b565b6001600160a01b038116611df45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b9e565b611dfd81612342565b50565b611e08611e1b565b60ff16601155565b6000610a348261262c565b600c546001600160a01b031633146114235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b9e565b6000818152600460205260409020546001600160a01b0316611dfd5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b9e565b6000818152600660205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611f1b8261190f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611f4081600081518110611f6a57611f6a613518565b6020026020010151611f7c9190613607565b611f879060016134f2565b601d5550601e55565b600080611f9c8361190f565b9050806001600160a01b0316846001600160a01b03161480611fe357506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b8061101d5750836001600160a01b0316611ffc84610ae7565b6001600160a01b031614949350505050565b826001600160a01b03166120218261190f565b6001600160a01b03161461209d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b9e565b6001600160a01b0382166121185760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b9e565b61212383838361266a565b61212e600082611ed9565b6001600160a01b0383166000908152600560205260408120805460019290612157908490613505565b90915550506001600160a01b03821660009081526005602052604081208054600192906121859084906134f2565b9091555050600081815260046020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60608160000361223657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612260578061224a8161361b565b91506122599050600a83613487565b915061223a565b60008167ffffffffffffffff81111561227b5761227b612ec6565b6040519080825280601f01601f1916602001820160405280156122a5576020820181803683370190505b5090505b841561101d576122ba600183613505565b91506122c7600a86613607565b6122d29060306134f2565b60f81b8183815181106122e7576122e7613518565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612321600a86613487565b94506122a9565b610d74828260405180602001604052806000815250612675565b600c80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826123ae85846126f3565b14949350505050565b6127106bffffffffffffffffffffffff8216111561243d5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610b9e565b6001600160a01b0382166124935760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b9e565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600055565b816001600160a01b0316836001600160a01b0316036125325760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b9e565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6125aa84848461200e565b6125b684848484612740565b6116ed5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b9e565b606060198054610a64906132fb565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610a345750610a348261288c565b610c3f8383836128fe565b61267f83836129b6565b61268c6000848484612740565b610c3f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b9e565b600081815b8451811015612738576127248286838151811061271757612717613518565b6020026020010151612b11565b9150806127308161361b565b9150506126f8565b509392505050565b60006001600160a01b0384163b1561288157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612784903390899088908890600401613634565b6020604051808303816000875af19250505080156127bf575060408051601f3d908101601f191682019092526127bc91810190613670565b60015b612867573d8080156127ed576040519150601f19603f3d011682016040523d82523d6000602084013e6127f2565b606091505b50805160000361285f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b9e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061101d565b506001949350505050565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806128ef57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a345750610a3482612b3d565b6001600160a01b0383166129595761295481600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b61297c565b816001600160a01b0316836001600160a01b03161461297c5761297c8382612ba4565b6001600160a01b03821661299357610c3f81612c41565b826001600160a01b0316826001600160a01b031614610c3f57610c3f8282612cf0565b6001600160a01b038216612a0c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b9e565b6000818152600460205260409020546001600160a01b031615612a715760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b9e565b612a7d6000838361266a565b6001600160a01b0382166000908152600560205260408120805460019290612aa69084906134f2565b9091555050600081815260046020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818310612b2d576000828152602084905260409020611d23565b5060009182526020526040902090565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610a3457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a34565b60006001612bb184611981565b612bbb9190613505565b600083815260096020526040902054909150808214612c0e576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090612c5390600190613505565b6000838152600b6020526040812054600a8054939450909284908110612c7b57612c7b613518565b9060005260206000200154905080600a8381548110612c9c57612c9c613518565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480612cd457612cd461368d565b6001900381819060005260206000200160009055905550505050565b6000612cfb83611981565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160e01b031981168114611dfd57600080fd5b600060208284031215612d5c57600080fd5b8135611d2381612d34565b80358015158114612d7757600080fd5b919050565b600060208284031215612d8e57600080fd5b611d2382612d67565b60005b83811015612db2578181015183820152602001612d9a565b50506000910152565b60008151808452612dd3816020860160208601612d97565b601f01601f19169290920160200192915050565b602081526000611d236020830184612dbb565b600060208284031215612e0c57600080fd5b5035919050565b80356001600160a01b0381168114612d7757600080fd5b60008060408385031215612e3d57600080fd5b612e4683612e13565b946020939093013593505050565b60008060208385031215612e6757600080fd5b823567ffffffffffffffff80821115612e7f57600080fd5b818501915085601f830112612e9357600080fd5b813581811115612ea257600080fd5b866020828501011115612eb457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612f0557612f05612ec6565b604052919050565b60008060408385031215612f2057600080fd5b8235915060208084013567ffffffffffffffff80821115612f4057600080fd5b818601915086601f830112612f5457600080fd5b813581811115612f6657612f66612ec6565b8060051b9150612f77848301612edc565b8181529183018401918481019089841115612f9157600080fd5b938501935b83851015612faf57843582529385019390850190612f96565b8096505050505050509250929050565b600080600060608486031215612fd457600080fd5b612fdd84612e13565b9250612feb60208501612e13565b9150604084013590509250925092565b6000806040838503121561300e57600080fd5b50508035926020909101359150565b6000806040838503121561303057600080fd5b8235915061304060208401612d67565b90509250929050565b60008083601f84011261305b57600080fd5b50813567ffffffffffffffff81111561307357600080fd5b6020830191508360208260051b8501011115610eb557600080fd5b6000806000604084860312156130a357600080fd5b833567ffffffffffffffff8111156130ba57600080fd5b6130c686828701613049565b909790965060209590950135949350505050565b600067ffffffffffffffff8311156130f4576130f4612ec6565b613107601f8401601f1916602001612edc565b905082815283838301111561311b57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561314457600080fd5b813567ffffffffffffffff81111561315b57600080fd5b8201601f8101841361316c57600080fd5b61101d848235602084016130da565b60006020828403121561318d57600080fd5b611d2382612e13565b600080604083850312156131a957600080fd5b6131b283612e13565b915060208301356bffffffffffffffffffffffff811681146131d357600080fd5b809150509250929050565b600080604083850312156131f157600080fd5b6131fa83612e13565b915061304060208401612d67565b6000806000806080858703121561321e57600080fd5b61322785612e13565b935061323560208601612e13565b925060408501359150606085013567ffffffffffffffff81111561325857600080fd5b8501601f8101871361326957600080fd5b613278878235602084016130da565b91505092959194509250565b6000806040838503121561329757600080fd5b6132a083612e13565b915061304060208401612e13565b6000602082840312156132c057600080fd5b813567ffffffffffffffff81168114611d2357600080fd5b6000602082840312156132ea57600080fd5b813560ff81168114611d2357600080fd5b600181811c9082168061330f57607f821691505b60208210810361332f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c3f57600081815260208120601f850160051c8101602086101561335c5750805b601f850160051c820191505b8181101561337b57828155600101613368565b505050505050565b67ffffffffffffffff83111561339b5761339b612ec6565b6133af836133a983546132fb565b83613335565b6000601f8411600181146133e357600085156133cb5750838201355b600019600387901b1c1916600186901b17835561343d565b600083815260209020601f19861690835b8281101561341457868501358255602094850194600190920191016133f4565b50868210156134315760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a3457610a34613444565b634e487b7160e01b600052601260045260246000fd5b60008261349657613496613471565b500490565b600083516134ad818460208801612d97565b8351908301906134c1818360208801612d97565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b80820180821115610a3457610a34613444565b81810381811115610a3457610a34613444565b634e487b7160e01b600052603260045260246000fd5b815167ffffffffffffffff81111561354857613548612ec6565b61355c8161355684546132fb565b84613335565b602080601f83116001811461359157600084156135795750858301515b600019600386901b1c1916600185901b17855561337b565b600085815260208120601f198616915b828110156135c0578886015182559484019460019091019084016135a1565b50858210156135de5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561360057600080fd5b5051919050565b60008261361657613616613471565b500690565b60006001820161362d5761362d613444565b5060010190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526136666080830184612dbb565b9695505050505050565b60006020828403121561368257600080fd5b8151611d2381612d34565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220650c104a39e9cf584b8c0ce2a1c9333a44b5b67e4d3ab8d4a2664984868d832f64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180edbf5b3fc03782d7c02d507fd97e089bdf0f7f207ba292b734eab170799a716b00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990900000000000000000000000000000000000000000000000000000000000001ed8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000000124d6574616476656e747572652047656e2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064d4147454e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e68747470733a2f2f6d6574616476656e747572652e73332e65752d776573742d312e616d617a6f6e6177732e636f6d2f67656e312f6d657461646174612f0000000000000000000000000000000000000000000000000000000000000000004061643765346363393931383233373162316165636465353732623234623865356434393434633932383366633665373837663735346462326439633030363239

Deployed Bytecode

0x6080604052600436106103765760003560e01c806349094948116101d15780639f85864211610102578063d5abeb01116100a0578063ee8cc7401161006f578063ee8cc740146109be578063f0fb21b0146109d4578063f2fde38b146109e9578063fd46d78714610a0957600080fd5b8063d5abeb011461092a578063e985e9c514610940578063e9e57d2f14610989578063ea7b4f771461099e57600080fd5b8063b9e3e2db116100dc578063b9e3e2db146108bf578063bf6db8bc146108d5578063c18f233a146108ea578063c87b56dd1461090a57600080fd5b80639f8586421461086a578063a22cb4651461087f578063b88d4fde1461089f57600080fd5b806370a082311161016f57806376837b5f1161014957806376837b5f146108025780638da5cb5b146108175780638f2fc60b1461083557806395d89b411461085557600080fd5b806370a08231146107ad578063715018a6146107cd5780637397727a146107e257600080fd5b80635779ed4a116101ab5780635779ed4a1461073e5780635c975abb1461075e5780636352211e146107785780636c0360eb1461079857600080fd5b806349094948146106e85780634f6ccce7146106fe57806355f804b31461071e57600080fd5b80632a55205a116102ab5780633ccfd60b1161024957806342842e0e1161022357806342842e0e1461067357806344a0d68a1461069357806347aea9dd146106b3578063484b973c146106c857600080fd5b80633ccfd60b146106435780633f6353561461064b57806340c10f191461066057600080fd5b80632f745c59116102855780632f745c59146105d057806330e406b1146105f057806336308f8d1461061057806336c5ae881461062357600080fd5b80632a55205a146105515780632ddb26ce146105905780632e403e4a146105b057600080fd5b806313faede6116103185780631cad77f8116102f25780631cad77f8146104db5780631fe543e3146104fb578063239c70ae1461051b57806323b872dd1461053157600080fd5b806313faede61461048c57806318160ddd146104b05780631bd4b7f0146104c557600080fd5b8063081812fc11610354578063081812fc146103f4578063095ea7b31461042c57806311d3ecd71461044c5780631352faec1461046c57600080fd5b806301ffc9a71461037b57806302329a29146103b057806306fdde03146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004612d4a565b610a29565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103d06103cb366004612d7c565b610a3a565b005b3480156103de57600080fd5b506103e7610a55565b6040516103a79190612de7565b34801561040057600080fd5b5061041461040f366004612dfa565b610ae7565b6040516001600160a01b0390911681526020016103a7565b34801561043857600080fd5b506103d0610447366004612e2a565b610b0e565b34801561045857600080fd5b506103d0610467366004612e54565b610c44565b34801561047857600080fd5b506103d0610487366004612dfa565b610c59565b34801561049857600080fd5b506104a2600e5481565b6040519081526020016103a7565b3480156104bc57600080fd5b50600a546104a2565b3480156104d157600080fd5b506104a2600f5481565b3480156104e757600080fd5b506103d06104f6366004612e54565b610c66565b34801561050757600080fd5b506103d0610516366004612f0d565b610cd7565b34801561052757600080fd5b506104a260115481565b34801561053d57600080fd5b506103d061054c366004612fbf565b610d78565b34801561055d57600080fd5b5061057161056c366004612ffb565b610dff565b604080516001600160a01b0390931683526020830191909152016103a7565b34801561059c57600080fd5b506103d06105ab366004612e54565b610ebc565b3480156105bc57600080fd5b506103e76105cb36600461301d565b610ed1565b3480156105dc57600080fd5b506104a26105eb366004612e2a565b611025565b3480156105fc57600080fd5b506103d061060b366004612dfa565b6110cd565b6103d061061e36600461308e565b6110da565b34801561062f57600080fd5b506103d061063e366004612dfa565b6113ea565b6103d06113f7565b34801561065757600080fd5b506103e7611425565b6103d061066e366004612e2a565b6114b3565b34801561067f57600080fd5b506103d061068e366004612fbf565b6116f3565b34801561069f57600080fd5b506103d06106ae366004612dfa565b61170e565b3480156106bf57600080fd5b506103e761171b565b3480156106d457600080fd5b506103d06106e3366004612e2a565b611728565b3480156106f457600080fd5b506104a2601d5481565b34801561070a57600080fd5b506104a2610719366004612dfa565b611842565b34801561072a57600080fd5b506103d0610739366004613132565b6118e6565b34801561074a57600080fd5b506103d0610759366004612e54565b6118fa565b34801561076a57600080fd5b5060125461039b9060ff1681565b34801561078457600080fd5b50610414610793366004612dfa565b61190f565b3480156107a457600080fd5b506103e7611974565b3480156107b957600080fd5b506104a26107c836600461317b565b611981565b3480156107d957600080fd5b506103d0611a1b565b3480156107ee57600080fd5b5061039b6107fd36600461308e565b611a2d565b34801561080e57600080fd5b506104a2611a70565b34801561082357600080fd5b50600c546001600160a01b0316610414565b34801561084157600080fd5b506103d0610850366004613196565b611b84565b34801561086157600080fd5b506103e7611b96565b34801561087657600080fd5b506103e7611ba5565b34801561088b57600080fd5b506103d061089a3660046131de565b611bb2565b3480156108ab57600080fd5b506103d06108ba366004613208565b611bbd565b3480156108cb57600080fd5b506104a260135481565b3480156108e157600080fd5b506103e7611c45565b3480156108f657600080fd5b506103d0610905366004612e54565b611c52565b34801561091657600080fd5b506103e7610925366004612dfa565b611c67565b34801561093657600080fd5b506104a260105481565b34801561094c57600080fd5b5061039b61095b366004613284565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561099557600080fd5b506103e7611d2a565b3480156109aa57600080fd5b506103d06109b93660046132ae565b611d37565b3480156109ca57600080fd5b506104a260145481565b3480156109e057600080fd5b506103e7611d63565b3480156109f557600080fd5b506103d0610a0436600461317b565b611d70565b348015610a1557600080fd5b506103d0610a243660046132d8565b611e00565b6000610a3482611e10565b92915050565b610a42611e1b565b6012805460ff1916911515919091179055565b606060028054610a64906132fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a90906132fb565b8015610add5780601f10610ab257610100808354040283529160200191610add565b820191906000526020600020905b815481529060010190602001808311610ac057829003601f168201915b5050505050905090565b6000610af282611e75565b506000908152600660205260409020546001600160a01b031690565b6000610b198261190f565b9050806001600160a01b0316836001600160a01b031603610ba75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b0382161480610bc35750610bc3813361095b565b610c355760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610b9e565b610c3f8383611ed9565b505050565b610c4c611e1b565b6016610c3f828483613383565b610c61611e1b565b601355565b610c6e611e1b565b60188054610c7b906132fb565b159050610cca5760405162461bcd60e51b815260206004820152601360248201527f4861736820616c726561647920736574746564000000000000000000000000006044820152606401610b9e565b6018610c3f828483613383565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610d6a576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610b9e565b610d748282611f54565b5050565b610d823382611f90565b610df45760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610b9e565b610c3f83838361200e565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610e7e5750604080518082019091526000546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610ea2906bffffffffffffffffffffffff168761345a565b610eac9190613487565b91519350909150505b9250929050565b610ec4611e1b565b601a610c3f828483613383565b6000828152600460205260409020546060906001600160a01b0316610f385760405162461bcd60e51b815260206004820152600f60248201527f556e646566696e656420746f6b656e00000000000000000000000000000000006044820152606401610b9e565b600082610f4657601a610f49565b601b5b8054610f54906132fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f80906132fb565b8015610fcd5780601f10610fa257610100808354040283529160200191610fcd565b820191906000526020600020905b815481529060010190602001808311610fb057829003601f168201915b505050505090506000815111610ff2576040518060200160405280600081525061101d565b80610ffc856121f3565b60405160200161100d92919061349b565b6040516020818303038152906040525b949350505050565b600061103083611981565b82106110a45760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b9e565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6110d5611e1b565b601455565b60125460ff161561112d5760405162461bcd60e51b815260206004820152601360248201527f436f6e747261637420696e2070617573652e2e000000000000000000000000006044820152606401610b9e565b42601454111561117f5760405162461bcd60e51b815260206004820152601b60248201527f57686974656c697374206d696e742069736e2774206f70656e656400000000006044820152606401610b9e565b32331461118b57600080fd5b6040516bffffffffffffffffffffffff193360601b1660208201526000906034016040516020818303038152906040528051906020012090506111cf848483611a2d565b61121b5760405162461bcd60e51b815260206004820152601760248201527f41646472657373206e6f742077686974656c69737465640000000000000000006044820152606401610b9e565b6000611226600a5490565b90506000831161126c5760405162461bcd60e51b8152602060048201526011602482015270131bddd95c881b5a5b9d08185b5bdd5b9d607a1b6044820152606401610b9e565b60105461127984836134f2565b11156112ba5760405162461bcd60e51b815260206004820152601060248201526f4e6f20656e6f75676820737570706c7960801b6044820152606401610b9e565b601154836112c733611981565b6112d191906134f2565b111561131f5760405162461bcd60e51b815260206004820152601260248201527f4d696e74206c696d6974207265616368656400000000000000000000000000006044820152606401610b9e565b60008061132b33611981565b111561134557600e5461133e908561345a565b905061136d565b600e54611353600186613505565b61135d919061345a565b600f5461136a91906134f2565b90505b8034146113bc5760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420616d6f756e74206f662065746800000000000000000000006044820152606401610b9e565b60015b8481116113e1576113d9336113d483866134f2565b612328565b6001016113bf565b50505050505050565b6113f2611e1b565b600f55565b6113ff611e1b565b60405133904780156108fc02916000818181858888f1935050505061142357600080fd5b565b60168054611432906132fb565b80601f016020809104026020016040519081016040528092919081815260200182805461145e906132fb565b80156114ab5780601f10611480576101008083540402835291602001916114ab565b820191906000526020600020905b81548152906001019060200180831161148e57829003601f168201915b505050505081565b60125460ff16156115065760405162461bcd60e51b815260206004820152601360248201527f436f6e747261637420696e2070617573652e2e000000000000000000000000006044820152606401610b9e565b4260135411156115585760405162461bcd60e51b815260206004820152601160248201527f4d696e742069736e2774206f70656e65640000000000000000000000000000006044820152606401610b9e565b326001600160a01b0383161461156d57600080fd5b6000611578600a5490565b9050600082116115be5760405162461bcd60e51b8152602060048201526011602482015270131bddd95c881b5a5b9d08185b5bdd5b9d607a1b6044820152606401610b9e565b6010546115cb83836134f2565b111561160c5760405162461bcd60e51b815260206004820152601060248201526f4e6f20656e6f75676820737570706c7960801b6044820152606401610b9e565b6011548261161933611981565b61162391906134f2565b11156116715760405162461bcd60e51b815260206004820152601260248201527f4d696e74206c696d6974207265616368656400000000000000000000000000006044820152606401610b9e565b81600e5461167f919061345a565b34146116cd5760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420616d6f756e74206f662065746800000000000000000000006044820152606401610b9e565b60015b8281116116ed576116e5846113d483856134f2565b6001016116d0565b50505050565b610c3f83838360405180602001604052806000815250611bbd565b611716611e1b565b600e55565b60188054611432906132fb565b611730611e1b565b60125460ff16156117835760405162461bcd60e51b815260206004820152601360248201527f436f6e747261637420696e2070617573652e2e000000000000000000000000006044820152606401610b9e565b600061178e600a5490565b9050600082116117d45760405162461bcd60e51b8152602060048201526011602482015270131bddd95c881b5a5b9d08185b5bdd5b9d607a1b6044820152606401610b9e565b6010546117e183836134f2565b11156118225760405162461bcd60e51b815260206004820152601060248201526f4e6f20656e6f75676820737570706c7960801b6044820152606401610b9e565b60015b8281116116ed5761183a846113d483856134f2565b600101611825565b600061184d600a5490565b82106118c15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b9e565b600a82815481106118d4576118d4613518565b90600052602060002001549050919050565b6118ee611e1b565b6019610d74828261352e565b611902611e1b565b6017610c3f828483613383565b6000818152600460205260408120546001600160a01b031680610a345760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b9e565b60198054611432906132fb565b60006001600160a01b0382166119ff5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610b9e565b506001600160a01b031660009081526005602052604090205490565b611a23611e1b565b6114236000612342565b600061101d84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c5491508590506123a1565b6000611a7a611e1b565b601d5415611aca5760405162461bcd60e51b815260206004820152600f60248201527f416c726561647920646566696e656400000000000000000000000000000000006044820152606401610b9e565b600d54602054601f546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff16602482015260036044820152620186a06064820152600160848201526001600160a01b0390911690635d3b1d309060a4016020604051808303816000875af1158015611b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7f91906135ee565b905090565b611b8c611e1b565b610d7482826123b7565b606060038054610a64906132fb565b60178054611432906132fb565b610d743383836124d1565b611bc73383611f90565b611c395760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610b9e565b6116ed8484848461259f565b60158054611432906132fb565b611c5a611e1b565b601b610c3f828483613383565b6000818152600460205260409020546060906001600160a01b0316611cce5760405162461bcd60e51b815260206004820152600f60248201527f556e646566696e656420746f6b656e00000000000000000000000000000000006044820152606401610b9e565b6000611cd861261d565b90506000815111611cf85760405180602001604052806000815250611d23565b80611d02846121f3565b604051602001611d1392919061349b565b6040516020818303038152906040525b9392505050565b601b8054611432906132fb565b611d3f611e1b565b601f805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b601a8054611432906132fb565b611d78611e1b565b6001600160a01b038116611df45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b9e565b611dfd81612342565b50565b611e08611e1b565b60ff16601155565b6000610a348261262c565b600c546001600160a01b031633146114235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b9e565b6000818152600460205260409020546001600160a01b0316611dfd5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b9e565b6000818152600660205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611f1b8261190f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611f4081600081518110611f6a57611f6a613518565b6020026020010151611f7c9190613607565b611f879060016134f2565b601d5550601e55565b600080611f9c8361190f565b9050806001600160a01b0316846001600160a01b03161480611fe357506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b8061101d5750836001600160a01b0316611ffc84610ae7565b6001600160a01b031614949350505050565b826001600160a01b03166120218261190f565b6001600160a01b03161461209d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b9e565b6001600160a01b0382166121185760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b9e565b61212383838361266a565b61212e600082611ed9565b6001600160a01b0383166000908152600560205260408120805460019290612157908490613505565b90915550506001600160a01b03821660009081526005602052604081208054600192906121859084906134f2565b9091555050600081815260046020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60608160000361223657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612260578061224a8161361b565b91506122599050600a83613487565b915061223a565b60008167ffffffffffffffff81111561227b5761227b612ec6565b6040519080825280601f01601f1916602001820160405280156122a5576020820181803683370190505b5090505b841561101d576122ba600183613505565b91506122c7600a86613607565b6122d29060306134f2565b60f81b8183815181106122e7576122e7613518565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612321600a86613487565b94506122a9565b610d74828260405180602001604052806000815250612675565b600c80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826123ae85846126f3565b14949350505050565b6127106bffffffffffffffffffffffff8216111561243d5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610b9e565b6001600160a01b0382166124935760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b9e565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600055565b816001600160a01b0316836001600160a01b0316036125325760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b9e565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6125aa84848461200e565b6125b684848484612740565b6116ed5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b9e565b606060198054610a64906132fb565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610a345750610a348261288c565b610c3f8383836128fe565b61267f83836129b6565b61268c6000848484612740565b610c3f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b9e565b600081815b8451811015612738576127248286838151811061271757612717613518565b6020026020010151612b11565b9150806127308161361b565b9150506126f8565b509392505050565b60006001600160a01b0384163b1561288157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612784903390899088908890600401613634565b6020604051808303816000875af19250505080156127bf575060408051601f3d908101601f191682019092526127bc91810190613670565b60015b612867573d8080156127ed576040519150601f19603f3d011682016040523d82523d6000602084013e6127f2565b606091505b50805160000361285f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b9e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061101d565b506001949350505050565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806128ef57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a345750610a3482612b3d565b6001600160a01b0383166129595761295481600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b61297c565b816001600160a01b0316836001600160a01b03161461297c5761297c8382612ba4565b6001600160a01b03821661299357610c3f81612c41565b826001600160a01b0316826001600160a01b031614610c3f57610c3f8282612cf0565b6001600160a01b038216612a0c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b9e565b6000818152600460205260409020546001600160a01b031615612a715760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b9e565b612a7d6000838361266a565b6001600160a01b0382166000908152600560205260408120805460019290612aa69084906134f2565b9091555050600081815260046020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818310612b2d576000828152602084905260409020611d23565b5060009182526020526040902090565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610a3457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a34565b60006001612bb184611981565b612bbb9190613505565b600083815260096020526040902054909150808214612c0e576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090612c5390600190613505565b6000838152600b6020526040812054600a8054939450909284908110612c7b57612c7b613518565b9060005260206000200154905080600a8381548110612c9c57612c9c613518565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480612cd457612cd461368d565b6001900381819060005260206000200160009055905550505050565b6000612cfb83611981565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160e01b031981168114611dfd57600080fd5b600060208284031215612d5c57600080fd5b8135611d2381612d34565b80358015158114612d7757600080fd5b919050565b600060208284031215612d8e57600080fd5b611d2382612d67565b60005b83811015612db2578181015183820152602001612d9a565b50506000910152565b60008151808452612dd3816020860160208601612d97565b601f01601f19169290920160200192915050565b602081526000611d236020830184612dbb565b600060208284031215612e0c57600080fd5b5035919050565b80356001600160a01b0381168114612d7757600080fd5b60008060408385031215612e3d57600080fd5b612e4683612e13565b946020939093013593505050565b60008060208385031215612e6757600080fd5b823567ffffffffffffffff80821115612e7f57600080fd5b818501915085601f830112612e9357600080fd5b813581811115612ea257600080fd5b866020828501011115612eb457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612f0557612f05612ec6565b604052919050565b60008060408385031215612f2057600080fd5b8235915060208084013567ffffffffffffffff80821115612f4057600080fd5b818601915086601f830112612f5457600080fd5b813581811115612f6657612f66612ec6565b8060051b9150612f77848301612edc565b8181529183018401918481019089841115612f9157600080fd5b938501935b83851015612faf57843582529385019390850190612f96565b8096505050505050509250929050565b600080600060608486031215612fd457600080fd5b612fdd84612e13565b9250612feb60208501612e13565b9150604084013590509250925092565b6000806040838503121561300e57600080fd5b50508035926020909101359150565b6000806040838503121561303057600080fd5b8235915061304060208401612d67565b90509250929050565b60008083601f84011261305b57600080fd5b50813567ffffffffffffffff81111561307357600080fd5b6020830191508360208260051b8501011115610eb557600080fd5b6000806000604084860312156130a357600080fd5b833567ffffffffffffffff8111156130ba57600080fd5b6130c686828701613049565b909790965060209590950135949350505050565b600067ffffffffffffffff8311156130f4576130f4612ec6565b613107601f8401601f1916602001612edc565b905082815283838301111561311b57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561314457600080fd5b813567ffffffffffffffff81111561315b57600080fd5b8201601f8101841361316c57600080fd5b61101d848235602084016130da565b60006020828403121561318d57600080fd5b611d2382612e13565b600080604083850312156131a957600080fd5b6131b283612e13565b915060208301356bffffffffffffffffffffffff811681146131d357600080fd5b809150509250929050565b600080604083850312156131f157600080fd5b6131fa83612e13565b915061304060208401612d67565b6000806000806080858703121561321e57600080fd5b61322785612e13565b935061323560208601612e13565b925060408501359150606085013567ffffffffffffffff81111561325857600080fd5b8501601f8101871361326957600080fd5b613278878235602084016130da565b91505092959194509250565b6000806040838503121561329757600080fd5b6132a083612e13565b915061304060208401612e13565b6000602082840312156132c057600080fd5b813567ffffffffffffffff81168114611d2357600080fd5b6000602082840312156132ea57600080fd5b813560ff81168114611d2357600080fd5b600181811c9082168061330f57607f821691505b60208210810361332f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c3f57600081815260208120601f850160051c8101602086101561335c5750805b601f850160051c820191505b8181101561337b57828155600101613368565b505050505050565b67ffffffffffffffff83111561339b5761339b612ec6565b6133af836133a983546132fb565b83613335565b6000601f8411600181146133e357600085156133cb5750838201355b600019600387901b1c1916600186901b17835561343d565b600083815260209020601f19861690835b8281101561341457868501358255602094850194600190920191016133f4565b50868210156134315760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a3457610a34613444565b634e487b7160e01b600052601260045260246000fd5b60008261349657613496613471565b500490565b600083516134ad818460208801612d97565b8351908301906134c1818360208801612d97565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b80820180821115610a3457610a34613444565b81810381811115610a3457610a34613444565b634e487b7160e01b600052603260045260246000fd5b815167ffffffffffffffff81111561354857613548612ec6565b61355c8161355684546132fb565b84613335565b602080601f83116001811461359157600084156135795750858301515b600019600386901b1c1916600185901b17855561337b565b600085815260208120601f198616915b828110156135c0578886015182559484019460019091019084016135a1565b50858210156135de5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561360057600080fd5b5051919050565b60008261361657613616613471565b500690565b60006001820161362d5761362d613444565b5060010190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526136666080830184612dbb565b9695505050505050565b60006020828403121561368257600080fd5b8151611d2381612d34565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220650c104a39e9cf584b8c0ce2a1c9333a44b5b67e4d3ab8d4a2664984868d832f64736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180edbf5b3fc03782d7c02d507fd97e089bdf0f7f207ba292b734eab170799a716b00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990900000000000000000000000000000000000000000000000000000000000001ed8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000000124d6574616476656e747572652047656e2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064d4147454e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e68747470733a2f2f6d6574616476656e747572652e73332e65752d776573742d312e616d617a6f6e6177732e636f6d2f67656e312f6d657461646174612f0000000000000000000000000000000000000000000000000000000000000000004061643765346363393931383233373162316165636465353732623234623865356434393434633932383366633665373837663735346462326439633030363239

-----Decoded View---------------
Arg [0] : _name (string): Metadventure Gen 1
Arg [1] : _symbol (string): MAGEN1
Arg [2] : _initBaseURI (string): https://metadventure.s3.eu-west-1.amazonaws.com/gen1/metadata/
Arg [3] : _whitelistRoot (bytes32): 0xedbf5b3fc03782d7c02d507fd97e089bdf0f7f207ba292b734eab170799a716b
Arg [4] : _allInitialMetadataEncrypted (string): ad7e4cc99182371b1aecde572b24b8e5d4944c9283fc6e787f754db2d9c00629
Arg [5] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [6] : _subscriptionId (uint64): 493
Arg [7] : _keyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [3] : edbf5b3fc03782d7c02d507fd97e089bdf0f7f207ba292b734eab170799a716b
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [5] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [6] : 00000000000000000000000000000000000000000000000000000000000001ed
Arg [7] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [9] : 4d6574616476656e747572652047656e20310000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [11] : 4d4147454e310000000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000003e
Arg [13] : 68747470733a2f2f6d6574616476656e747572652e73332e65752d776573742d
Arg [14] : 312e616d617a6f6e6177732e636f6d2f67656e312f6d657461646174612f0000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [16] : 6164376534636339393138323337316231616563646535373262323462386535
Arg [17] : 6434393434633932383366633665373837663735346462326439633030363239


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.