ETH Price: $3,415.73 (-1.51%)
Gas: 5 Gwei

Token

PFPAsia (PFPAsia)
 

Overview

Max Total Supply

46,170,000 PFPAsia

Holders

0

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

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:
DAN

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion, MIT license
File 1 of 11 : dan.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "erc1111.sol";
import "Ownable.sol";
import "MerkleProof.sol";
import "IERC2981.sol";
import "Strings.sol";
import "Address.sol";
import "ECDSA.sol";

contract DAN is ERC1111, IERC2981, Ownable{
    using Strings for uint256;

    bytes32 public merkleRoot;
    mapping(address => bool) public withdrawn;

    bool public isRedirect;

    address private _royaltyRecipient;

    // metadata URI
    string private _baseTokenURI;

    mapping(address => bool) public isFairLaunch;

    uint256 startTimestamp = 1707534671; // 2024-02-10 11:11:11

    uint256 mintedFairLaunch;

    mapping(bytes32 => bool) public evidenceUsed;
    address public signer;

    

    constructor(
        address _signer
    ) ERC1111("PFPAsia", "PFPAsia", 18) {
        signer = _signer;
         
        _mintFT(msg.sender, 278 * 10000 * 10**18); // team reamins 5.555%
    }

    function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
        merkleRoot = _merkleRoot;
    }
    
    function claim(uint256 _amount, bytes32[] calldata _proof) external {
        address _account = msg.sender;
        require(!withdrawn[_account], "withdrawned token.");

        // Verify the merkle proof.
        bytes32 leaf = keccak256(abi.encodePacked(_account, _amount));
        require(MerkleProof.verify(_proof, merkleRoot, leaf), "Invalid proof");

        withdrawn[_account] = true;

        for (uint256 i = 0; i < _amount;i++){
            ERC1111._mint(_account);
        }
    }

    function openRedirect() public onlyOwner {
        isRedirect = true;
    }

    function closeRedirect() public onlyOwner {
        isRedirect = false;
    }
    function openFtTransfer() public onlyOwner {
        enableFtTransfer = true;
    }
    
    function closeFtTransfer() public onlyOwner {
        enableFtTransfer = false;
    }

    function ftRedirectNFT(uint256 amount) public {
        require(isRedirect, "redirect not open");
        _ft_to_nft(amount);
    }
    function nftRedirectFT(uint256 tokenId) public {
        require(isRedirect, "redirect not open");
        _nft_to_ft(tokenId);
    }

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

    function setBaseURI(string calldata baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    function fairLaunch(
        bytes memory evidence
    ) external{
        require(block.timestamp >= startTimestamp, "not start");
        require(!Address.isContract(msg.sender), "contract");
        require(!isFairLaunch[msg.sender],"claimed");
        require(mintedFairLaunch + 10000 * 10**18 <= 5000 * 10000 * 10**18, "exceed");

        
        require(
            !evidenceUsed[keccak256(evidence)] &&
                ECDSA.recover(ECDSA.toEthSignedMessageHash(keccak256(
                        abi.encodePacked(
                            msg.sender,
                            block.chainid
                        )
                    )), evidence) == signer,
            "invalid evidence"
        );
        evidenceUsed[keccak256(evidence)] = true;

        _mintFT(msg.sender, 10000 * 10**18);
        mintedFairLaunch += 10000 * 10**18;

        isFairLaunch[msg.sender] = true;

    }

    function setSigner(address _signer) public onlyOwner {
        signer = _signer;
    }
    function setStartTimestamp(uint256 _startTimestamp) public onlyOwner {
        startTimestamp = _startTimestamp;
    }

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

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


     /**
   *  --------- IERC2981 ---------
   */

  function royaltyInfo(
    uint256 tokenId,
    uint256 salePrice
  ) external view returns (address receiver, uint256 royaltyAmount) {
    return (_royaltyRecipient, salePrice * 5 / 100);
  }

  function setRoyaltyRecipient(address r) public onlyOwner {
    _royaltyRecipient = r;
  }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165)
        returns (bool)
    {
        return
            interfaceId == type(IERC2981).interfaceId;
    }
   
}

File 2 of 11 : erc1111.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract ERC1111 {

    // Events
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    event ERC20Transfer(
        address indexed from,
        address indexed to,
        uint256 amount
    );

    // meatadata

    // Token name
    string public name;

    // Token symbol
    string public symbol;

    // Token decimals
    uint8 public decimals;

    // erc20

    mapping(address => uint256) private _erc20BalanceOf;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    // erc721

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

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

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

    // Array of owned ids in native representation
    mapping(address => uint256[]) internal _owned;

    mapping(uint256 => uint256) internal _ownedIndex;

    uint256 public minted;

    bool enableFtTransfer;

    constructor(
        string memory name_,
        string memory symbol_,
        uint8 decimals_
    )  {
        name =      name_;
        symbol = symbol_;
        decimals = decimals_;
    }


    function balanceOf(address owner) public view virtual returns (uint256) {
        return _erc20BalanceOf[owner];
    }

    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    function ownerOf(uint256 tokenId) public view virtual returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    function getApproved(uint256 tokenId) public view virtual returns (address) {
        require(_exists(tokenId), "ERC721: invalid token ID");

        return _tokenApprovals[tokenId];
    }

    function setApprovalForAll(address operator, bool approved) public virtual {
        _setApprovalForAll(msg.sender, operator, approved);
    }

    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }
    

    function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    function approve(address spender, uint256 amountOrId) public virtual  {
        if (amountOrId <= minted && amountOrId > 0) {
            address owner = ownerOf(amountOrId);
            require(spender != owner, "ERC721: approval to current owner");
            require(
                msg.sender == owner || isApprovedForAll(owner, msg.sender),
                "ERC721: approve caller is not token owner or approved for all"
            );

            _tokenApprovals[amountOrId] = spender;

            emit Approval(owner, spender, amountOrId);
        } else {
            _allowances[msg.sender][spender] = amountOrId;

            emit Approval(msg.sender, spender, amountOrId);
        }

    }

    // erc20//
    function allowance(address owner, address spender) public view  returns (uint256) {
        return _allowances[owner][spender];
    }

    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amountOrId
    ) public virtual {
        if (amountOrId <= minted) {
            require(_isApprovedOrOwner(msg.sender, amountOrId), "ERC721: caller is not token owner or approved");
            require(ownerOf(amountOrId) == from, "ERC721: transfer from incorrect owner");
            require(to != address(0), "ERC721: transfer to the zero address");

            delete _tokenApprovals[amountOrId];

            unchecked {
                _erc721BalanceOf[from] -= 1;
                _erc721BalanceOf[to] += 1;
            }

            _owners[amountOrId] = to;

            // update from
            uint256 updatedId = _owned[from][_owned[from].length - 1];
            _owned[from][_ownedIndex[amountOrId]] = updatedId;
            _owned[from].pop();
            _ownedIndex[updatedId] = _ownedIndex[amountOrId];
            _owned[to].push(amountOrId);
            _ownedIndex[amountOrId] = _owned[to].length - 1;

            emit Transfer(from, to, amountOrId);
        } else {
            uint256 allowed = _allowances[from][msg.sender];

            if (allowed != type(uint256).max)
                _allowances[from][msg.sender] = allowed - amountOrId;

            _transfer(from, to, amountOrId);
        }
    }

    function transfer(
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        return _transfer(msg.sender, to, amount);
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal returns (bool) {
        require(enableFtTransfer, "can not transfer");
        uint256 fromBalance = _erc20BalanceOf[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");

        unchecked {
            _erc20BalanceOf[from] -= amount;
            _erc20BalanceOf[to] += amount;
        }

        emit ERC20Transfer(from, to, amount);
        return true;
    }

    function _mint(address to) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        unchecked {
            minted++;
        }
        uint256 tokenId = minted;

        unchecked {
            _erc721BalanceOf[to] += 1;
        }
        _owners[tokenId] = to;
        _owned[to].push(tokenId);
        _ownedIndex[tokenId] = _owned[to].length - 1;

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

    function _burn(address owner) internal virtual {
        uint256 tokenId=_owned[owner][_owned[owner].length - 1];
        _owned[owner].pop();

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            _erc721BalanceOf[owner] -= 1;
        }
        delete _owners[tokenId];
        delete _ownedIndex[tokenId];

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

    }

    function _mintFT(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _erc20BalanceOf[account] += amount;
        }
        emit ERC20Transfer(address(0), account, amount);

    }

    function _getUnit() internal view returns (uint256) {
        return 10000 * 10 ** decimals;
    }

    function _nft_to_ft(uint256 tokenId) internal {
        uint256 unit = _getUnit();
        transferFrom(msg.sender, address(this), tokenId);

        _erc20BalanceOf[msg.sender] += unit;
        _totalSupply += unit;

        emit ERC20Transfer(address(0), msg.sender, unit);
    }

    function _ft_to_nft(uint256 amount) internal {
        uint256 unit = _getUnit();
        uint256 nftAmount = amount / unit;
        uint256 ftAmount = nftAmount * unit;

        _transfer(msg.sender, address(0), ftAmount);
        _totalSupply -= ftAmount;

        uint256 nftMintAmount = _owned[address(this)].length < nftAmount ? nftAmount-_owned[address(this)].length : 0;
        uint256 nftTransferAmount= nftAmount - nftMintAmount;

        for (uint256 i=0; i<nftMintAmount; i++){
            _mint(msg.sender);
        }
        
        for (uint256 i=0; i<nftTransferAmount; i++){
            uint256 tokenId=_owned[address(this)][_owned[address(this)].length - 1];
            address from = address(this);
            address to = msg.sender;
            unchecked {
                _erc721BalanceOf[from] -= 1;
                _erc721BalanceOf[to] += 1;
            }

            _owners[tokenId] = to;

            // update from
            uint256 updatedId = _owned[from][_owned[from].length - 1];
            _owned[from][_ownedIndex[tokenId]] = updatedId;
            _owned[from].pop();
            _ownedIndex[updatedId] = _ownedIndex[tokenId];
            _owned[to].push(tokenId);
            _ownedIndex[tokenId] = _owned[to].length - 1;

            emit Transfer(from, to, tokenId);
        }
    }
    function tokenURI(uint256 id) public view virtual returns (string memory);

}

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

pragma solidity ^0.8.0;

import "Context.sol";

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 6 of 11 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "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 9 of 11 : 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 10 of 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 11 of 11 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amountOrId","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":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeFtTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeRedirect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"evidenceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"evidence","type":"bytes"}],"name":"fairLaunch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ftRedirectNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[{"internalType":"address","name":"","type":"address"}],"name":"isFairLaunch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRedirect","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"nftRedirectFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openFtTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openRedirect","outputs":[],"stateMutability":"nonpayable","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"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":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"r","type":"address"}],"name":"setRoyaltyRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"name":"setStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountOrId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040526365c6e94f6013553480156200001957600080fd5b5060405162002c0838038062002c088339810160408190526200003c9162000211565b6040805180820182526007808252665046504173696160c81b602080840182905284518086019095529184529083015290601260006200007d8482620002e8565b5060016200008c8382620002e8565b506002805460ff191660ff9290921691909117905550620000b69050620000b03390565b620000ef565b601680546001600160a01b0319166001600160a01b038316179055620000e8336a024cb01a1b10bd9180000062000149565b50620003dc565b600d80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620001a45760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060056000828254620001b89190620003b4565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487910160405180910390a35050565b6000602082840312156200022457600080fd5b81516001600160a01b03811681146200023c57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200026e57607f821691505b6020821081036200028f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e357600081815260208120601f850160051c81016020861015620002be5750805b601f850160051c820191505b81811015620002df57828155600101620002ca565b5050505b505050565b81516001600160401b0381111562000304576200030462000243565b6200031c8162000315845462000259565b8462000295565b602080601f8311600181146200035457600084156200033b5750858301515b600019600386901b1c1916600185901b178555620002df565b600085815260208120601f198616915b82811015620003855788860151825594840194600190910190840162000364565b5085821015620003a45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620003d657634e487b7160e01b600052601160045260246000fd5b92915050565b61281c80620003ec6000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c80636352211e1161013b578063a22cb465116100b8578063d95ba17d1161007c578063d95ba17d14610511578063dd62ed3e14610524578063e985e9c51461055d578063f2fde38b14610570578063fbda63221461058357600080fd5b8063a22cb465146104b8578063a7e61240146104cb578063a9059cbb146104d8578063c44bef75146104eb578063c87b56dd146104fe57600080fd5b80637cb64759116100ff5780637cb647591461045c5780638059dc101461046f5780638da5cb5b1461047757806392c090d31461048d57806395d89b41146104b057600080fd5b80636352211e146103e25780636c19e783146103f55780636ef610921461040857806370a082311461042b578063715018a61461045457600080fd5b80632a55205a116101c957806348bf380a1161018d57806348bf380a146103a357806349359cb2146103ab5780634f02c420146103b357806355f804b3146103bc5780635a058858146103cf57600080fd5b80632a55205a146103235780632eb4a7ab146103555780632f52ebb71461035e578063313ce5671461037157806341e42f301461039057600080fd5b8063095ea7b311610210578063095ea7b3146102d057806318160ddd146102e3578063238ac933146102f557806323b872dd146103085780632902b2581461031b57600080fd5b806301ffc9a71461024257806306fdde031461027b578063081812fc14610290578063091a1ecf146102bb575b600080fd5b610266610250366004612134565b6001600160e01b03191663152a902d60e11b1490565b60405190151581526020015b60405180910390f35b6102836105a6565b6040516102729190612182565b6102a361029e3660046121b5565b610634565b6040516001600160a01b039091168152602001610272565b6102ce6102c93660046121b5565b6106b4565b005b6102ce6102de3660046121ea565b610706565b6005545b604051908152602001610272565b6016546102a3906001600160a01b031681565b6102ce610316366004612214565b6108d3565b6102ce610c4a565b610336610331366004612250565b610c61565b604080516001600160a01b039093168352602083019190915201610272565b6102e7600e5481565b6102ce61036c366004612272565b610c9a565b60025461037e9060ff1681565b60405160ff9091168152602001610272565b6102ce61039e3660046122f1565b610dfc565b6102ce610e2c565b6102ce610e40565b6102e7600c5481565b6102ce6103ca36600461230c565b610e57565b6102ce6103dd366004612394565b610e6c565b6102a36103f03660046121b5565b611118565b6102ce6104033660046122f1565b61117e565b6102666104163660046122f1565b600f6020526000908152604090205460ff1681565b6102e76104393660046122f1565b6001600160a01b031660009081526003602052604090205490565b6102ce6111a8565b6102ce61046a3660046121b5565b6111bc565b6102ce6111c9565b600d5461010090046001600160a01b03166102a3565b61026661049b3660046121b5565b60156020526000908152604090205460ff1681565b6102836111dd565b6102ce6104c6366004612445565b6111ea565b6010546102669060ff1681565b6102666104e63660046121ea565b6111f5565b6102ce6104f93660046121b5565b611209565b61028361050c3660046121b5565b611216565b6102ce61051f3660046121b5565b6112f0565b6102e7610532366004612481565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b61026661056b366004612481565b61133f565b6102ce61057e3660046122f1565b61136d565b6102666105913660046122f1565b60126020526000908152604090205460ff1681565b600080546105b3906124b4565b80601f01602080910402602001604051908101604052809291908181526020018280546105df906124b4565b801561062c5780601f106106015761010080835404028352916020019161062c565b820191906000526020600020905b81548152906001019060200180831161060f57829003601f168201915b505050505081565b6000818152600760205260408120546001600160a01b03166106985760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064015b60405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60105460ff166106fa5760405162461bcd60e51b81526020600482015260116024820152703932b234b932b1ba103737ba1037b832b760791b604482015260640161068f565b610703816113e3565b50565b600c5481111580156107185750600081115b1561087f57600061072882611118565b9050806001600160a01b0316836001600160a01b0316036107955760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161068f565b336001600160a01b03821614806107b157506107b1813361133f565b6108235760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161068f565b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551849391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a45b5050565b600c548111610bdb576108e63382611474565b6109485760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b606482015260840161068f565b826001600160a01b031661095b82611118565b6001600160a01b0316146109bf5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161068f565b6001600160a01b038216610a215760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161068f565b600081815260086020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652600685528386208054600019019055908716808652838620805460019081019091558787526007865284872080549094169091179092558452600a909252822080549091610a9e91612504565b81548110610aae57610aae612517565b60009182526020808320909101546001600160a01b0387168352600a82526040808420868552600b90935290922054815492935083928110610af257610af2612517565b60009182526020808320909101929092556001600160a01b0386168152600a90915260409020805480610b2757610b2761252d565b600082815260208082208301600019908101839055909201909255838252600b8152604080832054848452818420556001600160a01b038616808452600a83529083208054600181810183558286529385200186905592529054610b8b9190612504565b6000838152600b602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a450505050565b6001600160a01b03831660009081526004602090815260408083203384529091529020546000198114610c3757610c128282612504565b6001600160a01b03851660009081526004602090815260408083203384529091529020555b610c428484846114d3565b50505b505050565b610c52611608565b6010805460ff19166001179055565b601054600090819061010090046001600160a01b03166064610c84856005612543565b610c8e919061255a565b915091505b9250929050565b336000818152600f602052604090205460ff1615610cef5760405162461bcd60e51b81526020600482015260126024820152713bb4ba34323930bbb732b2103a37b5b2b71760711b604482015260640161068f565b6040516bffffffffffffffffffffffff19606083901b16602082015260348101859052600090605401604051602081830303815290604052805190602001209050610d7184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050611668565b610dad5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b604482015260640161068f565b6001600160a01b0382166000908152600f60205260408120805460ff191660011790555b85811015610df457610de28361167e565b80610dec8161257c565b915050610dd1565b505050505050565b610e04611608565b601080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610e34611608565b600d805460ff19169055565b610e48611608565b600d805460ff19166001179055565b610e5f611608565b6011610c458284836125db565b601354421015610eaa5760405162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015260640161068f565b333b15610ee45760405162461bcd60e51b815260206004820152600860248201526718dbdb9d1c9858dd60c21b604482015260640161068f565b3360009081526012602052604090205460ff1615610f2e5760405162461bcd60e51b815260206004820152600760248201526618db185a5b595960ca1b604482015260640161068f565b6a295be96e6406697200000060145469021e19e0c9bab2400000610f52919061269b565b1115610f895760405162461bcd60e51b8152602060048201526006602482015265195e18d9595960d21b604482015260640161068f565b805160208083019190912060009081526015909152604090205460ff1615801561106357506016546040516bffffffffffffffffffffffff193360601b1660208201524660348201526001600160a01b03909116906110589061105290605401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b83611791565b6001600160a01b0316145b6110a25760405162461bcd60e51b815260206004820152601060248201526f696e76616c69642065766964656e636560801b604482015260640161068f565b80516020808301919091206000908152601590915260409020805460ff191660011790556110da3369021e19e0c9bab24000006117b5565b69021e19e0c9bab2400000601460008282546110f6919061269b565b9091555050336000908152601260205260409020805460ff1916600117905550565b6000818152600760205260408120546001600160a01b0316806111785760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161068f565b92915050565b611186611608565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6111b0611608565b6111ba600061186f565b565b6111c4611608565b600e55565b6111d1611608565b6010805460ff19169055565b600180546105b3906124b4565b6108cf3383836118c9565b60006112023384846114d3565b9392505050565b611211611608565b601355565b6000818152600760205260409020546060906001600160a01b03166112955760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161068f565b600061129f611997565b905060008151116112bf5760405180602001604052806000815250611202565b806112c984611a29565b6040516020016112da9291906126ae565b6040516020818303038152906040529392505050565b60105460ff166113365760405162461bcd60e51b81526020600482015260116024820152703932b234b932b1ba103737ba1037b832b760791b604482015260640161068f565b61070381611abc565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b611375611608565b6001600160a01b0381166113da5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161068f565b6107038161186f565b60006113ed611d73565b90506113fa3330846108d3565b336000908152600360205260408120805483929061141990849061269b565b925050819055508060056000828254611432919061269b565b909155505060405181815233906000907fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487906020015b60405180910390a35050565b60008061148083611118565b9050806001600160a01b0316846001600160a01b031614806114a757506114a7818561133f565b806114cb5750836001600160a01b03166114c084610634565b6001600160a01b0316145b949350505050565b600d5460009060ff1661151b5760405162461bcd60e51b815260206004820152601060248201526f31b0b7103737ba103a3930b739b332b960811b604482015260640161068f565b6001600160a01b038416600090815260036020526040902054828110156115935760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161068f565b6001600160a01b03808616600081815260036020526040808220805488900390559287168082529083902080548701905591517fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487906115f59087815260200190565b60405180910390a3506001949350505050565b600d546001600160a01b036101009091041633146111ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068f565b6000826116758584611d98565b14949350505050565b6001600160a01b0381166116d45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161068f565b600c80546001908101918290556001600160a01b03831660008181526006602090815260408083208054860190558583526007825280832080546001600160a01b03191685179055838352600a8252822080548086018255818452918320909101859055919052546117469190612504565b6000828152600b602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008060006117a08585611ddd565b915091506117ad81611e1f565b509392505050565b6001600160a01b03821661180b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161068f565b806005600082825461181d919061269b565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e0314879101611468565b600d80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361192a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161068f565b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6060601180546119a6906124b4565b80601f01602080910402602001604051908101604052809291908181526020018280546119d2906124b4565b8015611a1f5780601f106119f457610100808354040283529160200191611a1f565b820191906000526020600020905b815481529060010190602001808311611a0257829003601f168201915b5050505050905090565b60606000611a3683611f69565b600101905060008167ffffffffffffffff811115611a5657611a5661237e565b6040519080825280601f01601f191660200182016040528015611a80576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611a8a57509392505050565b6000611ac6611d73565b90506000611ad4828461255a565b90506000611ae28383612543565b9050611af0336000836114d3565b508060056000828254611b039190612504565b9091555050306000908152600a60205260408120548311611b25576000611b3f565b306000908152600a6020526040902054611b3f9084612504565b90506000611b4d8285612504565b905060005b82811015611b7557611b633361167e565b80611b6d8161257c565b915050611b52565b5060005b81811015611d6a57306000908152600a602052604081208054611b9e90600190612504565b81548110611bae57611bae612517565b600091825260208083209091015430808452600683526040808520805460001901905533808652818620805460019081019091558487526007865282872080546001600160a01b03191683179055838752600a9095529085208054939650919490939092611c1c9190612504565b81548110611c2c57611c2c612517565b60009182526020808320909101546001600160a01b0386168352600a82526040808420888552600b90935290922054815492935083928110611c7057611c70612517565b60009182526020808320909101929092556001600160a01b0385168152600a90915260409020805480611ca557611ca561252d565b600082815260208082208301600019908101839055909201909255858252600b8152604080832054848452818420556001600160a01b038516808452600a83529083208054600181810183558286529385200188905592529054611d099190612504565b6000858152600b602052604080822092909255905185916001600160a01b0380861692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050508080611d629061257c565b915050611b79565b50505050505050565b600254600090611d879060ff16600a6127c1565b611d9390612710612543565b905090565b600081815b84518110156117ad57611dc982868381518110611dbc57611dbc612517565b6020026020010151612041565b915080611dd58161257c565b915050611d9d565b6000808251604103611e135760208301516040840151606085015160001a611e0787828585612070565b94509450505050610c93565b50600090506002610c93565b6000816004811115611e3357611e336127d0565b03611e3b5750565b6001816004811115611e4f57611e4f6127d0565b03611e9c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161068f565b6002816004811115611eb057611eb06127d0565b03611efd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161068f565b6003816004811115611f1157611f116127d0565b036107035760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161068f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611fa85772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611fd4576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611ff257662386f26fc10000830492506010015b6305f5e100831061200a576305f5e100830492506008015b612710831061201e57612710830492506004015b60648310612030576064830492506002015b600a83106111785760010192915050565b600081831061205d576000828152602084905260409020611202565b6000838152602083905260409020611202565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156120a7575060009050600361212b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156120fb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166121245760006001925092505061212b565b9150600090505b94509492505050565b60006020828403121561214657600080fd5b81356001600160e01b03198116811461120257600080fd5b60005b83811015612179578181015183820152602001612161565b50506000910152565b60208152600082518060208401526121a181604085016020870161215e565b601f01601f19169190910160400192915050565b6000602082840312156121c757600080fd5b5035919050565b80356001600160a01b03811681146121e557600080fd5b919050565b600080604083850312156121fd57600080fd5b612206836121ce565b946020939093013593505050565b60008060006060848603121561222957600080fd5b612232846121ce565b9250612240602085016121ce565b9150604084013590509250925092565b6000806040838503121561226357600080fd5b50508035926020909101359150565b60008060006040848603121561228757600080fd5b83359250602084013567ffffffffffffffff808211156122a657600080fd5b818601915086601f8301126122ba57600080fd5b8135818111156122c957600080fd5b8760208260051b85010111156122de57600080fd5b6020830194508093505050509250925092565b60006020828403121561230357600080fd5b611202826121ce565b6000806020838503121561231f57600080fd5b823567ffffffffffffffff8082111561233757600080fd5b818501915085601f83011261234b57600080fd5b81358181111561235a57600080fd5b86602082850101111561236c57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156123a657600080fd5b813567ffffffffffffffff808211156123be57600080fd5b818401915084601f8301126123d257600080fd5b8135818111156123e4576123e461237e565b604051601f8201601f19908116603f0116810190838211818310171561240c5761240c61237e565b8160405282815287602084870101111561242557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561245857600080fd5b612461836121ce565b91506020830135801515811461247657600080fd5b809150509250929050565b6000806040838503121561249457600080fd5b61249d836121ce565b91506124ab602084016121ce565b90509250929050565b600181811c908216806124c857607f821691505b6020821081036124e857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115611178576111786124ee565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b8082028115828204841417611178576111786124ee565b60008261257757634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161258e5761258e6124ee565b5060010190565b601f821115610c4557600081815260208120601f850160051c810160208610156125bc5750805b601f850160051c820191505b81811015610df4578281556001016125c8565b67ffffffffffffffff8311156125f3576125f361237e565b6126078361260183546124b4565b83612595565b6000601f84116001811461263b57600085156126235750838201355b600019600387901b1c1916600186901b178355610c42565b600083815260209020601f19861690835b8281101561266c578685013582556020948501946001909201910161264c565b50868210156126895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b80820180821115611178576111786124ee565b600083516126c081846020880161215e565b8351908301906126d481836020880161215e565b01949350505050565b600181815b808511156127185781600019048211156126fe576126fe6124ee565b8085161561270b57918102915b93841c93908002906126e2565b509250929050565b60008261272f57506001611178565b8161273c57506000611178565b8160018114612752576002811461275c57612778565b6001915050611178565b60ff84111561276d5761276d6124ee565b50506001821b611178565b5060208310610133831016604e8410600b841016171561279b575081810a611178565b6127a583836126dd565b80600019048211156127b9576127b96124ee565b029392505050565b600061120260ff841683612720565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c53085dfe88b5f3d3742da353d79b5051b8693dee8640712f9a64a690dee386564736f6c63430008120033000000000000000000000000b0b8d2f68cbea6112af786b0435c01cd01ee3b0b

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061023d5760003560e01c80636352211e1161013b578063a22cb465116100b8578063d95ba17d1161007c578063d95ba17d14610511578063dd62ed3e14610524578063e985e9c51461055d578063f2fde38b14610570578063fbda63221461058357600080fd5b8063a22cb465146104b8578063a7e61240146104cb578063a9059cbb146104d8578063c44bef75146104eb578063c87b56dd146104fe57600080fd5b80637cb64759116100ff5780637cb647591461045c5780638059dc101461046f5780638da5cb5b1461047757806392c090d31461048d57806395d89b41146104b057600080fd5b80636352211e146103e25780636c19e783146103f55780636ef610921461040857806370a082311461042b578063715018a61461045457600080fd5b80632a55205a116101c957806348bf380a1161018d57806348bf380a146103a357806349359cb2146103ab5780634f02c420146103b357806355f804b3146103bc5780635a058858146103cf57600080fd5b80632a55205a146103235780632eb4a7ab146103555780632f52ebb71461035e578063313ce5671461037157806341e42f301461039057600080fd5b8063095ea7b311610210578063095ea7b3146102d057806318160ddd146102e3578063238ac933146102f557806323b872dd146103085780632902b2581461031b57600080fd5b806301ffc9a71461024257806306fdde031461027b578063081812fc14610290578063091a1ecf146102bb575b600080fd5b610266610250366004612134565b6001600160e01b03191663152a902d60e11b1490565b60405190151581526020015b60405180910390f35b6102836105a6565b6040516102729190612182565b6102a361029e3660046121b5565b610634565b6040516001600160a01b039091168152602001610272565b6102ce6102c93660046121b5565b6106b4565b005b6102ce6102de3660046121ea565b610706565b6005545b604051908152602001610272565b6016546102a3906001600160a01b031681565b6102ce610316366004612214565b6108d3565b6102ce610c4a565b610336610331366004612250565b610c61565b604080516001600160a01b039093168352602083019190915201610272565b6102e7600e5481565b6102ce61036c366004612272565b610c9a565b60025461037e9060ff1681565b60405160ff9091168152602001610272565b6102ce61039e3660046122f1565b610dfc565b6102ce610e2c565b6102ce610e40565b6102e7600c5481565b6102ce6103ca36600461230c565b610e57565b6102ce6103dd366004612394565b610e6c565b6102a36103f03660046121b5565b611118565b6102ce6104033660046122f1565b61117e565b6102666104163660046122f1565b600f6020526000908152604090205460ff1681565b6102e76104393660046122f1565b6001600160a01b031660009081526003602052604090205490565b6102ce6111a8565b6102ce61046a3660046121b5565b6111bc565b6102ce6111c9565b600d5461010090046001600160a01b03166102a3565b61026661049b3660046121b5565b60156020526000908152604090205460ff1681565b6102836111dd565b6102ce6104c6366004612445565b6111ea565b6010546102669060ff1681565b6102666104e63660046121ea565b6111f5565b6102ce6104f93660046121b5565b611209565b61028361050c3660046121b5565b611216565b6102ce61051f3660046121b5565b6112f0565b6102e7610532366004612481565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b61026661056b366004612481565b61133f565b6102ce61057e3660046122f1565b61136d565b6102666105913660046122f1565b60126020526000908152604090205460ff1681565b600080546105b3906124b4565b80601f01602080910402602001604051908101604052809291908181526020018280546105df906124b4565b801561062c5780601f106106015761010080835404028352916020019161062c565b820191906000526020600020905b81548152906001019060200180831161060f57829003601f168201915b505050505081565b6000818152600760205260408120546001600160a01b03166106985760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064015b60405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60105460ff166106fa5760405162461bcd60e51b81526020600482015260116024820152703932b234b932b1ba103737ba1037b832b760791b604482015260640161068f565b610703816113e3565b50565b600c5481111580156107185750600081115b1561087f57600061072882611118565b9050806001600160a01b0316836001600160a01b0316036107955760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161068f565b336001600160a01b03821614806107b157506107b1813361133f565b6108235760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161068f565b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551849391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a45b5050565b600c548111610bdb576108e63382611474565b6109485760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b606482015260840161068f565b826001600160a01b031661095b82611118565b6001600160a01b0316146109bf5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161068f565b6001600160a01b038216610a215760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161068f565b600081815260086020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652600685528386208054600019019055908716808652838620805460019081019091558787526007865284872080549094169091179092558452600a909252822080549091610a9e91612504565b81548110610aae57610aae612517565b60009182526020808320909101546001600160a01b0387168352600a82526040808420868552600b90935290922054815492935083928110610af257610af2612517565b60009182526020808320909101929092556001600160a01b0386168152600a90915260409020805480610b2757610b2761252d565b600082815260208082208301600019908101839055909201909255838252600b8152604080832054848452818420556001600160a01b038616808452600a83529083208054600181810183558286529385200186905592529054610b8b9190612504565b6000838152600b602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a450505050565b6001600160a01b03831660009081526004602090815260408083203384529091529020546000198114610c3757610c128282612504565b6001600160a01b03851660009081526004602090815260408083203384529091529020555b610c428484846114d3565b50505b505050565b610c52611608565b6010805460ff19166001179055565b601054600090819061010090046001600160a01b03166064610c84856005612543565b610c8e919061255a565b915091505b9250929050565b336000818152600f602052604090205460ff1615610cef5760405162461bcd60e51b81526020600482015260126024820152713bb4ba34323930bbb732b2103a37b5b2b71760711b604482015260640161068f565b6040516bffffffffffffffffffffffff19606083901b16602082015260348101859052600090605401604051602081830303815290604052805190602001209050610d7184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050611668565b610dad5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b604482015260640161068f565b6001600160a01b0382166000908152600f60205260408120805460ff191660011790555b85811015610df457610de28361167e565b80610dec8161257c565b915050610dd1565b505050505050565b610e04611608565b601080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610e34611608565b600d805460ff19169055565b610e48611608565b600d805460ff19166001179055565b610e5f611608565b6011610c458284836125db565b601354421015610eaa5760405162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015260640161068f565b333b15610ee45760405162461bcd60e51b815260206004820152600860248201526718dbdb9d1c9858dd60c21b604482015260640161068f565b3360009081526012602052604090205460ff1615610f2e5760405162461bcd60e51b815260206004820152600760248201526618db185a5b595960ca1b604482015260640161068f565b6a295be96e6406697200000060145469021e19e0c9bab2400000610f52919061269b565b1115610f895760405162461bcd60e51b8152602060048201526006602482015265195e18d9595960d21b604482015260640161068f565b805160208083019190912060009081526015909152604090205460ff1615801561106357506016546040516bffffffffffffffffffffffff193360601b1660208201524660348201526001600160a01b03909116906110589061105290605401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b83611791565b6001600160a01b0316145b6110a25760405162461bcd60e51b815260206004820152601060248201526f696e76616c69642065766964656e636560801b604482015260640161068f565b80516020808301919091206000908152601590915260409020805460ff191660011790556110da3369021e19e0c9bab24000006117b5565b69021e19e0c9bab2400000601460008282546110f6919061269b565b9091555050336000908152601260205260409020805460ff1916600117905550565b6000818152600760205260408120546001600160a01b0316806111785760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161068f565b92915050565b611186611608565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6111b0611608565b6111ba600061186f565b565b6111c4611608565b600e55565b6111d1611608565b6010805460ff19169055565b600180546105b3906124b4565b6108cf3383836118c9565b60006112023384846114d3565b9392505050565b611211611608565b601355565b6000818152600760205260409020546060906001600160a01b03166112955760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161068f565b600061129f611997565b905060008151116112bf5760405180602001604052806000815250611202565b806112c984611a29565b6040516020016112da9291906126ae565b6040516020818303038152906040529392505050565b60105460ff166113365760405162461bcd60e51b81526020600482015260116024820152703932b234b932b1ba103737ba1037b832b760791b604482015260640161068f565b61070381611abc565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b611375611608565b6001600160a01b0381166113da5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161068f565b6107038161186f565b60006113ed611d73565b90506113fa3330846108d3565b336000908152600360205260408120805483929061141990849061269b565b925050819055508060056000828254611432919061269b565b909155505060405181815233906000907fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487906020015b60405180910390a35050565b60008061148083611118565b9050806001600160a01b0316846001600160a01b031614806114a757506114a7818561133f565b806114cb5750836001600160a01b03166114c084610634565b6001600160a01b0316145b949350505050565b600d5460009060ff1661151b5760405162461bcd60e51b815260206004820152601060248201526f31b0b7103737ba103a3930b739b332b960811b604482015260640161068f565b6001600160a01b038416600090815260036020526040902054828110156115935760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161068f565b6001600160a01b03808616600081815260036020526040808220805488900390559287168082529083902080548701905591517fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487906115f59087815260200190565b60405180910390a3506001949350505050565b600d546001600160a01b036101009091041633146111ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068f565b6000826116758584611d98565b14949350505050565b6001600160a01b0381166116d45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161068f565b600c80546001908101918290556001600160a01b03831660008181526006602090815260408083208054860190558583526007825280832080546001600160a01b03191685179055838352600a8252822080548086018255818452918320909101859055919052546117469190612504565b6000828152600b602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008060006117a08585611ddd565b915091506117ad81611e1f565b509392505050565b6001600160a01b03821661180b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161068f565b806005600082825461181d919061269b565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e0314879101611468565b600d80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361192a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161068f565b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6060601180546119a6906124b4565b80601f01602080910402602001604051908101604052809291908181526020018280546119d2906124b4565b8015611a1f5780601f106119f457610100808354040283529160200191611a1f565b820191906000526020600020905b815481529060010190602001808311611a0257829003601f168201915b5050505050905090565b60606000611a3683611f69565b600101905060008167ffffffffffffffff811115611a5657611a5661237e565b6040519080825280601f01601f191660200182016040528015611a80576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611a8a57509392505050565b6000611ac6611d73565b90506000611ad4828461255a565b90506000611ae28383612543565b9050611af0336000836114d3565b508060056000828254611b039190612504565b9091555050306000908152600a60205260408120548311611b25576000611b3f565b306000908152600a6020526040902054611b3f9084612504565b90506000611b4d8285612504565b905060005b82811015611b7557611b633361167e565b80611b6d8161257c565b915050611b52565b5060005b81811015611d6a57306000908152600a602052604081208054611b9e90600190612504565b81548110611bae57611bae612517565b600091825260208083209091015430808452600683526040808520805460001901905533808652818620805460019081019091558487526007865282872080546001600160a01b03191683179055838752600a9095529085208054939650919490939092611c1c9190612504565b81548110611c2c57611c2c612517565b60009182526020808320909101546001600160a01b0386168352600a82526040808420888552600b90935290922054815492935083928110611c7057611c70612517565b60009182526020808320909101929092556001600160a01b0385168152600a90915260409020805480611ca557611ca561252d565b600082815260208082208301600019908101839055909201909255858252600b8152604080832054848452818420556001600160a01b038516808452600a83529083208054600181810183558286529385200188905592529054611d099190612504565b6000858152600b602052604080822092909255905185916001600160a01b0380861692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050508080611d629061257c565b915050611b79565b50505050505050565b600254600090611d879060ff16600a6127c1565b611d9390612710612543565b905090565b600081815b84518110156117ad57611dc982868381518110611dbc57611dbc612517565b6020026020010151612041565b915080611dd58161257c565b915050611d9d565b6000808251604103611e135760208301516040840151606085015160001a611e0787828585612070565b94509450505050610c93565b50600090506002610c93565b6000816004811115611e3357611e336127d0565b03611e3b5750565b6001816004811115611e4f57611e4f6127d0565b03611e9c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161068f565b6002816004811115611eb057611eb06127d0565b03611efd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161068f565b6003816004811115611f1157611f116127d0565b036107035760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161068f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611fa85772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611fd4576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611ff257662386f26fc10000830492506010015b6305f5e100831061200a576305f5e100830492506008015b612710831061201e57612710830492506004015b60648310612030576064830492506002015b600a83106111785760010192915050565b600081831061205d576000828152602084905260409020611202565b6000838152602083905260409020611202565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156120a7575060009050600361212b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156120fb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166121245760006001925092505061212b565b9150600090505b94509492505050565b60006020828403121561214657600080fd5b81356001600160e01b03198116811461120257600080fd5b60005b83811015612179578181015183820152602001612161565b50506000910152565b60208152600082518060208401526121a181604085016020870161215e565b601f01601f19169190910160400192915050565b6000602082840312156121c757600080fd5b5035919050565b80356001600160a01b03811681146121e557600080fd5b919050565b600080604083850312156121fd57600080fd5b612206836121ce565b946020939093013593505050565b60008060006060848603121561222957600080fd5b612232846121ce565b9250612240602085016121ce565b9150604084013590509250925092565b6000806040838503121561226357600080fd5b50508035926020909101359150565b60008060006040848603121561228757600080fd5b83359250602084013567ffffffffffffffff808211156122a657600080fd5b818601915086601f8301126122ba57600080fd5b8135818111156122c957600080fd5b8760208260051b85010111156122de57600080fd5b6020830194508093505050509250925092565b60006020828403121561230357600080fd5b611202826121ce565b6000806020838503121561231f57600080fd5b823567ffffffffffffffff8082111561233757600080fd5b818501915085601f83011261234b57600080fd5b81358181111561235a57600080fd5b86602082850101111561236c57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156123a657600080fd5b813567ffffffffffffffff808211156123be57600080fd5b818401915084601f8301126123d257600080fd5b8135818111156123e4576123e461237e565b604051601f8201601f19908116603f0116810190838211818310171561240c5761240c61237e565b8160405282815287602084870101111561242557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561245857600080fd5b612461836121ce565b91506020830135801515811461247657600080fd5b809150509250929050565b6000806040838503121561249457600080fd5b61249d836121ce565b91506124ab602084016121ce565b90509250929050565b600181811c908216806124c857607f821691505b6020821081036124e857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115611178576111786124ee565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b8082028115828204841417611178576111786124ee565b60008261257757634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161258e5761258e6124ee565b5060010190565b601f821115610c4557600081815260208120601f850160051c810160208610156125bc5750805b601f850160051c820191505b81811015610df4578281556001016125c8565b67ffffffffffffffff8311156125f3576125f361237e565b6126078361260183546124b4565b83612595565b6000601f84116001811461263b57600085156126235750838201355b600019600387901b1c1916600186901b178355610c42565b600083815260209020601f19861690835b8281101561266c578685013582556020948501946001909201910161264c565b50868210156126895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b80820180821115611178576111786124ee565b600083516126c081846020880161215e565b8351908301906126d481836020880161215e565b01949350505050565b600181815b808511156127185781600019048211156126fe576126fe6124ee565b8085161561270b57918102915b93841c93908002906126e2565b509250929050565b60008261272f57506001611178565b8161273c57506000611178565b8160018114612752576002811461275c57612778565b6001915050611178565b60ff84111561276d5761276d6124ee565b50506001821b611178565b5060208310610133831016604e8410600b841016171561279b575081810a611178565b6127a583836126dd565b80600019048211156127b9576127b96124ee565b029392505050565b600061120260ff841683612720565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c53085dfe88b5f3d3742da353d79b5051b8693dee8640712f9a64a690dee386564736f6c63430008120033

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

000000000000000000000000b0b8d2f68cbea6112af786b0435c01cd01ee3b0b

-----Decoded View---------------
Arg [0] : _signer (address): 0xb0b8d2f68CBEA6112Af786b0435C01Cd01EE3B0B

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b0b8d2f68cbea6112af786b0435c01cd01ee3b0b


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

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