ETH Price: $3,243.99 (-5.82%)
Gas: 10 Gwei

Token

InTandem Mint Pass (INT)
 

Overview

Max Total Supply

29 INT

Holders

26

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
jtt.eth
0x36c488771b5ee5485f83d8b9e51ebf26cc587f28
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:
InTandemMintPassDeployer

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : intandomToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "./intandemERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";


abstract contract RedeemerContractI {
    function redeemIntandemToken(uint256 _tokenId , uint256 _amount, address Tokenowner) public virtual;
}

contract InTandemMintPassDeployer is IntandemERC1155 {
    using SafeMath for uint256;
    using Counters for Counters.Counter;
    Counters.Counter private mtCounter;
    mapping(uint256 => MintToken) public mintTokens;
    mapping(string => address) public address_coupon_map;
    bytes32 public merkleRootHash = 0x1d59a72f85142a530d352a30071dedab0bc31ac19923881855f8badd5d836313;
    uint8 public whitelist_check = 1;
    mapping (address => uint8) redeem_to;
    uint256 public mint_price = 0.2 ether;

    event Claimed(uint index, address indexed account, uint amount, string coupon);
    event TokenAddedToMint(uint256 tokenID, string identifyingSerialNumber);
    event TokenRedeemed(uint256 tokenId, address TokenOwner, address redeemTo);

    error invalidToken();
    error ZeroAddress();
    error EmptyUri();
    error TokenNotExist();
    error ClaimParamWrong();
    error AirdropToNull();
    error AirdropZeroAmount();
    error AlreadyMinted();
    error CouponRedeemed();
    error MaxSupplyReached();
    error ZeroMaxSupply();
    error InvalidMaxSupply();
    error InvalidWhitelistCheck();
    error InvalidMintPerTransLimit();
    error MintPerTransLimitReached();
    error InvalidRedeem();
    error InvalidPrice(uint256 _price);

    constructor(address _admin, string memory _firstTokenURI, uint256 _firstTokenMaxSupply) ERC1155("https://base_uri/"){
        name_ = "InTandem Mint Pass";
        symbol_ = "INT";
        mtCounter.increment();
        _grantRole(DEFAULT_ADMIN_ROLE, _admin);
        addMintToken(_firstTokenURI, _firstTokenMaxSupply, 1);
    }

    function addMintToken(
        string memory _ipfsMetadataLink,
        uint256 _maxSupply,
        uint256 _mintPerTransactionLimit
    ) public onlyAdmin {
        if (_maxSupply == 0) revert ZeroMaxSupply();
        uint256 _tokenIndex = mtCounter.current();
        MintToken storage mt = mintTokens[_tokenIndex];
        _update_mt(mt, _ipfsMetadataLink, _maxSupply, _mintPerTransactionLimit);
        mtCounter.increment();
        emit TokenAddedToMint(_tokenIndex, _ipfsMetadataLink);
    }

    function _update_mt(
        MintToken storage mt,
        string memory _ipfsMetadataLink,
        uint256 _maxSupply,
        uint256 _mintPerTransLimit
    ) internal {
        if (bytes(_ipfsMetadataLink).length == 0) {
            revert EmptyUri();
        }

        mt.ipfsMetadataLink = _ipfsMetadataLink;
        mt.maxSupply = _maxSupply;
        mt.mintPerTransLimit = _mintPerTransLimit;
    }

    function editMintToken(
        uint256 _tokenIndex,
        string memory _ipfsMetadataLink,
        uint256 _maxSupply,
        uint256 _mintPerTransLimit
    ) external onlyAdmin {
        if (!(_tokenIndex > 0 && _tokenIndex < mtCounter.current())) revert TokenNotExist();
        if (_maxSupply == 0) revert ZeroMaxSupply();
        if (_maxSupply < totalSupply(_tokenIndex)) revert InvalidMaxSupply();
        if (_mintPerTransLimit > _maxSupply) revert InvalidMintPerTransLimit();

        _update_mt(mintTokens[_tokenIndex], _ipfsMetadataLink, _maxSupply, _mintPerTransLimit);
    }

    function claim(
        uint256 numTokens,
        uint256 _tokenIndexToMint,
        string memory _coupon,
        bytes32[] calldata _proof
    ) external payable{
        require(isValidClaim(numTokens, _tokenIndexToMint, _coupon, _proof));
        mintTokens[_tokenIndexToMint].claimedMTs[msg.sender] = mintTokens[_tokenIndexToMint].claimedMTs[msg.sender].add(numTokens);
        mintTokens[_tokenIndexToMint].mintedCount = mintTokens[_tokenIndexToMint].mintedCount.add(numTokens);

        if (isAdmin() == 0 && whitelist_check == 1){
            address_coupon_map[_coupon] = msg.sender;
        }
        emit Claimed(_tokenIndexToMint, msg.sender, numTokens, _coupon);
        _mint(msg.sender, _tokenIndexToMint, numTokens, "");
    }

    function isValidClaim(
        uint256 numTokens, uint256 _tokenIndexToMint, string memory _coupon,
        bytes32[] calldata _proof) internal view returns (bool) {
        if (!(_tokenIndexToMint > 0 && _tokenIndexToMint < mtCounter.current())) revert TokenNotExist();
        if (!(mintTokens[_tokenIndexToMint].mintPerTransLimit >= numTokens)) revert MintPerTransLimitReached();
        if (!(mintTokens[_tokenIndexToMint].claimedMTs[msg.sender] == 0)) revert AlreadyMinted();
        if (!(mintTokens[_tokenIndexToMint].maxSupply >= totalSupply(_tokenIndexToMint).add(numTokens))) revert MaxSupplyReached();
        if (msg.value < mint_price) revert InvalidPrice(msg.value);
        if (isAdmin() == 0 && whitelist_check == 1) {
            if (address_coupon_map[_coupon] != address(0)) revert CouponRedeemed();
            bytes32 leaf = keccak256(abi.encodePacked(_coupon));
            if (!(MerkleProof.verify(_proof, merkleRootHash, leaf))) {
                revert ClaimParamWrong();
            }
        }
        return true;
    }

    function uri(uint256 _id) public view override returns (string memory) {
        if (!(_id < mtCounter.current() && _id > 0)) revert TokenNotExist();
        return mintTokens[_id].ipfsMetadataLink;
    }

    function airdrop(uint _tokenID, uint _amount, address _addr) external onlyOwner {
        if (_addr == address(0)) revert AirdropToNull();
        if (!(_tokenID > 0 && _tokenID < mtCounter.current())) revert TokenNotExist();
        if (!(_amount > 0)) revert AirdropZeroAmount();
        mintTokens[_tokenID].claimedMTs[msg.sender] = mintTokens[_tokenID].claimedMTs[msg.sender].add(_amount);
        mintTokens[_tokenID].mintedCount = mintTokens[_tokenID].mintedCount.add(_amount);
        _mint(_addr, _tokenID, _amount, "");
    }

    function setWhitelistCheck(uint8 _whitelistCheck) external onlyAdmin {
        if (_whitelistCheck > 1) revert InvalidWhitelistCheck();
        whitelist_check = _whitelistCheck;
    }

    function setMintPerTransLimit(uint256 _tokenIndex, uint256 _mintPerTransLimit) external onlyAdmin {
        if (!(_tokenIndex > 0 && _tokenIndex < mtCounter.current())) revert TokenNotExist();
        if (mintTokens[_tokenIndex].maxSupply < _mintPerTransLimit) revert InvalidMintPerTransLimit();
        mintTokens[_tokenIndex].mintPerTransLimit = _mintPerTransLimit;
    }

    function setMerkleRootHash(bytes32 _rootHash) external onlyAdmin{
        merkleRootHash = _rootHash;
    }

    function setRedeemTo(address _redeem_to_address) external onlyAdmin{
        if(_redeem_to_address==address(0)) revert ZeroAddress();
        redeem_to[_redeem_to_address] = 1;
        
    }

    function redeem(uint256 _tokenId, uint256 _amount, address _to) external {
        if (!(_tokenId > 0 && _tokenId < mtCounter.current())) revert TokenNotExist();
        if(redeem_to[_to]==0) revert InvalidRedeem();
        if(_amount==0) revert InvalidRedeem();
        RedeemerContractI redeemerContract = RedeemerContractI(_to);
        redeemerContract.redeemIntandemToken(_tokenId, _amount, msg.sender);
        emit TokenRedeemed(_tokenId, msg.sender, _to);
        burn(msg.sender, _tokenId, _amount);
    }

    function setMintprice(uint256 _new_price) external onlyAdmin{
        if(_new_price ==0) revert InvalidPrice(_new_price);
        mint_price = _new_price;
    }

}

File 2 of 20 : intandemERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "./utils/AdminPermissionable.sol";

abstract contract IntandemERC1155 is ERC1155Supply, ERC1155Burnable, AdminPermissionable {
    using SafeMath for uint256;
    string  name_;
    string  symbol_;
    mapping(address => uint[]) internal holdings;

    struct MintToken {
        string ipfsMetadataLink;
        uint256 mintedCount;
        uint256 maxSupply;
        uint256 mintPerTransLimit;
        mapping(address => uint256) claimedMTs;
    }

    function setURI(string memory baseURI) external onlyAdmin {
        _setURI(baseURI);
    }

    function name() public view returns (string memory) {
        return name_;
    }

    function symbol() public view returns (string memory) {
        return symbol_;
    }


    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual override(ERC1155) {
        super._mint(account, id, amount, data);
    }

    function balanceOf(address account, uint256 id) public view virtual override(ERC1155) returns (uint256){
        return super.balanceOf(account, id);
    }

    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override(ERC1155) {
        super._mintBatch(to, ids, amounts, data);
    }

    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual override(ERC1155) {
        super._burn(account, id, amount);
    }

    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual override(ERC1155) {
        super._burnBatch(account, ids, amounts);
    }

    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override(ERC1155, ERC1155Supply) {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    function withdrawAllFunds() external onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }

    function withdrawFunds(address payable _to, uint256 _amount) external onlyOwner
    {
        require(_to != address(0), "cant send money to null address");
        _to.transfer(_amount);
    }

    function getBalance() external view returns (uint256){
        return address(this).balance;
    }
}

File 3 of 20 : 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 4 of 20 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 20 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 6 of 20 : 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 7 of 20 : 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 8 of 20 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 9 of 20 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

File 10 of 20 : AdminPermissionable.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";


abstract contract AdminPermissionable is AccessControl, Ownable {
    error NotAdminOrOwner();
    error NotAdminOrModerator();
    error ZeroAdminAddress();
    bytes32 public constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE");

    modifier onlyAdmin() {
        if (!(owner() == _msgSender() || hasRole(DEFAULT_ADMIN_ROLE, _msgSender())))
            revert NotAdminOrOwner();
        _;
    }

    modifier onlyAdminOrModerator() {
        if (!(owner() == _msgSender() ||
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) ||
            hasRole(MODERATOR_ROLE, _msgSender())))
            revert NotAdminOrModerator();
        _;
    }

    modifier checkAdminAddress(address _address) {
        if (_address == address(0)){
            revert ZeroAdminAddress();
        }
        _;
    }

    function setAdminPermission(address _address) external onlyAdmin checkAdminAddress(_address) {
        _grantRole(DEFAULT_ADMIN_ROLE, _address);
    }

    function removeAdminPermission(address _address) external onlyAdmin checkAdminAddress(_address) {
        _revokeRole(DEFAULT_ADMIN_ROLE, _address);
    }

    function isAdmin() internal view returns(uint8){
        if (owner() == _msgSender() || hasRole(DEFAULT_ADMIN_ROLE, _msgSender())){
            return 1;
        }
        return 0;
    }

}

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

pragma solidity ^0.8.0;

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

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

File 12 of 20 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @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, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 13 of 20 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 15 of 20 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 16 of 20 : 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 17 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"string","name":"_firstTokenURI","type":"string"},{"internalType":"uint256","name":"_firstTokenMaxSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AirdropToNull","type":"error"},{"inputs":[],"name":"AirdropZeroAmount","type":"error"},{"inputs":[],"name":"AlreadyMinted","type":"error"},{"inputs":[],"name":"ClaimParamWrong","type":"error"},{"inputs":[],"name":"CouponRedeemed","type":"error"},{"inputs":[],"name":"EmptyUri","type":"error"},{"inputs":[],"name":"InvalidMaxSupply","type":"error"},{"inputs":[],"name":"InvalidMintPerTransLimit","type":"error"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidRedeem","type":"error"},{"inputs":[],"name":"InvalidWhitelistCheck","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"MintPerTransLimitReached","type":"error"},{"inputs":[],"name":"NotAdminOrModerator","type":"error"},{"inputs":[],"name":"NotAdminOrOwner","type":"error"},{"inputs":[],"name":"TokenNotExist","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAdminAddress","type":"error"},{"inputs":[],"name":"ZeroMaxSupply","type":"error"},{"inputs":[],"name":"invalidToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"coupon","type":"string"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenID","type":"uint256"},{"indexed":false,"internalType":"string","name":"identifyingSerialNumber","type":"string"}],"name":"TokenAddedToMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"TokenOwner","type":"address"},{"indexed":false,"internalType":"address","name":"redeemTo","type":"address"}],"name":"TokenRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MODERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_ipfsMetadataLink","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_mintPerTransactionLimit","type":"uint256"}],"name":"addMintToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"address_coupon_map","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_addr","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"uint256","name":"_tokenIndexToMint","type":"uint256"},{"internalType":"string","name":"_coupon","type":"string"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"string","name":"_ipfsMetadataLink","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_mintPerTransLimit","type":"uint256"}],"name":"editMintToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintTokens","outputs":[{"internalType":"string","name":"ipfsMetadataLink","type":"string"},{"internalType":"uint256","name":"mintedCount","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"mintPerTransLimit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeAdminPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setAdminPermission","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":"bytes32","name":"_rootHash","type":"bytes32"}],"name":"setMerkleRootHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"uint256","name":"_mintPerTransLimit","type":"uint256"}],"name":"setMintPerTransLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_new_price","type":"uint256"}],"name":"setMintprice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_redeem_to_address","type":"address"}],"name":"setRedeemTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_whitelistCheck","type":"uint8"}],"name":"setWhitelistCheck","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":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelist_check","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAllFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040527f1d59a72f85142a530d352a30071dedab0bc31ac19923881855f8badd5d836313600c55600d805460ff191660011790556702c68af0bb140000600f553480156200004e57600080fd5b506040516200404238038062004042833981016040819052620000719162000475565b60408051808201909152601181527068747470733a2f2f626173655f7572692f60781b6020820152620000a48162000154565b50620000b0336200016d565b60408051808201909152601280825271496e54616e64656d204d696e74205061737360701b6020909201918252620000eb91600691620003cf565b506040805180820190915260038082526212539560ea1b60209092019182526200011891600791620003cf565b50620001306009620001bf60201b620018661760201c565b6200013d600084620001c8565b6200014b828260016200026c565b5050506200061b565b805162000169906002906020840190620003cf565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff16620001695760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002283390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6005546001600160a01b0316331480620002b457503360009081527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec602052604090205460ff165b620002d257604051637bb62a2160e01b815260040160405180910390fd5b81620002f1576040516331c9364360e01b815260040160405180910390fd5b60006200030a60096200038260201b6200186f1760201c565b6000818152600a60205260409020909150620003298186868662000386565b620003406009620001bf60201b620018661760201c565b7fc25031a1b68125fb0561c58bf093ddeb6c32916824e06aac5c8b60c73529b29882866040516200037392919062000559565b60405180910390a15050505050565b5490565b8251620003a65760405163d64becfd60e01b815260040160405180910390fd5b8251620003ba9085906020860190620003cf565b50600284019190915560039092019190915550565b828054620003dd90620005c8565b90600052602060002090601f0160209004810192826200040157600085556200044c565b82601f106200041c57805160ff19168380011785556200044c565b828001600101855582156200044c579182015b828111156200044c5782518255916020019190600101906200042f565b506200045a9291506200045e565b5090565b5b808211156200045a57600081556001016200045f565b6000806000606084860312156200048b57600080fd5b83516001600160a01b0381168114620004a357600080fd5b60208501519093506001600160401b0380821115620004c157600080fd5b818601915086601f830112620004d657600080fd5b815181811115620004eb57620004eb62000605565b604051601f8201601f19908116603f0116810190838211818310171562000516576200051662000605565b816040528281528960208487010111156200053057600080fd5b6200054383602083016020880162000595565b8096505050505050604084015190509250925092565b82815260406020820152600082518060408401526200058081606085016020870162000595565b601f01601f1916919091016060019392505050565b60005b83811015620005b257818101518382015260200162000598565b83811115620005c2576000848401525b50505050565b600181811c90821680620005dd57607f821691505b60208210811415620005ff57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b613a17806200062b6000396000f3fe6080604052600436106102715760003560e01c80636b20c4541161014f578063a22cb465116100c1578063ddb6dfc41161007a578063ddb6dfc4146107c9578063e985e9c5146107df578063f2358b7714610828578063f242432a14610848578063f2fde38b14610868578063f5298aca1461088857600080fd5b8063a22cb465146106f0578063a259109a14610710578063b45b8fdb1461073c578063bd85b0391461075c578063c107532914610789578063d547741f146107a957600080fd5b8063943af29011610113578063943af2901461061557806394571c4e1461065657806395d89b411461067657806397304ced1461068b5780639ba411b1146106bb578063a217fddf146106db57600080fd5b80636b20c4541461055a578063715018a61461057a578063797669c91461058f5780638da5cb5b146105c357806391d14854146105f557600080fd5b80632eb2c2d6116101e857806349649fbf116101ac57806349649fbf146104895780634e1273f41461049e5780634f558e79146104cb57806350b91129146104fa5780635c6fd90b1461051a5780636a87339d1461053a57600080fd5b80632eb2c2d6146103e95780632f2ff15d1461040957806336568abe146104295780633674800114610449578063404a1f371461046957600080fd5b80630e89341c1161023a5780630e89341c1461033d5780630f49afb21461035d57806312065fe0146103705780631a4231a4146103835780631e2e8c9514610399578063248a9ca3146103b957600080fd5b8062fdd58e1461027657806301ffc9a7146102a957806302fe5305146102d9578063049104e5146102fb57806306fdde031461031b575b600080fd5b34801561028257600080fd5b50610296610291366004612dbd565b6108a8565b6040519081526020015b60405180910390f35b3480156102b557600080fd5b506102c96102c4366004613124565b6108bb565b60405190151581526020016102a0565b3480156102e557600080fd5b506102f96102f436600461315e565b6108cc565b005b34801561030757600080fd5b506102f961031636600461325f565b610914565b34801561032757600080fd5b50610330610a5b565b6040516102a09190613541565b34801561034957600080fd5b506103306103583660046130e6565b610aed565b6102f961036b366004613298565b610bc1565b34801561037c57600080fd5b5047610296565b34801561038f57600080fd5b50610296600f5481565b3480156103a557600080fd5b506102f96103b436600461325f565b610d0f565b3480156103c557600080fd5b506102966103d43660046130e6565b60009081526004602052604090206001015490565b3480156103f557600080fd5b506102f9610404366004612e22565b610e23565b34801561041557600080fd5b506102f96104243660046130ff565b610e71565b34801561043557600080fd5b506102f96104443660046130ff565b610e96565b34801561045557600080fd5b506102f96104643660046130e6565b610f14565b34801561047557600080fd5b506102f9610484366004612da0565b610f76565b34801561049557600080fd5b506102f9610fe5565b3480156104aa57600080fd5b506104be6104b9366004613014565b611019565b6040516102a09190613500565b3480156104d757600080fd5b506102c96104e63660046130e6565b600090815260036020526040902054151590565b34801561050657600080fd5b506102f96105153660046131e7565b611142565b34801561052657600080fd5b506102f9610535366004612da0565b611234565b34801561054657600080fd5b506102f9610555366004612da0565b6112a3565b34801561056657600080fd5b506102f9610575366004612f37565b61132a565b34801561058657600080fd5b506102f961136d565b34801561059b57600080fd5b506102967f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b3480156105cf57600080fd5b506005546001600160a01b03165b6040516001600160a01b0390911681526020016102a0565b34801561060157600080fd5b506102c96106103660046130ff565b611381565b34801561062157600080fd5b506105dd61063036600461315e565b8051602081830181018051600b825292820191909301209152546001600160a01b031681565b34801561066257600080fd5b506102f9610671366004613342565b6113ac565b34801561068257600080fd5b50610330611423565b34801561069757600080fd5b506106ab6106a63660046130e6565b611432565b6040516102a09493929190613554565b3480156106c757600080fd5b506102f96106d63660046130e6565b6114e2565b3480156106e757600080fd5b50610296600081565b3480156106fc57600080fd5b506102f961070b366004612fac565b611523565b34801561071c57600080fd5b50600d5461072a9060ff1681565b60405160ff90911681526020016102a0565b34801561074857600080fd5b506102f961075736600461319a565b61152e565b34801561076857600080fd5b506102966107773660046130e6565b60009081526003602052604090205490565b34801561079557600080fd5b506102f96107a4366004612dbd565b6115fe565b3480156107b557600080fd5b506102f96107c43660046130ff565b611692565b3480156107d557600080fd5b50610296600c5481565b3480156107eb57600080fd5b506102c96107fa366004612de9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561083457600080fd5b506102f961084336600461323d565b6116b7565b34801561085457600080fd5b506102f9610863366004612ecf565b611768565b34801561087457600080fd5b506102f9610883366004612da0565b6117ad565b34801561089457600080fd5b506102f96108a3366004612fdf565b611823565b60006108b48383611873565b9392505050565b60006108c682611904565b92915050565b6005546001600160a01b03163314806108eb57506108eb600033611381565b61090857604051637bb62a2160e01b815260040160405180910390fd5b61091181611929565b50565b600083118015610925575060095483105b6109425760405163224a1b1160e11b815260040160405180910390fd5b6001600160a01b0381166000908152600e602052604090205460ff1661097b57604051635dec801160e11b815260040160405180910390fd5b8161099957604051635dec801160e11b815260040160405180910390fd5b604051638c8233f360e01b8152600481018490526024810183905233604482015281906001600160a01b03821690638c8233f390606401600060405180830381600087803b1580156109ea57600080fd5b505af11580156109fe573d6000803e3d6000fd5b5050604080518781523360208201526001600160a01b0386168183015290517f1899165c592703e302d15c2d4fa10e3d3afbb62b6f23b48dc19d99ea0e1b72b79350908190036060019150a1610a55338585611823565b50505050565b606060068054610a6a9061384d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a969061384d565b8015610ae35780601f10610ab857610100808354040283529160200191610ae3565b820191906000526020600020905b815481529060010190602001808311610ac657829003601f168201915b5050505050905090565b6060610af860095490565b82108015610b065750600082115b610b235760405163224a1b1160e11b815260040160405180910390fd5b6000828152600a602052604090208054610b3c9061384d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b689061384d565b8015610bb55780601f10610b8a57610100808354040283529160200191610bb5565b820191906000526020600020905b815481529060010190602001808311610b9857829003601f168201915b50505050509050919050565b610bce858585858561193c565b610bd757600080fd5b6000848152600a60209081526040808320338452600401909152902054610bfe9086611b59565b6000858152600a602081815260408084203385526004810183529084209490945591879052905260010154610c339086611b59565b6000858152600a6020526040902060010155610c4d611b65565b60ff16158015610c625750600d5460ff166001145b15610ca85733600b84604051610c7891906133cc565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790555b336001600160a01b03167fee563d8e532abc293fca2fdeb41c25180305bddcf9206c167dab3e155aaf1713858786604051610ce593929190613791565b60405180910390a2610d0833858760405180602001604052806000815250611b98565b5050505050565b610d17611ba4565b6001600160a01b038116610d3e57604051630cccf35360e21b815260040160405180910390fd5b600083118015610d4f575060095483105b610d6c5760405163224a1b1160e11b815260040160405180910390fd5b60008211610d8d57604051631e93cba960e01b815260040160405180910390fd5b6000838152600a60209081526040808320338452600401909152902054610db49083611b59565b6000848152600a602081815260408084203385526004810183529084209490945591869052905260010154610de99083611b59565b600a600085815260200190815260200160002060010181905550610e1e81848460405180602001604052806000815250611b98565b505050565b6001600160a01b038516331480610e3f5750610e3f85336107fa565b610e645760405162461bcd60e51b8152600401610e5b90613583565b60405180910390fd5b610d088585858585611bfe565b600082815260046020526040902060010154610e8c81611da8565b610e1e8383611db2565b6001600160a01b0381163314610f065760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610e5b565b610f108282611e38565b5050565b6005546001600160a01b0316331480610f335750610f33600033611381565b610f5057604051637bb62a2160e01b815260040160405180910390fd5b80610f7157604051637cb1974360e11b815260048101829052602401610e5b565b600f55565b6005546001600160a01b0316331480610f955750610f95600033611381565b610fb257604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b038116610fda57604051633ef39b8160e01b815260040160405180910390fd5b610f10600083611e38565b610fed611ba4565b60405133904780156108fc02916000818181858888f19350505050158015610911573d6000803e3d6000fd5b6060815183511461107e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610e5b565b600083516001600160401b03811115611099576110996138fb565b6040519080825280602002602001820160405280156110c2578160200160208202803683370190505b50905060005b845181101561113a5761110d8582815181106110e6576110e66138e5565b6020026020010151858381518110611100576111006138e5565b60200260200101516108a8565b82828151811061111f5761111f6138e5565b6020908102919091010152611133816138b4565b90506110c8565b509392505050565b6005546001600160a01b03163314806111615750611161600033611381565b61117e57604051637bb62a2160e01b815260040160405180910390fd5b60008411801561118f575060095484105b6111ac5760405163224a1b1160e11b815260040160405180910390fd5b816111ca576040516331c9364360e01b815260040160405180910390fd5b6000848152600360205260409020548210156111f95760405163066f305360e21b815260040160405180910390fd5b8181111561121a5760405163ef4596c760e01b815260040160405180910390fd5b6000848152600a60205260409020610a5590848484611e9f565b6005546001600160a01b03163314806112535750611253600033611381565b61127057604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b03811661129857604051633ef39b8160e01b815260040160405180910390fd5b610f10600083611db2565b6005546001600160a01b03163314806112c257506112c2600033611381565b6112df57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b0381166113065760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03166000908152600e60205260409020805460ff19166001179055565b6001600160a01b038316331480611346575061134683336107fa565b6113625760405162461bcd60e51b8152600401610e5b90613583565b610e1e838383611ee5565b611375611ba4565b61137f6000611ef0565b565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6005546001600160a01b03163314806113cb57506113cb600033611381565b6113e857604051637bb62a2160e01b815260040160405180910390fd5b60018160ff16111561140d57604051631293089f60e11b815260040160405180910390fd5b600d805460ff191660ff92909216919091179055565b606060078054610a6a9061384d565b600a6020526000908152604090208054819061144d9061384d565b80601f01602080910402602001604051908101604052809291908181526020018280546114799061384d565b80156114c65780601f1061149b576101008083540402835291602001916114c6565b820191906000526020600020905b8154815290600101906020018083116114a957829003601f168201915b5050505050908060010154908060020154908060030154905084565b6005546001600160a01b03163314806115015750611501600033611381565b61151e57604051637bb62a2160e01b815260040160405180910390fd5b600c55565b610f10338383611f42565b6005546001600160a01b031633148061154d575061154d600033611381565b61156a57604051637bb62a2160e01b815260040160405180910390fd5b81611588576040516331c9364360e01b815260040160405180910390fd5b600061159360095490565b6000818152600a602052604090209091506115b081868686611e9f565b6115be600980546001019055565b7fc25031a1b68125fb0561c58bf093ddeb6c32916824e06aac5c8b60c73529b29882866040516115ef929190613778565b60405180910390a15050505050565b611606611ba4565b6001600160a01b03821661165c5760405162461bcd60e51b815260206004820152601f60248201527f63616e742073656e64206d6f6e657920746f206e756c6c2061646472657373006044820152606401610e5b565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610e1e573d6000803e3d6000fd5b6000828152600460205260409020600101546116ad81611da8565b610e1e8383611e38565b6005546001600160a01b03163314806116d657506116d6600033611381565b6116f357604051637bb62a2160e01b815260040160405180910390fd5b600082118015611704575060095482105b6117215760405163224a1b1160e11b815260040160405180910390fd5b6000828152600a60205260409020600201548111156117535760405163ef4596c760e01b815260040160405180910390fd5b6000918252600a602052604090912060030155565b6001600160a01b038516331480611784575061178485336107fa565b6117a05760405162461bcd60e51b8152600401610e5b90613583565b610d088585858585612023565b6117b5611ba4565b6001600160a01b03811661181a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e5b565b61091181611ef0565b6001600160a01b03831633148061183f575061183f83336107fa565b61185b5760405162461bcd60e51b8152600401610e5b90613583565b610e1e83838361215b565b80546001019055565b5490565b60006001600160a01b0383166118de5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401610e5b565b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216637965db0b60e01b14806108c657506108c682612166565b8051610f10906002906020840190612c1d565b6000808511801561194e575060095485105b61196b5760405163224a1b1160e11b815260040160405180910390fd5b6000858152600a602052604090206003015486111561199d57604051635092c23b60e01b815260040160405180910390fd5b6000858152600a60209081526040808320338452600401909152902054156119d857604051631bbdf5c560e31b815260040160405180910390fd5b6119f8866119f28760009081526003602052604090205490565b90611b59565b6000868152600a60205260409020600201541015611a295760405163d05cb60960e01b815260040160405180910390fd5b600f54341015611a4e57604051637cb1974360e11b8152346004820152602401610e5b565b611a56611b65565b60ff16158015611a6b5750600d5460ff166001145b15611b4d5760006001600160a01b0316600b85604051611a8b91906133cc565b908152604051908190036020019020546001600160a01b031614611ac25760405163320e3acd60e21b815260040160405180910390fd5b600084604051602001611ad591906133cc565b604051602081830303815290604052805190602001209050611b2e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491508490506121b6565b611b4b57604051638743cbb560e01b815260040160405180910390fd5b505b50600195945050505050565b60006108b482846137d3565b6005546000906001600160a01b0316331480611b875750611b87600033611381565b15611b925750600190565b50600090565b610a55848484846121cc565b6005546001600160a01b0316331461137f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e5b565b8151835114611c1f5760405162461bcd60e51b8152600401610e5b90613730565b6001600160a01b038416611c455760405162461bcd60e51b8152600401610e5b9061365e565b33611c548187878787876122ef565b60005b8451811015611d3a576000858281518110611c7457611c746138e5565b602002602001015190506000858381518110611c9257611c926138e5565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611ce25760405162461bcd60e51b8152600401610e5b906136e6565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d1f9084906137d3565b9250508190555050505080611d33906138b4565b9050611c57565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d8a929190613513565b60405180910390a4611da08187878787876122fd565b505050505050565b6109118133612468565b611dbc8282611381565b610f105760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611df43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e428282611381565b15610f105760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8251611ebe5760405163d64becfd60e01b815260040160405180910390fd5b8251611ed09085906020860190612c1d565b50600284019190915560039092019190915550565b610e1e8383836124cc565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611fb65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610e5b565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166120495760405162461bcd60e51b8152600401610e5b9061365e565b33600061205585612668565b9050600061206285612668565b90506120728389898585896122ef565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156120b35760405162461bcd60e51b8152600401610e5b906136e6565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906120f09084906137d3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612150848a8a8a8a8a6126b3565b505050505050505050565b610e1e83838361277d565b60006001600160e01b03198216636cdb3d1360e11b148061219757506001600160e01b031982166303a24d0760e21b145b806108c657506301ffc9a760e01b6001600160e01b03198316146108c6565b6000826121c38584612895565b14949350505050565b6001600160a01b03841661222c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610e5b565b33600061223885612668565b9050600061224585612668565b9050612256836000898585896122ef565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906122869084906137d3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46122e6836000898989896126b3565b50505050505050565b611da08686868686866128da565b6001600160a01b0384163b15611da05760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612341908990899088908890889060040161345d565b602060405180830381600087803b15801561235b57600080fd5b505af192505050801561238b575060408051601f3d908101601f1916820190925261238891810190613141565b60015b61243857612397613911565b806308c379a014156123d157506123ac61392d565b806123b757506123d3565b8060405162461bcd60e51b8152600401610e5b9190613541565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610e5b565b6001600160e01b0319811663bc197c8160e01b146122e65760405162461bcd60e51b8152600401610e5b906135d2565b6124728282611381565b610f105761248a816001600160a01b03166014612a53565b612495836020612a53565b6040516020016124a69291906133e8565b60408051601f198184030181529082905262461bcd60e51b8252610e5b91600401613541565b6001600160a01b0383166124f25760405162461bcd60e51b8152600401610e5b906136a3565b80518251146125135760405162461bcd60e51b8152600401610e5b90613730565b6000339050612536818560008686604051806020016040528060008152506122ef565b60005b83518110156125fb576000848281518110612556576125566138e5565b602002602001015190506000848381518110612574576125746138e5565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156125c45760405162461bcd60e51b8152600401610e5b9061361a565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806125f3816138b4565b915050612539565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161264c929190613513565b60405180910390a4604080516020810190915260009052610a55565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126a2576126a26138e5565b602090810291909101015292915050565b6001600160a01b0384163b15611da05760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126f790899089908890889088906004016134bb565b602060405180830381600087803b15801561271157600080fd5b505af1925050508015612741575060408051601f3d908101601f1916820190925261273e91810190613141565b60015b61274d57612397613911565b6001600160e01b0319811663f23a6e6160e01b146122e65760405162461bcd60e51b8152600401610e5b906135d2565b6001600160a01b0383166127a35760405162461bcd60e51b8152600401610e5b906136a3565b3360006127af84612668565b905060006127bc84612668565b90506127dc838760008585604051806020016040528060008152506122ef565b6000858152602081815260408083206001600160a01b038a1684529091529020548481101561281d5760405162461bcd60e51b8152600401610e5b9061361a565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526122e6565b600081815b845181101561113a576128c6828683815181106128b9576128b96138e5565b6020026020010151612bee565b9150806128d2816138b4565b91505061289a565b6001600160a01b0385166129615760005b835181101561295f57828181518110612906576129066138e5565b602002602001015160036000868481518110612924576129246138e5565b60200260200101518152602001908152602001600020600082825461294991906137d3565b909155506129589050816138b4565b90506128eb565b505b6001600160a01b038416611da05760005b83518110156122e657600084828151811061298f5761298f6138e5565b6020026020010151905060008483815181106129ad576129ad6138e5565b6020026020010151905060006003600084815260200190815260200160002054905081811015612a305760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610e5b565b60009283526003602052604090922091039055612a4c816138b4565b9050612972565b60606000612a628360026137eb565b612a6d9060026137d3565b6001600160401b03811115612a8457612a846138fb565b6040519080825280601f01601f191660200182016040528015612aae576020820181803683370190505b509050600360fc1b81600081518110612ac957612ac96138e5565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612af857612af86138e5565b60200101906001600160f81b031916908160001a9053506000612b1c8460026137eb565b612b279060016137d3565b90505b6001811115612b9f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612b5b57612b5b6138e5565b1a60f81b828281518110612b7157612b716138e5565b60200101906001600160f81b031916908160001a90535060049490941c93612b9881613836565b9050612b2a565b5083156108b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e5b565b6000818310612c0a5760008281526020849052604090206108b4565b60008381526020839052604090206108b4565b828054612c299061384d565b90600052602060002090601f016020900481019282612c4b5760008555612c91565b82601f10612c6457805160ff1916838001178555612c91565b82800160010185558215612c91579182015b82811115612c91578251825591602001919060010190612c76565b50612c9d929150612ca1565b5090565b5b80821115612c9d5760008155600101612ca2565b600082601f830112612cc757600080fd5b81356020612cd4826137b0565b604051612ce18282613888565b8381528281019150858301600585901b87018401881015612d0157600080fd5b60005b85811015612d2057813584529284019290840190600101612d04565b5090979650505050505050565b600082601f830112612d3e57600080fd5b81356001600160401b03811115612d5757612d576138fb565b604051612d6e601f8301601f191660200182613888565b818152846020838601011115612d8357600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215612db257600080fd5b81356108b4816139b6565b60008060408385031215612dd057600080fd5b8235612ddb816139b6565b946020939093013593505050565b60008060408385031215612dfc57600080fd5b8235612e07816139b6565b91506020830135612e17816139b6565b809150509250929050565b600080600080600060a08688031215612e3a57600080fd5b8535612e45816139b6565b94506020860135612e55816139b6565b935060408601356001600160401b0380821115612e7157600080fd5b612e7d89838a01612cb6565b94506060880135915080821115612e9357600080fd5b612e9f89838a01612cb6565b93506080880135915080821115612eb557600080fd5b50612ec288828901612d2d565b9150509295509295909350565b600080600080600060a08688031215612ee757600080fd5b8535612ef2816139b6565b94506020860135612f02816139b6565b9350604086013592506060860135915060808601356001600160401b03811115612f2b57600080fd5b612ec288828901612d2d565b600080600060608486031215612f4c57600080fd5b8335612f57816139b6565b925060208401356001600160401b0380821115612f7357600080fd5b612f7f87838801612cb6565b93506040860135915080821115612f9557600080fd5b50612fa286828701612cb6565b9150509250925092565b60008060408385031215612fbf57600080fd5b8235612fca816139b6565b915060208301358015158114612e1757600080fd5b600080600060608486031215612ff457600080fd5b8335612fff816139b6565b95602085013595506040909401359392505050565b6000806040838503121561302757600080fd5b82356001600160401b038082111561303e57600080fd5b818501915085601f83011261305257600080fd5b8135602061305f826137b0565b60405161306c8282613888565b8381528281019150858301600585901b870184018b101561308c57600080fd5b600096505b848710156130b85780356130a4816139b6565b835260019690960195918301918301613091565b50965050860135925050808211156130cf57600080fd5b506130dc85828601612cb6565b9150509250929050565b6000602082840312156130f857600080fd5b5035919050565b6000806040838503121561311257600080fd5b823591506020830135612e17816139b6565b60006020828403121561313657600080fd5b81356108b4816139cb565b60006020828403121561315357600080fd5b81516108b4816139cb565b60006020828403121561317057600080fd5b81356001600160401b0381111561318657600080fd5b61319284828501612d2d565b949350505050565b6000806000606084860312156131af57600080fd5b83356001600160401b038111156131c557600080fd5b6131d186828701612d2d565b9660208601359650604090950135949350505050565b600080600080608085870312156131fd57600080fd5b8435935060208501356001600160401b0381111561321a57600080fd5b61322687828801612d2d565b949794965050505060408301359260600135919050565b6000806040838503121561325057600080fd5b50508035926020909101359150565b60008060006060848603121561327457600080fd5b8335925060208401359150604084013561328d816139b6565b809150509250925092565b6000806000806000608086880312156132b057600080fd5b853594506020860135935060408601356001600160401b03808211156132d557600080fd5b6132e189838a01612d2d565b945060608801359150808211156132f757600080fd5b818801915088601f83011261330b57600080fd5b81358181111561331a57600080fd5b8960208260051b850101111561332f57600080fd5b9699959850939650602001949392505050565b60006020828403121561335457600080fd5b813560ff811681146108b457600080fd5b600081518084526020808501945080840160005b8381101561339557815187529582019590820190600101613379565b509495945050505050565b600081518084526133b881602086016020860161380a565b601f01601f19169290920160200192915050565b600082516133de81846020870161380a565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161342081601785016020880161380a565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161345181602884016020880161380a565b01602801949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061348990830186613365565b828103606084015261349b8186613365565b905082810360808401526134af81856133a0565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906134f5908301846133a0565b979650505050505050565b6020815260006108b46020830184613365565b6040815260006135266040830185613365565b82810360208401526135388185613365565b95945050505050565b6020815260006108b460208301846133a0565b60808152600061356760808301876133a0565b6020830195909552506040810192909252606090910152919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b82815260406020820152600061319260408301846133a0565b83815282602082015260606040820152600061353860608301846133a0565b60006001600160401b038211156137c9576137c96138fb565b5060051b60200190565b600082198211156137e6576137e66138cf565b500190565b6000816000190483118215151615613805576138056138cf565b500290565b60005b8381101561382557818101518382015260200161380d565b83811115610a555750506000910152565b600081613845576138456138cf565b506000190190565b600181811c9082168061386157607f821691505b6020821081141561388257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156138ad576138ad6138fb565b6040525050565b60006000198214156138c8576138c86138cf565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561392a5760046000803e5060005160e01c5b90565b600060443d101561393b5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561396a57505050505090565b82850191508151818111156139825750505050505090565b843d870101602082850101111561399c5750505050505090565b6139ab60208286010187613888565b509095945050505050565b6001600160a01b038116811461091157600080fd5b6001600160e01b03198116811461091157600080fdfea26469706673582212200c8ceb1e89d9dded44d6090fe6a16121e1ab2e352fc8ee45fdfbd36c9600651164736f6c63430008070033000000000000000000000000ef8d4cb322144eb0c42c419466755f9463b24245000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d6566567072684e686f644a5679447472656762777361466e363956737975675843484236535766597958726f00000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102715760003560e01c80636b20c4541161014f578063a22cb465116100c1578063ddb6dfc41161007a578063ddb6dfc4146107c9578063e985e9c5146107df578063f2358b7714610828578063f242432a14610848578063f2fde38b14610868578063f5298aca1461088857600080fd5b8063a22cb465146106f0578063a259109a14610710578063b45b8fdb1461073c578063bd85b0391461075c578063c107532914610789578063d547741f146107a957600080fd5b8063943af29011610113578063943af2901461061557806394571c4e1461065657806395d89b411461067657806397304ced1461068b5780639ba411b1146106bb578063a217fddf146106db57600080fd5b80636b20c4541461055a578063715018a61461057a578063797669c91461058f5780638da5cb5b146105c357806391d14854146105f557600080fd5b80632eb2c2d6116101e857806349649fbf116101ac57806349649fbf146104895780634e1273f41461049e5780634f558e79146104cb57806350b91129146104fa5780635c6fd90b1461051a5780636a87339d1461053a57600080fd5b80632eb2c2d6146103e95780632f2ff15d1461040957806336568abe146104295780633674800114610449578063404a1f371461046957600080fd5b80630e89341c1161023a5780630e89341c1461033d5780630f49afb21461035d57806312065fe0146103705780631a4231a4146103835780631e2e8c9514610399578063248a9ca3146103b957600080fd5b8062fdd58e1461027657806301ffc9a7146102a957806302fe5305146102d9578063049104e5146102fb57806306fdde031461031b575b600080fd5b34801561028257600080fd5b50610296610291366004612dbd565b6108a8565b6040519081526020015b60405180910390f35b3480156102b557600080fd5b506102c96102c4366004613124565b6108bb565b60405190151581526020016102a0565b3480156102e557600080fd5b506102f96102f436600461315e565b6108cc565b005b34801561030757600080fd5b506102f961031636600461325f565b610914565b34801561032757600080fd5b50610330610a5b565b6040516102a09190613541565b34801561034957600080fd5b506103306103583660046130e6565b610aed565b6102f961036b366004613298565b610bc1565b34801561037c57600080fd5b5047610296565b34801561038f57600080fd5b50610296600f5481565b3480156103a557600080fd5b506102f96103b436600461325f565b610d0f565b3480156103c557600080fd5b506102966103d43660046130e6565b60009081526004602052604090206001015490565b3480156103f557600080fd5b506102f9610404366004612e22565b610e23565b34801561041557600080fd5b506102f96104243660046130ff565b610e71565b34801561043557600080fd5b506102f96104443660046130ff565b610e96565b34801561045557600080fd5b506102f96104643660046130e6565b610f14565b34801561047557600080fd5b506102f9610484366004612da0565b610f76565b34801561049557600080fd5b506102f9610fe5565b3480156104aa57600080fd5b506104be6104b9366004613014565b611019565b6040516102a09190613500565b3480156104d757600080fd5b506102c96104e63660046130e6565b600090815260036020526040902054151590565b34801561050657600080fd5b506102f96105153660046131e7565b611142565b34801561052657600080fd5b506102f9610535366004612da0565b611234565b34801561054657600080fd5b506102f9610555366004612da0565b6112a3565b34801561056657600080fd5b506102f9610575366004612f37565b61132a565b34801561058657600080fd5b506102f961136d565b34801561059b57600080fd5b506102967f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b3480156105cf57600080fd5b506005546001600160a01b03165b6040516001600160a01b0390911681526020016102a0565b34801561060157600080fd5b506102c96106103660046130ff565b611381565b34801561062157600080fd5b506105dd61063036600461315e565b8051602081830181018051600b825292820191909301209152546001600160a01b031681565b34801561066257600080fd5b506102f9610671366004613342565b6113ac565b34801561068257600080fd5b50610330611423565b34801561069757600080fd5b506106ab6106a63660046130e6565b611432565b6040516102a09493929190613554565b3480156106c757600080fd5b506102f96106d63660046130e6565b6114e2565b3480156106e757600080fd5b50610296600081565b3480156106fc57600080fd5b506102f961070b366004612fac565b611523565b34801561071c57600080fd5b50600d5461072a9060ff1681565b60405160ff90911681526020016102a0565b34801561074857600080fd5b506102f961075736600461319a565b61152e565b34801561076857600080fd5b506102966107773660046130e6565b60009081526003602052604090205490565b34801561079557600080fd5b506102f96107a4366004612dbd565b6115fe565b3480156107b557600080fd5b506102f96107c43660046130ff565b611692565b3480156107d557600080fd5b50610296600c5481565b3480156107eb57600080fd5b506102c96107fa366004612de9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561083457600080fd5b506102f961084336600461323d565b6116b7565b34801561085457600080fd5b506102f9610863366004612ecf565b611768565b34801561087457600080fd5b506102f9610883366004612da0565b6117ad565b34801561089457600080fd5b506102f96108a3366004612fdf565b611823565b60006108b48383611873565b9392505050565b60006108c682611904565b92915050565b6005546001600160a01b03163314806108eb57506108eb600033611381565b61090857604051637bb62a2160e01b815260040160405180910390fd5b61091181611929565b50565b600083118015610925575060095483105b6109425760405163224a1b1160e11b815260040160405180910390fd5b6001600160a01b0381166000908152600e602052604090205460ff1661097b57604051635dec801160e11b815260040160405180910390fd5b8161099957604051635dec801160e11b815260040160405180910390fd5b604051638c8233f360e01b8152600481018490526024810183905233604482015281906001600160a01b03821690638c8233f390606401600060405180830381600087803b1580156109ea57600080fd5b505af11580156109fe573d6000803e3d6000fd5b5050604080518781523360208201526001600160a01b0386168183015290517f1899165c592703e302d15c2d4fa10e3d3afbb62b6f23b48dc19d99ea0e1b72b79350908190036060019150a1610a55338585611823565b50505050565b606060068054610a6a9061384d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a969061384d565b8015610ae35780601f10610ab857610100808354040283529160200191610ae3565b820191906000526020600020905b815481529060010190602001808311610ac657829003601f168201915b5050505050905090565b6060610af860095490565b82108015610b065750600082115b610b235760405163224a1b1160e11b815260040160405180910390fd5b6000828152600a602052604090208054610b3c9061384d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b689061384d565b8015610bb55780601f10610b8a57610100808354040283529160200191610bb5565b820191906000526020600020905b815481529060010190602001808311610b9857829003601f168201915b50505050509050919050565b610bce858585858561193c565b610bd757600080fd5b6000848152600a60209081526040808320338452600401909152902054610bfe9086611b59565b6000858152600a602081815260408084203385526004810183529084209490945591879052905260010154610c339086611b59565b6000858152600a6020526040902060010155610c4d611b65565b60ff16158015610c625750600d5460ff166001145b15610ca85733600b84604051610c7891906133cc565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790555b336001600160a01b03167fee563d8e532abc293fca2fdeb41c25180305bddcf9206c167dab3e155aaf1713858786604051610ce593929190613791565b60405180910390a2610d0833858760405180602001604052806000815250611b98565b5050505050565b610d17611ba4565b6001600160a01b038116610d3e57604051630cccf35360e21b815260040160405180910390fd5b600083118015610d4f575060095483105b610d6c5760405163224a1b1160e11b815260040160405180910390fd5b60008211610d8d57604051631e93cba960e01b815260040160405180910390fd5b6000838152600a60209081526040808320338452600401909152902054610db49083611b59565b6000848152600a602081815260408084203385526004810183529084209490945591869052905260010154610de99083611b59565b600a600085815260200190815260200160002060010181905550610e1e81848460405180602001604052806000815250611b98565b505050565b6001600160a01b038516331480610e3f5750610e3f85336107fa565b610e645760405162461bcd60e51b8152600401610e5b90613583565b60405180910390fd5b610d088585858585611bfe565b600082815260046020526040902060010154610e8c81611da8565b610e1e8383611db2565b6001600160a01b0381163314610f065760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610e5b565b610f108282611e38565b5050565b6005546001600160a01b0316331480610f335750610f33600033611381565b610f5057604051637bb62a2160e01b815260040160405180910390fd5b80610f7157604051637cb1974360e11b815260048101829052602401610e5b565b600f55565b6005546001600160a01b0316331480610f955750610f95600033611381565b610fb257604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b038116610fda57604051633ef39b8160e01b815260040160405180910390fd5b610f10600083611e38565b610fed611ba4565b60405133904780156108fc02916000818181858888f19350505050158015610911573d6000803e3d6000fd5b6060815183511461107e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610e5b565b600083516001600160401b03811115611099576110996138fb565b6040519080825280602002602001820160405280156110c2578160200160208202803683370190505b50905060005b845181101561113a5761110d8582815181106110e6576110e66138e5565b6020026020010151858381518110611100576111006138e5565b60200260200101516108a8565b82828151811061111f5761111f6138e5565b6020908102919091010152611133816138b4565b90506110c8565b509392505050565b6005546001600160a01b03163314806111615750611161600033611381565b61117e57604051637bb62a2160e01b815260040160405180910390fd5b60008411801561118f575060095484105b6111ac5760405163224a1b1160e11b815260040160405180910390fd5b816111ca576040516331c9364360e01b815260040160405180910390fd5b6000848152600360205260409020548210156111f95760405163066f305360e21b815260040160405180910390fd5b8181111561121a5760405163ef4596c760e01b815260040160405180910390fd5b6000848152600a60205260409020610a5590848484611e9f565b6005546001600160a01b03163314806112535750611253600033611381565b61127057604051637bb62a2160e01b815260040160405180910390fd5b806001600160a01b03811661129857604051633ef39b8160e01b815260040160405180910390fd5b610f10600083611db2565b6005546001600160a01b03163314806112c257506112c2600033611381565b6112df57604051637bb62a2160e01b815260040160405180910390fd5b6001600160a01b0381166113065760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03166000908152600e60205260409020805460ff19166001179055565b6001600160a01b038316331480611346575061134683336107fa565b6113625760405162461bcd60e51b8152600401610e5b90613583565b610e1e838383611ee5565b611375611ba4565b61137f6000611ef0565b565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6005546001600160a01b03163314806113cb57506113cb600033611381565b6113e857604051637bb62a2160e01b815260040160405180910390fd5b60018160ff16111561140d57604051631293089f60e11b815260040160405180910390fd5b600d805460ff191660ff92909216919091179055565b606060078054610a6a9061384d565b600a6020526000908152604090208054819061144d9061384d565b80601f01602080910402602001604051908101604052809291908181526020018280546114799061384d565b80156114c65780601f1061149b576101008083540402835291602001916114c6565b820191906000526020600020905b8154815290600101906020018083116114a957829003601f168201915b5050505050908060010154908060020154908060030154905084565b6005546001600160a01b03163314806115015750611501600033611381565b61151e57604051637bb62a2160e01b815260040160405180910390fd5b600c55565b610f10338383611f42565b6005546001600160a01b031633148061154d575061154d600033611381565b61156a57604051637bb62a2160e01b815260040160405180910390fd5b81611588576040516331c9364360e01b815260040160405180910390fd5b600061159360095490565b6000818152600a602052604090209091506115b081868686611e9f565b6115be600980546001019055565b7fc25031a1b68125fb0561c58bf093ddeb6c32916824e06aac5c8b60c73529b29882866040516115ef929190613778565b60405180910390a15050505050565b611606611ba4565b6001600160a01b03821661165c5760405162461bcd60e51b815260206004820152601f60248201527f63616e742073656e64206d6f6e657920746f206e756c6c2061646472657373006044820152606401610e5b565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610e1e573d6000803e3d6000fd5b6000828152600460205260409020600101546116ad81611da8565b610e1e8383611e38565b6005546001600160a01b03163314806116d657506116d6600033611381565b6116f357604051637bb62a2160e01b815260040160405180910390fd5b600082118015611704575060095482105b6117215760405163224a1b1160e11b815260040160405180910390fd5b6000828152600a60205260409020600201548111156117535760405163ef4596c760e01b815260040160405180910390fd5b6000918252600a602052604090912060030155565b6001600160a01b038516331480611784575061178485336107fa565b6117a05760405162461bcd60e51b8152600401610e5b90613583565b610d088585858585612023565b6117b5611ba4565b6001600160a01b03811661181a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e5b565b61091181611ef0565b6001600160a01b03831633148061183f575061183f83336107fa565b61185b5760405162461bcd60e51b8152600401610e5b90613583565b610e1e83838361215b565b80546001019055565b5490565b60006001600160a01b0383166118de5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401610e5b565b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216637965db0b60e01b14806108c657506108c682612166565b8051610f10906002906020840190612c1d565b6000808511801561194e575060095485105b61196b5760405163224a1b1160e11b815260040160405180910390fd5b6000858152600a602052604090206003015486111561199d57604051635092c23b60e01b815260040160405180910390fd5b6000858152600a60209081526040808320338452600401909152902054156119d857604051631bbdf5c560e31b815260040160405180910390fd5b6119f8866119f28760009081526003602052604090205490565b90611b59565b6000868152600a60205260409020600201541015611a295760405163d05cb60960e01b815260040160405180910390fd5b600f54341015611a4e57604051637cb1974360e11b8152346004820152602401610e5b565b611a56611b65565b60ff16158015611a6b5750600d5460ff166001145b15611b4d5760006001600160a01b0316600b85604051611a8b91906133cc565b908152604051908190036020019020546001600160a01b031614611ac25760405163320e3acd60e21b815260040160405180910390fd5b600084604051602001611ad591906133cc565b604051602081830303815290604052805190602001209050611b2e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491508490506121b6565b611b4b57604051638743cbb560e01b815260040160405180910390fd5b505b50600195945050505050565b60006108b482846137d3565b6005546000906001600160a01b0316331480611b875750611b87600033611381565b15611b925750600190565b50600090565b610a55848484846121cc565b6005546001600160a01b0316331461137f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e5b565b8151835114611c1f5760405162461bcd60e51b8152600401610e5b90613730565b6001600160a01b038416611c455760405162461bcd60e51b8152600401610e5b9061365e565b33611c548187878787876122ef565b60005b8451811015611d3a576000858281518110611c7457611c746138e5565b602002602001015190506000858381518110611c9257611c926138e5565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611ce25760405162461bcd60e51b8152600401610e5b906136e6565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d1f9084906137d3565b9250508190555050505080611d33906138b4565b9050611c57565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d8a929190613513565b60405180910390a4611da08187878787876122fd565b505050505050565b6109118133612468565b611dbc8282611381565b610f105760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611df43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e428282611381565b15610f105760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8251611ebe5760405163d64becfd60e01b815260040160405180910390fd5b8251611ed09085906020860190612c1d565b50600284019190915560039092019190915550565b610e1e8383836124cc565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611fb65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610e5b565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166120495760405162461bcd60e51b8152600401610e5b9061365e565b33600061205585612668565b9050600061206285612668565b90506120728389898585896122ef565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156120b35760405162461bcd60e51b8152600401610e5b906136e6565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906120f09084906137d3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612150848a8a8a8a8a6126b3565b505050505050505050565b610e1e83838361277d565b60006001600160e01b03198216636cdb3d1360e11b148061219757506001600160e01b031982166303a24d0760e21b145b806108c657506301ffc9a760e01b6001600160e01b03198316146108c6565b6000826121c38584612895565b14949350505050565b6001600160a01b03841661222c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610e5b565b33600061223885612668565b9050600061224585612668565b9050612256836000898585896122ef565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906122869084906137d3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46122e6836000898989896126b3565b50505050505050565b611da08686868686866128da565b6001600160a01b0384163b15611da05760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612341908990899088908890889060040161345d565b602060405180830381600087803b15801561235b57600080fd5b505af192505050801561238b575060408051601f3d908101601f1916820190925261238891810190613141565b60015b61243857612397613911565b806308c379a014156123d157506123ac61392d565b806123b757506123d3565b8060405162461bcd60e51b8152600401610e5b9190613541565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610e5b565b6001600160e01b0319811663bc197c8160e01b146122e65760405162461bcd60e51b8152600401610e5b906135d2565b6124728282611381565b610f105761248a816001600160a01b03166014612a53565b612495836020612a53565b6040516020016124a69291906133e8565b60408051601f198184030181529082905262461bcd60e51b8252610e5b91600401613541565b6001600160a01b0383166124f25760405162461bcd60e51b8152600401610e5b906136a3565b80518251146125135760405162461bcd60e51b8152600401610e5b90613730565b6000339050612536818560008686604051806020016040528060008152506122ef565b60005b83518110156125fb576000848281518110612556576125566138e5565b602002602001015190506000848381518110612574576125746138e5565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156125c45760405162461bcd60e51b8152600401610e5b9061361a565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806125f3816138b4565b915050612539565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161264c929190613513565b60405180910390a4604080516020810190915260009052610a55565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126a2576126a26138e5565b602090810291909101015292915050565b6001600160a01b0384163b15611da05760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126f790899089908890889088906004016134bb565b602060405180830381600087803b15801561271157600080fd5b505af1925050508015612741575060408051601f3d908101601f1916820190925261273e91810190613141565b60015b61274d57612397613911565b6001600160e01b0319811663f23a6e6160e01b146122e65760405162461bcd60e51b8152600401610e5b906135d2565b6001600160a01b0383166127a35760405162461bcd60e51b8152600401610e5b906136a3565b3360006127af84612668565b905060006127bc84612668565b90506127dc838760008585604051806020016040528060008152506122ef565b6000858152602081815260408083206001600160a01b038a1684529091529020548481101561281d5760405162461bcd60e51b8152600401610e5b9061361a565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526122e6565b600081815b845181101561113a576128c6828683815181106128b9576128b96138e5565b6020026020010151612bee565b9150806128d2816138b4565b91505061289a565b6001600160a01b0385166129615760005b835181101561295f57828181518110612906576129066138e5565b602002602001015160036000868481518110612924576129246138e5565b60200260200101518152602001908152602001600020600082825461294991906137d3565b909155506129589050816138b4565b90506128eb565b505b6001600160a01b038416611da05760005b83518110156122e657600084828151811061298f5761298f6138e5565b6020026020010151905060008483815181106129ad576129ad6138e5565b6020026020010151905060006003600084815260200190815260200160002054905081811015612a305760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610e5b565b60009283526003602052604090922091039055612a4c816138b4565b9050612972565b60606000612a628360026137eb565b612a6d9060026137d3565b6001600160401b03811115612a8457612a846138fb565b6040519080825280601f01601f191660200182016040528015612aae576020820181803683370190505b509050600360fc1b81600081518110612ac957612ac96138e5565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612af857612af86138e5565b60200101906001600160f81b031916908160001a9053506000612b1c8460026137eb565b612b279060016137d3565b90505b6001811115612b9f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612b5b57612b5b6138e5565b1a60f81b828281518110612b7157612b716138e5565b60200101906001600160f81b031916908160001a90535060049490941c93612b9881613836565b9050612b2a565b5083156108b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e5b565b6000818310612c0a5760008281526020849052604090206108b4565b60008381526020839052604090206108b4565b828054612c299061384d565b90600052602060002090601f016020900481019282612c4b5760008555612c91565b82601f10612c6457805160ff1916838001178555612c91565b82800160010185558215612c91579182015b82811115612c91578251825591602001919060010190612c76565b50612c9d929150612ca1565b5090565b5b80821115612c9d5760008155600101612ca2565b600082601f830112612cc757600080fd5b81356020612cd4826137b0565b604051612ce18282613888565b8381528281019150858301600585901b87018401881015612d0157600080fd5b60005b85811015612d2057813584529284019290840190600101612d04565b5090979650505050505050565b600082601f830112612d3e57600080fd5b81356001600160401b03811115612d5757612d576138fb565b604051612d6e601f8301601f191660200182613888565b818152846020838601011115612d8357600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215612db257600080fd5b81356108b4816139b6565b60008060408385031215612dd057600080fd5b8235612ddb816139b6565b946020939093013593505050565b60008060408385031215612dfc57600080fd5b8235612e07816139b6565b91506020830135612e17816139b6565b809150509250929050565b600080600080600060a08688031215612e3a57600080fd5b8535612e45816139b6565b94506020860135612e55816139b6565b935060408601356001600160401b0380821115612e7157600080fd5b612e7d89838a01612cb6565b94506060880135915080821115612e9357600080fd5b612e9f89838a01612cb6565b93506080880135915080821115612eb557600080fd5b50612ec288828901612d2d565b9150509295509295909350565b600080600080600060a08688031215612ee757600080fd5b8535612ef2816139b6565b94506020860135612f02816139b6565b9350604086013592506060860135915060808601356001600160401b03811115612f2b57600080fd5b612ec288828901612d2d565b600080600060608486031215612f4c57600080fd5b8335612f57816139b6565b925060208401356001600160401b0380821115612f7357600080fd5b612f7f87838801612cb6565b93506040860135915080821115612f9557600080fd5b50612fa286828701612cb6565b9150509250925092565b60008060408385031215612fbf57600080fd5b8235612fca816139b6565b915060208301358015158114612e1757600080fd5b600080600060608486031215612ff457600080fd5b8335612fff816139b6565b95602085013595506040909401359392505050565b6000806040838503121561302757600080fd5b82356001600160401b038082111561303e57600080fd5b818501915085601f83011261305257600080fd5b8135602061305f826137b0565b60405161306c8282613888565b8381528281019150858301600585901b870184018b101561308c57600080fd5b600096505b848710156130b85780356130a4816139b6565b835260019690960195918301918301613091565b50965050860135925050808211156130cf57600080fd5b506130dc85828601612cb6565b9150509250929050565b6000602082840312156130f857600080fd5b5035919050565b6000806040838503121561311257600080fd5b823591506020830135612e17816139b6565b60006020828403121561313657600080fd5b81356108b4816139cb565b60006020828403121561315357600080fd5b81516108b4816139cb565b60006020828403121561317057600080fd5b81356001600160401b0381111561318657600080fd5b61319284828501612d2d565b949350505050565b6000806000606084860312156131af57600080fd5b83356001600160401b038111156131c557600080fd5b6131d186828701612d2d565b9660208601359650604090950135949350505050565b600080600080608085870312156131fd57600080fd5b8435935060208501356001600160401b0381111561321a57600080fd5b61322687828801612d2d565b949794965050505060408301359260600135919050565b6000806040838503121561325057600080fd5b50508035926020909101359150565b60008060006060848603121561327457600080fd5b8335925060208401359150604084013561328d816139b6565b809150509250925092565b6000806000806000608086880312156132b057600080fd5b853594506020860135935060408601356001600160401b03808211156132d557600080fd5b6132e189838a01612d2d565b945060608801359150808211156132f757600080fd5b818801915088601f83011261330b57600080fd5b81358181111561331a57600080fd5b8960208260051b850101111561332f57600080fd5b9699959850939650602001949392505050565b60006020828403121561335457600080fd5b813560ff811681146108b457600080fd5b600081518084526020808501945080840160005b8381101561339557815187529582019590820190600101613379565b509495945050505050565b600081518084526133b881602086016020860161380a565b601f01601f19169290920160200192915050565b600082516133de81846020870161380a565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161342081601785016020880161380a565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161345181602884016020880161380a565b01602801949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061348990830186613365565b828103606084015261349b8186613365565b905082810360808401526134af81856133a0565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906134f5908301846133a0565b979650505050505050565b6020815260006108b46020830184613365565b6040815260006135266040830185613365565b82810360208401526135388185613365565b95945050505050565b6020815260006108b460208301846133a0565b60808152600061356760808301876133a0565b6020830195909552506040810192909252606090910152919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b82815260406020820152600061319260408301846133a0565b83815282602082015260606040820152600061353860608301846133a0565b60006001600160401b038211156137c9576137c96138fb565b5060051b60200190565b600082198211156137e6576137e66138cf565b500190565b6000816000190483118215151615613805576138056138cf565b500290565b60005b8381101561382557818101518382015260200161380d565b83811115610a555750506000910152565b600081613845576138456138cf565b506000190190565b600181811c9082168061386157607f821691505b6020821081141561388257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156138ad576138ad6138fb565b6040525050565b60006000198214156138c8576138c86138cf565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561392a5760046000803e5060005160e01c5b90565b600060443d101561393b5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561396a57505050505090565b82850191508151818111156139825750505050505090565b843d870101602082850101111561399c5750505050505090565b6139ab60208286010187613888565b509095945050505050565b6001600160a01b038116811461091157600080fd5b6001600160e01b03198116811461091157600080fdfea26469706673582212200c8ceb1e89d9dded44d6090fe6a16121e1ab2e352fc8ee45fdfbd36c9600651164736f6c63430008070033

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

000000000000000000000000ef8d4cb322144eb0c42c419466755f9463b24245000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d6566567072684e686f644a5679447472656762777361466e363956737975675843484236535766597958726f00000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _admin (address): 0xEf8d4Cb322144eb0c42c419466755F9463B24245
Arg [1] : _firstTokenURI (string): https://gateway.pinata.cloud/ipfs/QmefVprhNhodJVyDtregbwsaFn69VsyugXCHB6SWfYyXro
Arg [2] : _firstTokenMaxSupply (uint256): 2000

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000ef8d4cb322144eb0c42c419466755f9463b24245
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000050
Arg [4] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [5] : 732f516d6566567072684e686f644a5679447472656762777361466e36395673
Arg [6] : 7975675843484236535766597958726f00000000000000000000000000000000


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.