ETH Price: $2,959.55 (-1.76%)
Gas: 2 Gwei

Token

BOTB Extended (BOTBEXT)
 

Overview

Max Total Supply

34 BOTBEXT

Holders

26

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
0xbd297c2532571bb3ff92da1935427ee43c3e6095
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:
BOTBEXT

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : BOTBExt.sol
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity 0.8.12;

import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./abstract/ERC1155Factory.sol";

contract BOTBEXT is ERC1155Factory, ReentrancyGuard {
    using Strings for uint256;

    address public constant METH_ADDRESS =
        0xED5464bd5c477b7F71739Ce1d741b43E932b97b0;
    address public secret;
    address public treasuryWallet;

    mapping(bytes => bool) public usedSignatures;

    mapping(uint256 => uint256) public traitLimit;
    mapping(address => bool) public isMinter;

    event Minted(uint256 tokenId, uint256 amount, address to, address operator);
    event MintedFree(
        uint256 tokenId,
        uint256 amount,
        address to,
        address operator
    );
    event MintedMETH(
        uint256 tokenId,
        uint256 amount,
        address to,
        address operator
    );
    event MintedBatch(
        uint256[] ids,
        uint256[] amounts,
        address to,
        address operator
    );
    event MintedOffchain(
        uint256[] traitsOut,
        uint256[] traitsOutAmounts,
        bytes signature,
        address operator
    );

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _uri
    ) ERC1155(_uri) {
        name_ = _name;
        symbol_ = _symbol;
    }

    modifier onlyMinter() {
        require(isMinter[msg.sender], "Mint: Not authorized to mint");
        _;
    }

    function mintOffchain(
        uint256[] memory traitsOut,
        uint256[] memory traitsOutAmounts,
        uint256 timeOut,
        bytes memory signature
    ) external nonReentrant {
        require(
            !usedSignatures[signature],
            "MintTraits: Signature already used"
        );
        require(timeOut > block.timestamp, "MintTraits: Signature expired");
        require(
            traitsOut.length == traitsOutAmounts.length,
            "MintTraits: Invalid traits length"
        );

        usedSignatures[signature] = true;

        string memory traitCode;

        for (uint256 i = 0; i < traitsOut.length; i++) {
            traitCode = string.concat(
                traitCode,
                "C",
                traitsOutAmounts[i].toString()
            );
            traitCode = string.concat(traitCode, "K", traitsOut[i].toString());
        }

        require(
            _verifyHashSignature(
                keccak256(abi.encode(timeOut, traitCode, msg.sender)),
                signature
            ),
            "MintTraits: Signature is invalid"
        );

        _mintBatch(msg.sender, traitsOut, traitsOutAmounts, "");

        emit MintedOffchain(traitsOut, traitsOutAmounts, signature, msg.sender);
    }

    function mint(
        address to,
        uint256 tokenId,
        uint256 amount,
        uint256 price,
        uint256 timeOut,
        bytes memory signature
    ) external payable nonReentrant {
        require(timeOut > block.timestamp, "Mint: Signature expired");
        require(!usedSignatures[signature], "Mint: Signature already used");
        if (traitLimit[tokenId] > 0) {
            require(
                amount + totalSupply(tokenId) <= traitLimit[tokenId],
                "Mint: Exceed trait limit"
            );
        }
        require(msg.value >= price, "Mint: Not enough funds for minting");
        require(
            _verifyHashSignature(
                keccak256(
                    abi.encode(msg.sender, tokenId, amount, price, timeOut)
                ),
                signature
            ),
            "Mint: Invalid signature"
        );

        usedSignatures[signature] = true;

        _mint(to, tokenId, amount, "");

        emit Minted(tokenId, amount, to, msg.sender);
    }

    function mintByMETH(
        address to,
        uint256 tokenId,
        uint256 amount,
        uint256 price,
        uint256 timeOut,
        bytes memory signature
    ) external nonReentrant {
        require(timeOut > block.timestamp, "Mint: Signature expired");
        require(!usedSignatures[signature], "Mint: Signature already used");
        if (traitLimit[tokenId] > 0) {
            require(
                amount + totalSupply(tokenId) <= traitLimit[tokenId],
                "Mint: Exceed trait limit"
            );
        }

        require(
            _verifyHashSignature(
                keccak256(
                    abi.encode(tokenId, msg.sender, timeOut, amount, price)
                ),
                signature
            ),
            "Mint: Invalid signature"
        );

        usedSignatures[signature] = true;

        IERC20(METH_ADDRESS).transfer(treasuryWallet, price);
        _mint(to, tokenId, amount, "");

        emit MintedMETH(tokenId, amount, to, msg.sender);
    }

    function freeMint(
        address to,
        uint256 tokenId,
        uint256 amount
    ) external onlyMinter {
        if (traitLimit[tokenId] > 0) {
            require(
                amount + totalSupply(tokenId) <= traitLimit[tokenId],
                "Mint: Exceed trait limit"
            );
        }

        _mint(to, tokenId, amount, "");

        emit MintedFree(tokenId, amount, to, msg.sender);
    }

    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external payable onlyMinter {
        _mintBatch(to, ids, amounts, "");

        emit MintedBatch(ids, amounts, to, msg.sender);
    }

    function setTraitLimit(uint256 tokenId, uint256 limit) external onlyOwner {
        traitLimit[tokenId] = limit;
    }

    function bulkSetTraitLimit(
        uint256[] calldata tokenIds,
        uint256[] calldata limits
    ) external onlyOwner {
        require(
            tokenIds.length == limits.length,
            "bulkSetTrait: length mismatch"
        );
        for (uint256 i = 0; i < tokenIds.length; i++) {
            traitLimit[tokenIds[i]] = limits[i];
        }
    }

    function setIsMinter(address operator, bool status) external onlyOwner {
        isMinter[operator] = status;
    }

    function setTreasuryWallet(address _treasuryWallet) external onlyOwner {
        treasuryWallet = _treasuryWallet;
    }

    function setSecret(address _secret) external onlyOwner {
        secret = _secret;
    }

    function uri(uint256 _id) public view override returns (string memory) {
        require(exists(_id), "URI: nonexistent token");

        return string(abi.encodePacked(super.uri(_id), _id.toString()));
    }

    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        for (uint256 i = 0; i < ids.length; i++) {
            if (traitLimit[ids[i]] > 0) {
                require(
                    amounts[i] + totalSupply(ids[i]) <= traitLimit[ids[i]],
                    "Mint: Exceed trait limit"
                );
            }
        }

        super._mintBatch(to, ids, amounts, data);
    }

    function _verifyHashSignature(
        bytes32 freshHash,
        bytes memory signature
    ) internal view returns (bool) {
        bytes32 hash = keccak256(
            abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash)
        );

        bytes32 r;
        bytes32 s;
        uint8 v;

        if (signature.length != 65) {
            return false;
        }
        assembly {
            r := mload(add(signature, 32))
            s := mload(add(signature, 64))
            v := byte(0, mload(add(signature, 96)))
        }

        if (v < 27) {
            v += 27;
        }

        address signer = address(0);
        if (v == 27 || v == 28) {
            // solium-disable-next-line arg-overflow
            signer = ecrecover(hash, v, r, s);
        }
        return secret == signer;
    }

    function withdrawETH(
        address _address,
        uint256 amount
    ) public nonReentrant onlyOwner {
        require(_address != address(0), "200:ZERO_ADDRESS");
        require(amount <= address(this).balance, "Insufficient funds");
        (bool success, ) = _address.call{value: amount}("");
        require(success, "Transaction failed");
    }
}

File 2 of 17 : ERC1155Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract ERC1155Factory is ERC1155Supply, Ownable {
    string name_;
    string symbol_;

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

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

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

    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );

        _burn(account, id, value);
    }

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

File 3 of 17 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 4 of 17 : 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 5 of 17 : 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 6 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _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) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _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 7 of 17 : 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 8 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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 9 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 10 of 17 : 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 11 of 17 : 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 12 of 17 : 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 13 of 17 : 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 17 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 or 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 or 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 15 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 16 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 17 of 17 : 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"MintedBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"MintedFree","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"MintedMETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"traitsOut","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"traitsOutAmounts","type":"uint256[]"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"MintedOffchain","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"METH_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"limits","type":"uint256[]"}],"name":"bulkSetTraitLimit","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"freeMint","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintByMETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"traitsOut","type":"uint256[]"},{"internalType":"uint256[]","name":"traitsOutAmounts","type":"uint256[]"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintOffchain","outputs":[],"stateMutability":"nonpayable","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":[],"name":"renounceOwnership","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":[],"name":"secret","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setIsMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_secret","type":"address"}],"name":"setSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setTraitLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setURI","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":"uint256","name":"","type":"uint256"}],"name":"traitLimit","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":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"usedSignatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162003b0c38038062003b0c833981016040819052620000349162000264565b80620000408162000086565b506200004c336200009f565b6001600755825162000066906005906020860190620000f1565b5081516200007c906006906020850190620000f1565b5050505062000332565b80516200009b906002906020840190620000f1565b5050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000ff90620002f5565b90600052602060002090601f0160209004810192826200012357600085556200016e565b82601f106200013e57805160ff19168380011785556200016e565b828001600101855582156200016e579182015b828111156200016e57825182559160200191906001019062000151565b506200017c92915062000180565b5090565b5b808211156200017c576000815560010162000181565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001bf57600080fd5b81516001600160401b0380821115620001dc57620001dc62000197565b604051601f8301601f19908116603f0116810190828211818310171562000207576200020762000197565b816040528381526020925086838588010111156200022457600080fd5b600091505b8382101562000248578582018301518183018401529082019062000229565b838211156200025a5760008385830101525b9695505050505050565b6000806000606084860312156200027a57600080fd5b83516001600160401b03808211156200029257600080fd5b620002a087838801620001ad565b94506020860151915080821115620002b757600080fd5b620002c587838801620001ad565b93506040860151915080821115620002dc57600080fd5b50620002eb86828701620001ad565b9150509250925092565b600181811c908216806200030a57607f821691505b602082108114156200032c57634e487b7160e01b600052602260045260246000fd5b50919050565b6137ca80620003426000396000f3fe6080604052600436106101f85760003560e01c8063715018a61161010d578063d1efd30d116100a0578063e985e9c51161006f578063e985e9c514610613578063e9a7484c1461065c578063f242432a1461067c578063f2fde38b1461069c578063f5298aca146106bc57600080fd5b8063d1efd30d14610578578063d81d0a1514610598578063e0a6bcdb146105ab578063e949580e146105d857600080fd5b8063a22cb465116100dc578063a22cb465146104db578063a8602fea146104fb578063aa271e1a1461051b578063bd85b0391461054b57600080fd5b8063715018a61461046b57806384e26002146104805780638da5cb5b146104a857806395d89b41146104c657600080fd5b80632fb413bd116101905780634f558e791161015f5780634f558e79146103bc578063540d22cf146103eb578063615544e21461040b57806366eb399f1461042b57806368bb40861461044b57600080fd5b80632fb413bd146103175780634626402b146103375780634782f7791461036f5780634e1273f41461038f57600080fd5b80630e89341c116101cc5780630e89341c146102a457806318c5a12c146102c457806325aabd07146102e45780632eb2c2d6146102f757600080fd5b8062fdd58e146101fd57806301ffc9a71461023057806302fe53051461026057806306fdde0314610282575b600080fd5b34801561020957600080fd5b5061021d61021836600461299c565b6106dc565b6040519081526020015b60405180910390f35b34801561023c57600080fd5b5061025061024b3660046129dc565b610775565b6040519015158152602001610227565b34801561026c57600080fd5b5061028061027b366004612a9f565b6107c5565b005b34801561028e57600080fd5b506102976107d9565b6040516102279190612b47565b3480156102b057600080fd5b506102976102bf366004612b5a565b61086b565b3480156102d057600080fd5b506102806102df366004612b93565b6108fb565b6102806102f2366004612b93565b610bc7565b34801561030357600080fd5b50610280610312366004612c99565b610e38565b34801561032357600080fd5b50610280610332366004612d8d565b610e84565b34801561034357600080fd5b50600954610357906001600160a01b031681565b6040516001600160a01b039091168152602001610227565b34801561037b57600080fd5b5061028061038a36600461299c565b610f41565b34801561039b57600080fd5b506103af6103aa366004612df8565b611086565b6040516102279190612efd565b3480156103c857600080fd5b506102506103d7366004612b5a565b600090815260036020526040902054151590565b3480156103f757600080fd5b50610280610406366004612f10565b6111af565b34801561041757600080fd5b50610280610426366004612f32565b6111c9565b34801561043757600080fd5b50610280610446366004612f73565b6112dc565b34801561045757600080fd5b50610280610466366004612faa565b61130f565b34801561047757600080fd5b506102806115f6565b34801561048c57600080fd5b5061035773ed5464bd5c477b7f71739ce1d741b43e932b97b081565b3480156104b457600080fd5b506004546001600160a01b0316610357565b3480156104d257600080fd5b5061029761160a565b3480156104e757600080fd5b506102806104f6366004612f73565b611619565b34801561050757600080fd5b5061028061051636600461303b565b611624565b34801561052757600080fd5b5061025061053636600461303b565b600c6020526000908152604090205460ff1681565b34801561055757600080fd5b5061021d610566366004612b5a565b60009081526003602052604090205490565b34801561058457600080fd5b50600854610357906001600160a01b031681565b6102806105a6366004613056565b61164e565b3480156105b757600080fd5b5061021d6105c6366004612b5a565b600b6020526000908152604090205481565b3480156105e457600080fd5b506102506105f33660046130c9565b8051602081830181018051600a8252928201919093012091525460ff1681565b34801561061f57600080fd5b5061025061062e3660046130fd565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561066857600080fd5b5061028061067736600461303b565b6116fd565b34801561068857600080fd5b50610280610697366004613130565b611727565b3480156106a857600080fd5b506102806106b736600461303b565b61176c565b3480156106c857600080fd5b506102806106d7366004612f32565b6117e2565b60006001600160a01b03831661074c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b14806107a657506001600160e01b031982166303a24d0760e21b145b8061076f57506301ffc9a760e01b6001600160e01b031983161461076f565b6107cd61182a565b6107d681611884565b50565b6060600580546107e890613194565b80601f016020809104026020016040519081016040528092919081815260200182805461081490613194565b80156108615780601f1061083657610100808354040283529160200191610861565b820191906000526020600020905b81548152906001019060200180831161084457829003601f168201915b5050505050905090565b6000818152600360205260409020546060906108c25760405162461bcd60e51b81526020600482015260166024820152752aa9249d103737b732bc34b9ba32b73a103a37b5b2b760511b6044820152606401610743565b6108cb82611897565b6108d48361192b565b6040516020016108e59291906131cf565b6040516020818303038152906040529050919050565b6109036119bf565b42821161094c5760405162461bcd60e51b8152602060048201526017602482015276135a5b9d0e8814da59db985d1d5c9948195e1c1a5c9959604a1b6044820152606401610743565b600a8160405161095c91906131fe565b9081526040519081900360200190205460ff16156109bc5760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a205369676e617475726520616c72656164792075736564000000006044820152606401610743565b6000858152600b602052604090205415610a13576000858152600b60209081526040808320546003909252909120546109f59086613230565b1115610a135760405162461bcd60e51b815260040161074390613248565b60408051602081018790523391810191909152606081018390526080810185905260a08101849052610a5f9060c0015b6040516020818303038152906040528051906020012082611a19565b610aa55760405162461bcd60e51b81526020600482015260176024820152764d696e743a20496e76616c6964207369676e617475726560481b6044820152606401610743565b6001600a82604051610ab791906131fe565b908152604051908190036020018120805492151560ff199093169290921790915560095463a9059cbb60e01b82526001600160a01b031660048201526024810184905273ed5464bd5c477b7f71739ce1d741b43e932b97b09063a9059cbb906044016020604051808303816000875af1158015610b38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5c919061327f565b50610b7886868660405180602001604052806000815250611b48565b7f67c8941fabaafabeed28fbc993dec89211bebed206c87749590d72edcf41498e85858833604051610bad949392919061329c565b60405180910390a1610bbf6001600755565b505050505050565b610bcf6119bf565b428211610c185760405162461bcd60e51b8152602060048201526017602482015276135a5b9d0e8814da59db985d1d5c9948195e1c1a5c9959604a1b6044820152606401610743565b600a81604051610c2891906131fe565b9081526040519081900360200190205460ff1615610c885760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a205369676e617475726520616c72656164792075736564000000006044820152606401610743565b6000858152600b602052604090205415610cdf576000858152600b6020908152604080832054600390925290912054610cc19086613230565b1115610cdf5760405162461bcd60e51b815260040161074390613248565b82341015610d3a5760405162461bcd60e51b815260206004820152602260248201527f4d696e743a204e6f7420656e6f7567682066756e647320666f72206d696e74696044820152616e6760f01b6064820152608401610743565b60408051336020820152908101869052606081018590526080810184905260a08101839052610d6b9060c001610a43565b610db15760405162461bcd60e51b81526020600482015260176024820152764d696e743a20496e76616c6964207369676e617475726560481b6044820152606401610743565b6001600a82604051610dc391906131fe565b908152602001604051809103902060006101000a81548160ff021916908315150217905550610e0386868660405180602001604052806000815250611b48565b7f433b76441e18c222fc492f65a3b0588e67167e45e4450e02b14c22d5aac5fe5685858833604051610bad949392919061329c565b6001600160a01b038516331480610e545750610e54853361062e565b610e705760405162461bcd60e51b8152600401610743906132c3565b610e7d8585858585611c31565b5050505050565b610e8c61182a565b828114610edb5760405162461bcd60e51b815260206004820152601d60248201527f62756c6b53657454726169743a206c656e677468206d69736d617463680000006044820152606401610743565b60005b83811015610e7d57828282818110610ef857610ef8613311565b90506020020135600b6000878785818110610f1557610f15613311565b905060200201358152602001908152602001600020819055508080610f3990613327565b915050610ede565b610f496119bf565b610f5161182a565b6001600160a01b038216610f9a5760405162461bcd60e51b815260206004820152601060248201526f3230303a5a45524f5f4144445245535360801b6044820152606401610743565b47811115610fdf5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610743565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461102c576040519150601f19603f3d011682016040523d82523d6000602084013e611031565b606091505b50509050806110775760405162461bcd60e51b8152602060048201526012602482015271151c985b9cd858dd1a5bdb8819985a5b195960721b6044820152606401610743565b506110826001600755565b5050565b606081518351146110eb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610743565b600083516001600160401b0381111561110657611106612a00565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b50905060005b84518110156111a75761117a85828151811061115357611153613311565b602002602001015185838151811061116d5761116d613311565b60200260200101516106dc565b82828151811061118c5761118c613311565b60209081029190910101526111a081613327565b9050611135565b509392505050565b6111b761182a565b6000918252600b602052604090912055565b336000908152600c602052604090205460ff166112285760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a204e6f7420617574686f72697a656420746f206d696e74000000006044820152606401610743565b6000828152600b60205260409020541561127f576000828152600b60209081526040808320546003909252909120546112619083613230565b111561127f5760405162461bcd60e51b815260040161074390613248565b61129a83838360405180602001604052806000815250611b48565b7f02c7cd4819befdd83fa1a9984e986f4608147b993616b6466031331f5a04a8e5828285336040516112cf949392919061329c565b60405180910390a1505050565b6112e461182a565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6113176119bf565b600a8160405161132791906131fe565b9081526040519081900360200190205460ff16156113925760405162461bcd60e51b815260206004820152602260248201527f4d696e745472616974733a205369676e617475726520616c7265616479207573604482015261195960f21b6064820152608401610743565b4282116113e15760405162461bcd60e51b815260206004820152601d60248201527f4d696e745472616974733a205369676e617475726520657870697265640000006044820152606401610743565b825184511461143c5760405162461bcd60e51b815260206004820152602160248201527f4d696e745472616974733a20496e76616c696420747261697473206c656e67746044820152600d60fb1b6064820152608401610743565b6001600a8260405161144e91906131fe565b908152604051908190036020019020805491151560ff19909216919091179055606060005b855181101561150c578161149f86838151811061149257611492613311565b602002602001015161192b565b6040516020016114b0929190613342565b6040516020818303038152906040529150816114d787838151811061149257611492613311565b6040516020016114e892919061337e565b6040516020818303038152906040529150808061150490613327565b915050611473565b50611541838233604051602001611525939291906133ae565b6040516020818303038152906040528051906020012083611a19565b61158d5760405162461bcd60e51b815260206004820181905260248201527f4d696e745472616974733a205369676e617475726520697320696e76616c69646044820152606401610743565b6115a833868660405180602001604052806000815250611dd3565b7f3b60161110d4999aadeced8377e0d3a05d0f674a2d19c2c09a98ff4401293442858584336040516115dd94939291906133df565b60405180910390a1506115f06001600755565b50505050565b6115fe61182a565b6116086000611ed1565b565b6060600680546107e890613194565b611082338383611f23565b61162c61182a565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600c602052604090205460ff166116ad5760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a204e6f7420617574686f72697a656420746f206d696e74000000006044820152606401610743565b6116c883838360405180602001604052806000815250611dd3565b7ff36d8cbebfcac71d1fcb485fa591caaa27217c7fdffd9af73ea652cedf433038828285336040516112cf9493929190613432565b61170561182a565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0385163314806117435750611743853361062e565b61175f5760405162461bcd60e51b8152600401610743906132c3565b610e7d8585858585612004565b61177461182a565b6001600160a01b0381166117d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610743565b6107d681611ed1565b6001600160a01b0383163314806117fe57506117fe833361062e565b61181a5760405162461bcd60e51b8152600401610743906132c3565b61182583838361213c565b505050565b6004546001600160a01b031633146116085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610743565b80516110829060029060208401906128e7565b6060600280546118a690613194565b80601f01602080910402602001604051908101604052809291908181526020018280546118d290613194565b801561191f5780601f106118f45761010080835404028352916020019161191f565b820191906000526020600020905b81548152906001019060200180831161190257829003601f168201915b50505050509050919050565b60606000611938836122cc565b60010190506000816001600160401b0381111561195757611957612a00565b6040519080825280601f01601f191660200182016040528015611981576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846119ba576111a7565b61198b565b60026007541415611a125760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610743565b6002600755565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390526000908190605c0160405160208183030381529060405280519060200120905060008060008551604114611a8457600094505050505061076f565b50505060208301516040840151606085015160001a601b811015611ab057611aad601b8261347c565b90505b60008160ff16601b1480611ac757508160ff16601c145b15611b2c5760408051600081526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611b1f573d6000803e3d6000fd5b5050506020604051035190505b6008546001600160a01b03918216911614979650505050505050565b6001600160a01b038416611b6e5760405162461bcd60e51b8152600401610743906134a1565b336000611b7a856123a4565b90506000611b87856123a4565b9050611b98836000898585896123ef565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290611bc8908490613230565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611c28836000898989896123fd565b50505050505050565b8151835114611c525760405162461bcd60e51b8152600401610743906134e2565b6001600160a01b038416611c785760405162461bcd60e51b81526004016107439061352a565b33611c878187878787876123ef565b60005b8451811015611d6d576000858281518110611ca757611ca7613311565b602002602001015190506000858381518110611cc557611cc5613311565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611d155760405162461bcd60e51b81526004016107439061356f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d52908490613230565b9250508190555050505080611d6690613327565b9050611c8a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611dbd9291906135b9565b60405180910390a4610bbf818787878787612559565b60005b8351811015611ec4576000600b6000868481518110611df757611df7613311565b60200260200101518152602001908152602001600020541115611eb257600b6000858381518110611e2a57611e2a613311565b6020026020010151815260200190815260200160002054611e70858381518110611e5657611e56613311565b602002602001015160009081526003602052604090205490565b848381518110611e8257611e82613311565b6020026020010151611e949190613230565b1115611eb25760405162461bcd60e51b815260040161074390613248565b80611ebc81613327565b915050611dd6565b506115f084848484612614565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611f975760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610743565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661202a5760405162461bcd60e51b81526004016107439061352a565b336000612036856123a4565b90506000612043856123a4565b90506120538389898585896123ef565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156120945760405162461bcd60e51b81526004016107439061356f565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906120d1908490613230565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612131848a8a8a8a8a6123fd565b505050505050505050565b6001600160a01b03831661219e5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610743565b3360006121aa846123a4565b905060006121b7846123a4565b90506121d7838760008585604051806020016040528060008152506123ef565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156122545760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610743565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611c28565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061230b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612337576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061235557662386f26fc10000830492506010015b6305f5e100831061236d576305f5e100830492506008015b612710831061238157612710830492506004015b60648310612393576064830492506002015b600a831061076f5760010192915050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106123de576123de613311565b602090810291909101015292915050565b610bbf86868686868661276e565b6001600160a01b0384163b15610bbf5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061244190899089908890889088906004016135e7565b6020604051808303816000875af192505050801561247c575060408051601f3d908101601f191682019092526124799181019061362c565b60015b61252957612488613649565b806308c379a014156124c2575061249d613665565b806124a857506124c4565b8060405162461bcd60e51b81526004016107439190612b47565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610743565b6001600160e01b0319811663f23a6e6160e01b14611c285760405162461bcd60e51b8152600401610743906136ee565b6001600160a01b0384163b15610bbf5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061259d9089908990889088908890600401613736565b6020604051808303816000875af19250505080156125d8575060408051601f3d908101601f191682019092526125d59181019061362c565b60015b6125e457612488613649565b6001600160e01b0319811663bc197c8160e01b14611c285760405162461bcd60e51b8152600401610743906136ee565b6001600160a01b03841661263a5760405162461bcd60e51b8152600401610743906134a1565b815183511461265b5760405162461bcd60e51b8152600401610743906134e2565b3361266b816000878787876123ef565b60005b84518110156127065783818151811061268957612689613311565b60200260200101516000808784815181106126a6576126a6613311565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546126ee9190613230565b909155508190506126fe81613327565b91505061266e565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516127579291906135b9565b60405180910390a4610e7d81600087878787612559565b6001600160a01b0385166127f55760005b83518110156127f35782818151811061279a5761279a613311565b6020026020010151600360008684815181106127b8576127b8613311565b6020026020010151815260200190815260200160002060008282546127dd9190613230565b909155506127ec905081613327565b905061277f565b505b6001600160a01b038416610bbf5760005b8351811015611c2857600084828151811061282357612823613311565b60200260200101519050600084838151811061284157612841613311565b60200260200101519050600060036000848152602001908152602001600020549050818110156128c45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610743565b600092835260036020526040909220910390556128e081613327565b9050612806565b8280546128f390613194565b90600052602060002090601f016020900481019282612915576000855561295b565b82601f1061292e57805160ff191683800117855561295b565b8280016001018555821561295b579182015b8281111561295b578251825591602001919060010190612940565b5061296792915061296b565b5090565b5b80821115612967576000815560010161296c565b80356001600160a01b038116811461299757600080fd5b919050565b600080604083850312156129af57600080fd5b6129b883612980565b946020939093013593505050565b6001600160e01b0319811681146107d657600080fd5b6000602082840312156129ee57600080fd5b81356129f9816129c6565b9392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612a3b57612a3b612a00565b6040525050565b60006001600160401b03831115612a5b57612a5b612a00565b604051612a72601f8501601f191660200182612a16565b809150838152848484011115612a8757600080fd5b83836020830137600060208583010152509392505050565b600060208284031215612ab157600080fd5b81356001600160401b03811115612ac757600080fd5b8201601f81018413612ad857600080fd5b612ae784823560208401612a42565b949350505050565b60005b83811015612b0a578181015183820152602001612af2565b838111156115f05750506000910152565b60008151808452612b33816020860160208601612aef565b601f01601f19169290920160200192915050565b6020815260006129f96020830184612b1b565b600060208284031215612b6c57600080fd5b5035919050565b600082601f830112612b8457600080fd5b6129f983833560208501612a42565b60008060008060008060c08789031215612bac57600080fd5b612bb587612980565b95506020870135945060408701359350606087013592506080870135915060a08701356001600160401b03811115612bec57600080fd5b612bf889828a01612b73565b9150509295509295509295565b60006001600160401b03821115612c1e57612c1e612a00565b5060051b60200190565b600082601f830112612c3957600080fd5b81356020612c4682612c05565b604051612c538282612a16565b83815260059390931b8501820192828101915086841115612c7357600080fd5b8286015b84811015612c8e5780358352918301918301612c77565b509695505050505050565b600080600080600060a08688031215612cb157600080fd5b612cba86612980565b9450612cc860208701612980565b935060408601356001600160401b0380821115612ce457600080fd5b612cf089838a01612c28565b94506060880135915080821115612d0657600080fd5b612d1289838a01612c28565b93506080880135915080821115612d2857600080fd5b50612d3588828901612b73565b9150509295509295909350565b60008083601f840112612d5457600080fd5b5081356001600160401b03811115612d6b57600080fd5b6020830191508360208260051b8501011115612d8657600080fd5b9250929050565b60008060008060408587031215612da357600080fd5b84356001600160401b0380821115612dba57600080fd5b612dc688838901612d42565b90965094506020870135915080821115612ddf57600080fd5b50612dec87828801612d42565b95989497509550505050565b60008060408385031215612e0b57600080fd5b82356001600160401b0380821115612e2257600080fd5b818501915085601f830112612e3657600080fd5b81356020612e4382612c05565b604051612e508282612a16565b83815260059390931b8501820192828101915089841115612e7057600080fd5b948201945b83861015612e9557612e8686612980565b82529482019490820190612e75565b96505086013592505080821115612eab57600080fd5b50612eb885828601612c28565b9150509250929050565b600081518084526020808501945080840160005b83811015612ef257815187529582019590820190600101612ed6565b509495945050505050565b6020815260006129f96020830184612ec2565b60008060408385031215612f2357600080fd5b50508035926020909101359150565b600080600060608486031215612f4757600080fd5b612f5084612980565b95602085013595506040909401359392505050565b80151581146107d657600080fd5b60008060408385031215612f8657600080fd5b612f8f83612980565b91506020830135612f9f81612f65565b809150509250929050565b60008060008060808587031215612fc057600080fd5b84356001600160401b0380821115612fd757600080fd5b612fe388838901612c28565b95506020870135915080821115612ff957600080fd5b61300588838901612c28565b945060408701359350606087013591508082111561302257600080fd5b5061302f87828801612b73565b91505092959194509250565b60006020828403121561304d57600080fd5b6129f982612980565b60008060006060848603121561306b57600080fd5b61307484612980565b925060208401356001600160401b038082111561309057600080fd5b61309c87838801612c28565b935060408601359150808211156130b257600080fd5b506130bf86828701612c28565b9150509250925092565b6000602082840312156130db57600080fd5b81356001600160401b038111156130f157600080fd5b612ae784828501612b73565b6000806040838503121561311057600080fd5b61311983612980565b915061312760208401612980565b90509250929050565b600080600080600060a0868803121561314857600080fd5b61315186612980565b945061315f60208701612980565b9350604086013592506060860135915060808601356001600160401b0381111561318857600080fd5b612d3588828901612b73565b600181811c908216806131a857607f821691505b602082108114156131c957634e487b7160e01b600052602260045260246000fd5b50919050565b600083516131e1818460208801612aef565b8351908301906131f5818360208801612aef565b01949350505050565b60008251613210818460208701612aef565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156132435761324361321a565b500190565b60208082526018908201527f4d696e743a20457863656564207472616974206c696d69740000000000000000604082015260600190565b60006020828403121561329157600080fd5b81516129f981612f65565b93845260208401929092526001600160a01b03908116604084015216606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561333b5761333b61321a565b5060010190565b60008351613354818460208801612aef565b604360f81b9083019081528351613372816001840160208801612aef565b01600101949350505050565b60008351613390818460208801612aef565b604b60f81b9083019081528351613372816001840160208801612aef565b8381526060602082015260006133c76060830185612b1b565b905060018060a01b0383166040830152949350505050565b6080815260006133f26080830187612ec2565b82810360208401526134048187612ec2565b905082810360408401526134188186612b1b565b91505060018060a01b038316606083015295945050505050565b6080815260006134456080830187612ec2565b82810360208401526134578187612ec2565b6001600160a01b03958616604085015293909416606090920191909152509392505050565b600060ff821660ff84168060ff038211156134995761349961321a565b019392505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006135cc6040830185612ec2565b82810360208401526135de8185612ec2565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061362190830184612b1b565b979650505050505050565b60006020828403121561363e57600080fd5b81516129f9816129c6565b600060033d11156136625760046000803e5060005160e01c5b90565b600060443d10156136735790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156136a257505050505090565b82850191508151818111156136ba5750505050505090565b843d87010160208285010111156136d45750505050505090565b6136e360208286010187612a16565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061376290830186612ec2565b82810360608401526137748186612ec2565b905082810360808401526137888185612b1b565b9897505050505050505056fea264697066735822122037d2cff4bc65d37ed838db9a37a13139ecb06dc9e6ec63c01151de57b75f6ab964736f6c634300080c0033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000d424f544220457874656e646564000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007424f544245585400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c68747470733a2f2f617065732e6d696e742e62756c6c73616e646170657370726f6a6563742e636f6d2f6d657461646174612f626f74622d6578742f00000000

Deployed Bytecode

0x6080604052600436106101f85760003560e01c8063715018a61161010d578063d1efd30d116100a0578063e985e9c51161006f578063e985e9c514610613578063e9a7484c1461065c578063f242432a1461067c578063f2fde38b1461069c578063f5298aca146106bc57600080fd5b8063d1efd30d14610578578063d81d0a1514610598578063e0a6bcdb146105ab578063e949580e146105d857600080fd5b8063a22cb465116100dc578063a22cb465146104db578063a8602fea146104fb578063aa271e1a1461051b578063bd85b0391461054b57600080fd5b8063715018a61461046b57806384e26002146104805780638da5cb5b146104a857806395d89b41146104c657600080fd5b80632fb413bd116101905780634f558e791161015f5780634f558e79146103bc578063540d22cf146103eb578063615544e21461040b57806366eb399f1461042b57806368bb40861461044b57600080fd5b80632fb413bd146103175780634626402b146103375780634782f7791461036f5780634e1273f41461038f57600080fd5b80630e89341c116101cc5780630e89341c146102a457806318c5a12c146102c457806325aabd07146102e45780632eb2c2d6146102f757600080fd5b8062fdd58e146101fd57806301ffc9a71461023057806302fe53051461026057806306fdde0314610282575b600080fd5b34801561020957600080fd5b5061021d61021836600461299c565b6106dc565b6040519081526020015b60405180910390f35b34801561023c57600080fd5b5061025061024b3660046129dc565b610775565b6040519015158152602001610227565b34801561026c57600080fd5b5061028061027b366004612a9f565b6107c5565b005b34801561028e57600080fd5b506102976107d9565b6040516102279190612b47565b3480156102b057600080fd5b506102976102bf366004612b5a565b61086b565b3480156102d057600080fd5b506102806102df366004612b93565b6108fb565b6102806102f2366004612b93565b610bc7565b34801561030357600080fd5b50610280610312366004612c99565b610e38565b34801561032357600080fd5b50610280610332366004612d8d565b610e84565b34801561034357600080fd5b50600954610357906001600160a01b031681565b6040516001600160a01b039091168152602001610227565b34801561037b57600080fd5b5061028061038a36600461299c565b610f41565b34801561039b57600080fd5b506103af6103aa366004612df8565b611086565b6040516102279190612efd565b3480156103c857600080fd5b506102506103d7366004612b5a565b600090815260036020526040902054151590565b3480156103f757600080fd5b50610280610406366004612f10565b6111af565b34801561041757600080fd5b50610280610426366004612f32565b6111c9565b34801561043757600080fd5b50610280610446366004612f73565b6112dc565b34801561045757600080fd5b50610280610466366004612faa565b61130f565b34801561047757600080fd5b506102806115f6565b34801561048c57600080fd5b5061035773ed5464bd5c477b7f71739ce1d741b43e932b97b081565b3480156104b457600080fd5b506004546001600160a01b0316610357565b3480156104d257600080fd5b5061029761160a565b3480156104e757600080fd5b506102806104f6366004612f73565b611619565b34801561050757600080fd5b5061028061051636600461303b565b611624565b34801561052757600080fd5b5061025061053636600461303b565b600c6020526000908152604090205460ff1681565b34801561055757600080fd5b5061021d610566366004612b5a565b60009081526003602052604090205490565b34801561058457600080fd5b50600854610357906001600160a01b031681565b6102806105a6366004613056565b61164e565b3480156105b757600080fd5b5061021d6105c6366004612b5a565b600b6020526000908152604090205481565b3480156105e457600080fd5b506102506105f33660046130c9565b8051602081830181018051600a8252928201919093012091525460ff1681565b34801561061f57600080fd5b5061025061062e3660046130fd565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561066857600080fd5b5061028061067736600461303b565b6116fd565b34801561068857600080fd5b50610280610697366004613130565b611727565b3480156106a857600080fd5b506102806106b736600461303b565b61176c565b3480156106c857600080fd5b506102806106d7366004612f32565b6117e2565b60006001600160a01b03831661074c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b14806107a657506001600160e01b031982166303a24d0760e21b145b8061076f57506301ffc9a760e01b6001600160e01b031983161461076f565b6107cd61182a565b6107d681611884565b50565b6060600580546107e890613194565b80601f016020809104026020016040519081016040528092919081815260200182805461081490613194565b80156108615780601f1061083657610100808354040283529160200191610861565b820191906000526020600020905b81548152906001019060200180831161084457829003601f168201915b5050505050905090565b6000818152600360205260409020546060906108c25760405162461bcd60e51b81526020600482015260166024820152752aa9249d103737b732bc34b9ba32b73a103a37b5b2b760511b6044820152606401610743565b6108cb82611897565b6108d48361192b565b6040516020016108e59291906131cf565b6040516020818303038152906040529050919050565b6109036119bf565b42821161094c5760405162461bcd60e51b8152602060048201526017602482015276135a5b9d0e8814da59db985d1d5c9948195e1c1a5c9959604a1b6044820152606401610743565b600a8160405161095c91906131fe565b9081526040519081900360200190205460ff16156109bc5760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a205369676e617475726520616c72656164792075736564000000006044820152606401610743565b6000858152600b602052604090205415610a13576000858152600b60209081526040808320546003909252909120546109f59086613230565b1115610a135760405162461bcd60e51b815260040161074390613248565b60408051602081018790523391810191909152606081018390526080810185905260a08101849052610a5f9060c0015b6040516020818303038152906040528051906020012082611a19565b610aa55760405162461bcd60e51b81526020600482015260176024820152764d696e743a20496e76616c6964207369676e617475726560481b6044820152606401610743565b6001600a82604051610ab791906131fe565b908152604051908190036020018120805492151560ff199093169290921790915560095463a9059cbb60e01b82526001600160a01b031660048201526024810184905273ed5464bd5c477b7f71739ce1d741b43e932b97b09063a9059cbb906044016020604051808303816000875af1158015610b38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5c919061327f565b50610b7886868660405180602001604052806000815250611b48565b7f67c8941fabaafabeed28fbc993dec89211bebed206c87749590d72edcf41498e85858833604051610bad949392919061329c565b60405180910390a1610bbf6001600755565b505050505050565b610bcf6119bf565b428211610c185760405162461bcd60e51b8152602060048201526017602482015276135a5b9d0e8814da59db985d1d5c9948195e1c1a5c9959604a1b6044820152606401610743565b600a81604051610c2891906131fe565b9081526040519081900360200190205460ff1615610c885760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a205369676e617475726520616c72656164792075736564000000006044820152606401610743565b6000858152600b602052604090205415610cdf576000858152600b6020908152604080832054600390925290912054610cc19086613230565b1115610cdf5760405162461bcd60e51b815260040161074390613248565b82341015610d3a5760405162461bcd60e51b815260206004820152602260248201527f4d696e743a204e6f7420656e6f7567682066756e647320666f72206d696e74696044820152616e6760f01b6064820152608401610743565b60408051336020820152908101869052606081018590526080810184905260a08101839052610d6b9060c001610a43565b610db15760405162461bcd60e51b81526020600482015260176024820152764d696e743a20496e76616c6964207369676e617475726560481b6044820152606401610743565b6001600a82604051610dc391906131fe565b908152602001604051809103902060006101000a81548160ff021916908315150217905550610e0386868660405180602001604052806000815250611b48565b7f433b76441e18c222fc492f65a3b0588e67167e45e4450e02b14c22d5aac5fe5685858833604051610bad949392919061329c565b6001600160a01b038516331480610e545750610e54853361062e565b610e705760405162461bcd60e51b8152600401610743906132c3565b610e7d8585858585611c31565b5050505050565b610e8c61182a565b828114610edb5760405162461bcd60e51b815260206004820152601d60248201527f62756c6b53657454726169743a206c656e677468206d69736d617463680000006044820152606401610743565b60005b83811015610e7d57828282818110610ef857610ef8613311565b90506020020135600b6000878785818110610f1557610f15613311565b905060200201358152602001908152602001600020819055508080610f3990613327565b915050610ede565b610f496119bf565b610f5161182a565b6001600160a01b038216610f9a5760405162461bcd60e51b815260206004820152601060248201526f3230303a5a45524f5f4144445245535360801b6044820152606401610743565b47811115610fdf5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610743565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461102c576040519150601f19603f3d011682016040523d82523d6000602084013e611031565b606091505b50509050806110775760405162461bcd60e51b8152602060048201526012602482015271151c985b9cd858dd1a5bdb8819985a5b195960721b6044820152606401610743565b506110826001600755565b5050565b606081518351146110eb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610743565b600083516001600160401b0381111561110657611106612a00565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b50905060005b84518110156111a75761117a85828151811061115357611153613311565b602002602001015185838151811061116d5761116d613311565b60200260200101516106dc565b82828151811061118c5761118c613311565b60209081029190910101526111a081613327565b9050611135565b509392505050565b6111b761182a565b6000918252600b602052604090912055565b336000908152600c602052604090205460ff166112285760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a204e6f7420617574686f72697a656420746f206d696e74000000006044820152606401610743565b6000828152600b60205260409020541561127f576000828152600b60209081526040808320546003909252909120546112619083613230565b111561127f5760405162461bcd60e51b815260040161074390613248565b61129a83838360405180602001604052806000815250611b48565b7f02c7cd4819befdd83fa1a9984e986f4608147b993616b6466031331f5a04a8e5828285336040516112cf949392919061329c565b60405180910390a1505050565b6112e461182a565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6113176119bf565b600a8160405161132791906131fe565b9081526040519081900360200190205460ff16156113925760405162461bcd60e51b815260206004820152602260248201527f4d696e745472616974733a205369676e617475726520616c7265616479207573604482015261195960f21b6064820152608401610743565b4282116113e15760405162461bcd60e51b815260206004820152601d60248201527f4d696e745472616974733a205369676e617475726520657870697265640000006044820152606401610743565b825184511461143c5760405162461bcd60e51b815260206004820152602160248201527f4d696e745472616974733a20496e76616c696420747261697473206c656e67746044820152600d60fb1b6064820152608401610743565b6001600a8260405161144e91906131fe565b908152604051908190036020019020805491151560ff19909216919091179055606060005b855181101561150c578161149f86838151811061149257611492613311565b602002602001015161192b565b6040516020016114b0929190613342565b6040516020818303038152906040529150816114d787838151811061149257611492613311565b6040516020016114e892919061337e565b6040516020818303038152906040529150808061150490613327565b915050611473565b50611541838233604051602001611525939291906133ae565b6040516020818303038152906040528051906020012083611a19565b61158d5760405162461bcd60e51b815260206004820181905260248201527f4d696e745472616974733a205369676e617475726520697320696e76616c69646044820152606401610743565b6115a833868660405180602001604052806000815250611dd3565b7f3b60161110d4999aadeced8377e0d3a05d0f674a2d19c2c09a98ff4401293442858584336040516115dd94939291906133df565b60405180910390a1506115f06001600755565b50505050565b6115fe61182a565b6116086000611ed1565b565b6060600680546107e890613194565b611082338383611f23565b61162c61182a565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600c602052604090205460ff166116ad5760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a204e6f7420617574686f72697a656420746f206d696e74000000006044820152606401610743565b6116c883838360405180602001604052806000815250611dd3565b7ff36d8cbebfcac71d1fcb485fa591caaa27217c7fdffd9af73ea652cedf433038828285336040516112cf9493929190613432565b61170561182a565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0385163314806117435750611743853361062e565b61175f5760405162461bcd60e51b8152600401610743906132c3565b610e7d8585858585612004565b61177461182a565b6001600160a01b0381166117d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610743565b6107d681611ed1565b6001600160a01b0383163314806117fe57506117fe833361062e565b61181a5760405162461bcd60e51b8152600401610743906132c3565b61182583838361213c565b505050565b6004546001600160a01b031633146116085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610743565b80516110829060029060208401906128e7565b6060600280546118a690613194565b80601f01602080910402602001604051908101604052809291908181526020018280546118d290613194565b801561191f5780601f106118f45761010080835404028352916020019161191f565b820191906000526020600020905b81548152906001019060200180831161190257829003601f168201915b50505050509050919050565b60606000611938836122cc565b60010190506000816001600160401b0381111561195757611957612a00565b6040519080825280601f01601f191660200182016040528015611981576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846119ba576111a7565b61198b565b60026007541415611a125760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610743565b6002600755565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390526000908190605c0160405160208183030381529060405280519060200120905060008060008551604114611a8457600094505050505061076f565b50505060208301516040840151606085015160001a601b811015611ab057611aad601b8261347c565b90505b60008160ff16601b1480611ac757508160ff16601c145b15611b2c5760408051600081526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611b1f573d6000803e3d6000fd5b5050506020604051035190505b6008546001600160a01b03918216911614979650505050505050565b6001600160a01b038416611b6e5760405162461bcd60e51b8152600401610743906134a1565b336000611b7a856123a4565b90506000611b87856123a4565b9050611b98836000898585896123ef565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290611bc8908490613230565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611c28836000898989896123fd565b50505050505050565b8151835114611c525760405162461bcd60e51b8152600401610743906134e2565b6001600160a01b038416611c785760405162461bcd60e51b81526004016107439061352a565b33611c878187878787876123ef565b60005b8451811015611d6d576000858281518110611ca757611ca7613311565b602002602001015190506000858381518110611cc557611cc5613311565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611d155760405162461bcd60e51b81526004016107439061356f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d52908490613230565b9250508190555050505080611d6690613327565b9050611c8a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611dbd9291906135b9565b60405180910390a4610bbf818787878787612559565b60005b8351811015611ec4576000600b6000868481518110611df757611df7613311565b60200260200101518152602001908152602001600020541115611eb257600b6000858381518110611e2a57611e2a613311565b6020026020010151815260200190815260200160002054611e70858381518110611e5657611e56613311565b602002602001015160009081526003602052604090205490565b848381518110611e8257611e82613311565b6020026020010151611e949190613230565b1115611eb25760405162461bcd60e51b815260040161074390613248565b80611ebc81613327565b915050611dd6565b506115f084848484612614565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611f975760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610743565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661202a5760405162461bcd60e51b81526004016107439061352a565b336000612036856123a4565b90506000612043856123a4565b90506120538389898585896123ef565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156120945760405162461bcd60e51b81526004016107439061356f565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906120d1908490613230565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612131848a8a8a8a8a6123fd565b505050505050505050565b6001600160a01b03831661219e5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610743565b3360006121aa846123a4565b905060006121b7846123a4565b90506121d7838760008585604051806020016040528060008152506123ef565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156122545760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610743565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611c28565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061230b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612337576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061235557662386f26fc10000830492506010015b6305f5e100831061236d576305f5e100830492506008015b612710831061238157612710830492506004015b60648310612393576064830492506002015b600a831061076f5760010192915050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106123de576123de613311565b602090810291909101015292915050565b610bbf86868686868661276e565b6001600160a01b0384163b15610bbf5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061244190899089908890889088906004016135e7565b6020604051808303816000875af192505050801561247c575060408051601f3d908101601f191682019092526124799181019061362c565b60015b61252957612488613649565b806308c379a014156124c2575061249d613665565b806124a857506124c4565b8060405162461bcd60e51b81526004016107439190612b47565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610743565b6001600160e01b0319811663f23a6e6160e01b14611c285760405162461bcd60e51b8152600401610743906136ee565b6001600160a01b0384163b15610bbf5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061259d9089908990889088908890600401613736565b6020604051808303816000875af19250505080156125d8575060408051601f3d908101601f191682019092526125d59181019061362c565b60015b6125e457612488613649565b6001600160e01b0319811663bc197c8160e01b14611c285760405162461bcd60e51b8152600401610743906136ee565b6001600160a01b03841661263a5760405162461bcd60e51b8152600401610743906134a1565b815183511461265b5760405162461bcd60e51b8152600401610743906134e2565b3361266b816000878787876123ef565b60005b84518110156127065783818151811061268957612689613311565b60200260200101516000808784815181106126a6576126a6613311565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546126ee9190613230565b909155508190506126fe81613327565b91505061266e565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516127579291906135b9565b60405180910390a4610e7d81600087878787612559565b6001600160a01b0385166127f55760005b83518110156127f35782818151811061279a5761279a613311565b6020026020010151600360008684815181106127b8576127b8613311565b6020026020010151815260200190815260200160002060008282546127dd9190613230565b909155506127ec905081613327565b905061277f565b505b6001600160a01b038416610bbf5760005b8351811015611c2857600084828151811061282357612823613311565b60200260200101519050600084838151811061284157612841613311565b60200260200101519050600060036000848152602001908152602001600020549050818110156128c45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610743565b600092835260036020526040909220910390556128e081613327565b9050612806565b8280546128f390613194565b90600052602060002090601f016020900481019282612915576000855561295b565b82601f1061292e57805160ff191683800117855561295b565b8280016001018555821561295b579182015b8281111561295b578251825591602001919060010190612940565b5061296792915061296b565b5090565b5b80821115612967576000815560010161296c565b80356001600160a01b038116811461299757600080fd5b919050565b600080604083850312156129af57600080fd5b6129b883612980565b946020939093013593505050565b6001600160e01b0319811681146107d657600080fd5b6000602082840312156129ee57600080fd5b81356129f9816129c6565b9392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612a3b57612a3b612a00565b6040525050565b60006001600160401b03831115612a5b57612a5b612a00565b604051612a72601f8501601f191660200182612a16565b809150838152848484011115612a8757600080fd5b83836020830137600060208583010152509392505050565b600060208284031215612ab157600080fd5b81356001600160401b03811115612ac757600080fd5b8201601f81018413612ad857600080fd5b612ae784823560208401612a42565b949350505050565b60005b83811015612b0a578181015183820152602001612af2565b838111156115f05750506000910152565b60008151808452612b33816020860160208601612aef565b601f01601f19169290920160200192915050565b6020815260006129f96020830184612b1b565b600060208284031215612b6c57600080fd5b5035919050565b600082601f830112612b8457600080fd5b6129f983833560208501612a42565b60008060008060008060c08789031215612bac57600080fd5b612bb587612980565b95506020870135945060408701359350606087013592506080870135915060a08701356001600160401b03811115612bec57600080fd5b612bf889828a01612b73565b9150509295509295509295565b60006001600160401b03821115612c1e57612c1e612a00565b5060051b60200190565b600082601f830112612c3957600080fd5b81356020612c4682612c05565b604051612c538282612a16565b83815260059390931b8501820192828101915086841115612c7357600080fd5b8286015b84811015612c8e5780358352918301918301612c77565b509695505050505050565b600080600080600060a08688031215612cb157600080fd5b612cba86612980565b9450612cc860208701612980565b935060408601356001600160401b0380821115612ce457600080fd5b612cf089838a01612c28565b94506060880135915080821115612d0657600080fd5b612d1289838a01612c28565b93506080880135915080821115612d2857600080fd5b50612d3588828901612b73565b9150509295509295909350565b60008083601f840112612d5457600080fd5b5081356001600160401b03811115612d6b57600080fd5b6020830191508360208260051b8501011115612d8657600080fd5b9250929050565b60008060008060408587031215612da357600080fd5b84356001600160401b0380821115612dba57600080fd5b612dc688838901612d42565b90965094506020870135915080821115612ddf57600080fd5b50612dec87828801612d42565b95989497509550505050565b60008060408385031215612e0b57600080fd5b82356001600160401b0380821115612e2257600080fd5b818501915085601f830112612e3657600080fd5b81356020612e4382612c05565b604051612e508282612a16565b83815260059390931b8501820192828101915089841115612e7057600080fd5b948201945b83861015612e9557612e8686612980565b82529482019490820190612e75565b96505086013592505080821115612eab57600080fd5b50612eb885828601612c28565b9150509250929050565b600081518084526020808501945080840160005b83811015612ef257815187529582019590820190600101612ed6565b509495945050505050565b6020815260006129f96020830184612ec2565b60008060408385031215612f2357600080fd5b50508035926020909101359150565b600080600060608486031215612f4757600080fd5b612f5084612980565b95602085013595506040909401359392505050565b80151581146107d657600080fd5b60008060408385031215612f8657600080fd5b612f8f83612980565b91506020830135612f9f81612f65565b809150509250929050565b60008060008060808587031215612fc057600080fd5b84356001600160401b0380821115612fd757600080fd5b612fe388838901612c28565b95506020870135915080821115612ff957600080fd5b61300588838901612c28565b945060408701359350606087013591508082111561302257600080fd5b5061302f87828801612b73565b91505092959194509250565b60006020828403121561304d57600080fd5b6129f982612980565b60008060006060848603121561306b57600080fd5b61307484612980565b925060208401356001600160401b038082111561309057600080fd5b61309c87838801612c28565b935060408601359150808211156130b257600080fd5b506130bf86828701612c28565b9150509250925092565b6000602082840312156130db57600080fd5b81356001600160401b038111156130f157600080fd5b612ae784828501612b73565b6000806040838503121561311057600080fd5b61311983612980565b915061312760208401612980565b90509250929050565b600080600080600060a0868803121561314857600080fd5b61315186612980565b945061315f60208701612980565b9350604086013592506060860135915060808601356001600160401b0381111561318857600080fd5b612d3588828901612b73565b600181811c908216806131a857607f821691505b602082108114156131c957634e487b7160e01b600052602260045260246000fd5b50919050565b600083516131e1818460208801612aef565b8351908301906131f5818360208801612aef565b01949350505050565b60008251613210818460208701612aef565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156132435761324361321a565b500190565b60208082526018908201527f4d696e743a20457863656564207472616974206c696d69740000000000000000604082015260600190565b60006020828403121561329157600080fd5b81516129f981612f65565b93845260208401929092526001600160a01b03908116604084015216606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561333b5761333b61321a565b5060010190565b60008351613354818460208801612aef565b604360f81b9083019081528351613372816001840160208801612aef565b01600101949350505050565b60008351613390818460208801612aef565b604b60f81b9083019081528351613372816001840160208801612aef565b8381526060602082015260006133c76060830185612b1b565b905060018060a01b0383166040830152949350505050565b6080815260006133f26080830187612ec2565b82810360208401526134048187612ec2565b905082810360408401526134188186612b1b565b91505060018060a01b038316606083015295945050505050565b6080815260006134456080830187612ec2565b82810360208401526134578187612ec2565b6001600160a01b03958616604085015293909416606090920191909152509392505050565b600060ff821660ff84168060ff038211156134995761349961321a565b019392505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006135cc6040830185612ec2565b82810360208401526135de8185612ec2565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061362190830184612b1b565b979650505050505050565b60006020828403121561363e57600080fd5b81516129f9816129c6565b600060033d11156136625760046000803e5060005160e01c5b90565b600060443d10156136735790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156136a257505050505090565b82850191508151818111156136ba5750505050505090565b843d87010160208285010111156136d45750505050505090565b6136e360208286010187612a16565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061376290830186612ec2565b82810360608401526137748186612ec2565b905082810360808401526137888185612b1b565b9897505050505050505056fea264697066735822122037d2cff4bc65d37ed838db9a37a13139ecb06dc9e6ec63c01151de57b75f6ab964736f6c634300080c0033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000d424f544220457874656e646564000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007424f544245585400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c68747470733a2f2f617065732e6d696e742e62756c6c73616e646170657370726f6a6563742e636f6d2f6d657461646174612f626f74622d6578742f00000000

-----Decoded View---------------
Arg [0] : _name (string): BOTB Extended
Arg [1] : _symbol (string): BOTBEXT
Arg [2] : _uri (string): https://apes.mint.bullsandapesproject.com/metadata/botb-ext/

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [4] : 424f544220457874656e64656400000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [6] : 424f544245585400000000000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [8] : 68747470733a2f2f617065732e6d696e742e62756c6c73616e64617065737072
Arg [9] : 6f6a6563742e636f6d2f6d657461646174612f626f74622d6578742f00000000


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.