ETH Price: $3,528.23 (+5.46%)

Token

The Forge (FORGE)
 

Overview

Max Total Supply

1,111 FORGE

Holders

344

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
coffeexcoin.eth
Balance
2 FORGE
0x86362a4c99d900d72d787ef1bdda38fd318aa5e9
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ForgeNFT

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion
File 1 of 10 : ForgeNFT.sol
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity 0.8.20;

import "./ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./IEscrow.sol";

contract ForgeNFT is ERC721A, Ownable, ReentrancyGuard {
    using Strings for uint256;

    string baseURI;

    /// @notice Max supply of Forge Token to be minted
    uint256 public constant MAX_SUPPLY = 5555;

    /// @notice Max supply of Forge Token to be minted using ERC-20
    uint256 public nonEthMaxSupply = 500;

    /// @notice Reserve amount for the Forge Token from escrow contract
    uint256 public reserveAmount = 506;

    /// @notice Public supply of token minted
    uint256 public publicSupply = MAX_SUPPLY - reserveAmount -  nonEthMaxSupply;

    /// @notice current supply of token minted using ERC-20
    uint256 public nonEthCurrentSupply = 0;

    /// @notice Max minting limit using ERC20 per wallet
    uint256 public nonEthMintLimit = 2;

    /// @notice Mint price for each tier
    uint256 public publicMintPrice = 0.065 ether;

    /// @notice Maximum mint per tier per wallet
    uint256[] public tierMaxSupply = [reserveAmount, publicSupply, nonEthMaxSupply];

    /// @notice Signer address for encrypted signatures
    address public secret;

    /// @notice Escrow contract address
    address public escrowAddress;

    /// @notice Public minting status
    bool public isPublicOpen = false;

    /// @notice Mapping for minted tokens per tier
    mapping(uint256 => uint256) public mintedPerTier;

    /// @notice Mapping for ERC20 token price
    mapping(address => uint256) public erc20Price;

    /// @notice Mapping for ERC20 token mint limit
    mapping(address => uint256) public erc20Limit;

    /// @notice Track ERC20 minted for each token
    mapping(address => uint256) public erc20Minted;

    /// @notice Track ETH minted for each tier per wallet
    mapping(address => mapping(uint256 => uint256)) public ethMintedPerTier;

    /// @notice Track ERC20 minted for each token per wallet
    mapping(address => mapping(address => uint256)) public nonEthMintedPerToken;

    /// @notice Check if the wallet claimed the free mint/escrow
    mapping(address => bool) public reserveClaimed;

    /// @notice Mapping for used signatures
    mapping(bytes => bool) public usedSignatures;

    struct PurchaseInfo {
        uint256 quantity;
        address paymentToken;
        uint256 priceOrTier;
        uint256 maxMintPerTier;
    }

    event Purchased(
        address operator,
        address user,
        uint256 currentSupply,
        PurchaseInfo[] purchases,
        uint256 timestamp
    );

    event Refunded(address user, uint256 tokenId);

    event Erc20TokenWhitelisted(address[] tokenAddresses, uint256[] prices, uint256[] limits);

    event MintLimitChanged(
        uint256 newReserveAmount,
        uint256 newPublicSupply,
        uint256 newNonEthMaxSupply,
        address operator
    );

    event Received(address, uint256);

    event MintPriceChanged(uint256);

    event EscrowAddresSet(address);

    /// @param _secret Signer address
    /// @param _escrowAddress Escrow contract address
    /// @dev Create ERC721A token: The Forge - FORGE
    constructor(address _secret, address _escrowAddress) ERC721A("The Forge", "FORGE") {
        secret = _secret;
        escrowAddress = _escrowAddress;        
    }

    receive() external payable {
        emit Received(msg.sender, msg.value);
    }

    /// @notice Check if the wallet is valid
    /// @dev Revert transaction if zero address
    modifier noZeroAddress(address _address) {
        require(_address != address(0), "Cannot send to zero address");
        _;
    }

    /// @notice Mint function is want to be called from etherscan
    /// @param quantity Amount of tokens to be minted
    /// @param paymentToken Address of the payment token
    /// @dev This function only works on public minting
    function mint(uint256 quantity,address paymentToken) external payable{      
        require(isPublicOpen, "mint: Public minting is not open"); 
       
        require(
            quantity > 0,
            "mint: Quantity must be more than zero"
        );
      
        if (paymentToken != address(0)){ 
            require(
                mintedPerTier[2] + quantity <= tierMaxSupply[2],
                "mint: Tier supply limit exceed"
            );   
            require(
                nonEthMintedPerToken[msg.sender][paymentToken] + quantity <= nonEthMintLimit,
                "mint: Exceed mint limit"
            );

            mintedPerTier[2] += quantity; 
            nonEthMintedPerToken[msg.sender][paymentToken] += quantity;             

            uint256 tokenPrice = erc20Price[paymentToken];

            require(
                tokenPrice > 0,
                "mint: Token not whitelisted"
            );      
          
            require(
                IERC20(paymentToken).transferFrom(
                    msg.sender,
                    address(this),
                   tokenPrice
                ),
                "mint: Token transfer failed"
            );            
        } else {                   
            require(
                mintedPerTier[1] + quantity <= tierMaxSupply[1],
                "mint: Tier supply limit exceed"
            );

            mintedPerTier[1] += quantity; 

            require(msg.value == publicMintPrice * quantity, "mint: Invalid ETH amount");
        }

        uint256 currentSupply = _totalMinted();

        require(
            currentSupply + quantity <= MAX_SUPPLY,
            "mint: Supply limit"
        );

        _safeMint(msg.sender, quantity);

        emit Purchased(
            msg.sender,
            msg.sender,
            currentSupply,
            new PurchaseInfo[](0),
            block.timestamp
        );
    }

    /// @notice Purchase an Forge NFT using whitelisted ECR20 tokens or ETH
    /// @param to Address to send the tokens
    /// @param totalQuantity Total amount of tokens to be minted
    /// @param purchases Array of PurchaseInfo struct
    /// @param signature Encrypted signature to verify the minting
    function purchase(
        address to,
        uint256 totalQuantity,
        PurchaseInfo[] memory purchases,
        bytes memory signature
    ) external payable {
        require(
            _verifyHashSignature(
                keccak256(abi.encode(to, purchases, msg.value)),
                signature
            ),
            "purchase: Signature is invalid"
        );

        uint256 currentSupply = _totalMinted();

        require(
            totalQuantity + currentSupply <= MAX_SUPPLY,
            "purchase: Supply limit"
        );        

        for (uint256 i = 0; i < purchases.length; i++) {
            PurchaseInfo memory purchaseInfo = purchases[i];

            _validateMintingParameters(
                to,
                purchaseInfo.paymentToken,
                purchaseInfo.priceOrTier,
                purchaseInfo.quantity,
                purchaseInfo.maxMintPerTier
            );
        }           

        _safeMint(to, totalQuantity);

        emit Purchased(
            msg.sender,
            to,
            currentSupply,
            purchases,
            block.timestamp
        );
    }

    /// INTERNAL FUNCTIONS

    /// @notice Check if the wallet has claimed the escrow reserve and claim it if not
    /// @param to Address to check
    function _checkEscrow(address to) internal {
        require(
            escrowAddress != address(0),
            "_checkEscrow: Escrow address not set"
        );
        require(
            !reserveClaimed[to],
            "_checkEscrow: Reserve already claimed"
        );

        reserveClaimed[to] = true;

        IEscrow escrow = IEscrow(escrowAddress);
        IEscrow.NftReserve memory nftReserve = escrow.nftReserveAmount(to);

        if (nftReserve.publicReserved > 0 || nftReserve.coFounderReserved > 0) {
            escrow.claimFor(to);           
        }
    }

    function _validateMintingParameters(
        address to,
        address tokenAddress,
        uint256 priceOrTier,
        uint256 quantity,
        uint256 maxMintPerTier
    ) internal {
        if(priceOrTier == 0){
          _checkEscrow(to);
        }

        if (tokenAddress == address(0)) {
            if(priceOrTier != 2){
                require(
                    ethMintedPerTier[to][priceOrTier] + quantity <= maxMintPerTier,
                    "_validateMintingParameters: Exceed tier mint limit"
                );

                ethMintedPerTier[to][priceOrTier] += quantity;
            }

            require(
                mintedPerTier[priceOrTier] + quantity <= tierMaxSupply[priceOrTier],
                "_validateMintingParameters: Tier supply limit exceed"
            );

            mintedPerTier[priceOrTier] += quantity;          
        } else {           
            // require that to has at least 1 NFT already minted
            require(
                balanceOf(to) > 0 || msg.value > 0,
                "_validateMintingParameters: User has no NFT"
            );          
            require(
               nonEthMintedPerToken[to][tokenAddress] + quantity <= nonEthMintLimit,
                "_validateMintingParameters: Exceed mint limit"
            );            
            require(
                erc20Minted[tokenAddress] + quantity <= erc20Limit[tokenAddress],
                "_validateMintingParameters: Exceed ERC-20 mint limit"
            );
            require(
                mintedPerTier[2] + quantity <= tierMaxSupply[2],
                "_validateMintingParameters: Tier supply limit exceed"
            );

            nonEthMintedPerToken[to][tokenAddress] += quantity;
            erc20Minted[tokenAddress] += quantity;               
            mintedPerTier[2] += quantity;               
           
            require(
                IERC20(tokenAddress).transferFrom(
                    msg.sender,
                    address(this),
                    priceOrTier
                ),
                "_validateMintingParameters: Token transfer failed"
            );                   
        }
    }

    /// @notice Verify that message is signed by secret wallet
    function _verifyHashSignature(
        bytes32 freshHash,
        bytes memory signature
    ) internal view returns (bool) {
        bytes32 hash = keccak256(
            abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash)
        );

        bytes32 r;
        bytes32 s;
        uint8 v;

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

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

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

    /// OWNABLE FUNCTIONS

    /// @notice Set the mint limit for each tier
    /// @param newReserveAmount New reserve amount
    /// @param newPublicSupply New public supply
    /// @param newNonEthMaxSupply New non-ETH max supply
    /// @dev Safety check to prevent supply limit exceed
    function setMintLimit(
        uint256 newReserveAmount,
        uint256 newPublicSupply,
        uint256 newNonEthMaxSupply
    ) external onlyOwner {
        require(
            newReserveAmount + newPublicSupply + newNonEthMaxSupply == MAX_SUPPLY,
            "setMintLimit: Invalid supply"
        );

        uint256 currentReserveMinted = mintedPerTier[0];
        uint256 currentPublicMinted = mintedPerTier[1];
        uint256 currentNonEthMinted = mintedPerTier[2];

        require(
            newReserveAmount >= currentReserveMinted,
            "setMintLimit: New reserve amount is less than current minted"
        );
        require(
            newPublicSupply >= currentPublicMinted,
            "setMintLimit: New public supply is less than current minted"
        );
        require(
            newNonEthMaxSupply >= currentNonEthMinted,
            "setMintLimit: New non-ETH max supply is less than current minted"
        );

        reserveAmount = newReserveAmount;
        publicSupply = newPublicSupply;
        nonEthMaxSupply = newNonEthMaxSupply;

        emit MintLimitChanged(
            newReserveAmount,
            newPublicSupply,
            newNonEthMaxSupply,
            msg.sender
        );
    }

    /// @notice Set ERC20 token price and mint limit
    /// @param tokenAddresses Addresses of the tokens to be set
    /// @param prices Prices of the tokens to be set
    /// @param limits Limits of the tokens to be set
    /// @dev Can only be called by the contract owner
    function setErc20TokenWhitelist(
        address[] memory tokenAddresses,
        uint256[] memory prices,
        uint256[] memory limits
    ) external onlyOwner {
        require(
            tokenAddresses.length == prices.length &&
                tokenAddresses.length == limits.length,
            "setErc20TokenWhitelist: Invalid input"
        );

        for (uint256 i = 0; i < tokenAddresses.length; i++) {
            erc20Price[tokenAddresses[i]] = prices[i];
            erc20Limit[tokenAddresses[i]] = limits[i];
        }

        emit Erc20TokenWhitelisted(tokenAddresses, prices, limits);
    }

    /// @notice Set the mint price for public minting
    /// @param price New mint price
    /// @dev Can only be called by the contract owner
    function setPublicMintPrice(uint256 price) external onlyOwner {
        publicMintPrice = price;

        emit MintPriceChanged(price);
    }

    /// @notice Set the escrow contract address
    /// @param escrowAddress Address of the escrow contract
    /// @dev Can only be called by the contract owner
    function setEscrowAddress(address escrowAddress) external onlyOwner {
        require(
            escrowAddress != address(0),
            "setEscrowAddress: Zero address"
        );

        escrowAddress = escrowAddress;

        emit EscrowAddresSet(escrowAddress);
    }

    /// @notice Change the Base URI
    /// @param newURI new URI to be set
    /// @dev Can only be called by the contract owner
    function setBaseURI(string memory newURI) external onlyOwner {
        baseURI = newURI;
    }

    /// @notice Change the signer address
    /// @param secretAddress new signer for encrypted signatures
    /// @dev Can only be called by the contract owner
    function setSecret(
        address secretAddress
    ) external onlyOwner noZeroAddress(secretAddress) {
        secret = secretAddress;
    }

    /// @notice Send ETH to specific address
    /// @param to Address to send the funds
    /// @param amount ETH amount to be sent
    /// @dev Can only be called by the contract owner
    function withdrawETH(
        address to,
        uint256 amount
    ) public nonReentrant onlyOwner noZeroAddress(to) {
        require(amount <= address(this).balance, "Insufficient funds");

        (bool success, ) = to.call{value: amount}("");

        require(success, "withdrawETH: ETH transfer failed");
    }

    /// @notice Send ERC20 tokens to specific address
    /// @param to Address to send the funds
    /// @param tokenAddresses Addresses of the tokens to be sent
    /// @dev Can only be called by the contract owner
    function withdrawERC20(
        address to,
        address[] memory tokenAddresses
    ) public nonReentrant onlyOwner noZeroAddress(to) {
        for (uint256 i = 0; i < tokenAddresses.length; i++) {
            IERC20 token = IERC20(tokenAddresses[i]);
            uint256 balance = token.balanceOf(address(this));

            require(balance > 0, "withdrawERC20: Insufficient funds");

            require(
                token.transfer(to, balance),
                "withdrawERC20: Token transfer failed"
            );             
        }
    }

    function setIsPublicOpen(bool status) external onlyOwner {
        isPublicOpen = status;
    }

    /// VIEW FUNCTIONS

    /// @notice Return total minted amount
    function minted() external view returns (uint256) {
        return _totalMinted();
    }

    /// @notice Return Base URI
    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    /// @notice Inherit from ERC721, return token URI, revert is tokenId doesn't exist
    function tokenURI(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        require(
            _exists(tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );

        return string(abi.encodePacked(baseURI, tokenId.toString()));
    }

    /// @notice Inherit from ERC721, checks if a token exists
    function exists(uint256 tokenId) external view returns (bool) {
        return _exists(tokenId);
    }
}

File 2 of 10 : IEscrow.sol
pragma solidity ^0.8.20;

interface IEscrow { 
    struct NftReserve {
        uint256 publicReserved;
        uint256 coFounderReserved;
        uint256 price;
    }

    function nftReserveAmount(address) external view returns (NftReserve memory);

    function claimFor(address _account) external;
}

File 3 of 10 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

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

    // ==============================
    //            IERC721
    // ==============================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

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

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

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

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

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

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

    // ==============================
    //        IERC721Metadata
    // ==============================

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

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

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

File 4 of 10 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "./IERC721A.sol";

/**
 * @dev ERC721 token receiver interface.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Mask of an entry in packed address data.
    uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The tokenId of the next token to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See `_packedOwnershipOf` implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 1;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see `_totalMinted`.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to `_startTokenId()`
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes of the XOR of
        // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165
        // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (_addressToUint256(owner) == 0) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return
            (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) &
            BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return
            (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) &
            BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> BITPOS_AUX);
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        assembly {
            // Cast aux without masking.
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(
        uint256 tokenId
    ) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(
        uint256 packed
    ) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);
        ownership.burned = packed & BITMASK_BURNED != 0;
    }

    /**
     * Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(
        uint256 index
    ) internal view returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(
        uint256 tokenId
    ) internal view returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

    /**
     * @dev Casts the address to uint256 without masking.
     */
    function _addressToUint256(
        address value
    ) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev Casts the boolean to uint256 without branching.
     */
    function _boolToUint256(bool value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = address(uint160(_packedOwnershipOf(tokenId)));
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(
        uint256 tokenId
    ) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(
        address operator,
        bool approved
    ) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _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 {
        _transfer(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (_addressToUint256(to) == 0) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] +=
                quantity *
                ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.code.length != 0) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (
                        !_checkContractOnERC721Received(
                            address(0),
                            to,
                            updatedIndex++,
                            _data
                        )
                    ) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (_addressToUint256(to) == 0) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] +=
                quantity *
                ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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) private {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from)
            revert TransferFromIncorrectOwner();

        address approvedAddress = _tokenApprovals[tokenId];

        bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
            isApprovedForAll(from, _msgSenderERC721A()) ||
            approvedAddress == _msgSenderERC721A());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (_addressToUint256(to) == 0) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        if (_addressToUint256(approvedAddress) != 0) {
            delete _tokenApprovals[tokenId];
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

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

        address from = address(uint160(prevOwnershipPacked));
        address approvedAddress = _tokenApprovals[tokenId];

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
                isApprovedForAll(from, _msgSenderERC721A()) ||
                approvedAddress == _msgSenderERC721A());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        if (_addressToUint256(approvedAddress) != 0) {
            delete _tokenApprovals[tokenId];
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED |
                BITMASK_NEXT_INITIALIZED;

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try
            ERC721A__IERC721Receiver(to).onERC721Received(
                _msgSenderERC721A(),
                from,
                tokenId,
                _data
            )
        returns (bytes4 retval) {
            return
                retval ==
                ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function _toString(
        uint256 value
    ) internal pure returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

            // Cache the end of the memory to calculate the length later.
            let end := ptr

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for {
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp {
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } {
                // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }

            let length := sub(end, ptr)
            // Move the pointer 32 bytes leftwards to make room for the length.
            ptr := sub(ptr, 32)
            // Store the length.
            mstore(ptr, length)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 6 of 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 8 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 9 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_secret","type":"address"},{"internalType":"address","name":"_escrowAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokenAddresses","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"prices","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"limits","type":"uint256[]"}],"name":"Erc20TokenWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"EscrowAddresSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newReserveAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPublicSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newNonEthMaxSupply","type":"uint256"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"MintLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"MintPriceChanged","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":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"currentSupply","type":"uint256"},{"components":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"priceOrTier","type":"uint256"},{"internalType":"uint256","name":"maxMintPerTier","type":"uint256"}],"indexed":false,"internalType":"struct ForgeNFT.PurchaseInfo[]","name":"purchases","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Purchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Refunded","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_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"","type":"address"}],"name":"erc20Limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"erc20Minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"erc20Price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"escrowAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ethMintedPerTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedPerTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonEthCurrentSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonEthMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonEthMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"nonEthMintedPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"publicMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"totalQuantity","type":"uint256"},{"components":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"priceOrTier","type":"uint256"},{"internalType":"uint256","name":"maxMintPerTier","type":"uint256"}],"internalType":"struct ForgeNFT.PurchaseInfo[]","name":"purchases","type":"tuple[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secret","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenAddresses","type":"address[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"},{"internalType":"uint256[]","name":"limits","type":"uint256[]"}],"name":"setErc20TokenWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"escrowAddress","type":"address"}],"name":"setEscrowAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setIsPublicOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newReserveAmount","type":"uint256"},{"internalType":"uint256","name":"newPublicSupply","type":"uint256"},{"internalType":"uint256","name":"newNonEthMaxSupply","type":"uint256"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPublicMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"secretAddress","type":"address"}],"name":"setSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tierMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"bytes","name":"","type":"bytes"}],"name":"usedSignatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address[]","name":"tokenAddresses","type":"address[]"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526101f4600b8190556101fa600c81905562000022906115b362000213565b6200002e919062000213565b600d555f600e556002600f5566e6ed27d66680006010556040518060600160405280600c548152602001600d548152602001600b54815250601190600362000078929190620001af565b506013805460ff60a01b1916905534801562000092575f80fd5b5060405162003ccf38038062003ccf833981016040819052620000b59162000255565b6040518060400160405280600981526020016854686520466f72676560b81b81525060405180604001604052806005815260200164464f52474560d81b81525081600290816200010691906200032b565b5060036200011582826200032b565b505060015f555062000127336200015e565b6001600955601280546001600160a01b039384166001600160a01b03199182161790915560138054929093169116179055620003f3565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b828054828255905f5260205f20908101928215620001eb579160200282015b82811115620001eb578251825591602001919060010190620001ce565b50620001f9929150620001fd565b5090565b5b80821115620001f9575f8155600101620001fe565b818103818111156200023357634e487b7160e01b5f52601160045260245ffd5b92915050565b80516001600160a01b038116811462000250575f80fd5b919050565b5f806040838503121562000267575f80fd5b620002728362000239565b9150620002826020840162000239565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b600181811c90821680620002b457607f821691505b602082108103620002d357634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000326575f81815260208120601f850160051c81016020861015620003015750805b601f850160051c820191505b8181101562000322578281556001016200030d565b5050505b505050565b81516001600160401b038111156200034757620003476200028b565b6200035f816200035884546200029f565b84620002d9565b602080601f83116001811462000395575f84156200037d5750858301515b5f19600386901b1c1916600185901b17855562000322565b5f85815260208120601f198616915b82811015620003c557888601518255948401946001909101908401620003a4565b5085821015620003e357878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6138ce80620004015f395ff3fe6080604052600436106102a8575f3560e01c80637192e1111161016f578063a78bf96e116100d8578063d1efd30d11610092578063e949580e1161006d578063e949580e14610887578063e985e9c5146108c1578063e9a7484c146108e0578063f2fde38b146108ff575f80fd5b8063d1efd30d14610834578063dc53fd9214610853578063ddeb63b514610868575f80fd5b8063a78bf96e14610778578063ac26558d14610797578063b5b7f85e146107ac578063b88d4fde146107d7578063c87b56dd146107f6578063c97d938714610815575f80fd5b80639218c319116101295780639218c319146106d357806394bf804d146106e857806395d89b41146106fb5780639cc7e6341461070f5780639d2dcde71461073a578063a22cb46514610759575f80fd5b80637192e111146105ed5780637b43c3981461060c5780638b24316d1461061f5780638da5cb5b146106555780638f4efe1c1461067257806390a85ee01461069d575f80fd5b806342842e0e116102115780635cbe3b83116101cb5780635cbe3b83146105485780635d82cf6e146105675780635e84d723146105865780636352211e1461059b57806370a08231146105ba578063715018a6146105d9575f80fd5b806342842e0e146104a15780634782f779146104c05780634b09b72a146104df5780634f02c420146104f45780634f558e791461050a57806355f804b314610529575f80fd5b806311c67efc1161026257806311c67efc146103e557806316ace63f1461040557806318160ddd146104285780631f150ea41461044257806323b872dd1461046d57806332cb6b0c1461048c575f80fd5b806301ffc9a7146102eb57806306fdde031461031f57806307aa885414610340578063081812fc1461036e578063095ea7b3146103a55780630d5defa4146103c6575f80fd5b366102e757604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b5f80fd5b3480156102f6575f80fd5b5061030a610305366004612cf5565b61091e565b60405190151581526020015b60405180910390f35b34801561032a575f80fd5b5061033361096f565b6040516103169190612d5d565b34801561034b575f80fd5b5061030a61035a366004612d8a565b601a6020525f908152604090205460ff1681565b348015610379575f80fd5b5061038d610388366004612da3565b6109ff565b6040516001600160a01b039091168152602001610316565b3480156103b0575f80fd5b506103c46103bf366004612dba565b610a41565b005b3480156103d1575f80fd5b5060135461038d906001600160a01b031681565b3480156103f0575f80fd5b5060135461030a90600160a01b900460ff1681565b348015610410575f80fd5b5061041a600b5481565b604051908152602001610316565b348015610433575f80fd5b506001545f54035f190161041a565b34801561044d575f80fd5b5061041a61045c366004612d8a565b60176020525f908152604090205481565b348015610478575f80fd5b506103c4610487366004612de2565b610b11565b348015610497575f80fd5b5061041a6115b381565b3480156104ac575f80fd5b506103c46104bb366004612de2565b610b21565b3480156104cb575f80fd5b506103c46104da366004612dba565b610b3b565b3480156104ea575f80fd5b5061041a600c5481565b3480156104ff575f80fd5b505f545f190161041a565b348015610515575f80fd5b5061030a610524366004612da3565b610c6f565b348015610534575f80fd5b506103c4610543366004612edb565b610c79565b348015610553575f80fd5b506103c4610562366004613008565b610c8d565b348015610572575f80fd5b506103c4610581366004612da3565b610e14565b348015610591575f80fd5b5061041a600d5481565b3480156105a6575f80fd5b5061038d6105b5366004612da3565b610e58565b3480156105c5575f80fd5b5061041a6105d4366004612d8a565b610e62565b3480156105e4575f80fd5b506103c4610ea7565b3480156105f8575f80fd5b506103c4610607366004613089565b610eba565b6103c461061a3660046130d0565b611145565b34801561062a575f80fd5b5061041a6106393660046131db565b601960209081525f928352604080842090915290825290205481565b348015610660575f80fd5b506008546001600160a01b031661038d565b34801561067d575f80fd5b5061041a61068c366004612da3565b60146020525f908152604090205481565b3480156106a8575f80fd5b5061041a6106b7366004612dba565b601860209081525f928352604080842090915290825290205481565b3480156106de575f80fd5b5061041a600f5481565b6103c46106f636600461320c565b6112c6565b348015610706575f80fd5b50610333611866565b34801561071a575f80fd5b5061041a610729366004612d8a565b60166020525f908152604090205481565b348015610745575f80fd5b506103c461075436600461322d565b611875565b348015610764575f80fd5b506103c4610773366004613284565b611a78565b348015610783575f80fd5b5061041a610792366004612da3565b611b0c565b3480156107a2575f80fd5b5061041a600e5481565b3480156107b7575f80fd5b5061041a6107c6366004612d8a565b60156020525f908152604090205481565b3480156107e2575f80fd5b506103c46107f13660046132b9565b611b2b565b348015610801575f80fd5b50610333610810366004612da3565b611b75565b348015610820575f80fd5b506103c461082f366004613310565b611c16565b34801561083f575f80fd5b5060125461038d906001600160a01b031681565b34801561085e575f80fd5b5061041a60105481565b348015610873575f80fd5b506103c4610882366004612d8a565b611c3c565b348015610892575f80fd5b5061030a6108a136600461332b565b8051602081830181018051601b8252928201919093012091525460ff1681565b3480156108cc575f80fd5b5061030a6108db3660046131db565b611cd3565b3480156108eb575f80fd5b506103c46108fa366004612d8a565b611d00565b34801561090a575f80fd5b506103c4610919366004612d8a565b611d52565b5f6301ffc9a760e01b6001600160e01b03198316148061094e57506380ac58cd60e01b6001600160e01b03198316145b806109695750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461097e9061335c565b80601f01602080910402602001604051908101604052809291908181526020018280546109aa9061335c565b80156109f55780601f106109cc576101008083540402835291602001916109f5565b820191905f5260205f20905b8154815290600101906020018083116109d857829003601f168201915b5050505050905090565b5f610a0982611dcb565b610a26576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610a4b82611dfd565b9050806001600160a01b0316836001600160a01b031603610a7f5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610ab657610a998133611cd3565b610ab6576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610b1c838383611e6d565b505050565b610b1c83838360405180602001604052805f815250611b2b565b610b4361201e565b610b4b612077565b816001600160a01b038116610b7b5760405162461bcd60e51b8152600401610b7290613394565b60405180910390fd5b47821115610bc05760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610b72565b5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610c09576040519150601f19603f3d011682016040523d82523d5f602084013e610c0e565b606091505b5050905080610c5f5760405162461bcd60e51b815260206004820181905260248201527f77697468647261774554483a20455448207472616e73666572206661696c65646044820152606401610b72565b5050610c6b6001600955565b5050565b5f61096982611dcb565b610c81612077565b600a610c6b8282613410565b610c95612077565b81518351148015610ca7575080518351145b610d015760405162461bcd60e51b815260206004820152602560248201527f7365744572633230546f6b656e57686974656c6973743a20496e76616c6964206044820152641a5b9c1d5d60da1b6064820152608401610b72565b5f5b8351811015610dd357828181518110610d1e57610d1e6134cb565b602002602001015160155f868481518110610d3b57610d3b6134cb565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550818181518110610d7857610d786134cb565b602002602001015160165f868481518110610d9557610d956134cb565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f20819055508080610dcb906134f3565b915050610d03565b507f47a29f7b95e9428e4ad7fd5b9e844cba196a37a63a8560e093a6092e156b0492838383604051610e0793929190613544565b60405180910390a1505050565b610e1c612077565b60108190556040518181527f25b1f9f6b6e61dfca5575239769e4450ed2e49176670837f5d1a82a9a2fc693f906020015b60405180910390a150565b5f61096982611dfd565b5f815f03610e83576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b610eaf612077565b610eb85f6120d1565b565b610ec2612077565b6115b381610ed084866135b8565b610eda91906135b8565b14610f275760405162461bcd60e51b815260206004820152601c60248201527f7365744d696e744c696d69743a20496e76616c696420737570706c79000000006044820152606401610b72565b60146020527f4f26c3876aa9f4b92579780beea1161a61f87ebf1ec6ee865b299e447ecba99c547fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c5460025f525f805160206138798339815191525482861015610ff95760405162461bcd60e51b815260206004820152603c60248201527f7365744d696e744c696d69743a204e6577207265736572766520616d6f756e7460448201527f206973206c657373207468616e2063757272656e74206d696e746564000000006064820152608401610b72565b8185101561106f5760405162461bcd60e51b815260206004820152603b60248201527f7365744d696e744c696d69743a204e6577207075626c696320737570706c792060448201527f6973206c657373207468616e2063757272656e74206d696e74656400000000006064820152608401610b72565b808410156110e7576040805162461bcd60e51b81526020600482015260248101919091527f7365744d696e744c696d69743a204e6577206e6f6e2d455448206d617820737560448201527f70706c79206973206c657373207468616e2063757272656e74206d696e7465646064820152608401610b72565b600c869055600d859055600b84905560408051878152602081018790529081018590523360608201527f30faad65c7f583308ef778354075d9d06fafbce424fc9cf12827c2d83772fb139060800160405180910390a1505050505050565b61117984833460405160200161115d93929190613622565b6040516020818303038152906040528051906020012082612122565b6111c55760405162461bcd60e51b815260206004820152601e60248201527f70757263686173653a205369676e617475726520697320696e76616c696400006044820152606401610b72565b5f545f19016115b36111d782866135b8565b111561121e5760405162461bcd60e51b81526020600482015260166024820152751c1d5c98da185cd94e8814dd5c1c1b1e481b1a5b5a5d60521b6044820152606401610b72565b5f5b8351811015611275575f84828151811061123c5761123c6134cb565b602002602001015190506112628782602001518360400151845f01518560600151612248565b508061126d816134f3565b915050611220565b50611280858561273c565b7f88b95a1c09cd1798f3b6f39d1c5b76273c9709eb4d1c2e94b6af327703aadc7233868386426040516112b7959493929190613655565b60405180910390a15050505050565b601354600160a01b900460ff1661131f5760405162461bcd60e51b815260206004820181905260248201527f6d696e743a205075626c6963206d696e74696e67206973206e6f74206f70656e6044820152606401610b72565b5f821161137c5760405162461bcd60e51b815260206004820152602560248201527f6d696e743a205175616e74697479206d757374206265206d6f7265207468616e604482015264207a65726f60d81b6064820152608401610b72565b6001600160a01b0381161561162c57601160028154811061139f5761139f6134cb565b5f9182526020808320909101546002909252601490525f80516020613879833981519152546113cf9084906135b8565b111561141d5760405162461bcd60e51b815260206004820152601e60248201527f6d696e743a205469657220737570706c79206c696d69742065786365656400006044820152606401610b72565b600f54335f9081526019602090815260408083206001600160a01b038616845290915290205461144e9084906135b8565b111561149c5760405162461bcd60e51b815260206004820152601760248201527f6d696e743a20457863656564206d696e74206c696d69740000000000000000006044820152606401610b72565b60025f90815260146020525f8051602061387983398151915280548492906114c59084906135b8565b9091555050335f9081526019602090815260408083206001600160a01b0385168452909152812080548492906114fc9084906135b8565b90915550506001600160a01b0381165f90815260156020526040902054806115665760405162461bcd60e51b815260206004820152601b60248201527f6d696e743a20546f6b656e206e6f742077686974656c697374656400000000006044820152606401610b72565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064016020604051808303815f875af11580156115b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115da9190613699565b6116265760405162461bcd60e51b815260206004820152601b60248201527f6d696e743a20546f6b656e207472616e73666572206661696c656400000000006044820152606401610b72565b5061176e565b6011600181548110611640576116406134cb565b5f9182526020808320909101546001909252601490527fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c546116839084906135b8565b11156116d15760405162461bcd60e51b815260206004820152601e60248201527f6d696e743a205469657220737570706c79206c696d69742065786365656400006044820152606401610b72565b60015f90815260146020527fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c805484929061170d9084906135b8565b90915550506010546117209083906136b4565b341461176e5760405162461bcd60e51b815260206004820152601860248201527f6d696e743a20496e76616c69642045544820616d6f756e7400000000000000006044820152606401610b72565b5f545f19016115b361178084836135b8565b11156117c35760405162461bcd60e51b81526020600482015260126024820152711b5a5b9d0e8814dd5c1c1b1e481b1a5b5a5d60721b6044820152606401610b72565b6117cd338461273c565b7f88b95a1c09cd1798f3b6f39d1c5b76273c9709eb4d1c2e94b6af327703aadc723380835f60405190808252806020026020018201604052801561185357816020015b61184060405180608001604052805f81526020015f6001600160a01b031681526020015f81526020015f81525090565b8152602001906001900390816118105790505b5042604051610e07959493929190613655565b60606003805461097e9061335c565b61187d61201e565b611885612077565b816001600160a01b0381166118ac5760405162461bcd60e51b8152600401610b7290613394565b5f5b8251811015610c5f575f8382815181106118ca576118ca6134cb565b60209081029190910101516040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa15801561191c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061194091906136cb565b90505f811161199b5760405162461bcd60e51b815260206004820152602160248201527f776974686472617745524332303a20496e73756666696369656e742066756e646044820152607360f81b6064820152608401610b72565b60405163a9059cbb60e01b81526001600160a01b0387811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af11580156119e7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a0b9190613699565b611a635760405162461bcd60e51b8152602060048201526024808201527f776974686472617745524332303a20546f6b656e207472616e736665722066616044820152631a5b195960e21b6064820152608401610b72565b50508080611a70906134f3565b9150506118ae565b336001600160a01b03831603611aa15760405163b06307db60e01b815260040160405180910390fd5b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60118181548110611b1b575f80fd5b5f91825260209091200154905081565b611b36848484611e6d565b6001600160a01b0383163b15611b6f57611b5284848484612755565b611b6f576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060611b8082611dcb565b611be45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b72565b600a611bef8361283d565b604051602001611c009291906136e2565b6040516020818303038152906040529050919050565b611c1e612077565b60138054911515600160a01b0260ff60a01b19909216919091179055565b611c44612077565b6001600160a01b038116611c9a5760405162461bcd60e51b815260206004820152601e60248201527f736574457363726f77416464726573733a205a65726f206164647265737300006044820152606401610b72565b6040516001600160a01b03821681527f439a280b3683fc516da23f193ff8372b78c11c2e27aabcc7d99e6d029acfab3d90602001610e4d565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611d08612077565b806001600160a01b038116611d2f5760405162461bcd60e51b8152600401610b7290613394565b50601280546001600160a01b0319166001600160a01b0392909216919091179055565b611d5a612077565b6001600160a01b038116611dbf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b72565b611dc8816120d1565b50565b5f81600111158015611ddd57505f5482105b80156109695750505f90815260046020526040902054600160e01b161590565b5f8180600111611e54575f54811015611e54575f8181526004602052604081205490600160e01b82169003611e52575b805f03611e4b57505f19015f81815260046020526040902054611e2d565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b5f611e7782611dfd565b9050836001600160a01b0316816001600160a01b031614611eaa5760405162a1148160e81b815260040160405180910390fd5b5f828152600660205260408120546001600160a01b0390811691908616331480611ed95750611ed98633611cd3565b80611eec57506001600160a01b03821633145b905080611f0c57604051632ce44b5f60e11b815260040160405180910390fd5b845f03611f2c57604051633a954ecd60e21b815260040160405180910390fd5b8115611f4e575f84815260066020526040902080546001600160a01b03191690555b6001600160a01b038681165f90815260056020908152604080832080545f1901905592881682528282208054600101905586825260049052908120600160e11b4260a01b8817811790915584169003611fd457600184015f818152600460205260408120549003611fd2575f548114611fd2575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6002600954036120705760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b72565b6002600955565b6008546001600160a01b03163314610eb85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b72565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f8551604114612189575f945050505050610969565b5050506020830151604084015160608501515f1a601b8110156121b4576121b1601b82613765565b90505b5f8160ff16601b14806121ca57508160ff16601c145b1561222c57604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561221f573d5f803e3d5ffd5b5050506020604051035190505b6012546001600160a01b03918216911614979650505050505050565b825f0361225857612258856128cc565b6001600160a01b0384166123be578260021461233f576001600160a01b0385165f908152601860209081526040808320868452909152902054819061229e9084906135b8565b11156123075760405162461bcd60e51b815260206004820152603260248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20457863656044820152711959081d1a595c881b5a5b9d081b1a5b5a5d60721b6064820152608401610b72565b6001600160a01b0385165f908152601860209081526040808320868452909152812080548492906123399084906135b8565b90915550505b60118381548110612352576123526134cb565b905f5260205f2001548260145f8681526020019081526020015f205461237891906135b8565b11156123965760405162461bcd60e51b8152600401610b729061377e565b5f83815260146020526040812080548492906123b39084906135b8565b909155506127359050565b5f6123c886610e62565b11806123d357505f34115b6124335760405162461bcd60e51b815260206004820152602b60248201527f5f76616c69646174654d696e74696e67506172616d65746572733a205573657260448201526a081a185cc81b9bc813919560aa1b6064820152608401610b72565b600f546001600160a01b038087165f908152601960209081526040808320938916835292905220546124669084906135b8565b11156124ca5760405162461bcd60e51b815260206004820152602d60248201527f5f76616c69646174654d696e74696e67506172616d65746572733a204578636560448201526c1959081b5a5b9d081b1a5b5a5d609a1b6064820152608401610b72565b6001600160a01b0384165f908152601660209081526040808320546017909252909120546124f99084906135b8565b11156125645760405162461bcd60e51b815260206004820152603460248201527f5f76616c69646174654d696e74696e67506172616d65746572733a2045786365604482015273195908115490cb4c8c081b5a5b9d081b1a5b5a5d60621b6064820152608401610b72565b6011600281548110612578576125786134cb565b5f9182526020808320909101546002909252601490525f80516020613879833981519152546125a89084906135b8565b11156125c65760405162461bcd60e51b8152600401610b729061377e565b6001600160a01b038086165f908152601960209081526040808320938816835292905290812080548492906125fc9084906135b8565b90915550506001600160a01b0384165f90815260176020526040812080548492906126289084906135b8565b909155505060025f90815260146020525f8051602061387983398151915280548492906126569084906135b8565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038516906323b872dd906064016020604051808303815f875af11580156126ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126cf9190613699565b6127355760405162461bcd60e51b815260206004820152603160248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20546f6b656044820152701b881d1c985b9cd9995c8819985a5b1959607a1b6064820152608401610b72565b5050505050565b610c6b828260405180602001604052805f815250612aa5565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a02906127899033908990889088906004016137d2565b6020604051808303815f875af19250505080156127c3575060408051601f3d908101601f191682019092526127c091810190613804565b60015b61281f573d8080156127f0576040519150601f19603f3d011682016040523d82523d5f602084013e6127f5565b606091505b5080515f03612817576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60605f61284983612c09565b60010190505f816001600160401b0381111561286757612867612e1b565b6040519080825280601f01601f191660200182016040528015612891576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461289b57509392505050565b6013546001600160a01b03166129305760405162461bcd60e51b8152602060048201526024808201527f5f636865636b457363726f773a20457363726f772061646472657373206e6f74604482015263081cd95d60e21b6064820152608401610b72565b6001600160a01b0381165f908152601a602052604090205460ff16156129a65760405162461bcd60e51b815260206004820152602560248201527f5f636865636b457363726f773a205265736572766520616c726561647920636c604482015264185a5b595960da1b6064820152608401610b72565b6001600160a01b038181165f818152601a6020526040808220805460ff19166001179055601354905163bbe9143d60e01b815260048101939093529092169190829063bbe9143d90602401606060405180830381865afa158015612a0c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a30919061381f565b8051909150151580612a4557505f8160200151115b15610b1c5760405163ddeae03360e01b81526001600160a01b03848116600483015283169063ddeae033906024015f604051808303815f87803b158015612a8a575f80fd5b505af1158015612a9c573d5f803e3d5ffd5b50505050505050565b5f54835f03612ac657604051622e076360e81b815260040160405180910390fd5b825f03612ae65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0384165f8181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b15612bb6575b60405182906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612b815f878480600101955087612755565b612b9e576040516368d2bf6b60e11b815260040160405180910390fd5b808210612b3857825f5414612bb1575f80fd5b612bfa565b5b6040516001830192906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612bb7575b505f908155611b6f9085838684565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612c475772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612c73576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612c9157662386f26fc10000830492506010015b6305f5e1008310612ca9576305f5e100830492506008015b6127108310612cbd57612710830492506004015b60648310612ccf576064830492506002015b600a83106109695760010192915050565b6001600160e01b031981168114611dc8575f80fd5b5f60208284031215612d05575f80fd5b8135611e4b81612ce0565b5f5b83811015612d2a578181015183820152602001612d12565b50505f910152565b5f8151808452612d49816020860160208601612d10565b601f01601f19169290920160200192915050565b602081525f611e4b6020830184612d32565b80356001600160a01b0381168114612d85575f80fd5b919050565b5f60208284031215612d9a575f80fd5b611e4b82612d6f565b5f60208284031215612db3575f80fd5b5035919050565b5f8060408385031215612dcb575f80fd5b612dd483612d6f565b946020939093013593505050565b5f805f60608486031215612df4575f80fd5b612dfd84612d6f565b9250612e0b60208501612d6f565b9150604084013590509250925092565b634e487b7160e01b5f52604160045260245ffd5b604051608081016001600160401b0381118282101715612e5157612e51612e1b565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612e7f57612e7f612e1b565b604052919050565b5f6001600160401b03831115612e9f57612e9f612e1b565b612eb2601f8401601f1916602001612e57565b9050828152838383011115612ec5575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215612eeb575f80fd5b81356001600160401b03811115612f00575f80fd5b8201601f81018413612f10575f80fd5b61283584823560208401612e87565b5f6001600160401b03821115612f3757612f37612e1b565b5060051b60200190565b5f82601f830112612f50575f80fd5b81356020612f65612f6083612f1f565b612e57565b82815260059290921b84018101918181019086841115612f83575f80fd5b8286015b84811015612fa557612f9881612d6f565b8352918301918301612f87565b509695505050505050565b5f82601f830112612fbf575f80fd5b81356020612fcf612f6083612f1f565b82815260059290921b84018101918181019086841115612fed575f80fd5b8286015b84811015612fa55780358352918301918301612ff1565b5f805f6060848603121561301a575f80fd5b83356001600160401b0380821115613030575f80fd5b61303c87838801612f41565b94506020860135915080821115613051575f80fd5b61305d87838801612fb0565b93506040860135915080821115613072575f80fd5b5061307f86828701612fb0565b9150509250925092565b5f805f6060848603121561309b575f80fd5b505081359360208301359350604090920135919050565b5f82601f8301126130c1575f80fd5b611e4b83833560208501612e87565b5f805f8060808086880312156130e4575f80fd5b6130ed86612d6f565b945060208087013594506040808801356001600160401b0380821115613111575f80fd5b818a0191508a601f830112613124575f80fd5b8135613132612f6082612f1f565b81815260079190911b8301850190858101908d831115613150575f80fd5b938601935b828510156131a85787858f03121561316c575f8081fd5b613174612e2f565b85358152613183888701612d6f565b8189015285870135878201526060808701359082015282529387019390860190613155565b9850505060608a01359450808511156131bf575f80fd5b505050506131cf878288016130b2565b91505092959194509250565b5f80604083850312156131ec575f80fd5b6131f583612d6f565b915061320360208401612d6f565b90509250929050565b5f806040838503121561321d575f80fd5b8235915061320360208401612d6f565b5f806040838503121561323e575f80fd5b61324783612d6f565b915060208301356001600160401b03811115613261575f80fd5b61326d85828601612f41565b9150509250929050565b8015158114611dc8575f80fd5b5f8060408385031215613295575f80fd5b61329e83612d6f565b915060208301356132ae81613277565b809150509250929050565b5f805f80608085870312156132cc575f80fd5b6132d585612d6f565b93506132e360208601612d6f565b92506040850135915060608501356001600160401b03811115613304575f80fd5b6131cf878288016130b2565b5f60208284031215613320575f80fd5b8135611e4b81613277565b5f6020828403121561333b575f80fd5b81356001600160401b03811115613350575f80fd5b612835848285016130b2565b600181811c9082168061337057607f821691505b60208210810361338e57634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252601b908201527f43616e6e6f742073656e6420746f207a65726f20616464726573730000000000604082015260600190565b601f821115610b1c575f81815260208120601f850160051c810160208610156133f15750805b601f850160051c820191505b81811015612016578281556001016133fd565b81516001600160401b0381111561342957613429612e1b565b61343d81613437845461335c565b846133cb565b602080601f831160018114613470575f84156134595750858301515b5f19600386901b1c1916600185901b178555612016565b5f85815260208120601f198616915b8281101561349e5788860151825594840194600190910190840161347f565b50858210156134bb57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201613504576135046134df565b5060010190565b5f8151808452602080850194508084015f5b838110156135395781518752958201959082019060010161351d565b509495945050505050565b606080825284519082018190525f906020906080840190828801845b828110156135855781516001600160a01b031684529284019290840190600101613560565b50505083810382850152613599818761350b565b91505082810360408401526135ae818561350b565b9695505050505050565b80820180821115610969576109696134df565b5f8151808452602080850194508084015f5b8381101561353957815180518852838101516001600160a01b0316848901526040808201519089015260609081015190880152608090960195908201906001016135dd565b6001600160a01b03841681526060602082018190525f90613645908301856135cb565b9050826040830152949350505050565b6001600160a01b038681168252851660208201526040810184905260a0606082018190525f90613687908301856135cb565b90508260808301529695505050505050565b5f602082840312156136a9575f80fd5b8151611e4b81613277565b8082028115828204841417610969576109696134df565b5f602082840312156136db575f80fd5b5051919050565b5f8084546136ef8161335c565b60018281168015613707576001811461371c57613748565b60ff1984168752821515830287019450613748565b885f526020805f205f5b8581101561373f5781548a820152908401908201613726565b50505082870194505b50505050835161375c818360208801612d10565b01949350505050565b60ff8181168382160190811115610969576109696134df565b60208082526034908201527f5f76616c69646174654d696e74696e67506172616d65746572733a2054696572604082015273081cdd5c1c1b1e481b1a5b5a5d08195e18d9595960621b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f906135ae90830184612d32565b5f60208284031215613814575f80fd5b8151611e4b81612ce0565b5f6060828403121561382f575f80fd5b604051606081018181106001600160401b038211171561385157613851612e1b565b8060405250825181526020830151602082015260408301516040820152809150509291505056fea1930aa930426c54c34daad2b9ada7c5d0ef0c96078a3c5bb79f6fa6602c4a7aa2646970667358221220a55c06c1012adb97f67c5ad6ab914b498f1f925440df7069b68a5fe6fb2aa22d64736f6c63430008140033000000000000000000000000697383a650c23487c73eec8158d9216483efc8fe0000000000000000000000000215637eec655101c03a7fa88eeac4476239a40c

Deployed Bytecode

0x6080604052600436106102a8575f3560e01c80637192e1111161016f578063a78bf96e116100d8578063d1efd30d11610092578063e949580e1161006d578063e949580e14610887578063e985e9c5146108c1578063e9a7484c146108e0578063f2fde38b146108ff575f80fd5b8063d1efd30d14610834578063dc53fd9214610853578063ddeb63b514610868575f80fd5b8063a78bf96e14610778578063ac26558d14610797578063b5b7f85e146107ac578063b88d4fde146107d7578063c87b56dd146107f6578063c97d938714610815575f80fd5b80639218c319116101295780639218c319146106d357806394bf804d146106e857806395d89b41146106fb5780639cc7e6341461070f5780639d2dcde71461073a578063a22cb46514610759575f80fd5b80637192e111146105ed5780637b43c3981461060c5780638b24316d1461061f5780638da5cb5b146106555780638f4efe1c1461067257806390a85ee01461069d575f80fd5b806342842e0e116102115780635cbe3b83116101cb5780635cbe3b83146105485780635d82cf6e146105675780635e84d723146105865780636352211e1461059b57806370a08231146105ba578063715018a6146105d9575f80fd5b806342842e0e146104a15780634782f779146104c05780634b09b72a146104df5780634f02c420146104f45780634f558e791461050a57806355f804b314610529575f80fd5b806311c67efc1161026257806311c67efc146103e557806316ace63f1461040557806318160ddd146104285780631f150ea41461044257806323b872dd1461046d57806332cb6b0c1461048c575f80fd5b806301ffc9a7146102eb57806306fdde031461031f57806307aa885414610340578063081812fc1461036e578063095ea7b3146103a55780630d5defa4146103c6575f80fd5b366102e757604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b5f80fd5b3480156102f6575f80fd5b5061030a610305366004612cf5565b61091e565b60405190151581526020015b60405180910390f35b34801561032a575f80fd5b5061033361096f565b6040516103169190612d5d565b34801561034b575f80fd5b5061030a61035a366004612d8a565b601a6020525f908152604090205460ff1681565b348015610379575f80fd5b5061038d610388366004612da3565b6109ff565b6040516001600160a01b039091168152602001610316565b3480156103b0575f80fd5b506103c46103bf366004612dba565b610a41565b005b3480156103d1575f80fd5b5060135461038d906001600160a01b031681565b3480156103f0575f80fd5b5060135461030a90600160a01b900460ff1681565b348015610410575f80fd5b5061041a600b5481565b604051908152602001610316565b348015610433575f80fd5b506001545f54035f190161041a565b34801561044d575f80fd5b5061041a61045c366004612d8a565b60176020525f908152604090205481565b348015610478575f80fd5b506103c4610487366004612de2565b610b11565b348015610497575f80fd5b5061041a6115b381565b3480156104ac575f80fd5b506103c46104bb366004612de2565b610b21565b3480156104cb575f80fd5b506103c46104da366004612dba565b610b3b565b3480156104ea575f80fd5b5061041a600c5481565b3480156104ff575f80fd5b505f545f190161041a565b348015610515575f80fd5b5061030a610524366004612da3565b610c6f565b348015610534575f80fd5b506103c4610543366004612edb565b610c79565b348015610553575f80fd5b506103c4610562366004613008565b610c8d565b348015610572575f80fd5b506103c4610581366004612da3565b610e14565b348015610591575f80fd5b5061041a600d5481565b3480156105a6575f80fd5b5061038d6105b5366004612da3565b610e58565b3480156105c5575f80fd5b5061041a6105d4366004612d8a565b610e62565b3480156105e4575f80fd5b506103c4610ea7565b3480156105f8575f80fd5b506103c4610607366004613089565b610eba565b6103c461061a3660046130d0565b611145565b34801561062a575f80fd5b5061041a6106393660046131db565b601960209081525f928352604080842090915290825290205481565b348015610660575f80fd5b506008546001600160a01b031661038d565b34801561067d575f80fd5b5061041a61068c366004612da3565b60146020525f908152604090205481565b3480156106a8575f80fd5b5061041a6106b7366004612dba565b601860209081525f928352604080842090915290825290205481565b3480156106de575f80fd5b5061041a600f5481565b6103c46106f636600461320c565b6112c6565b348015610706575f80fd5b50610333611866565b34801561071a575f80fd5b5061041a610729366004612d8a565b60166020525f908152604090205481565b348015610745575f80fd5b506103c461075436600461322d565b611875565b348015610764575f80fd5b506103c4610773366004613284565b611a78565b348015610783575f80fd5b5061041a610792366004612da3565b611b0c565b3480156107a2575f80fd5b5061041a600e5481565b3480156107b7575f80fd5b5061041a6107c6366004612d8a565b60156020525f908152604090205481565b3480156107e2575f80fd5b506103c46107f13660046132b9565b611b2b565b348015610801575f80fd5b50610333610810366004612da3565b611b75565b348015610820575f80fd5b506103c461082f366004613310565b611c16565b34801561083f575f80fd5b5060125461038d906001600160a01b031681565b34801561085e575f80fd5b5061041a60105481565b348015610873575f80fd5b506103c4610882366004612d8a565b611c3c565b348015610892575f80fd5b5061030a6108a136600461332b565b8051602081830181018051601b8252928201919093012091525460ff1681565b3480156108cc575f80fd5b5061030a6108db3660046131db565b611cd3565b3480156108eb575f80fd5b506103c46108fa366004612d8a565b611d00565b34801561090a575f80fd5b506103c4610919366004612d8a565b611d52565b5f6301ffc9a760e01b6001600160e01b03198316148061094e57506380ac58cd60e01b6001600160e01b03198316145b806109695750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461097e9061335c565b80601f01602080910402602001604051908101604052809291908181526020018280546109aa9061335c565b80156109f55780601f106109cc576101008083540402835291602001916109f5565b820191905f5260205f20905b8154815290600101906020018083116109d857829003601f168201915b5050505050905090565b5f610a0982611dcb565b610a26576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610a4b82611dfd565b9050806001600160a01b0316836001600160a01b031603610a7f5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610ab657610a998133611cd3565b610ab6576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610b1c838383611e6d565b505050565b610b1c83838360405180602001604052805f815250611b2b565b610b4361201e565b610b4b612077565b816001600160a01b038116610b7b5760405162461bcd60e51b8152600401610b7290613394565b60405180910390fd5b47821115610bc05760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610b72565b5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610c09576040519150601f19603f3d011682016040523d82523d5f602084013e610c0e565b606091505b5050905080610c5f5760405162461bcd60e51b815260206004820181905260248201527f77697468647261774554483a20455448207472616e73666572206661696c65646044820152606401610b72565b5050610c6b6001600955565b5050565b5f61096982611dcb565b610c81612077565b600a610c6b8282613410565b610c95612077565b81518351148015610ca7575080518351145b610d015760405162461bcd60e51b815260206004820152602560248201527f7365744572633230546f6b656e57686974656c6973743a20496e76616c6964206044820152641a5b9c1d5d60da1b6064820152608401610b72565b5f5b8351811015610dd357828181518110610d1e57610d1e6134cb565b602002602001015160155f868481518110610d3b57610d3b6134cb565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550818181518110610d7857610d786134cb565b602002602001015160165f868481518110610d9557610d956134cb565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f20819055508080610dcb906134f3565b915050610d03565b507f47a29f7b95e9428e4ad7fd5b9e844cba196a37a63a8560e093a6092e156b0492838383604051610e0793929190613544565b60405180910390a1505050565b610e1c612077565b60108190556040518181527f25b1f9f6b6e61dfca5575239769e4450ed2e49176670837f5d1a82a9a2fc693f906020015b60405180910390a150565b5f61096982611dfd565b5f815f03610e83576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b610eaf612077565b610eb85f6120d1565b565b610ec2612077565b6115b381610ed084866135b8565b610eda91906135b8565b14610f275760405162461bcd60e51b815260206004820152601c60248201527f7365744d696e744c696d69743a20496e76616c696420737570706c79000000006044820152606401610b72565b60146020527f4f26c3876aa9f4b92579780beea1161a61f87ebf1ec6ee865b299e447ecba99c547fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c5460025f525f805160206138798339815191525482861015610ff95760405162461bcd60e51b815260206004820152603c60248201527f7365744d696e744c696d69743a204e6577207265736572766520616d6f756e7460448201527f206973206c657373207468616e2063757272656e74206d696e746564000000006064820152608401610b72565b8185101561106f5760405162461bcd60e51b815260206004820152603b60248201527f7365744d696e744c696d69743a204e6577207075626c696320737570706c792060448201527f6973206c657373207468616e2063757272656e74206d696e74656400000000006064820152608401610b72565b808410156110e7576040805162461bcd60e51b81526020600482015260248101919091527f7365744d696e744c696d69743a204e6577206e6f6e2d455448206d617820737560448201527f70706c79206973206c657373207468616e2063757272656e74206d696e7465646064820152608401610b72565b600c869055600d859055600b84905560408051878152602081018790529081018590523360608201527f30faad65c7f583308ef778354075d9d06fafbce424fc9cf12827c2d83772fb139060800160405180910390a1505050505050565b61117984833460405160200161115d93929190613622565b6040516020818303038152906040528051906020012082612122565b6111c55760405162461bcd60e51b815260206004820152601e60248201527f70757263686173653a205369676e617475726520697320696e76616c696400006044820152606401610b72565b5f545f19016115b36111d782866135b8565b111561121e5760405162461bcd60e51b81526020600482015260166024820152751c1d5c98da185cd94e8814dd5c1c1b1e481b1a5b5a5d60521b6044820152606401610b72565b5f5b8351811015611275575f84828151811061123c5761123c6134cb565b602002602001015190506112628782602001518360400151845f01518560600151612248565b508061126d816134f3565b915050611220565b50611280858561273c565b7f88b95a1c09cd1798f3b6f39d1c5b76273c9709eb4d1c2e94b6af327703aadc7233868386426040516112b7959493929190613655565b60405180910390a15050505050565b601354600160a01b900460ff1661131f5760405162461bcd60e51b815260206004820181905260248201527f6d696e743a205075626c6963206d696e74696e67206973206e6f74206f70656e6044820152606401610b72565b5f821161137c5760405162461bcd60e51b815260206004820152602560248201527f6d696e743a205175616e74697479206d757374206265206d6f7265207468616e604482015264207a65726f60d81b6064820152608401610b72565b6001600160a01b0381161561162c57601160028154811061139f5761139f6134cb565b5f9182526020808320909101546002909252601490525f80516020613879833981519152546113cf9084906135b8565b111561141d5760405162461bcd60e51b815260206004820152601e60248201527f6d696e743a205469657220737570706c79206c696d69742065786365656400006044820152606401610b72565b600f54335f9081526019602090815260408083206001600160a01b038616845290915290205461144e9084906135b8565b111561149c5760405162461bcd60e51b815260206004820152601760248201527f6d696e743a20457863656564206d696e74206c696d69740000000000000000006044820152606401610b72565b60025f90815260146020525f8051602061387983398151915280548492906114c59084906135b8565b9091555050335f9081526019602090815260408083206001600160a01b0385168452909152812080548492906114fc9084906135b8565b90915550506001600160a01b0381165f90815260156020526040902054806115665760405162461bcd60e51b815260206004820152601b60248201527f6d696e743a20546f6b656e206e6f742077686974656c697374656400000000006044820152606401610b72565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064016020604051808303815f875af11580156115b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115da9190613699565b6116265760405162461bcd60e51b815260206004820152601b60248201527f6d696e743a20546f6b656e207472616e73666572206661696c656400000000006044820152606401610b72565b5061176e565b6011600181548110611640576116406134cb565b5f9182526020808320909101546001909252601490527fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c546116839084906135b8565b11156116d15760405162461bcd60e51b815260206004820152601e60248201527f6d696e743a205469657220737570706c79206c696d69742065786365656400006044820152606401610b72565b60015f90815260146020527fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c805484929061170d9084906135b8565b90915550506010546117209083906136b4565b341461176e5760405162461bcd60e51b815260206004820152601860248201527f6d696e743a20496e76616c69642045544820616d6f756e7400000000000000006044820152606401610b72565b5f545f19016115b361178084836135b8565b11156117c35760405162461bcd60e51b81526020600482015260126024820152711b5a5b9d0e8814dd5c1c1b1e481b1a5b5a5d60721b6044820152606401610b72565b6117cd338461273c565b7f88b95a1c09cd1798f3b6f39d1c5b76273c9709eb4d1c2e94b6af327703aadc723380835f60405190808252806020026020018201604052801561185357816020015b61184060405180608001604052805f81526020015f6001600160a01b031681526020015f81526020015f81525090565b8152602001906001900390816118105790505b5042604051610e07959493929190613655565b60606003805461097e9061335c565b61187d61201e565b611885612077565b816001600160a01b0381166118ac5760405162461bcd60e51b8152600401610b7290613394565b5f5b8251811015610c5f575f8382815181106118ca576118ca6134cb565b60209081029190910101516040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa15801561191c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061194091906136cb565b90505f811161199b5760405162461bcd60e51b815260206004820152602160248201527f776974686472617745524332303a20496e73756666696369656e742066756e646044820152607360f81b6064820152608401610b72565b60405163a9059cbb60e01b81526001600160a01b0387811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af11580156119e7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a0b9190613699565b611a635760405162461bcd60e51b8152602060048201526024808201527f776974686472617745524332303a20546f6b656e207472616e736665722066616044820152631a5b195960e21b6064820152608401610b72565b50508080611a70906134f3565b9150506118ae565b336001600160a01b03831603611aa15760405163b06307db60e01b815260040160405180910390fd5b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60118181548110611b1b575f80fd5b5f91825260209091200154905081565b611b36848484611e6d565b6001600160a01b0383163b15611b6f57611b5284848484612755565b611b6f576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060611b8082611dcb565b611be45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b72565b600a611bef8361283d565b604051602001611c009291906136e2565b6040516020818303038152906040529050919050565b611c1e612077565b60138054911515600160a01b0260ff60a01b19909216919091179055565b611c44612077565b6001600160a01b038116611c9a5760405162461bcd60e51b815260206004820152601e60248201527f736574457363726f77416464726573733a205a65726f206164647265737300006044820152606401610b72565b6040516001600160a01b03821681527f439a280b3683fc516da23f193ff8372b78c11c2e27aabcc7d99e6d029acfab3d90602001610e4d565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611d08612077565b806001600160a01b038116611d2f5760405162461bcd60e51b8152600401610b7290613394565b50601280546001600160a01b0319166001600160a01b0392909216919091179055565b611d5a612077565b6001600160a01b038116611dbf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b72565b611dc8816120d1565b50565b5f81600111158015611ddd57505f5482105b80156109695750505f90815260046020526040902054600160e01b161590565b5f8180600111611e54575f54811015611e54575f8181526004602052604081205490600160e01b82169003611e52575b805f03611e4b57505f19015f81815260046020526040902054611e2d565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b5f611e7782611dfd565b9050836001600160a01b0316816001600160a01b031614611eaa5760405162a1148160e81b815260040160405180910390fd5b5f828152600660205260408120546001600160a01b0390811691908616331480611ed95750611ed98633611cd3565b80611eec57506001600160a01b03821633145b905080611f0c57604051632ce44b5f60e11b815260040160405180910390fd5b845f03611f2c57604051633a954ecd60e21b815260040160405180910390fd5b8115611f4e575f84815260066020526040902080546001600160a01b03191690555b6001600160a01b038681165f90815260056020908152604080832080545f1901905592881682528282208054600101905586825260049052908120600160e11b4260a01b8817811790915584169003611fd457600184015f818152600460205260408120549003611fd2575f548114611fd2575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6002600954036120705760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b72565b6002600955565b6008546001600160a01b03163314610eb85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b72565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f8551604114612189575f945050505050610969565b5050506020830151604084015160608501515f1a601b8110156121b4576121b1601b82613765565b90505b5f8160ff16601b14806121ca57508160ff16601c145b1561222c57604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561221f573d5f803e3d5ffd5b5050506020604051035190505b6012546001600160a01b03918216911614979650505050505050565b825f0361225857612258856128cc565b6001600160a01b0384166123be578260021461233f576001600160a01b0385165f908152601860209081526040808320868452909152902054819061229e9084906135b8565b11156123075760405162461bcd60e51b815260206004820152603260248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20457863656044820152711959081d1a595c881b5a5b9d081b1a5b5a5d60721b6064820152608401610b72565b6001600160a01b0385165f908152601860209081526040808320868452909152812080548492906123399084906135b8565b90915550505b60118381548110612352576123526134cb565b905f5260205f2001548260145f8681526020019081526020015f205461237891906135b8565b11156123965760405162461bcd60e51b8152600401610b729061377e565b5f83815260146020526040812080548492906123b39084906135b8565b909155506127359050565b5f6123c886610e62565b11806123d357505f34115b6124335760405162461bcd60e51b815260206004820152602b60248201527f5f76616c69646174654d696e74696e67506172616d65746572733a205573657260448201526a081a185cc81b9bc813919560aa1b6064820152608401610b72565b600f546001600160a01b038087165f908152601960209081526040808320938916835292905220546124669084906135b8565b11156124ca5760405162461bcd60e51b815260206004820152602d60248201527f5f76616c69646174654d696e74696e67506172616d65746572733a204578636560448201526c1959081b5a5b9d081b1a5b5a5d609a1b6064820152608401610b72565b6001600160a01b0384165f908152601660209081526040808320546017909252909120546124f99084906135b8565b11156125645760405162461bcd60e51b815260206004820152603460248201527f5f76616c69646174654d696e74696e67506172616d65746572733a2045786365604482015273195908115490cb4c8c081b5a5b9d081b1a5b5a5d60621b6064820152608401610b72565b6011600281548110612578576125786134cb565b5f9182526020808320909101546002909252601490525f80516020613879833981519152546125a89084906135b8565b11156125c65760405162461bcd60e51b8152600401610b729061377e565b6001600160a01b038086165f908152601960209081526040808320938816835292905290812080548492906125fc9084906135b8565b90915550506001600160a01b0384165f90815260176020526040812080548492906126289084906135b8565b909155505060025f90815260146020525f8051602061387983398151915280548492906126569084906135b8565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038516906323b872dd906064016020604051808303815f875af11580156126ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126cf9190613699565b6127355760405162461bcd60e51b815260206004820152603160248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20546f6b656044820152701b881d1c985b9cd9995c8819985a5b1959607a1b6064820152608401610b72565b5050505050565b610c6b828260405180602001604052805f815250612aa5565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a02906127899033908990889088906004016137d2565b6020604051808303815f875af19250505080156127c3575060408051601f3d908101601f191682019092526127c091810190613804565b60015b61281f573d8080156127f0576040519150601f19603f3d011682016040523d82523d5f602084013e6127f5565b606091505b5080515f03612817576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60605f61284983612c09565b60010190505f816001600160401b0381111561286757612867612e1b565b6040519080825280601f01601f191660200182016040528015612891576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461289b57509392505050565b6013546001600160a01b03166129305760405162461bcd60e51b8152602060048201526024808201527f5f636865636b457363726f773a20457363726f772061646472657373206e6f74604482015263081cd95d60e21b6064820152608401610b72565b6001600160a01b0381165f908152601a602052604090205460ff16156129a65760405162461bcd60e51b815260206004820152602560248201527f5f636865636b457363726f773a205265736572766520616c726561647920636c604482015264185a5b595960da1b6064820152608401610b72565b6001600160a01b038181165f818152601a6020526040808220805460ff19166001179055601354905163bbe9143d60e01b815260048101939093529092169190829063bbe9143d90602401606060405180830381865afa158015612a0c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a30919061381f565b8051909150151580612a4557505f8160200151115b15610b1c5760405163ddeae03360e01b81526001600160a01b03848116600483015283169063ddeae033906024015f604051808303815f87803b158015612a8a575f80fd5b505af1158015612a9c573d5f803e3d5ffd5b50505050505050565b5f54835f03612ac657604051622e076360e81b815260040160405180910390fd5b825f03612ae65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0384165f8181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b15612bb6575b60405182906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612b815f878480600101955087612755565b612b9e576040516368d2bf6b60e11b815260040160405180910390fd5b808210612b3857825f5414612bb1575f80fd5b612bfa565b5b6040516001830192906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612bb7575b505f908155611b6f9085838684565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612c475772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612c73576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612c9157662386f26fc10000830492506010015b6305f5e1008310612ca9576305f5e100830492506008015b6127108310612cbd57612710830492506004015b60648310612ccf576064830492506002015b600a83106109695760010192915050565b6001600160e01b031981168114611dc8575f80fd5b5f60208284031215612d05575f80fd5b8135611e4b81612ce0565b5f5b83811015612d2a578181015183820152602001612d12565b50505f910152565b5f8151808452612d49816020860160208601612d10565b601f01601f19169290920160200192915050565b602081525f611e4b6020830184612d32565b80356001600160a01b0381168114612d85575f80fd5b919050565b5f60208284031215612d9a575f80fd5b611e4b82612d6f565b5f60208284031215612db3575f80fd5b5035919050565b5f8060408385031215612dcb575f80fd5b612dd483612d6f565b946020939093013593505050565b5f805f60608486031215612df4575f80fd5b612dfd84612d6f565b9250612e0b60208501612d6f565b9150604084013590509250925092565b634e487b7160e01b5f52604160045260245ffd5b604051608081016001600160401b0381118282101715612e5157612e51612e1b565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612e7f57612e7f612e1b565b604052919050565b5f6001600160401b03831115612e9f57612e9f612e1b565b612eb2601f8401601f1916602001612e57565b9050828152838383011115612ec5575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215612eeb575f80fd5b81356001600160401b03811115612f00575f80fd5b8201601f81018413612f10575f80fd5b61283584823560208401612e87565b5f6001600160401b03821115612f3757612f37612e1b565b5060051b60200190565b5f82601f830112612f50575f80fd5b81356020612f65612f6083612f1f565b612e57565b82815260059290921b84018101918181019086841115612f83575f80fd5b8286015b84811015612fa557612f9881612d6f565b8352918301918301612f87565b509695505050505050565b5f82601f830112612fbf575f80fd5b81356020612fcf612f6083612f1f565b82815260059290921b84018101918181019086841115612fed575f80fd5b8286015b84811015612fa55780358352918301918301612ff1565b5f805f6060848603121561301a575f80fd5b83356001600160401b0380821115613030575f80fd5b61303c87838801612f41565b94506020860135915080821115613051575f80fd5b61305d87838801612fb0565b93506040860135915080821115613072575f80fd5b5061307f86828701612fb0565b9150509250925092565b5f805f6060848603121561309b575f80fd5b505081359360208301359350604090920135919050565b5f82601f8301126130c1575f80fd5b611e4b83833560208501612e87565b5f805f8060808086880312156130e4575f80fd5b6130ed86612d6f565b945060208087013594506040808801356001600160401b0380821115613111575f80fd5b818a0191508a601f830112613124575f80fd5b8135613132612f6082612f1f565b81815260079190911b8301850190858101908d831115613150575f80fd5b938601935b828510156131a85787858f03121561316c575f8081fd5b613174612e2f565b85358152613183888701612d6f565b8189015285870135878201526060808701359082015282529387019390860190613155565b9850505060608a01359450808511156131bf575f80fd5b505050506131cf878288016130b2565b91505092959194509250565b5f80604083850312156131ec575f80fd5b6131f583612d6f565b915061320360208401612d6f565b90509250929050565b5f806040838503121561321d575f80fd5b8235915061320360208401612d6f565b5f806040838503121561323e575f80fd5b61324783612d6f565b915060208301356001600160401b03811115613261575f80fd5b61326d85828601612f41565b9150509250929050565b8015158114611dc8575f80fd5b5f8060408385031215613295575f80fd5b61329e83612d6f565b915060208301356132ae81613277565b809150509250929050565b5f805f80608085870312156132cc575f80fd5b6132d585612d6f565b93506132e360208601612d6f565b92506040850135915060608501356001600160401b03811115613304575f80fd5b6131cf878288016130b2565b5f60208284031215613320575f80fd5b8135611e4b81613277565b5f6020828403121561333b575f80fd5b81356001600160401b03811115613350575f80fd5b612835848285016130b2565b600181811c9082168061337057607f821691505b60208210810361338e57634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252601b908201527f43616e6e6f742073656e6420746f207a65726f20616464726573730000000000604082015260600190565b601f821115610b1c575f81815260208120601f850160051c810160208610156133f15750805b601f850160051c820191505b81811015612016578281556001016133fd565b81516001600160401b0381111561342957613429612e1b565b61343d81613437845461335c565b846133cb565b602080601f831160018114613470575f84156134595750858301515b5f19600386901b1c1916600185901b178555612016565b5f85815260208120601f198616915b8281101561349e5788860151825594840194600190910190840161347f565b50858210156134bb57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201613504576135046134df565b5060010190565b5f8151808452602080850194508084015f5b838110156135395781518752958201959082019060010161351d565b509495945050505050565b606080825284519082018190525f906020906080840190828801845b828110156135855781516001600160a01b031684529284019290840190600101613560565b50505083810382850152613599818761350b565b91505082810360408401526135ae818561350b565b9695505050505050565b80820180821115610969576109696134df565b5f8151808452602080850194508084015f5b8381101561353957815180518852838101516001600160a01b0316848901526040808201519089015260609081015190880152608090960195908201906001016135dd565b6001600160a01b03841681526060602082018190525f90613645908301856135cb565b9050826040830152949350505050565b6001600160a01b038681168252851660208201526040810184905260a0606082018190525f90613687908301856135cb565b90508260808301529695505050505050565b5f602082840312156136a9575f80fd5b8151611e4b81613277565b8082028115828204841417610969576109696134df565b5f602082840312156136db575f80fd5b5051919050565b5f8084546136ef8161335c565b60018281168015613707576001811461371c57613748565b60ff1984168752821515830287019450613748565b885f526020805f205f5b8581101561373f5781548a820152908401908201613726565b50505082870194505b50505050835161375c818360208801612d10565b01949350505050565b60ff8181168382160190811115610969576109696134df565b60208082526034908201527f5f76616c69646174654d696e74696e67506172616d65746572733a2054696572604082015273081cdd5c1c1b1e481b1a5b5a5d08195e18d9595960621b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f906135ae90830184612d32565b5f60208284031215613814575f80fd5b8151611e4b81612ce0565b5f6060828403121561382f575f80fd5b604051606081018181106001600160401b038211171561385157613851612e1b565b8060405250825181526020830151602082015260408301516040820152809150509291505056fea1930aa930426c54c34daad2b9ada7c5d0ef0c96078a3c5bb79f6fa6602c4a7aa2646970667358221220a55c06c1012adb97f67c5ad6ab914b498f1f925440df7069b68a5fe6fb2aa22d64736f6c63430008140033

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

000000000000000000000000697383a650c23487c73eec8158d9216483efc8fe0000000000000000000000000215637eec655101c03a7fa88eeac4476239a40c

-----Decoded View---------------
Arg [0] : _secret (address): 0x697383a650c23487C73eec8158d9216483efC8fe
Arg [1] : _escrowAddress (address): 0x0215637eec655101C03A7FA88EEac4476239A40c

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000697383a650c23487c73eec8158d9216483efc8fe
Arg [1] : 0000000000000000000000000215637eec655101c03a7fa88eeac4476239a40c


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.