ETH Price: $2,636.08 (-0.83%)

Stamps (STAMP)
 

Overview

TokenID

3859

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Stamps were made by dozens of artists from around the world with styles varying from 3D, illustration, animation, pixel art, graffiti, etc.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Stamps

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : Stamps.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC165/IERC165.sol";
import "./ERC165/ERC165.sol";
import "./utils/Address.sol";
import "./utils/EnumerableMap.sol";
import "./utils/EnumerableSet.sol";
import "./utils/SafeMath.sol";
import "./utils/Strings.sol";
import "./utils/Context.sol";
import "./ERC721/IERC721Metadata.sol";
import "./ERC721/IERC721Receiver.sol";
import "./ERC721/IERC721Enumerable.sol";
import "./ERC2309/IERC2309.sol";
import "./utils/Ownable.sol";

/**
 * @title Stamps contract
 * @dev Extends ERC721 Non-Fungible Token Standard basic implementation
 */
contract Stamps is  Context, Ownable, IERC2309, ERC165, IERC721Metadata, IERC721Enumerable {
    using SafeMath for uint256;
    using Address for address;
    using EnumerableSet for EnumerableSet.UintSet;
    using EnumerableMap for EnumerableMap.UintToAddressMap;
    using Strings for uint256;

    // This is the provenance record of all Stamps artwork in existence
    string public constant STAMPS_PROVENANCE = "605c9bb70315ffd6dcd394b645a739768feb5c7c8ce97f0a31ddd3e2001030ff";

    // Wednesday, 17 March 2021 19:00:00 UTC
    uint256 public constant SALE_START_TIMESTAMP = 1616007600;

    // Time after which stamps are randomized and allotted
    uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP + (86400 * 7);

    uint256 public constant MAX_NFT_SUPPLY = 100000;

    uint256 public constant MAX_PACK_SUPPLY = 20000;

    uint256 public startingIndexBlock;

    uint256 public startingIndex;

    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
    bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;

    // Mapping from holder address to their (enumerable) set of owned tokens
    mapping (address => EnumerableSet.UintSet) private _holderTokens;

    // Enumerable mapping from token ids to their owners
    EnumerableMap.UintToAddressMap private _tokenOwners;

    // Number of packs minted
    uint256 private _packSupply;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    /*
     *     bytes4(keccak256('balanceOf(address)')) == 0x70a08231
     *     bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
     *     bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
     *     bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
     *     bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
     *
     *     => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
     *        0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
     */
    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;

    /*
     *     bytes4(keccak256('name()')) == 0x06fdde03
     *     bytes4(keccak256('symbol()')) == 0x95d89b41
     *
     *     => 0x06fdde03 ^ 0x95d89b41 == 0x93254542
     */
    bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;

    /*
     *     bytes4(keccak256('totalSupply()')) == 0x18160ddd
     *     bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
     *     bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
     *
     *     => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
     */
    bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;

    /**
     * @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_;
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
        _registerInterface(_INTERFACE_ID_ERC721_METADATA);
        _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

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

        return _holderTokens[owner].length();
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOfPacks(address owner) public view returns (uint256) {
        require(owner != address(0), "Stamps: balance query for the zero address");

        return _holderTokens[owner].length() / 5;
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
    }


    function ownerOfPack(uint256 packId) public view returns (address) {
        require(packId < totalPackSupply(), "Stamps: owner query for nonexistent pack");
        return _tokenOwners.get(packId * 5, "Stamps: owner query for nonexistent pack");
    }


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

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
        return _holderTokens[owner].at(index);
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
        return _tokenOwners.length();
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view override returns (uint256) {
        (uint256 tokenId, ) = _tokenOwners.at(index);
        return tokenId;
    }

    function totalPackSupply() public view returns (uint256) {
        return totalSupply() / 5;
    }

    function tokensByPack(uint256 packId) public view returns (uint256[5] memory) {
        require(packId < totalPackSupply(), "Stamp: Invalid packId parameter");
        uint256 startingTokenIndex = packId * 5;
        return [startingTokenIndex, startingTokenIndex + 1, startingTokenIndex + 2, startingTokenIndex + 3, startingTokenIndex + 4];
    }

    /**
     * @dev Gets current Stamp Pack Price
     */
    function getPackPrice() public view returns (uint256) {
        require(block.timestamp >= SALE_START_TIMESTAMP, "Stamp: Sale has not started");

        uint256 currentPackSupply = totalPackSupply();

        require(currentPackSupply < MAX_PACK_SUPPLY, "Stamp: Sale has already ended");

        if (currentPackSupply >= 17500) {
            return 2 ether; // 17500 - 20000, 2 ETH
        } else if (currentPackSupply >= 15000) {
            return 1.5 ether; // 15000 - 17500, 1.5 ETH
        } else if (currentPackSupply >= 12500) {
            return 1.2 ether; // 12500 - 15000, 1.2 ETH
        } else if (currentPackSupply >= 10000) {
            return 1 ether; // 10000 - 12500, 1 ETH
        } else if (currentPackSupply >= 7500) {
            return 0.8 ether; // 7500 - 10000, 0.8 ETH
        } else if (currentPackSupply >= 5000) {
            return 0.5 ether; // 5000 - 7500, 0.5 ETH
        } else if (currentPackSupply >= 2500) {
            return 0.3 ether; // 2500 - 5000, 0.3 ETH
        } else {
            return 0.1 ether; // 0 - 2500 0.1 ETH
        }
    }

    /**
    * @dev Mints Stamps
    */
    function mintPack(uint256 numberOfPacks) public payable {
        uint currentPackSupply = totalPackSupply();

        require(currentPackSupply < MAX_PACK_SUPPLY, "Stamps: Sale has already ended");
        require(numberOfPacks > 0, "Stamps: numberOfPacks cannot be 0");
        require(numberOfPacks <= 10, "Stamps: You may not buy more than 10 Packs at once");


        require(currentPackSupply.add(numberOfPacks) <= MAX_PACK_SUPPLY, "Stamps: Exceeds MAX_PACK_SUPPLY");
        require(getPackPrice().mul(numberOfPacks) == msg.value, "Stamps: Ether value sent is not correct");

        uint256 numberOfNfts = numberOfPacks * 5;
        uint currentSupply = totalSupply();

        uint tokenIndex = currentSupply;

        // Needed for the ConsecutiveTransfer event
        uint startingTokenId = currentSupply;


        for(uint i = 0; i < numberOfNfts; i++) {
            _holderTokens[msg.sender].add(tokenIndex);
            _tokenOwners.set(tokenIndex, msg.sender);
            tokenIndex += 1;
        }

        emit ConsecutiveTransfer(startingTokenId, tokenIndex - 1, address(0), msg.sender);

        /**
        * Source of randomness. Theoretical miner withhold manipulation possible but should be sufficient in a pragmatic sense
        */
        if (startingIndexBlock == 0 && (totalSupply() == MAX_NFT_SUPPLY || block.timestamp >= REVEAL_TIMESTAMP)) {
            startingIndexBlock = block.number;
        }
    }

    /**
     * @dev Finalize starting index
     */
    function finalizeStartingIndex() public {
        require(startingIndex == 0, "Starting index is already set");
        require(startingIndexBlock != 0, "Starting index block must be set");

        startingIndex = uint(blockhash(startingIndexBlock)) % MAX_NFT_SUPPLY;
        // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes)
        if (block.number.sub(startingIndexBlock) > 255) {
            startingIndex = uint(blockhash(block.number-1)) % MAX_NFT_SUPPLY;
        }
        // Prevent default sequence
        if (startingIndex == 0) {
            startingIndex = startingIndex.add(1);
        }
    }


    /**
     * @dev Withdraw ether from this contract (Callable by the owner)
    */
    function withdraw(address withdrawalAddress, uint256 amount) onlyOwner public {
        require(withdrawalAddress != address(0), "Stamps: Withdrawal to zero address not allowed.");
        uint balance = address(this).balance;
        require(balance >= amount, "Stamps: The amount is greater than the available balance.");

        payable(withdrawalAddress).transfer(amount);
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = 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 override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view 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}.
     *
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _tokenOwners.contains(tokenId);
    }

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




    /**
     * @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(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

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

        _holderTokens[from].remove(tokenId);
        _holderTokens[to].add(tokenId);

        _tokenOwners.set(tokenId, to);

        emit Transfer(from, to, tokenId);
    }


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

    function _approve(address to, uint256 tokenId) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(ownerOf(tokenId), to, tokenId);
    }


    /**
     * @dev Return the status of the presale (is it open)
     *
     * The sale is open when the current time is larger than the sale start time and not all packs are minted.
     *
     */
    function isSaleOpen() external view returns (bool) {
        return block.timestamp >= SALE_START_TIMESTAMP && totalPackSupply() < MAX_PACK_SUPPLY;
    }


}

File 2 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 3 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

File 4 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 5 of 15 : EnumerableMap.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./EnumerableSet.sol";

/**
 * @dev Library for managing an enumerable variant of Solidity's
 * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
 * type.
 *
 * Maps have the following properties:
 *
 * - Entries are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Entries are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableMap for EnumerableMap.UintToAddressMap;
 *
 *     // Declare a set state variable
 *     EnumerableMap.UintToAddressMap private myMap;
 * }
 * ```
 *
 * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
 * supported.
 */
library EnumerableMap {
    using EnumerableSet for EnumerableSet.Bytes32Set;

    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Map type with
    // bytes32 keys and values.
    // The Map implementation uses private functions, and user-facing
    // implementations (such as Uint256ToAddressMap) are just wrappers around
    // the underlying Map.
    // This means that we can only create new EnumerableMaps for types that fit
    // in bytes32.

    struct Map {
        // Storage of keys
        EnumerableSet.Bytes32Set _keys;

        mapping (bytes32 => bytes32) _values;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
        map._values[key] = value;
        return map._keys.add(key);
    }

    /**
     * @dev Removes a key-value pair from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function _remove(Map storage map, bytes32 key) private returns (bool) {
        delete map._values[key];
        return map._keys.remove(key);
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function _contains(Map storage map, bytes32 key) private view returns (bool) {
        return map._keys.contains(key);
    }

    /**
     * @dev Returns the number of key-value pairs in the map. O(1).
     */
    function _length(Map storage map) private view returns (uint256) {
        return map._keys.length();
    }

    /**
     * @dev Returns the key-value pair stored at position `index` in the map. O(1).
     *
     * Note that there are no guarantees on the ordering of entries inside the
     * array, and it may change when more entries are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
        bytes32 key = map._keys.at(index);
        return (key, map._values[key]);
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     */
    function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {
        bytes32 value = map._values[key];
        if (value == bytes32(0)) {
            return (_contains(map, key), bytes32(0));
        } else {
            return (true, value);
        }
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function _get(Map storage map, bytes32 key) private view returns (bytes32) {
        bytes32 value = map._values[key];
        require(value != 0 || _contains(map, key), "EnumerableMap: nonexistent key");
        return value;
    }

    /**
     * @dev Same as {_get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {_tryGet}.
     */
    function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
        bytes32 value = map._values[key];
        require(value != 0 || _contains(map, key), errorMessage);
        return value;
    }

    // UintToAddressMap

    struct UintToAddressMap {
        Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
        return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
        return _remove(map._inner, bytes32(key));
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {
        return _contains(map._inner, bytes32(key));
    }

    /**
     * @dev Returns the number of elements in the map. O(1).
     */
    function length(UintToAddressMap storage map) internal view returns (uint256) {
        return _length(map._inner);
    }

    /**
     * @dev Returns the element stored at position `index` in the set. O(1).
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
        (bytes32 key, bytes32 value) = _at(map._inner, index);
        return (uint256(key), address(uint160(uint256(value))));
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     *
     * _Available since v3.4._
     */
    function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
        (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));
        return (success, address(uint160(uint256(value))));
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
        return address(uint160(uint256(_get(map._inner, bytes32(key)))));
    }

    /**
     * @dev Same as {get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryGet}.
     */
    function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
        return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));
    }
}

File 6 of 15 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 7 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 15 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 9 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 10 of 15 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {

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

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

File 11 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 12 of 15 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

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

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

File 13 of 15 : IERC2309.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;


/**
 * @dev IERC2309 interface
 * See: https://eips.ethereum.org/EIPS/eip-2309 for more details
 */
interface IERC2309 {
    /**
     * @dev Emitted when one or multiple tokens in the range `fromTokenId` to `toTokenId` are transferred from `fromAddress` to `toAddress`.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress);

}

File 14 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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

pragma solidity ^0.8.0;

import "../ERC165/IERC165.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_NFT_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PACK_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEAL_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_START_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAMPS_PROVENANCE","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":"owner","type":"address"}],"name":"balanceOfPacks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeStartingIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPackPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfPacks","type":"uint256"}],"name":"mintPack","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"packId","type":"uint256"}],"name":"ownerOfPack","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndexBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"packId","type":"uint256"}],"name":"tokensByPack","outputs":[{"internalType":"uint256[5]","name":"","type":"uint256[5]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPackSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawalAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200297d3803806200297d8339810160408190526200003491620002b9565b60006200004062000106565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200009c6301ffc9a760e01b6200010a565b8151620000b190600b90602085019062000168565b508051620000c790600c90602084019062000168565b50620000da6380ac58cd60e01b6200010a565b620000ec634992a2a160e11b6200010a565b620000fe63780e9d6360e01b6200010a565b5050620003aa565b3390565b6001600160e01b03198082161415620001405760405162461bcd60e51b8152600401620001379062000320565b60405180910390fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b828054620001769062000357565b90600052602060002090601f0160209004810192826200019a5760008555620001e5565b82601f10620001b557805160ff1916838001178555620001e5565b82800160010185558215620001e5579182015b82811115620001e5578251825591602001919060010190620001c8565b50620001f3929150620001f7565b5090565b5b80821115620001f35760008155600101620001f8565b600082601f8301126200021f578081fd5b81516001600160401b03808211156200023c576200023c62000394565b6040516020601f8401601f191682018101838111838210171562000264576200026462000394565b60405283825285840181018710156200027b578485fd5b8492505b838310156200029e57858301810151828401820152918201916200027f565b83831115620002af57848185840101525b5095945050505050565b60008060408385031215620002cc578182fd5b82516001600160401b0380821115620002e3578384fd5b620002f1868387016200020e565b9350602085015191508082111562000307578283fd5b5062000316858286016200020e565b9150509250929050565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b6002810460018216806200036c57607f821691505b602082108114156200038e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6125c380620003ba6000396000f3fe6080604052600436106101f95760003560e01c806374df39c91161010d578063b88d4fde116100a0578063de99488d1161006f578063de99488d14610538578063e36d649814610558578063e985e9c51461056d578063f2fde38b1461058d578063f3fef3a3146105ad576101f9565b8063b88d4fde146104d0578063c0288a37146104f0578063cb774d4714610510578063d45765e214610525576101f9565b8063946807fd116100dc578063946807fd1461047157806395d89b4114610486578063a22cb4651461049b578063b5077f44146104bb576101f9565b806374df39c91461041d5780638815af30146104325780638da5cb5b14610447578063923080161461045c576101f9565b80632f745c59116101905780634f6ccce71161015f5780634f6ccce7146103935780635a44e1b5146103b35780636352211e146103c857806370a08231146103e8578063715018a614610408576101f9565b80632f745c591461031157806335f83e52146103315780633b9d9e6d1461034657806342842e0e14610373576101f9565b806318160ddd116101cc57806318160ddd146102a557806318e20a38146102c75780631a081330146102dc57806323b872dd146102f1576101f9565b806301ffc9a7146101fe57806306fdde0314610234578063081812fc14610256578063095ea7b314610283575b600080fd5b34801561020a57600080fd5b5061021e610219366004611a7e565b6105cd565b60405161022b9190611b98565b60405180910390f35b34801561024057600080fd5b506102496105f0565b60405161022b9190611ba3565b34801561026257600080fd5b50610276610271366004611ab6565b610683565b60405161022b9190611b16565b34801561028f57600080fd5b506102a361029e366004611a55565b6106cf565b005b3480156102b157600080fd5b506102ba610767565b60405161022b919061236e565b3480156102d357600080fd5b506102ba610778565b3480156102e857600080fd5b5061021e61078c565b3480156102fd57600080fd5b506102a361030c366004611914565b6107ae565b34801561031d57600080fd5b506102ba61032c366004611a55565b6107e6565b34801561033d57600080fd5b506102ba610811565b34801561035257600080fd5b50610366610361366004611ab6565b610827565b60405161022b9190611b67565b34801561037f57600080fd5b506102a361038e366004611914565b6108bb565b34801561039f57600080fd5b506102ba6103ae366004611ab6565b6108d6565b3480156103bf57600080fd5b506102496108ec565b3480156103d457600080fd5b506102766103e3366004611ab6565b610908565b3480156103f457600080fd5b506102ba6104033660046118c8565b610930565b34801561041457600080fd5b506102a3610979565b34801561042957600080fd5b506102a3610a02565b34801561043e57600080fd5b506102ba610aa6565b34801561045357600080fd5b50610276610aac565b34801561046857600080fd5b506102ba610abb565b34801561047d57600080fd5b506102ba610bd5565b34801561049257600080fd5b50610249610bdd565b3480156104a757600080fd5b506102a36104b6366004611a1b565b610bec565b3480156104c757600080fd5b506102ba610cba565b3480156104dc57600080fd5b506102a36104eb36600461194f565b610cc1565b3480156104fc57600080fd5b5061027661050b366004611ab6565b610d00565b34801561051c57600080fd5b506102ba610d58565b6102a3610533366004611ab6565b610d5e565b34801561054457600080fd5b506102ba6105533660046118c8565b610f20565b34801561056457600080fd5b506102ba610f76565b34801561057957600080fd5b5061021e6105883660046118e2565b610f7c565b34801561059957600080fd5b506102a36105a83660046118c8565b610faa565b3480156105b957600080fd5b506102a36105c8366004611a55565b61106a565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b6060600b80546105ff90612405565b80601f016020809104026020016040519081016040528092919081815260200182805461062b90612405565b80156106785780601f1061064d57610100808354040283529160200191610678565b820191906000526020600020905b81548152906001019060200180831161065b57829003601f168201915b505050505090505b90565b600061068e82611126565b6106b35760405162461bcd60e51b81526004016106aa90612042565b60405180910390fd5b506000908152600960205260409020546001600160a01b031690565b60006106da82610908565b9050806001600160a01b0316836001600160a01b0316141561070e5760405162461bcd60e51b81526004016106aa90612195565b806001600160a01b0316610720611133565b6001600160a01b0316148061073c575061073c81610588611133565b6107585760405162461bcd60e51b81526004016106aa90611f4c565b6107628383611137565b505050565b600061077360056111a5565b905090565b61078963605251b062093a80612377565b81565b600063605251b042101580156107735750614e206107a8610811565b10905090565b6107bf6107b9611133565b826111b0565b6107db5760405162461bcd60e51b81526004016106aa90612242565b610762838383611235565b6001600160a01b03821660009081526004602052604081206108089083611338565b90505b92915050565b6000600561081d610767565b610773919061238f565b61082f611893565b610837610811565b82106108555760405162461bcd60e51b81526004016106aa90611ede565b60006108628360056123a3565b90506040518060a001604052808281526020018260016108829190612377565b8152602001610892836002612377565b81526020016108a2836003612377565b81526020016108b2836004612377565b90529392505050565b61076283838360405180602001604052806000815250610cc1565b6000806108e4600584611344565b509392505050565b60405180606001604052806040815260200161254e6040913981565b600061080b826040518060600160405280602981526020016125256029913960059190611360565b60006001600160a01b0382166109585760405162461bcd60e51b81526004016106aa90611fa9565b6001600160a01b038216600090815260046020526040902061080b90611377565b610981611133565b6001600160a01b0316610992610aac565b6001600160a01b0316146109b85760405162461bcd60e51b81526004016106aa9061208e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035415610a225760405162461bcd60e51b81526004016106aa90611f15565b600254610a415760405162461bcd60e51b81526004016106aa9061220d565b600254610a5390620186a0904061245b565b60035560025460ff90610a67904390611382565b1115610a8b57620186a0610a7c6001436123c2565b610a8791904061245b565b6003555b600354610aa457600354610aa090600161138e565b6003555b565b614e2081565b6000546001600160a01b031690565b600063605251b0421015610ae15760405162461bcd60e51b81526004016106aa9061215e565b6000610aeb610811565b9050614e208110610b0e5760405162461bcd60e51b81526004016106aa90611c39565b61445c8110610b2857671bc16d674ec80000915050610680565b613a988110610b42576714d1120d7b160000915050610680565b6130d48110610b5c576710a741a462780000915050610680565b6127108110610b7657670de0b6b3a7640000915050610680565b611d4c8110610b9057670b1a2bc2ec500000915050610680565b6113888110610baa576706f05b59d3b20000915050610680565b6109c48110610bc457670429d069189e0000915050610680565b67016345785d8a0000915050610680565b63605251b081565b6060600c80546105ff90612405565b610bf4611133565b6001600160a01b0316826001600160a01b03161415610c255760405162461bcd60e51b81526004016106aa90611e15565b80600a6000610c32611133565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610c76611133565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610cae9190611b98565b60405180910390a35050565b620186a081565b610cd2610ccc611133565b836111b0565b610cee5760405162461bcd60e51b81526004016106aa90612242565b610cfa8484848461139a565b50505050565b6000610d0a610811565b8210610d285760405162461bcd60e51b81526004016106aa90611d3f565b61080b610d368360056123a3565b6040518060600160405280602881526020016124fd6028913960059190611360565b60035481565b6000610d68610811565b9050614e208110610d8b5760405162461bcd60e51b81526004016106aa906121d6565b60008211610dab5760405162461bcd60e51b81526004016106aa90611bf8565b600a821115610dcc5760405162461bcd60e51b81526004016106aa9061210c565b614e20610dd9828461138e565b1115610df75760405162461bcd60e51b81526004016106aa90611cc2565b34610e0a83610e04610abb565b906113cd565b14610e275760405162461bcd60e51b81526004016106aa90612327565b6000610e348360056123a3565b90506000610e40610767565b9050808060005b84811015610e9557336000908152600460205260409020610e6890846113d9565b50610e75600584336113e5565b50610e81600184612377565b925080610e8d81612440565b915050610e47565b50336000827fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d610ec66001876123c2565b604051610ed3919061236e565b60405180910390a4600254158015610f0e5750620186a0610ef2610767565b1480610f0e5750610f0a63605251b062093a80612377565b4210155b15610f1857436002555b505050505050565b60006001600160a01b038216610f485760405162461bcd60e51b81526004016106aa90611d87565b6001600160a01b0382166000908152600460205260409020600590610f6c90611377565b61080b919061238f565b60025481565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b610fb2611133565b6001600160a01b0316610fc3610aac565b6001600160a01b031614610fe95760405162461bcd60e51b81526004016106aa9061208e565b6001600160a01b03811661100f5760405162461bcd60e51b81526004016106aa90611cf9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611072611133565b6001600160a01b0316611083610aac565b6001600160a01b0316146110a95760405162461bcd60e51b81526004016106aa9061208e565b6001600160a01b0382166110cf5760405162461bcd60e51b81526004016106aa90611ff3565b47818110156110f05760405162461bcd60e51b81526004016106aa906122ca565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610cfa573d6000803e3d6000fd5b600061080b6005836113fb565b3390565b600081815260096020526040902080546001600160a01b0319166001600160a01b038416908117909155819061116c82610908565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061080b82611407565b60006111bb82611126565b6111d75760405162461bcd60e51b81526004016106aa90611e92565b60006111e283610908565b9050806001600160a01b0316846001600160a01b0316148061121d5750836001600160a01b031661121284610683565b6001600160a01b0316145b8061122d575061122d8185610f7c565b949350505050565b826001600160a01b031661124882610908565b6001600160a01b03161461126e5760405162461bcd60e51b81526004016106aa906120c3565b6001600160a01b0382166112945760405162461bcd60e51b81526004016106aa90611dd1565b61129f600082611137565b6001600160a01b03831660009081526004602052604090206112c19082611412565b506001600160a01b03821660009081526004602052604090206112e490826113d9565b506112f1600582846113e5565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610808838361141e565b60008080806113538686611477565b9097909650945050505050565b600061136d8484846114a2565b90505b9392505050565b600061080b826114ee565b600061080882846123c2565b60006108088284612377565b6113a5848484611235565b6113b1848484846114f2565b610cfa5760405162461bcd60e51b81526004016106aa90611c70565b600061080882846123a3565b600061080883836115d1565b600061136d84846001600160a01b03851661161b565b60006108088383611638565b600061080b82611377565b60006108088383611644565b815460009082106114415760405162461bcd60e51b81526004016106aa90611bb6565b82600001828154811061146457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600080806114858585611338565b600081815260029690960160205260409095205494959350505050565b6000828152600284016020526040812054801515806114c657506114c68585611638565b83906114e55760405162461bcd60e51b81526004016106aa9190611ba3565b50949350505050565b5490565b6000611506846001600160a01b0316611761565b6115125750600161122d565b600061159a630a85bd0160e11b611527611133565b88878760405160240161153d9493929190611b2a565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050506040518060600160405280603281526020016124cb603291396001600160a01b0388169190611767565b90506000818060200190518101906115b29190611a9a565b6001600160e01b031916630a85bd0160e11b1492505050949350505050565b60006115dd8383611776565b6116135750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561080b565b50600061080b565b6000828152600284016020526040812082905561136d84846113d9565b6000610808838361178e565b600081815260018301602052604081205480156117575760006116686001836123c2565b855490915060009061167c906001906123c2565b905060008660000182815481106116a357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106116d457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001556116eb836001612377565b6000828152600189016020526040902055865487908061171b57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061080b565b600091505061080b565b3b151590565b606061136d848460008561179a565b60009081526001919091016020526040902054151590565b60006108088383611776565b6060824710156117bc5760405162461bcd60e51b81526004016106aa90611e4c565b6117c585611761565b6117e15760405162461bcd60e51b81526004016106aa90612293565b600080866001600160a01b031685876040516117fd9190611afa565b60006040518083038185875af1925050503d806000811461183a576040519150601f19603f3d011682016040523d82523d6000602084013e61183f565b606091505b509150915061184f82828661185a565b979650505050505050565b60608315611869575081611370565b8251156118795782518084602001fd5b8160405162461bcd60e51b81526004016106aa9190611ba3565b6040518060a001604052806005906020820280368337509192915050565b80356001600160a01b03811681146105eb57600080fd5b6000602082840312156118d9578081fd5b610808826118b1565b600080604083850312156118f4578081fd5b6118fd836118b1565b915061190b602084016118b1565b90509250929050565b600080600060608486031215611928578081fd5b611931846118b1565b925061193f602085016118b1565b9150604084013590509250925092565b60008060008060808587031215611964578081fd5b61196d856118b1565b9350602061197c8187016118b1565b935060408601359250606086013567ffffffffffffffff8082111561199f578384fd5b818801915088601f8301126119b2578384fd5b8135818111156119c4576119c461249b565b604051601f8201601f19168101850183811182821017156119e7576119e761249b565b60405281815283820185018b10156119fd578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060408385031215611a2d578182fd5b611a36836118b1565b915060208301358015158114611a4a578182fd5b809150509250929050565b60008060408385031215611a67578182fd5b611a70836118b1565b946020939093013593505050565b600060208284031215611a8f578081fd5b8135611370816124b1565b600060208284031215611aab578081fd5b8151611370816124b1565b600060208284031215611ac7578081fd5b5035919050565b60008151808452611ae68160208601602086016123d9565b601f01601f19169290920160200192915050565b60008251611b0c8184602087016123d9565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611b5d90830184611ace565b9695505050505050565b60a08101818360005b6005811015611b8f578151835260209283019290910190600101611b70565b50505092915050565b901515815260200190565b6000602082526108086020830184611ace565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526021908201527f5374616d70733a206e756d6265724f665061636b732063616e6e6f74206265206040820152600360fc1b606082015260800190565b6020808252601d908201527f5374616d703a2053616c652068617320616c726561647920656e646564000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601f908201527f5374616d70733a2045786365656473204d41585f5041434b5f535550504c5900604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526028908201527f5374616d70733a206f776e657220717565727920666f72206e6f6e6578697374604082015267656e74207061636b60c01b606082015260800190565b6020808252602a908201527f5374616d70733a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252601f908201527f5374616d703a20496e76616c6964207061636b496420706172616d6574657200604082015260600190565b6020808252601d908201527f5374617274696e6720696e64657820697320616c726561647920736574000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252602f908201527f5374616d70733a205769746864726177616c20746f207a65726f20616464726560408201526e39b9903737ba1030b63637bbb2b21760891b606082015260800190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526032908201527f5374616d70733a20596f75206d6179206e6f7420627579206d6f7265207468616040820152716e203130205061636b73206174206f6e636560701b606082015260800190565b6020808252601b908201527f5374616d703a2053616c6520686173206e6f7420737461727465640000000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601e908201527f5374616d70733a2053616c652068617320616c726561647920656e6465640000604082015260600190565b6020808252818101527f5374617274696e6720696e64657820626c6f636b206d75737420626520736574604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526039908201527f5374616d70733a2054686520616d6f756e74206973206772656174657220746860408201527f616e2074686520617661696c61626c652062616c616e63652e00000000000000606082015260800190565b60208082526027908201527f5374616d70733a2045746865722076616c75652073656e74206973206e6f742060408201526618dbdc9c9958dd60ca1b606082015260800190565b90815260200190565b6000821982111561238a5761238a61246f565b500190565b60008261239e5761239e612485565b500490565b60008160001904831182151516156123bd576123bd61246f565b500290565b6000828210156123d4576123d461246f565b500390565b60005b838110156123f45781810151838201526020016123dc565b83811115610cfa5750506000910152565b60028104600182168061241957607f821691505b6020821081141561243a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156124545761245461246f565b5060010190565b60008261246a5761246a612485565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146124c757600080fd5b5056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465725374616d70733a206f776e657220717565727920666f72206e6f6e6578697374656e74207061636b4552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e36303563396262373033313566666436646364333934623634356137333937363866656235633763386365393766306133316464643365323030313033306666a2646970667358221220b7afd2b328ed5bff9ef3a77326f4e7ca29123d7cb243a48bb99b8df6df6e133b64736f6c634300080000330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000065374616d7073000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055354414d50000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101f95760003560e01c806374df39c91161010d578063b88d4fde116100a0578063de99488d1161006f578063de99488d14610538578063e36d649814610558578063e985e9c51461056d578063f2fde38b1461058d578063f3fef3a3146105ad576101f9565b8063b88d4fde146104d0578063c0288a37146104f0578063cb774d4714610510578063d45765e214610525576101f9565b8063946807fd116100dc578063946807fd1461047157806395d89b4114610486578063a22cb4651461049b578063b5077f44146104bb576101f9565b806374df39c91461041d5780638815af30146104325780638da5cb5b14610447578063923080161461045c576101f9565b80632f745c59116101905780634f6ccce71161015f5780634f6ccce7146103935780635a44e1b5146103b35780636352211e146103c857806370a08231146103e8578063715018a614610408576101f9565b80632f745c591461031157806335f83e52146103315780633b9d9e6d1461034657806342842e0e14610373576101f9565b806318160ddd116101cc57806318160ddd146102a557806318e20a38146102c75780631a081330146102dc57806323b872dd146102f1576101f9565b806301ffc9a7146101fe57806306fdde0314610234578063081812fc14610256578063095ea7b314610283575b600080fd5b34801561020a57600080fd5b5061021e610219366004611a7e565b6105cd565b60405161022b9190611b98565b60405180910390f35b34801561024057600080fd5b506102496105f0565b60405161022b9190611ba3565b34801561026257600080fd5b50610276610271366004611ab6565b610683565b60405161022b9190611b16565b34801561028f57600080fd5b506102a361029e366004611a55565b6106cf565b005b3480156102b157600080fd5b506102ba610767565b60405161022b919061236e565b3480156102d357600080fd5b506102ba610778565b3480156102e857600080fd5b5061021e61078c565b3480156102fd57600080fd5b506102a361030c366004611914565b6107ae565b34801561031d57600080fd5b506102ba61032c366004611a55565b6107e6565b34801561033d57600080fd5b506102ba610811565b34801561035257600080fd5b50610366610361366004611ab6565b610827565b60405161022b9190611b67565b34801561037f57600080fd5b506102a361038e366004611914565b6108bb565b34801561039f57600080fd5b506102ba6103ae366004611ab6565b6108d6565b3480156103bf57600080fd5b506102496108ec565b3480156103d457600080fd5b506102766103e3366004611ab6565b610908565b3480156103f457600080fd5b506102ba6104033660046118c8565b610930565b34801561041457600080fd5b506102a3610979565b34801561042957600080fd5b506102a3610a02565b34801561043e57600080fd5b506102ba610aa6565b34801561045357600080fd5b50610276610aac565b34801561046857600080fd5b506102ba610abb565b34801561047d57600080fd5b506102ba610bd5565b34801561049257600080fd5b50610249610bdd565b3480156104a757600080fd5b506102a36104b6366004611a1b565b610bec565b3480156104c757600080fd5b506102ba610cba565b3480156104dc57600080fd5b506102a36104eb36600461194f565b610cc1565b3480156104fc57600080fd5b5061027661050b366004611ab6565b610d00565b34801561051c57600080fd5b506102ba610d58565b6102a3610533366004611ab6565b610d5e565b34801561054457600080fd5b506102ba6105533660046118c8565b610f20565b34801561056457600080fd5b506102ba610f76565b34801561057957600080fd5b5061021e6105883660046118e2565b610f7c565b34801561059957600080fd5b506102a36105a83660046118c8565b610faa565b3480156105b957600080fd5b506102a36105c8366004611a55565b61106a565b6001600160e01b0319811660009081526001602052604090205460ff165b919050565b6060600b80546105ff90612405565b80601f016020809104026020016040519081016040528092919081815260200182805461062b90612405565b80156106785780601f1061064d57610100808354040283529160200191610678565b820191906000526020600020905b81548152906001019060200180831161065b57829003601f168201915b505050505090505b90565b600061068e82611126565b6106b35760405162461bcd60e51b81526004016106aa90612042565b60405180910390fd5b506000908152600960205260409020546001600160a01b031690565b60006106da82610908565b9050806001600160a01b0316836001600160a01b0316141561070e5760405162461bcd60e51b81526004016106aa90612195565b806001600160a01b0316610720611133565b6001600160a01b0316148061073c575061073c81610588611133565b6107585760405162461bcd60e51b81526004016106aa90611f4c565b6107628383611137565b505050565b600061077360056111a5565b905090565b61078963605251b062093a80612377565b81565b600063605251b042101580156107735750614e206107a8610811565b10905090565b6107bf6107b9611133565b826111b0565b6107db5760405162461bcd60e51b81526004016106aa90612242565b610762838383611235565b6001600160a01b03821660009081526004602052604081206108089083611338565b90505b92915050565b6000600561081d610767565b610773919061238f565b61082f611893565b610837610811565b82106108555760405162461bcd60e51b81526004016106aa90611ede565b60006108628360056123a3565b90506040518060a001604052808281526020018260016108829190612377565b8152602001610892836002612377565b81526020016108a2836003612377565b81526020016108b2836004612377565b90529392505050565b61076283838360405180602001604052806000815250610cc1565b6000806108e4600584611344565b509392505050565b60405180606001604052806040815260200161254e6040913981565b600061080b826040518060600160405280602981526020016125256029913960059190611360565b60006001600160a01b0382166109585760405162461bcd60e51b81526004016106aa90611fa9565b6001600160a01b038216600090815260046020526040902061080b90611377565b610981611133565b6001600160a01b0316610992610aac565b6001600160a01b0316146109b85760405162461bcd60e51b81526004016106aa9061208e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035415610a225760405162461bcd60e51b81526004016106aa90611f15565b600254610a415760405162461bcd60e51b81526004016106aa9061220d565b600254610a5390620186a0904061245b565b60035560025460ff90610a67904390611382565b1115610a8b57620186a0610a7c6001436123c2565b610a8791904061245b565b6003555b600354610aa457600354610aa090600161138e565b6003555b565b614e2081565b6000546001600160a01b031690565b600063605251b0421015610ae15760405162461bcd60e51b81526004016106aa9061215e565b6000610aeb610811565b9050614e208110610b0e5760405162461bcd60e51b81526004016106aa90611c39565b61445c8110610b2857671bc16d674ec80000915050610680565b613a988110610b42576714d1120d7b160000915050610680565b6130d48110610b5c576710a741a462780000915050610680565b6127108110610b7657670de0b6b3a7640000915050610680565b611d4c8110610b9057670b1a2bc2ec500000915050610680565b6113888110610baa576706f05b59d3b20000915050610680565b6109c48110610bc457670429d069189e0000915050610680565b67016345785d8a0000915050610680565b63605251b081565b6060600c80546105ff90612405565b610bf4611133565b6001600160a01b0316826001600160a01b03161415610c255760405162461bcd60e51b81526004016106aa90611e15565b80600a6000610c32611133565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610c76611133565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610cae9190611b98565b60405180910390a35050565b620186a081565b610cd2610ccc611133565b836111b0565b610cee5760405162461bcd60e51b81526004016106aa90612242565b610cfa8484848461139a565b50505050565b6000610d0a610811565b8210610d285760405162461bcd60e51b81526004016106aa90611d3f565b61080b610d368360056123a3565b6040518060600160405280602881526020016124fd6028913960059190611360565b60035481565b6000610d68610811565b9050614e208110610d8b5760405162461bcd60e51b81526004016106aa906121d6565b60008211610dab5760405162461bcd60e51b81526004016106aa90611bf8565b600a821115610dcc5760405162461bcd60e51b81526004016106aa9061210c565b614e20610dd9828461138e565b1115610df75760405162461bcd60e51b81526004016106aa90611cc2565b34610e0a83610e04610abb565b906113cd565b14610e275760405162461bcd60e51b81526004016106aa90612327565b6000610e348360056123a3565b90506000610e40610767565b9050808060005b84811015610e9557336000908152600460205260409020610e6890846113d9565b50610e75600584336113e5565b50610e81600184612377565b925080610e8d81612440565b915050610e47565b50336000827fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d610ec66001876123c2565b604051610ed3919061236e565b60405180910390a4600254158015610f0e5750620186a0610ef2610767565b1480610f0e5750610f0a63605251b062093a80612377565b4210155b15610f1857436002555b505050505050565b60006001600160a01b038216610f485760405162461bcd60e51b81526004016106aa90611d87565b6001600160a01b0382166000908152600460205260409020600590610f6c90611377565b61080b919061238f565b60025481565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b610fb2611133565b6001600160a01b0316610fc3610aac565b6001600160a01b031614610fe95760405162461bcd60e51b81526004016106aa9061208e565b6001600160a01b03811661100f5760405162461bcd60e51b81526004016106aa90611cf9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611072611133565b6001600160a01b0316611083610aac565b6001600160a01b0316146110a95760405162461bcd60e51b81526004016106aa9061208e565b6001600160a01b0382166110cf5760405162461bcd60e51b81526004016106aa90611ff3565b47818110156110f05760405162461bcd60e51b81526004016106aa906122ca565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610cfa573d6000803e3d6000fd5b600061080b6005836113fb565b3390565b600081815260096020526040902080546001600160a01b0319166001600160a01b038416908117909155819061116c82610908565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061080b82611407565b60006111bb82611126565b6111d75760405162461bcd60e51b81526004016106aa90611e92565b60006111e283610908565b9050806001600160a01b0316846001600160a01b0316148061121d5750836001600160a01b031661121284610683565b6001600160a01b0316145b8061122d575061122d8185610f7c565b949350505050565b826001600160a01b031661124882610908565b6001600160a01b03161461126e5760405162461bcd60e51b81526004016106aa906120c3565b6001600160a01b0382166112945760405162461bcd60e51b81526004016106aa90611dd1565b61129f600082611137565b6001600160a01b03831660009081526004602052604090206112c19082611412565b506001600160a01b03821660009081526004602052604090206112e490826113d9565b506112f1600582846113e5565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610808838361141e565b60008080806113538686611477565b9097909650945050505050565b600061136d8484846114a2565b90505b9392505050565b600061080b826114ee565b600061080882846123c2565b60006108088284612377565b6113a5848484611235565b6113b1848484846114f2565b610cfa5760405162461bcd60e51b81526004016106aa90611c70565b600061080882846123a3565b600061080883836115d1565b600061136d84846001600160a01b03851661161b565b60006108088383611638565b600061080b82611377565b60006108088383611644565b815460009082106114415760405162461bcd60e51b81526004016106aa90611bb6565b82600001828154811061146457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600080806114858585611338565b600081815260029690960160205260409095205494959350505050565b6000828152600284016020526040812054801515806114c657506114c68585611638565b83906114e55760405162461bcd60e51b81526004016106aa9190611ba3565b50949350505050565b5490565b6000611506846001600160a01b0316611761565b6115125750600161122d565b600061159a630a85bd0160e11b611527611133565b88878760405160240161153d9493929190611b2a565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050506040518060600160405280603281526020016124cb603291396001600160a01b0388169190611767565b90506000818060200190518101906115b29190611a9a565b6001600160e01b031916630a85bd0160e11b1492505050949350505050565b60006115dd8383611776565b6116135750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561080b565b50600061080b565b6000828152600284016020526040812082905561136d84846113d9565b6000610808838361178e565b600081815260018301602052604081205480156117575760006116686001836123c2565b855490915060009061167c906001906123c2565b905060008660000182815481106116a357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106116d457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001556116eb836001612377565b6000828152600189016020526040902055865487908061171b57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061080b565b600091505061080b565b3b151590565b606061136d848460008561179a565b60009081526001919091016020526040902054151590565b60006108088383611776565b6060824710156117bc5760405162461bcd60e51b81526004016106aa90611e4c565b6117c585611761565b6117e15760405162461bcd60e51b81526004016106aa90612293565b600080866001600160a01b031685876040516117fd9190611afa565b60006040518083038185875af1925050503d806000811461183a576040519150601f19603f3d011682016040523d82523d6000602084013e61183f565b606091505b509150915061184f82828661185a565b979650505050505050565b60608315611869575081611370565b8251156118795782518084602001fd5b8160405162461bcd60e51b81526004016106aa9190611ba3565b6040518060a001604052806005906020820280368337509192915050565b80356001600160a01b03811681146105eb57600080fd5b6000602082840312156118d9578081fd5b610808826118b1565b600080604083850312156118f4578081fd5b6118fd836118b1565b915061190b602084016118b1565b90509250929050565b600080600060608486031215611928578081fd5b611931846118b1565b925061193f602085016118b1565b9150604084013590509250925092565b60008060008060808587031215611964578081fd5b61196d856118b1565b9350602061197c8187016118b1565b935060408601359250606086013567ffffffffffffffff8082111561199f578384fd5b818801915088601f8301126119b2578384fd5b8135818111156119c4576119c461249b565b604051601f8201601f19168101850183811182821017156119e7576119e761249b565b60405281815283820185018b10156119fd578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060408385031215611a2d578182fd5b611a36836118b1565b915060208301358015158114611a4a578182fd5b809150509250929050565b60008060408385031215611a67578182fd5b611a70836118b1565b946020939093013593505050565b600060208284031215611a8f578081fd5b8135611370816124b1565b600060208284031215611aab578081fd5b8151611370816124b1565b600060208284031215611ac7578081fd5b5035919050565b60008151808452611ae68160208601602086016123d9565b601f01601f19169290920160200192915050565b60008251611b0c8184602087016123d9565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611b5d90830184611ace565b9695505050505050565b60a08101818360005b6005811015611b8f578151835260209283019290910190600101611b70565b50505092915050565b901515815260200190565b6000602082526108086020830184611ace565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526021908201527f5374616d70733a206e756d6265724f665061636b732063616e6e6f74206265206040820152600360fc1b606082015260800190565b6020808252601d908201527f5374616d703a2053616c652068617320616c726561647920656e646564000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601f908201527f5374616d70733a2045786365656473204d41585f5041434b5f535550504c5900604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526028908201527f5374616d70733a206f776e657220717565727920666f72206e6f6e6578697374604082015267656e74207061636b60c01b606082015260800190565b6020808252602a908201527f5374616d70733a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252601f908201527f5374616d703a20496e76616c6964207061636b496420706172616d6574657200604082015260600190565b6020808252601d908201527f5374617274696e6720696e64657820697320616c726561647920736574000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252602f908201527f5374616d70733a205769746864726177616c20746f207a65726f20616464726560408201526e39b9903737ba1030b63637bbb2b21760891b606082015260800190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526032908201527f5374616d70733a20596f75206d6179206e6f7420627579206d6f7265207468616040820152716e203130205061636b73206174206f6e636560701b606082015260800190565b6020808252601b908201527f5374616d703a2053616c6520686173206e6f7420737461727465640000000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601e908201527f5374616d70733a2053616c652068617320616c726561647920656e6465640000604082015260600190565b6020808252818101527f5374617274696e6720696e64657820626c6f636b206d75737420626520736574604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526039908201527f5374616d70733a2054686520616d6f756e74206973206772656174657220746860408201527f616e2074686520617661696c61626c652062616c616e63652e00000000000000606082015260800190565b60208082526027908201527f5374616d70733a2045746865722076616c75652073656e74206973206e6f742060408201526618dbdc9c9958dd60ca1b606082015260800190565b90815260200190565b6000821982111561238a5761238a61246f565b500190565b60008261239e5761239e612485565b500490565b60008160001904831182151516156123bd576123bd61246f565b500290565b6000828210156123d4576123d461246f565b500390565b60005b838110156123f45781810151838201526020016123dc565b83811115610cfa5750506000910152565b60028104600182168061241957607f821691505b6020821081141561243a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156124545761245461246f565b5060010190565b60008261246a5761246a612485565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146124c757600080fd5b5056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465725374616d70733a206f776e657220717565727920666f72206e6f6e6578697374656e74207061636b4552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e36303563396262373033313566666436646364333934623634356137333937363866656235633763386365393766306133316464643365323030313033306666a2646970667358221220b7afd2b328ed5bff9ef3a77326f4e7ca29123d7cb243a48bb99b8df6df6e133b64736f6c63430008000033

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

0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000065374616d7073000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055354414d50000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Stamps
Arg [1] : symbol_ (string): STAMP

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [3] : 5374616d70730000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 5354414d50000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ 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.