ETH Price: $3,451.54 (+1.55%)

Token

Gutterz 2 (GTRZ2)
 

Overview

Max Total Supply

1,000 GTRZ2

Holders

196

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
thailapino.eth
Balance
1 GTRZ2
0x89c50d41bef923cc949051e1358d67bf13cad976
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:
Gutterz2

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 1500 runs

Other Settings:
default evmVersion
File 1 of 19 : Gutterz2.sol
//SPDX-License-Identifier: MIT
/*
     ^\                                               /^
    @@@@@                                           @@@@@
   @@@@@@&                                        &@@@@@@
   @@  @@@@@@                                   @@@@@@  @
   #@   .@@@@@@@@     /@@@@@@@@@@@@@@@\     @@@@@@@@@.  @
    @#  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&  #@
     @&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@
     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@  GUTTERZ 2  @@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@ BY THE KARMELEONS @@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     @@@     @@@@@@@      /@@@@@@\      @@@@@@@     @@@
      @@@@     @@@/     @@@@@@@@@@@@     \@@@     @@@@
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@@@@@@____@@@@@@@@@@@@@@@@@@@@@@@
       @@@@@@@@@@@@@@@@@@@@\    /@@@@@@@@@@@@@@@@@@@@
          @@@@@@@@@@@@@@@@@@@||@@@@@@@@@@@@@@@@@@@
             @@@@@@@@@@@@@@@@/\@@@@@@@@@@@@@@@@
               @@@@@/-------/@@\-------\@@@@@
                \@@/@@@@@@@@@@@@@@@@@@@@\@@/
                     \@@@@@@@@@@@@@@@@/
*/

pragma solidity >=0.7.0 <0.9.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";


/// @title Gutterz Species 2 minting contract
/// @author Jack (@DblJackDiamond) on Twitter
/// @dev All functions have been tested and work correctly
contract Gutterz2 is ERC721, Ownable, ReentrancyGuard  {
    using Strings for uint256;
    using Counters for Counters.Counter;

    // Keeps track of Gutterz Species 2 minted so far
    Counters.Counter private supply;

    // Mapping of which Karmeleons have claimed a free mint
    mapping(uint => bool) public CLAIMED;

    // Switch for turning public mint on and off
    bool public REQUIRE_GUTTERZ = true;
    // Price if going through public mint
    uint256 public PUBLIC_COST = 0.07 ether;


    bool public paused = true;
    bool public revealed = false;
    string public NOT_REVEALED_URI = "ipfs://QmbDNbq63c9mMNsq2tbZXkvB3nZwKZGzN8KK8dgyoWi4Ls/hidden.json";


    string public uriPrefix = "";
    string public uriSuffix = ".json";

    string public _name = "Gutterz 2";
    string public _symbol = "GTRZ2";
    uint256 public MAX_SUPPLY = 1000;


    IERC721Enumerable public KARMELEONS_CONTRACT = IERC721Enumerable(0xD396706543979149f7510839E9EB0B0608E8bc23);
    IERC721 public GUTTERZ_CONTRACT = IERC721(0xB71b0a17E21a0D1BF4f07858bCd6B18A985467e5);


    constructor() ERC721(_name, _symbol) {}

    modifier mintCompliance(uint256 _amount) {
        require(supply.current() + _amount <= MAX_SUPPLY, "Max supply exceeded");
        require(_amount > 0, "Invalid mint amount");
        _;
    }

    /// @param _address Address of account to check for a Gutterz Species 1
    /// @return bool True if the address owns a Gutter animal with that ID
    function hasGutterz(address _address) public view returns (bool) {
        if(GUTTERZ_CONTRACT.balanceOf(_address) > 0 ){
            return true;
        }
        return false;
    }

    /// @return uint The amount of Gutterz Species 2 minted
    function totalSupply() public view returns (uint) {
        return supply.current();
    }

    function checkWalletEligibility(address _wallet) public view returns (bool, uint) {
            if(hasGutterz(_wallet) || !REQUIRE_GUTTERZ){
                return (true, unusedKarmeleons(_wallet).length);
            } else {
                return (false, 0);
            }
    }

    ////////////////////////// 3 Mint types - free, public, and owner //////////////////////////

    /// @notice Checks to make sure msg.sender is eligible to mint the desired amount of Gutterz
    /// @param _amount How many Gutterz to mint
    function holdersMint(uint _amount) public mintCompliance(_amount) nonReentrant {
        require(hasGutterz(msg.sender), "You need to own a Gutterz Species 1 to mint a Gutterz Species 2 for free");
        uint[] memory freeMintsRemaining = unusedKarmeleons(msg.sender);
        require(freeMintsRemaining.length >= _amount, "You don't own enough unused Karmeleons");
        require(!paused, "The contract is paused");
        for(uint i=0; i < _amount; i++) {
            CLAIMED[freeMintsRemaining[i]] = true;
            supply.increment();
            _mint(msg.sender, supply.current());
        }
    }

    /// @notice Public mint for those that do not qualify for a free mint
    /// @param _amount How many Gutterz to mint
    function publicMint(uint _amount) public payable mintCompliance(_amount) nonReentrant {
        require(msg.value >= PUBLIC_COST * _amount, "Insufficient payment sent to mint");
        require(!paused, "The contract is paused");
        for(uint i=0; i < _amount; i++) {
            supply.increment();
            _mint(msg.sender, supply.current());
        }
    }

    /// @notice Allows the owner (Karmelo) to mint without restrictions
    function ownerMint(uint _amount, address _to) public onlyOwner mintCompliance(_amount) {
        for(uint i=0; i < _amount; i++) {
            supply.increment();
            _mint(_to, supply.current());
        }
    }
    ////////////////////////////////////////////////////////////////////////////////////////////

    /// @return address[] A list of all owner addresses from 1 to totalSupply()
    function getAllOwners() public view onlyOwner returns (address[] memory){
        address[] memory gutterzOwners = new address[](totalSupply());
        for(uint i=1; i <= totalSupply(); i++){
            gutterzOwners[i -1] = ownerOf(i);
        }
        return gutterzOwners;
    }


    /// @notice Retrieves the Karmeleons in owners account then returns karmeleons not been used for a free claim.
    /// @param _owner Address of account to check for Karmeleons
    /// @return uint[] Array of Eligible karmeleons by ID.
    function unusedKarmeleons(address _owner) internal view returns (uint[] memory) {
        uint ownedKarmeleonCount = KARMELEONS_CONTRACT.balanceOf(_owner);
        uint validKarmeleonCount = 0;
        for(uint i=0; i < ownedKarmeleonCount; i++){
            if(!CLAIMED[KARMELEONS_CONTRACT.tokenOfOwnerByIndex(_owner, i)]){
                //Karmeleon is valid for mint
                validKarmeleonCount++;
            }
        }
        uint[] memory validKarmeleons = new uint[](validKarmeleonCount);
        for(uint i=0; i < ownedKarmeleonCount; i++){
            uint karmeleonID = KARMELEONS_CONTRACT.tokenOfOwnerByIndex(_owner, i);
            if(!CLAIMED[karmeleonID]){
                validKarmeleons[validKarmeleonCount - 1] = karmeleonID;
                validKarmeleonCount--;
            }
        }
        return validKarmeleons;
    }

    function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
        require(
            _exists(_tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );

        if(!revealed) {
            return NOT_REVEALED_URI;
        }

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

    function setCost(uint256 _newCost) public onlyOwner {
        PUBLIC_COST = _newCost;
    }

    function setUriPrefix(string memory _uriPrefix) public onlyOwner {
        uriPrefix = _uriPrefix;
    }

    function setUriSuffix(string memory _uriSuffix) public onlyOwner {
        uriSuffix = _uriSuffix;
    }

    function reveal() public onlyOwner {
        revealed = true;
    }


    /// @notice Allows owner to change whether a gutterz 1 is required for mint or not
    /// @param _state true = Gutterz Required
    function setRequireGutterz(bool _state) public onlyOwner {
       REQUIRE_GUTTERZ = _state;
    }

    /// @notice Allows owner to start and stop minting process
    /// @param _state true = paused, false = not paused
    function setPaused(bool _state) public onlyOwner {
        paused = _state;
    }

    function withdraw() public onlyOwner {
        (bool os, ) = payable(owner()).call{value: address(this).balance}("");
        require(os);
    }

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 7 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

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

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 14 of 19 : 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 15 of 19 : 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 16 of 19 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 be 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 17 of 19 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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: balance query for the zero address");
        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 owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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`
     *
     * 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}.
     *
     * 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 a {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 `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 _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 18 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 19 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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": 1500
  },
  "evmVersion": "london",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"CLAIMED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GUTTERZ_CONTRACT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KARMELEONS_CONTRACT","outputs":[{"internalType":"contract IERC721Enumerable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NOT_REVEALED_URI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQUIRE_GUTTERZ","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"checkWalletEligibility","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"hasGutterz","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"holdersMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setRequireGutterz","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriPrefix","type":"string"}],"name":"setUriPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriSuffix","type":"string"}],"name":"setUriSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uriSuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600a805460ff1916600190811790915566f8b0a10e470000600b55600c805461ffff1916909117905561010060405260416080818152906200334360a03980516200005391600d9160209091019062000331565b506040805160208101918290526000908190526200007491600e9162000331565b5060408051808201909152600580825264173539b7b760d91b6020909201918252620000a391600f9162000331565b506040805180820190915260098082526823baba3a32b93d101960b91b6020909201918252620000d69160109162000331565b506040805180820190915260058082526423aa292d1960d91b6020909201918252620001059160119162000331565b506103e8601255601380546001600160a01b031990811673d396706543979149f7510839e9eb0b0608e8bc23179091556014805490911673b71b0a17e21a0d1bf4f07858bcd6b18a985467e51790553480156200016157600080fd5b50601080546200017190620003d7565b80601f01602080910402602001604051908101604052809291908181526020018280546200019f90620003d7565b8015620001f05780601f10620001c457610100808354040283529160200191620001f0565b820191906000526020600020905b815481529060010190602001808311620001d257829003601f168201915b5050505050601180546200020490620003d7565b80601f01602080910402602001604051908101604052809291908181526020018280546200023290620003d7565b8015620002835780601f10620002575761010080835404028352916020019162000283565b820191906000526020600020905b8154815290600101906020018083116200026557829003601f168201915b505084516200029d93506000925060208601915062000331565b508051620002b390600190602084019062000331565b505050620002d0620002ca620002db60201b60201c565b620002df565b600160075562000413565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200033f90620003d7565b90600052602060002090601f016020900481019282620003635760008555620003ae565b82601f106200037e57805160ff1916838001178555620003ae565b82800160010185558215620003ae579182015b82811115620003ae57825182559160200191906001019062000391565b50620003bc929150620003c0565b5090565b5b80821115620003bc5760008155600101620003c1565b600181811c90821680620003ec57607f821691505b6020821081036200040d57634e487b7160e01b600052602260045260246000fd5b50919050565b612f2080620004236000396000f3fe6080604052600436106102dc5760003560e01c806362617a4811610184578063a475b5dd116100d6578063d28d88521161008a578063e985e9c511610064578063e985e9c5146107b6578063ed99e1e2146107ff578063f2fde38b1461081457600080fd5b8063d28d885214610761578063d52c57e014610776578063df8ffa381461079657600080fd5b8063b09f1266116100bb578063b09f12661461070c578063b88d4fde14610721578063c87b56dd1461074157600080fd5b8063a475b5dd146106dd578063a6ac7051146106f257600080fd5b80637ec4a6591161013857806395d89b411161011257806395d89b41146106885780639e815be61461069d578063a22cb465146106bd57600080fd5b80637ec4a6591461061a57806388b36cae1461063a5780638da5cb5b1461066a57600080fd5b80636352211e116101695780636352211e146105c557806370a08231146105e5578063715018a61461060557600080fd5b806362617a481461059057806362b99ad4146105b057600080fd5b8063208a3f001161023d5780633ccfd60b116101f157806351830227116101cb57806351830227146105425780635503a0e8146105615780635c975abb1461057657600080fd5b80633ccfd60b146104ed57806342842e0e1461050257806344a0d68a1461052257600080fd5b806323b872dd1161022257806323b872dd146104a45780632db11544146104c457806332cb6b0c146104d757600080fd5b8063208a3f00146104645780632334ba5a1461048457600080fd5b806316ba10e01161029457806316c38b3c1161027957806316c38b3c1461040b57806318160ddd1461042b5780631f9ce1751461044e57600080fd5b806316ba10e0146103c957806316c12746146103e957600080fd5b806306fdde03116102c557806306fdde031461034d578063081812fc1461036f578063095ea7b3146103a757600080fd5b806301ffc9a7146102e1578063063df0c314610316575b600080fd5b3480156102ed57600080fd5b506103016102fc36600461290c565b610834565b60405190151581526020015b60405180910390f35b34801561032257600080fd5b50610336610331366004612945565b6108d1565b60408051921515835260208301919091520161030d565b34801561035957600080fd5b50610362610910565b60405161030d91906129b8565b34801561037b57600080fd5b5061038f61038a3660046129cb565b6109a2565b6040516001600160a01b03909116815260200161030d565b3480156103b357600080fd5b506103c76103c23660046129e4565b610a4d565b005b3480156103d557600080fd5b506103c76103e4366004612a9a565b610b7e565b3480156103f557600080fd5b506103fe610bef565b60405161030d9190612ae3565b34801561041757600080fd5b506103c7610426366004612b40565b610d00565b34801561043757600080fd5b50610440610d6d565b60405190815260200161030d565b34801561045a57600080fd5b50610440600b5481565b34801561047057600080fd5b506103c761047f3660046129cb565b610d7d565b34801561049057600080fd5b5061030161049f366004612945565b61108f565b3480156104b057600080fd5b506103c76104bf366004612b5b565b611117565b6103c76104d23660046129cb565b61119e565b3480156104e357600080fd5b5061044060125481565b3480156104f957600080fd5b506103c76113c3565b34801561050e57600080fd5b506103c761051d366004612b5b565b611491565b34801561052e57600080fd5b506103c761053d3660046129cb565b6114ac565b34801561054e57600080fd5b50600c5461030190610100900460ff1681565b34801561056d57600080fd5b5061036261150b565b34801561058257600080fd5b50600c546103019060ff1681565b34801561059c57600080fd5b5060135461038f906001600160a01b031681565b3480156105bc57600080fd5b50610362611599565b3480156105d157600080fd5b5061038f6105e03660046129cb565b6115a6565b3480156105f157600080fd5b50610440610600366004612945565b611631565b34801561061157600080fd5b506103c76116cb565b34801561062657600080fd5b506103c7610635366004612a9a565b611731565b34801561064657600080fd5b506103016106553660046129cb565b60096020526000908152604090205460ff1681565b34801561067657600080fd5b506006546001600160a01b031661038f565b34801561069457600080fd5b5061036261179e565b3480156106a957600080fd5b5060145461038f906001600160a01b031681565b3480156106c957600080fd5b506103c76106d8366004612b97565b6117ad565b3480156106e957600080fd5b506103c76117b8565b3480156106fe57600080fd5b50600a546103019060ff1681565b34801561071857600080fd5b50610362611823565b34801561072d57600080fd5b506103c761073c366004612bca565b611830565b34801561074d57600080fd5b5061036261075c3660046129cb565b6118be565b34801561076d57600080fd5b50610362611a4b565b34801561078257600080fd5b506103c7610791366004612c46565b611a58565b3480156107a257600080fd5b506103c76107b1366004612b40565b611ba0565b3480156107c257600080fd5b506103016107d1366004612c69565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561080b57600080fd5b50610362611c0d565b34801561082057600080fd5b506103c761082f366004612945565b611c1a565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061089757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806108cb57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6000806108dd8361108f565b806108eb5750600a5460ff16155b156109055760016108fb84611cf9565b5191509150915091565b506000928392509050565b60606000805461091f90612c93565b80601f016020809104026020016040519081016040528092919081815260200182805461094b90612c93565b80156109985780601f1061096d57610100808354040283529160200191610998565b820191906000526020600020905b81548152906001019060200180831161097b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a315760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a58826115a6565b9050806001600160a01b0316836001600160a01b031603610ae15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610a28565b336001600160a01b0382161480610afd5750610afd81336107d1565b610b6f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a28565b610b798383611f60565b505050565b6006546001600160a01b03163314610bd85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b8051610beb90600f90602084019061285d565b5050565b6006546060906001600160a01b03163314610c4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b6000610c56610d6d565b67ffffffffffffffff811115610c6e57610c6e612a0e565b604051908082528060200260200182016040528015610c97578160200160208202803683370190505b50905060015b610ca5610d6d565b8111610cfa57610cb4816115a6565b82610cc0600184612ce3565b81518110610cd057610cd0612cfa565b6001600160a01b039092166020928302919091019091015280610cf281612d10565b915050610c9d565b50905090565b6006546001600160a01b03163314610d5a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600c805460ff1916911515919091179055565b6000610d7860085490565b905090565b8060125481610d8b60085490565b610d959190612d29565b1115610de35760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a28565b60008111610e335760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e7420616d6f756e74000000000000000000000000006044820152606401610a28565b600260075403610e855760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a28565b6002600755610e933361108f565b610f2b5760405162461bcd60e51b815260206004820152604860248201527f596f75206e65656420746f206f776e2061204775747465727a2053706563696560448201527f73203120746f206d696e742061204775747465727a205370656369657320322060648201527f666f722066726565000000000000000000000000000000000000000000000000608482015260a401610a28565b6000610f3633611cf9565b90508281511015610faf5760405162461bcd60e51b815260206004820152602660248201527f596f7520646f6e2774206f776e20656e6f75676820756e75736564204b61726d60448201527f656c656f6e7300000000000000000000000000000000000000000000000000006064820152608401610a28565b600c5460ff16156110025760405162461bcd60e51b815260206004820152601660248201527f54686520636f6e747261637420697320706175736564000000000000000000006044820152606401610a28565b60005b838110156110845760016009600084848151811061102557611025612cfa565b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550611060600880546001019055565b6110723361106d60085490565b611fdb565b8061107c81612d10565b915050611005565b505060016007555050565b6014546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381865afa1580156110dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111019190612d41565b111561110f57506001919050565b506000919050565b611121338261212a565b6111935760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a28565b610b79838383612232565b80601254816111ac60085490565b6111b69190612d29565b11156112045760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a28565b600081116112545760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e7420616d6f756e74000000000000000000000000006044820152606401610a28565b6002600754036112a65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a28565b6002600755600b546112b9908390612d5a565b34101561132e5760405162461bcd60e51b815260206004820152602160248201527f496e73756666696369656e74207061796d656e742073656e7420746f206d696e60448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610a28565b600c5460ff16156113815760405162461bcd60e51b815260206004820152601660248201527f54686520636f6e747261637420697320706175736564000000000000000000006044820152606401610a28565b60005b828110156113b95761139a600880546001019055565b6113a73361106d60085490565b806113b181612d10565b915050611384565b5050600160075550565b6006546001600160a01b0316331461141d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b60006114316006546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d806000811461147b576040519150601f19603f3d011682016040523d82523d6000602084013e611480565b606091505b505090508061148e57600080fd5b50565b610b7983838360405180602001604052806000815250611830565b6006546001600160a01b031633146115065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600b55565b600f805461151890612c93565b80601f016020809104026020016040519081016040528092919081815260200182805461154490612c93565b80156115915780601f1061156657610100808354040283529160200191611591565b820191906000526020600020905b81548152906001019060200180831161157457829003601f168201915b505050505081565b600e805461151890612c93565b6000818152600260205260408120546001600160a01b0316806108cb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610a28565b60006001600160a01b0382166116af5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610a28565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146117255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b61172f600061240c565b565b6006546001600160a01b0316331461178b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b8051610beb90600e90602084019061285d565b60606001805461091f90612c93565b610beb33838361246b565b6006546001600160a01b031633146118125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600c805461ff001916610100179055565b6011805461151890612c93565b61183a338361212a565b6118ac5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a28565b6118b884848484612539565b50505050565b6000818152600260205260409020546060906001600160a01b031661194b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610a28565b600c54610100900460ff166119ec57600d805461196790612c93565b80601f016020809104026020016040519081016040528092919081815260200182805461199390612c93565b80156119e05780601f106119b5576101008083540402835291602001916119e0565b820191906000526020600020905b8154815290600101906020018083116119c357829003601f168201915b50505050509050919050565b60006119f66125c2565b90506000815111611a165760405180602001604052806000815250611a44565b80611a20846125d1565b600f604051602001611a3493929190612d79565b6040516020818303038152906040525b9392505050565b6010805461151890612c93565b6006546001600160a01b03163314611ab25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b8160125481611ac060085490565b611aca9190612d29565b1115611b185760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a28565b60008111611b685760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e7420616d6f756e74000000000000000000000000006044820152606401610a28565b60005b838110156118b857611b81600880546001019055565b611b8e8361106d60085490565b80611b9881612d10565b915050611b6b565b6006546001600160a01b03163314611bfa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600a805460ff1916911515919091179055565b600d805461151890612c93565b6006546001600160a01b03163314611c745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b6001600160a01b038116611cf05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a28565b61148e8161240c565b6013546040516370a0823160e01b81526001600160a01b0383811660048301526060926000929116906370a0823190602401602060405180830381865afa158015611d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6c9190612d41565b90506000805b82811015611e2c57601354604051632f745c5960e01b81526001600160a01b03878116600483015260248201849052600992600092911690632f745c5990604401602060405180830381865afa158015611dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df49190612d41565b815260208101919091526040016000205460ff16611e1a5781611e1681612d10565b9250505b80611e2481612d10565b915050611d72565b5060008167ffffffffffffffff811115611e4857611e48612a0e565b604051908082528060200260200182016040528015611e71578160200160208202803683370190505b50905060005b83811015611f5757601354604051632f745c5960e01b81526001600160a01b038881166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015611ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef59190612d41565b60008181526009602052604090205490915060ff16611f44578083611f1b600187612ce3565b81518110611f2b57611f2b612cfa565b602090810291909101015283611f4081612e3c565b9450505b5080611f4f81612d10565b915050611e77565b50949350505050565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611fa2826115a6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166120315760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a28565b6000818152600260205260409020546001600160a01b0316156120965760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a28565b6001600160a01b03821660009081526003602052604081208054600192906120bf908490612d29565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818152600260205260408120546001600160a01b03166121b45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a28565b60006121bf836115a6565b9050806001600160a01b0316846001600160a01b0316148061220657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061222a5750836001600160a01b031661221f846109a2565b6001600160a01b0316145b949350505050565b826001600160a01b0316612245826115a6565b6001600160a01b0316146122c15760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610a28565b6001600160a01b03821661233c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610a28565b612347600082611f60565b6001600160a01b0383166000908152600360205260408120805460019290612370908490612ce3565b90915550506001600160a01b038216600090815260036020526040812080546001929061239e908490612d29565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036124cc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a28565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612544848484612232565b61255084848484612706565b6118b85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a28565b6060600e805461091f90612c93565b60608160000361261457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561263e578061262881612d10565b91506126379050600a83612e69565b9150612618565b60008167ffffffffffffffff81111561265957612659612a0e565b6040519080825280601f01601f191660200182016040528015612683576020820181803683370190505b5090505b841561222a57612698600183612ce3565b91506126a5600a86612e7d565b6126b0906030612d29565b60f81b8183815181106126c5576126c5612cfa565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506126ff600a86612e69565b9450612687565b60006001600160a01b0384163b1561285257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061274a903390899088908890600401612e91565b6020604051808303816000875af1925050508015612785575060408051601f3d908101601f1916820190925261278291810190612ecd565b60015b612838573d8080156127b3576040519150601f19603f3d011682016040523d82523d6000602084013e6127b8565b606091505b5080516000036128305760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a28565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061222a565b506001949350505050565b82805461286990612c93565b90600052602060002090601f01602090048101928261288b57600085556128d1565b82601f106128a457805160ff19168380011785556128d1565b828001600101855582156128d1579182015b828111156128d15782518255916020019190600101906128b6565b506128dd9291506128e1565b5090565b5b808211156128dd57600081556001016128e2565b6001600160e01b03198116811461148e57600080fd5b60006020828403121561291e57600080fd5b8135611a44816128f6565b80356001600160a01b038116811461294057600080fd5b919050565b60006020828403121561295757600080fd5b611a4482612929565b60005b8381101561297b578181015183820152602001612963565b838111156118b85750506000910152565b600081518084526129a4816020860160208601612960565b601f01601f19169290920160200192915050565b602081526000611a44602083018461298c565b6000602082840312156129dd57600080fd5b5035919050565b600080604083850312156129f757600080fd5b612a0083612929565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612a3f57612a3f612a0e565b604051601f8501601f19908116603f01168101908282118183101715612a6757612a67612a0e565b81604052809350858152868686011115612a8057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612aac57600080fd5b813567ffffffffffffffff811115612ac357600080fd5b8201601f81018413612ad457600080fd5b61222a84823560208401612a24565b6020808252825182820181905260009190848201906040850190845b81811015612b245783516001600160a01b031683529284019291840191600101612aff565b50909695505050505050565b8035801515811461294057600080fd5b600060208284031215612b5257600080fd5b611a4482612b30565b600080600060608486031215612b7057600080fd5b612b7984612929565b9250612b8760208501612929565b9150604084013590509250925092565b60008060408385031215612baa57600080fd5b612bb383612929565b9150612bc160208401612b30565b90509250929050565b60008060008060808587031215612be057600080fd5b612be985612929565b9350612bf760208601612929565b925060408501359150606085013567ffffffffffffffff811115612c1a57600080fd5b8501601f81018713612c2b57600080fd5b612c3a87823560208401612a24565b91505092959194509250565b60008060408385031215612c5957600080fd5b82359150612bc160208401612929565b60008060408385031215612c7c57600080fd5b612c8583612929565b9150612bc160208401612929565b600181811c90821680612ca757607f821691505b602082108103612cc757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612cf557612cf5612ccd565b500390565b634e487b7160e01b600052603260045260246000fd5b600060018201612d2257612d22612ccd565b5060010190565b60008219821115612d3c57612d3c612ccd565b500190565b600060208284031215612d5357600080fd5b5051919050565b6000816000190483118215151615612d7457612d74612ccd565b500290565b600084516020612d8c8285838a01612960565b855191840191612d9f8184848a01612960565b8554920191600090600181811c9080831680612dbc57607f831692505b8583108103612dd957634e487b7160e01b85526022600452602485fd5b808015612ded5760018114612dfe57612e2b565b60ff19851688528388019550612e2b565b60008b81526020902060005b85811015612e235781548a820152908401908801612e0a565b505083880195505b50939b9a5050505050505050505050565b600081612e4b57612e4b612ccd565b506000190190565b634e487b7160e01b600052601260045260246000fd5b600082612e7857612e78612e53565b500490565b600082612e8c57612e8c612e53565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ec3608083018461298c565b9695505050505050565b600060208284031215612edf57600080fd5b8151611a44816128f656fea26469706673582212206c432781c8297bf35255760375b8fca499198e611efe6063fd533c3180a34e3464736f6c634300080e0033697066733a2f2f516d62444e6271363363396d4d4e73713274625a586b7642336e5a774b5a477a4e384b4b386467796f5769344c732f68696464656e2e6a736f6e

Deployed Bytecode

0x6080604052600436106102dc5760003560e01c806362617a4811610184578063a475b5dd116100d6578063d28d88521161008a578063e985e9c511610064578063e985e9c5146107b6578063ed99e1e2146107ff578063f2fde38b1461081457600080fd5b8063d28d885214610761578063d52c57e014610776578063df8ffa381461079657600080fd5b8063b09f1266116100bb578063b09f12661461070c578063b88d4fde14610721578063c87b56dd1461074157600080fd5b8063a475b5dd146106dd578063a6ac7051146106f257600080fd5b80637ec4a6591161013857806395d89b411161011257806395d89b41146106885780639e815be61461069d578063a22cb465146106bd57600080fd5b80637ec4a6591461061a57806388b36cae1461063a5780638da5cb5b1461066a57600080fd5b80636352211e116101695780636352211e146105c557806370a08231146105e5578063715018a61461060557600080fd5b806362617a481461059057806362b99ad4146105b057600080fd5b8063208a3f001161023d5780633ccfd60b116101f157806351830227116101cb57806351830227146105425780635503a0e8146105615780635c975abb1461057657600080fd5b80633ccfd60b146104ed57806342842e0e1461050257806344a0d68a1461052257600080fd5b806323b872dd1161022257806323b872dd146104a45780632db11544146104c457806332cb6b0c146104d757600080fd5b8063208a3f00146104645780632334ba5a1461048457600080fd5b806316ba10e01161029457806316c38b3c1161027957806316c38b3c1461040b57806318160ddd1461042b5780631f9ce1751461044e57600080fd5b806316ba10e0146103c957806316c12746146103e957600080fd5b806306fdde03116102c557806306fdde031461034d578063081812fc1461036f578063095ea7b3146103a757600080fd5b806301ffc9a7146102e1578063063df0c314610316575b600080fd5b3480156102ed57600080fd5b506103016102fc36600461290c565b610834565b60405190151581526020015b60405180910390f35b34801561032257600080fd5b50610336610331366004612945565b6108d1565b60408051921515835260208301919091520161030d565b34801561035957600080fd5b50610362610910565b60405161030d91906129b8565b34801561037b57600080fd5b5061038f61038a3660046129cb565b6109a2565b6040516001600160a01b03909116815260200161030d565b3480156103b357600080fd5b506103c76103c23660046129e4565b610a4d565b005b3480156103d557600080fd5b506103c76103e4366004612a9a565b610b7e565b3480156103f557600080fd5b506103fe610bef565b60405161030d9190612ae3565b34801561041757600080fd5b506103c7610426366004612b40565b610d00565b34801561043757600080fd5b50610440610d6d565b60405190815260200161030d565b34801561045a57600080fd5b50610440600b5481565b34801561047057600080fd5b506103c761047f3660046129cb565b610d7d565b34801561049057600080fd5b5061030161049f366004612945565b61108f565b3480156104b057600080fd5b506103c76104bf366004612b5b565b611117565b6103c76104d23660046129cb565b61119e565b3480156104e357600080fd5b5061044060125481565b3480156104f957600080fd5b506103c76113c3565b34801561050e57600080fd5b506103c761051d366004612b5b565b611491565b34801561052e57600080fd5b506103c761053d3660046129cb565b6114ac565b34801561054e57600080fd5b50600c5461030190610100900460ff1681565b34801561056d57600080fd5b5061036261150b565b34801561058257600080fd5b50600c546103019060ff1681565b34801561059c57600080fd5b5060135461038f906001600160a01b031681565b3480156105bc57600080fd5b50610362611599565b3480156105d157600080fd5b5061038f6105e03660046129cb565b6115a6565b3480156105f157600080fd5b50610440610600366004612945565b611631565b34801561061157600080fd5b506103c76116cb565b34801561062657600080fd5b506103c7610635366004612a9a565b611731565b34801561064657600080fd5b506103016106553660046129cb565b60096020526000908152604090205460ff1681565b34801561067657600080fd5b506006546001600160a01b031661038f565b34801561069457600080fd5b5061036261179e565b3480156106a957600080fd5b5060145461038f906001600160a01b031681565b3480156106c957600080fd5b506103c76106d8366004612b97565b6117ad565b3480156106e957600080fd5b506103c76117b8565b3480156106fe57600080fd5b50600a546103019060ff1681565b34801561071857600080fd5b50610362611823565b34801561072d57600080fd5b506103c761073c366004612bca565b611830565b34801561074d57600080fd5b5061036261075c3660046129cb565b6118be565b34801561076d57600080fd5b50610362611a4b565b34801561078257600080fd5b506103c7610791366004612c46565b611a58565b3480156107a257600080fd5b506103c76107b1366004612b40565b611ba0565b3480156107c257600080fd5b506103016107d1366004612c69565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561080b57600080fd5b50610362611c0d565b34801561082057600080fd5b506103c761082f366004612945565b611c1a565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061089757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806108cb57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6000806108dd8361108f565b806108eb5750600a5460ff16155b156109055760016108fb84611cf9565b5191509150915091565b506000928392509050565b60606000805461091f90612c93565b80601f016020809104026020016040519081016040528092919081815260200182805461094b90612c93565b80156109985780601f1061096d57610100808354040283529160200191610998565b820191906000526020600020905b81548152906001019060200180831161097b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a315760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a58826115a6565b9050806001600160a01b0316836001600160a01b031603610ae15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610a28565b336001600160a01b0382161480610afd5750610afd81336107d1565b610b6f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a28565b610b798383611f60565b505050565b6006546001600160a01b03163314610bd85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b8051610beb90600f90602084019061285d565b5050565b6006546060906001600160a01b03163314610c4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b6000610c56610d6d565b67ffffffffffffffff811115610c6e57610c6e612a0e565b604051908082528060200260200182016040528015610c97578160200160208202803683370190505b50905060015b610ca5610d6d565b8111610cfa57610cb4816115a6565b82610cc0600184612ce3565b81518110610cd057610cd0612cfa565b6001600160a01b039092166020928302919091019091015280610cf281612d10565b915050610c9d565b50905090565b6006546001600160a01b03163314610d5a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600c805460ff1916911515919091179055565b6000610d7860085490565b905090565b8060125481610d8b60085490565b610d959190612d29565b1115610de35760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a28565b60008111610e335760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e7420616d6f756e74000000000000000000000000006044820152606401610a28565b600260075403610e855760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a28565b6002600755610e933361108f565b610f2b5760405162461bcd60e51b815260206004820152604860248201527f596f75206e65656420746f206f776e2061204775747465727a2053706563696560448201527f73203120746f206d696e742061204775747465727a205370656369657320322060648201527f666f722066726565000000000000000000000000000000000000000000000000608482015260a401610a28565b6000610f3633611cf9565b90508281511015610faf5760405162461bcd60e51b815260206004820152602660248201527f596f7520646f6e2774206f776e20656e6f75676820756e75736564204b61726d60448201527f656c656f6e7300000000000000000000000000000000000000000000000000006064820152608401610a28565b600c5460ff16156110025760405162461bcd60e51b815260206004820152601660248201527f54686520636f6e747261637420697320706175736564000000000000000000006044820152606401610a28565b60005b838110156110845760016009600084848151811061102557611025612cfa565b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550611060600880546001019055565b6110723361106d60085490565b611fdb565b8061107c81612d10565b915050611005565b505060016007555050565b6014546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381865afa1580156110dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111019190612d41565b111561110f57506001919050565b506000919050565b611121338261212a565b6111935760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a28565b610b79838383612232565b80601254816111ac60085490565b6111b69190612d29565b11156112045760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a28565b600081116112545760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e7420616d6f756e74000000000000000000000000006044820152606401610a28565b6002600754036112a65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a28565b6002600755600b546112b9908390612d5a565b34101561132e5760405162461bcd60e51b815260206004820152602160248201527f496e73756666696369656e74207061796d656e742073656e7420746f206d696e60448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610a28565b600c5460ff16156113815760405162461bcd60e51b815260206004820152601660248201527f54686520636f6e747261637420697320706175736564000000000000000000006044820152606401610a28565b60005b828110156113b95761139a600880546001019055565b6113a73361106d60085490565b806113b181612d10565b915050611384565b5050600160075550565b6006546001600160a01b0316331461141d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b60006114316006546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d806000811461147b576040519150601f19603f3d011682016040523d82523d6000602084013e611480565b606091505b505090508061148e57600080fd5b50565b610b7983838360405180602001604052806000815250611830565b6006546001600160a01b031633146115065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600b55565b600f805461151890612c93565b80601f016020809104026020016040519081016040528092919081815260200182805461154490612c93565b80156115915780601f1061156657610100808354040283529160200191611591565b820191906000526020600020905b81548152906001019060200180831161157457829003601f168201915b505050505081565b600e805461151890612c93565b6000818152600260205260408120546001600160a01b0316806108cb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610a28565b60006001600160a01b0382166116af5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610a28565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146117255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b61172f600061240c565b565b6006546001600160a01b0316331461178b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b8051610beb90600e90602084019061285d565b60606001805461091f90612c93565b610beb33838361246b565b6006546001600160a01b031633146118125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600c805461ff001916610100179055565b6011805461151890612c93565b61183a338361212a565b6118ac5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a28565b6118b884848484612539565b50505050565b6000818152600260205260409020546060906001600160a01b031661194b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610a28565b600c54610100900460ff166119ec57600d805461196790612c93565b80601f016020809104026020016040519081016040528092919081815260200182805461199390612c93565b80156119e05780601f106119b5576101008083540402835291602001916119e0565b820191906000526020600020905b8154815290600101906020018083116119c357829003601f168201915b50505050509050919050565b60006119f66125c2565b90506000815111611a165760405180602001604052806000815250611a44565b80611a20846125d1565b600f604051602001611a3493929190612d79565b6040516020818303038152906040525b9392505050565b6010805461151890612c93565b6006546001600160a01b03163314611ab25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b8160125481611ac060085490565b611aca9190612d29565b1115611b185760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a28565b60008111611b685760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e7420616d6f756e74000000000000000000000000006044820152606401610a28565b60005b838110156118b857611b81600880546001019055565b611b8e8361106d60085490565b80611b9881612d10565b915050611b6b565b6006546001600160a01b03163314611bfa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b600a805460ff1916911515919091179055565b600d805461151890612c93565b6006546001600160a01b03163314611c745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b6001600160a01b038116611cf05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a28565b61148e8161240c565b6013546040516370a0823160e01b81526001600160a01b0383811660048301526060926000929116906370a0823190602401602060405180830381865afa158015611d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6c9190612d41565b90506000805b82811015611e2c57601354604051632f745c5960e01b81526001600160a01b03878116600483015260248201849052600992600092911690632f745c5990604401602060405180830381865afa158015611dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df49190612d41565b815260208101919091526040016000205460ff16611e1a5781611e1681612d10565b9250505b80611e2481612d10565b915050611d72565b5060008167ffffffffffffffff811115611e4857611e48612a0e565b604051908082528060200260200182016040528015611e71578160200160208202803683370190505b50905060005b83811015611f5757601354604051632f745c5960e01b81526001600160a01b038881166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015611ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef59190612d41565b60008181526009602052604090205490915060ff16611f44578083611f1b600187612ce3565b81518110611f2b57611f2b612cfa565b602090810291909101015283611f4081612e3c565b9450505b5080611f4f81612d10565b915050611e77565b50949350505050565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611fa2826115a6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166120315760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a28565b6000818152600260205260409020546001600160a01b0316156120965760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a28565b6001600160a01b03821660009081526003602052604081208054600192906120bf908490612d29565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818152600260205260408120546001600160a01b03166121b45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a28565b60006121bf836115a6565b9050806001600160a01b0316846001600160a01b0316148061220657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061222a5750836001600160a01b031661221f846109a2565b6001600160a01b0316145b949350505050565b826001600160a01b0316612245826115a6565b6001600160a01b0316146122c15760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610a28565b6001600160a01b03821661233c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610a28565b612347600082611f60565b6001600160a01b0383166000908152600360205260408120805460019290612370908490612ce3565b90915550506001600160a01b038216600090815260036020526040812080546001929061239e908490612d29565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036124cc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a28565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612544848484612232565b61255084848484612706565b6118b85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a28565b6060600e805461091f90612c93565b60608160000361261457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561263e578061262881612d10565b91506126379050600a83612e69565b9150612618565b60008167ffffffffffffffff81111561265957612659612a0e565b6040519080825280601f01601f191660200182016040528015612683576020820181803683370190505b5090505b841561222a57612698600183612ce3565b91506126a5600a86612e7d565b6126b0906030612d29565b60f81b8183815181106126c5576126c5612cfa565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506126ff600a86612e69565b9450612687565b60006001600160a01b0384163b1561285257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061274a903390899088908890600401612e91565b6020604051808303816000875af1925050508015612785575060408051601f3d908101601f1916820190925261278291810190612ecd565b60015b612838573d8080156127b3576040519150601f19603f3d011682016040523d82523d6000602084013e6127b8565b606091505b5080516000036128305760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a28565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061222a565b506001949350505050565b82805461286990612c93565b90600052602060002090601f01602090048101928261288b57600085556128d1565b82601f106128a457805160ff19168380011785556128d1565b828001600101855582156128d1579182015b828111156128d15782518255916020019190600101906128b6565b506128dd9291506128e1565b5090565b5b808211156128dd57600081556001016128e2565b6001600160e01b03198116811461148e57600080fd5b60006020828403121561291e57600080fd5b8135611a44816128f6565b80356001600160a01b038116811461294057600080fd5b919050565b60006020828403121561295757600080fd5b611a4482612929565b60005b8381101561297b578181015183820152602001612963565b838111156118b85750506000910152565b600081518084526129a4816020860160208601612960565b601f01601f19169290920160200192915050565b602081526000611a44602083018461298c565b6000602082840312156129dd57600080fd5b5035919050565b600080604083850312156129f757600080fd5b612a0083612929565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612a3f57612a3f612a0e565b604051601f8501601f19908116603f01168101908282118183101715612a6757612a67612a0e565b81604052809350858152868686011115612a8057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612aac57600080fd5b813567ffffffffffffffff811115612ac357600080fd5b8201601f81018413612ad457600080fd5b61222a84823560208401612a24565b6020808252825182820181905260009190848201906040850190845b81811015612b245783516001600160a01b031683529284019291840191600101612aff565b50909695505050505050565b8035801515811461294057600080fd5b600060208284031215612b5257600080fd5b611a4482612b30565b600080600060608486031215612b7057600080fd5b612b7984612929565b9250612b8760208501612929565b9150604084013590509250925092565b60008060408385031215612baa57600080fd5b612bb383612929565b9150612bc160208401612b30565b90509250929050565b60008060008060808587031215612be057600080fd5b612be985612929565b9350612bf760208601612929565b925060408501359150606085013567ffffffffffffffff811115612c1a57600080fd5b8501601f81018713612c2b57600080fd5b612c3a87823560208401612a24565b91505092959194509250565b60008060408385031215612c5957600080fd5b82359150612bc160208401612929565b60008060408385031215612c7c57600080fd5b612c8583612929565b9150612bc160208401612929565b600181811c90821680612ca757607f821691505b602082108103612cc757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612cf557612cf5612ccd565b500390565b634e487b7160e01b600052603260045260246000fd5b600060018201612d2257612d22612ccd565b5060010190565b60008219821115612d3c57612d3c612ccd565b500190565b600060208284031215612d5357600080fd5b5051919050565b6000816000190483118215151615612d7457612d74612ccd565b500290565b600084516020612d8c8285838a01612960565b855191840191612d9f8184848a01612960565b8554920191600090600181811c9080831680612dbc57607f831692505b8583108103612dd957634e487b7160e01b85526022600452602485fd5b808015612ded5760018114612dfe57612e2b565b60ff19851688528388019550612e2b565b60008b81526020902060005b85811015612e235781548a820152908401908801612e0a565b505083880195505b50939b9a5050505050505050505050565b600081612e4b57612e4b612ccd565b506000190190565b634e487b7160e01b600052601260045260246000fd5b600082612e7857612e78612e53565b500490565b600082612e8c57612e8c612e53565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ec3608083018461298c565b9695505050505050565b600060208284031215612edf57600080fd5b8151611a44816128f656fea26469706673582212206c432781c8297bf35255760375b8fca499198e611efe6063fd533c3180a34e3464736f6c634300080e0033

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.