ETH Price: $3,919.03 (+5.66%)

TWVPKLand (TWVPK)
 

Overview

TokenID

105756

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

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

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : TWVPKLand.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
pragma abicoder v2;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";

/**
 * Generalities:
 * This Smart Contract has 2 main roles: ADMIN and SIGNER. Admin is used for most "management" functions.
 * The SIGNER role is very specific and directly related to the purchase land through the website.
 * The VOUCHER (created by the website) is a bit like a Cart. It contains a price, a list of tokens, and expiration date and the wallet of the person buying.
 * The VOUCHER is signed server side and its authenticity is validated by the smart contract using the ECDSA recover function.
 * The buyLand function is open to anyone, and the function can freely mint and transfer lands. A valid VOUCHER is required to process, and this can only happen through the website.
 *
 *
 *
 */

/// @custom:security-contact [email protected]
contract TWVPKLand is ERC721, EIP712, IERC2981, Ownable, AccessControl, Pausable, ERC721Burnable {
    // SIGNER role is used to sign the voucher on the server backend
    bytes32 private constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
    string private constant SIGNING_DOMAIN = "TWVPKLand-Voucher";
    string private constant SIGNATURE_VERSION = "1";

    // Wallet Managing the transfer of winky token in ERC-20
    IERC20 private WNK_TOKEN;

    address private _royaltiesRecipient;
    uint256 private _royaltyPct;

    string private baseTokenUri;

    /**
     * @dev Constructor call when deploying the smart contract
     *
     * Requirements:
     *
     * - `signer` Address that will be use to sign the Vouchers on the server backend
     * - `wnkAddress` Winkies ERC20 token smart contract address
     * - `tokenUriUrl` URL of the token metadatas
     * - An initial default royalties of 10% will be initiated at deployement
     */
    constructor(address signer, address wnkAddress, string memory tokenUriUrl)
        ERC721("TWVPKLand", "TWVPK")
        EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) {
            _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
            _grantRole(SIGNER_ROLE, signer);
            _royaltiesRecipient = msg.sender;
            WNK_TOKEN = IERC20(wnkAddress);
            baseTokenUri = tokenUriUrl;
            _royaltyPct = 10;
        }

    /**
     * @dev A Voucher is Generated on the server backend once a transaction is initiated by a user buying a land on the website.
     * Requirements:
     *
     * - `tokenIds` List of token IDs to buy
     * - `price` Price to apply for the whole transaction. (not a single land)
     * - `redeemer` Address of the buyer to receive the lands
     * - `expiration` A delay used to temporarily lock other user from creating another transaction with the same items at the same time.
     * - `signature` The voucher hash, signed by the AWS KMS signing service
     */
    struct NFTVoucher {
        uint256[] tokenIds;
        uint256 price;
        address redeemer;
        uint expiration;
        bytes signature;
    }

    /**
     * @dev WalletNfts is being used to mint a series of land and give them to a specific user
     * Requirements:
     *
     * - `walletAddress` Receiver address
     * - `tokenIds` List of lands to mind and transfer
     */
    struct WalletNfts {
        address walletAddress;
        uint256[] tokenIds;
    }

    function intArrayToString(uint256[] memory intArray) internal pure returns (string memory) {
        string memory result = "[";
        string memory prefix = "";
        for (uint i = 0; i < intArray.length; i++) {
            if (i > 0) {
               prefix = ","; 
            }
            result = string(abi.encodePacked(result, prefix, Strings.toString(intArray[i])));
        }
        return string(abi.encodePacked(result, "]"));
    }

    function setBaseTokenUri(string memory _baseTokenUri) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        baseTokenUri = _baseTokenUri;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        return string(abi.encodePacked(baseTokenUri, Strings.toString(tokenId)));
    }

    /**
     * @dev _hash is used to computer a signature from the Voucher hash and then validate that the signer is the same as granted
     * Requirements:
     *
     * - `voucher` Receive a voucher in parameter
     */
    function _hash(NFTVoucher calldata voucher) internal view returns (bytes32) {
        return _hashTypedDataV4(keccak256(abi.encode(
        keccak256("NFTVoucher(uint256[] tokenIds,uint256 price,address redeemer,uint expiration)"),
        keccak256(bytes(intArrayToString(voucher.tokenIds))),
        voucher.price,
        voucher.redeemer,
        voucher.expiration
        )));
    }

    /**
     * @dev _verify the Voucher Hash     * Requirements:
     *
     * - `voucher` Receive a voucher in parameter
     */
    function _verify(NFTVoucher calldata voucher) internal view returns (address) {
        bytes32 digest = _hash(voucher);
        return ECDSA.recover(digest, voucher.signature);
    }

    /**
     * @dev buyLand is called the a potention buyer after having selected their items on the web site.
     *
     * - `voucher` The data indicating what is the nature of the transaction
     */
    function buyLandWnk(NFTVoucher calldata voucher) external whenNotPaused {
        // Make sure the voucher is legit and signed by our keys
        address signer = _verify(voucher);
        require(hasRole(SIGNER_ROLE, signer), "Signature invalid or unauthorized for signer.");
        // Make sure the redemmer is not the sender
        require(msg.sender == voucher.redeemer, "This address has not been authorized to use this voucher.");
        require(block.timestamp < voucher.expiration, "This voucher is expired.");
        uint256 allowance = WNK_TOKEN.allowance(msg.sender, address(this));
        require(allowance >= voucher.price, "Insufficient funds to buy these lands.");
        //Directly transfer the lands into the sender memory
        WNK_TOKEN.transferFrom(msg.sender, address(this), voucher.price);
        for (uint i = 0; i < voucher.tokenIds.length; i++) {
            _mint(msg.sender, voucher.tokenIds[i]);
        }
    }

    /**
     * @dev Function to withdraw a certain quantity of Winkies
     *
     * - `quantity` The quantity to send to the main wallet
     */
    function withdrawWnk(uint256 quantity) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        require(quantity > 0, "No WNK token to transfer.");
        uint256 wnkAmountAvailable = WNK_TOKEN.balanceOf(address(this));
        require(quantity <= wnkAmountAvailable, "The quantity of WNK to transfer can't be higher that the total amount of WNK available.");
        WNK_TOKEN.transfer(msg.sender, quantity);
    }

    function availableWnkToWithdraw() external view returns (uint256) {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        return WNK_TOKEN.balanceOf(address(this));
    }

    function mintByOwner(WalletNfts[] calldata nftsToMint) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        for (uint walletCpt = 0; walletCpt < nftsToMint.length; walletCpt++) {
            WalletNfts memory walletNfts = nftsToMint[walletCpt];
            for (uint tokenIdCpt = 0; tokenIdCpt < walletNfts.tokenIds.length; tokenIdCpt++) {
                _mint(walletNfts.walletAddress, walletNfts.tokenIds[tokenIdCpt]);
            }
        }
    }

    function setRoyaltiesRecipient(address newRecipient) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        require(newRecipient != address(0), "Royalties: new recipient is the zero address");
        _royaltiesRecipient = newRecipient;
    }

    function setWnkTokenAddress(address wnkAddress) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        WNK_TOKEN = IERC20(wnkAddress);
    }

    // EIP2981 standard royalties return
    function royaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override
        returns (address receiver, uint256 royaltyAmount)
    {
        return (_royaltiesRecipient, (_salePrice * _royaltyPct) / 100);
    }

    function setRoyaltyPct(uint256 royaltyPct) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        _royaltyPct = royaltyPct;
    }

    function pause() public {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        _pause();
    }

    function unpause() public {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Unauthorized operation.");
        _unpause();
    }

    // The following functions are overrides required by Solidity.
    function _burn(uint256 tokenId) internal override {
        super._burn(tokenId);
    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165, AccessControl) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 2 of 21 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _burn(tokenId);
    }
}

File 3 of 21 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

pragma solidity ^0.8.0;

import "../utils/introspection/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 5 of 21 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

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

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 6 of 21 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 7 of 21 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (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
    }

    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");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' 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 (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

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

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

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

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

    /**
     * @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 11 of 21 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

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

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

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

File 12 of 21 : 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 13 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 14 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

File 17 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 18 of 21 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 20 of 21 : 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 21 of 21 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"wnkAddress","type":"address"},{"internalType":"string","name":"tokenUriUrl","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableWnkToWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct TWVPKLand.NFTVoucher","name":"voucher","type":"tuple"}],"name":"buyLandWnk","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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"components":[{"internalType":"address","name":"walletAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"internalType":"struct TWVPKLand.WalletNfts[]","name":"nftsToMint","type":"tuple[]"}],"name":"mintByOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenUri","type":"string"}],"name":"setBaseTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRecipient","type":"address"}],"name":"setRoyaltiesRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"royaltyPct","type":"uint256"}],"name":"setRoyaltyPct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wnkAddress","type":"address"}],"name":"setWnkTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"withdrawWnk","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101406040523480156200001257600080fd5b5060405162003715380380620037158339810160408190526200003591620003ef565b604051806040016040528060118152602001702a2bab2825a630b73216ab37bab1b432b960791b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060098152602001681515d59412d3185b9960ba1b81525060405180604001604052806005815260200164545756504b60d81b8152508160009080519060200190620000d192919062000316565b508051620000e790600190602084019062000316565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c094850190915281519190960120905292909252610120525062000184336200021f565b6008805460ff191690556200019b60003362000271565b620001c77fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f708462000271565b600980546001600160a01b03191633179055600880546001600160a01b03841661010002610100600160a81b031990911617905580516200021090600b90602084019062000316565b5050600a805550620005309050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16620003125760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002d13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200032490620004f3565b90600052602060002090601f01602090048101928262000348576000855562000393565b82601f106200036357805160ff191683800117855562000393565b8280016001018555821562000393579182015b828111156200039357825182559160200191906001019062000376565b50620003a1929150620003a5565b5090565b5b80821115620003a15760008155600101620003a6565b80516001600160a01b0381168114620003d457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156200040557600080fd5b6200041084620003bc565b9250602062000421818601620003bc565b60408601519093506001600160401b03808211156200043f57600080fd5b818701915087601f8301126200045457600080fd5b815181811115620004695762000469620003d9565b604051601f8201601f19908116603f01168101908382118183101715620004945762000494620003d9565b816040528281528a86848701011115620004ad57600080fd5b600093505b82841015620004d15784840186015181850187015292850192620004b2565b82841115620004e35760008684830101525b8096505050505050509250925092565b600181811c908216806200050857607f821691505b602082108114156200052a57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161319562000580600039600061253a0152600061258901526000612564015260006124bd015260006124e70152600061251101526131956000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063a217fddf116100ad578063c50b87be1161007c578063c50b87be14610472578063c87b56dd14610485578063d547741f14610498578063e985e9c5146104ab578063f2fde38b146104e757600080fd5b8063a217fddf14610431578063a22cb46514610439578063b88d4fde1461044c578063bf81941e1461045f57600080fd5b806391d14854116100f457806391d14854146103dd57806391f22c86146103f057806395652cfa1461040357806395b8a72a1461041657806395d89b411461042957600080fd5b806370a08231146103a9578063715018a6146103bc5780638456cb59146103c45780638da5cb5b146103cc57600080fd5b80632a55205a116101a857806342842e0e1161017757806342842e0e1461035d57806342966c68146103705780635327f34a146103835780635c975abb1461038b5780636352211e1461039657600080fd5b80632a55205a146102fd5780632f2ff15d1461032f57806336568abe146103425780633f4ba83a1461035557600080fd5b80631c0063b4116101e45780631c0063b4146102935780631f3491a2146102a657806323b872dd146102b9578063248a9ca3146102cc57600080fd5b806301ffc9a71461021657806306fdde031461023e578063081812fc14610253578063095ea7b31461027e575b600080fd5b610229610224366004612773565b6104fa565b60405190151581526020015b60405180910390f35b610246610525565b60405161023591906127e8565b6102666102613660046127fb565b6105b7565b6040516001600160a01b039091168152602001610235565b61029161028c366004612830565b6105de565b005b6102916102a13660046127fb565b6106f9565b6102916102b43660046127fb565b610725565b6102916102c736600461285a565b610925565b6102ef6102da3660046127fb565b60009081526007602052604090206001015490565b604051908152602001610235565b61031061030b366004612896565b610957565b604080516001600160a01b039093168352602083019190915201610235565b61029161033d3660046128b8565b610991565b6102916103503660046128b8565b6109b6565b610291610a34565b61029161036b36600461285a565b610a65565b61029161037e3660046127fb565b610a80565b6102ef610ab1565b60085460ff16610229565b6102666103a43660046127fb565b610b4e565b6102ef6103b73660046128e4565b610bae565b610291610c34565b610291610c46565b6006546001600160a01b0316610266565b6102296103eb3660046128b8565b610c75565b6102916103fe3660046128ff565b610ca0565b610291610411366004612a3c565b610d65565b610291610424366004612a85565b610d9f565b6102466110e1565b6102ef600081565b610291610447366004612ace565b6110f0565b61029161045a366004612b05565b6110fb565b61029161046d3660046128e4565b61112d565b6102916104803660046128e4565b61117c565b6102466104933660046127fb565b611230565b6102916104a63660046128b8565b611264565b6102296104b9366004612b81565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102916104f53660046128e4565b611289565b60006001600160e01b0319821663152a902d60e11b148061051f575061051f826112ff565b92915050565b60606000805461053490612bab565b80601f016020809104026020016040519081016040528092919081815260200182805461056090612bab565b80156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b5050505050905090565b60006105c282611324565b506000908152600460205260409020546001600160a01b031690565b60006105e982610b4e565b9050806001600160a01b0316836001600160a01b0316141561065c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610678575061067881336104b9565b6106ea5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610653565b6106f48383611383565b505050565b610704600033610c75565b6107205760405162461bcd60e51b815260040161065390612be6565b600a55565b610730600033610c75565b61074c5760405162461bcd60e51b815260040161065390612be6565b6000811161079c5760405162461bcd60e51b815260206004820152601960248201527f4e6f20574e4b20746f6b656e20746f207472616e736665722e000000000000006044820152606401610653565b6008546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080e9190612c1d565b9050808211156108ac5760405162461bcd60e51b815260206004820152605760248201527f546865207175616e74697479206f6620574e4b20746f207472616e736665722060448201527f63616e27742062652068696768657220746861742074686520746f74616c206160648201527f6d6f756e74206f6620574e4b20617661696c61626c652e000000000000000000608482015260a401610653565b60085460405163a9059cbb60e01b8152336004820152602481018490526101009091046001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f49190612c36565b610930335b826113f1565b61094c5760405162461bcd60e51b815260040161065390612c53565b6106f4838383611470565b600954600a5460009182916001600160a01b039091169060649061097b9086612cb7565b6109859190612cec565b915091505b9250929050565b6000828152600760205260409020600101546109ac81611617565b6106f48383611621565b6001600160a01b0381163314610a265760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610653565b610a3082826116a7565b5050565b610a3f600033610c75565b610a5b5760405162461bcd60e51b815260040161065390612be6565b610a6361170e565b565b6106f4838383604051806020016040528060008152506110fb565b610a893361092a565b610aa55760405162461bcd60e51b815260040161065390612c53565b610aae81611760565b50565b6000610abd8133610c75565b610ad95760405162461bcd60e51b815260040161065390612be6565b6008546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b499190612c1d565b905090565b6000818152600260205260408120546001600160a01b03168061051f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610653565b60006001600160a01b038216610c185760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610653565b506001600160a01b031660009081526003602052604090205490565b610c3c611769565b610a6360006117c3565b610c51600033610c75565b610c6d5760405162461bcd60e51b815260040161065390612be6565b610a63611815565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610cab600033610c75565b610cc75760405162461bcd60e51b815260040161065390612be6565b60005b818110156106f4576000838383818110610ce657610ce6612d00565b9050602002810190610cf89190612d16565b610d0190612d36565b905060005b816020015151811015610d5057610d3e826000015183602001518381518110610d3157610d31612d00565b6020026020010151611852565b80610d4881612df7565b915050610d06565b50508080610d5d90612df7565b915050610cca565b610d70600033610c75565b610d8c5760405162461bcd60e51b815260040161065390612be6565b8051610a3090600b9060208401906126c4565b610da76119a0565b6000610db2826119e6565b9050610dde7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082610c75565b610e405760405162461bcd60e51b815260206004820152602d60248201527f5369676e617475726520696e76616c6964206f7220756e617574686f72697a6560448201526c32103337b91039b4b3b732b91760991b6064820152608401610653565b610e5060608301604084016128e4565b6001600160a01b0316336001600160a01b031614610ed65760405162461bcd60e51b815260206004820152603960248201527f54686973206164647265737320686173206e6f74206265656e20617574686f7260448201527f697a656420746f20757365207468697320766f75636865722e000000000000006064820152608401610653565b81606001354210610f295760405162461bcd60e51b815260206004820152601860248201527f5468697320766f756368657220697320657870697265642e00000000000000006044820152606401610653565b600854604051636eb1769f60e11b815233600482015230602482015260009161010090046001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190612c1d565b905082602001358110156110065760405162461bcd60e51b815260206004820152602660248201527f496e73756666696369656e742066756e647320746f20627579207468657365206044820152653630b732399760d11b6064820152608401610653565b6008546040516323b872dd60e01b8152336004820152306024820152602085013560448201526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611064573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110889190612c36565b5060005b6110968480612e12565b90508110156110db576110c9336110ad8680612e12565b848181106110bd576110bd612d00565b90506020020135611852565b806110d381612df7565b91505061108c565b50505050565b60606001805461053490612bab565b610a30338383611a46565b61110533836113f1565b6111215760405162461bcd60e51b815260040161065390612c53565b6110db84848484611b15565b611138600033610c75565b6111545760405162461bcd60e51b815260040161065390612be6565b600880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611187600033610c75565b6111a35760405162461bcd60e51b815260040161065390612be6565b6001600160a01b03811661120e5760405162461bcd60e51b815260206004820152602c60248201527f526f79616c746965733a206e657720726563697069656e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401610653565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6060600b61123d83611b48565b60405160200161124e929190612e78565b6040516020818303038152906040529050919050565b60008281526007602052604090206001015461127f81611617565b6106f483836116a7565b611291611769565b6001600160a01b0381166112f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610653565b610aae816117c3565b60006001600160e01b03198216637965db0b60e01b148061051f575061051f82611c46565b6000818152600260205260409020546001600160a01b0316610aae5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610653565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906113b882610b4e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806113fd83610b4e565b9050806001600160a01b0316846001600160a01b0316148061144457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806114685750836001600160a01b031661145d846105b7565b6001600160a01b0316145b949350505050565b826001600160a01b031661148382610b4e565b6001600160a01b0316146114e75760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610653565b6001600160a01b0382166115495760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610653565b611554838383611c96565b61155f600082611383565b6001600160a01b0383166000908152600360205260408120805460019290611588908490612f1f565b90915550506001600160a01b03821660009081526003602052604081208054600192906115b6908490612f36565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610aae8133611c9e565b61162b8282610c75565b610a305760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116633390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6116b18282610c75565b15610a305760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b611716611d02565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610aae81611d4b565b6006546001600160a01b03163314610a635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610653565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61181d6119a0565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117433390565b6001600160a01b0382166118a85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610653565b6000818152600260205260409020546001600160a01b03161561190d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610653565b61191960008383611c96565b6001600160a01b0382166000908152600360205260408120805460019290611942908490612f36565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60085460ff1615610a635760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610653565b6000806119f283611df2565b9050611a3f81611a056080860186612f4e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ec992505050565b9392505050565b816001600160a01b0316836001600160a01b03161415611aa85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610653565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611b20848484611470565b611b2c84848484611eed565b6110db5760405162461bcd60e51b815260040161065390612f95565b606081611b6c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b965780611b8081612df7565b9150611b8f9050600a83612cec565b9150611b70565b60008167ffffffffffffffff811115611bb157611bb1612974565b6040519080825280601f01601f191660200182016040528015611bdb576020820181803683370190505b5090505b841561146857611bf0600183612f1f565b9150611bfd600a86612fe7565b611c08906030612f36565b60f81b818381518110611c1d57611c1d612d00565b60200101906001600160f81b031916908160001a905350611c3f600a86612cec565b9450611bdf565b60006001600160e01b031982166380ac58cd60e01b1480611c7757506001600160e01b03198216635b5e139f60e01b145b8061051f57506301ffc9a760e01b6001600160e01b031983161461051f565b6106f46119a0565b611ca88282610c75565b610a3057611cc0816001600160a01b03166014611feb565b611ccb836020611feb565b604051602001611cdc929190612ffb565b60408051601f198184030181529082905262461bcd60e51b8252610653916004016127e8565b60085460ff16610a635760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610653565b6000611d5682610b4e565b9050611d6481600084611c96565b611d6f600083611383565b6001600160a01b0381166000908152600360205260408120805460019290611d98908490612f1f565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600061051f7f1b824d21c709406b9fd6dcfc509797a99efb23e3be6e1e3f6656432f575dac31611e5c611e258580612e12565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061218792505050565b805160209182012090850135611e7860608701604088016128e4565b6040805160208101959095528401929092526060838101919091526001600160a01b03909116608083015284013560a082015260c00160405160208183030381529060405280519060200120612264565b6000806000611ed885856122b2565b91509150611ee5816122f5565b509392505050565b60006001600160a01b0384163b15611fe057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f31903390899088908890600401613070565b6020604051808303816000875af1925050508015611f6c575060408051601f3d908101601f19168201909252611f69918101906130ad565b60015b611fc6573d808015611f9a576040519150601f19603f3d011682016040523d82523d6000602084013e611f9f565b606091505b508051611fbe5760405162461bcd60e51b815260040161065390612f95565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611468565b506001949350505050565b60606000611ffa836002612cb7565b612005906002612f36565b67ffffffffffffffff81111561201d5761201d612974565b6040519080825280601f01601f191660200182016040528015612047576020820181803683370190505b509050600360fc1b8160008151811061206257612062612d00565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061209157612091612d00565b60200101906001600160f81b031916908160001a90535060006120b5846002612cb7565b6120c0906001612f36565b90505b6001811115612138576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120f4576120f4612d00565b1a60f81b82828151811061210a5761210a612d00565b60200101906001600160f81b031916908160001a90535060049490941c93612131816130ca565b90506120c3565b508315611a3f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610653565b60408051808201825260018152605b60f81b60208083019190915282519081019092526000808352606092905b845181101561223a5780156121e057604051806040016040528060018152602001600b60fa1b81525091505b82826122048784815181106121f7576121f7612d00565b6020026020010151611b48565b604051602001612216939291906130e1565b6040516020818303038152906040529250808061223290612df7565b9150506121b4565b508160405160200161224c9190613124565b60405160208183030381529060405292505050919050565b600061051f6122716124b0565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604114156122e95760208301516040840151606085015160001a6122dd878285856125d7565b9450945050505061098a565b5060009050600261098a565b600081600481111561230957612309613149565b14156123125750565b600181600481111561232657612326613149565b14156123745760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610653565b600281600481111561238857612388613149565b14156123d65760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610653565b60038160048111156123ea576123ea613149565b14156124435760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610653565b600481600481111561245757612457613149565b1415610aae5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610653565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561250957507f000000000000000000000000000000000000000000000000000000000000000046145b1561253357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561260e57506000905060036126bb565b8460ff16601b1415801561262657508460ff16601c14155b1561263757506000905060046126bb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561268b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126b4576000600192509250506126bb565b9150600090505b94509492505050565b8280546126d090612bab565b90600052602060002090601f0160209004810192826126f25760008555612738565b82601f1061270b57805160ff1916838001178555612738565b82800160010185558215612738579182015b8281111561273857825182559160200191906001019061271d565b50612744929150612748565b5090565b5b808211156127445760008155600101612749565b6001600160e01b031981168114610aae57600080fd5b60006020828403121561278557600080fd5b8135611a3f8161275d565b60005b838110156127ab578181015183820152602001612793565b838111156110db5750506000910152565b600081518084526127d4816020860160208601612790565b601f01601f19169290920160200192915050565b602081526000611a3f60208301846127bc565b60006020828403121561280d57600080fd5b5035919050565b80356001600160a01b038116811461282b57600080fd5b919050565b6000806040838503121561284357600080fd5b61284c83612814565b946020939093013593505050565b60008060006060848603121561286f57600080fd5b61287884612814565b925061288660208501612814565b9150604084013590509250925092565b600080604083850312156128a957600080fd5b50508035926020909101359150565b600080604083850312156128cb57600080fd5b823591506128db60208401612814565b90509250929050565b6000602082840312156128f657600080fd5b611a3f82612814565b6000806020838503121561291257600080fd5b823567ffffffffffffffff8082111561292a57600080fd5b818501915085601f83011261293e57600080fd5b81358181111561294d57600080fd5b8660208260051b850101111561296257600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156129ad576129ad612974565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156129dc576129dc612974565b604052919050565b600067ffffffffffffffff8311156129fe576129fe612974565b612a11601f8401601f19166020016129b3565b9050828152838383011115612a2557600080fd5b828260208301376000602084830101529392505050565b600060208284031215612a4e57600080fd5b813567ffffffffffffffff811115612a6557600080fd5b8201601f81018413612a7657600080fd5b611468848235602084016129e4565b600060208284031215612a9757600080fd5b813567ffffffffffffffff811115612aae57600080fd5b820160a08185031215611a3f57600080fd5b8015158114610aae57600080fd5b60008060408385031215612ae157600080fd5b612aea83612814565b91506020830135612afa81612ac0565b809150509250929050565b60008060008060808587031215612b1b57600080fd5b612b2485612814565b9350612b3260208601612814565b925060408501359150606085013567ffffffffffffffff811115612b5557600080fd5b8501601f81018713612b6657600080fd5b612b75878235602084016129e4565b91505092959194509250565b60008060408385031215612b9457600080fd5b612b9d83612814565b91506128db60208401612814565b600181811c90821680612bbf57607f821691505b60208210811415612be057634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526017908201527f556e617574686f72697a6564206f7065726174696f6e2e000000000000000000604082015260600190565b600060208284031215612c2f57600080fd5b5051919050565b600060208284031215612c4857600080fd5b8151611a3f81612ac0565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612cd157612cd1612ca1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612cfb57612cfb612cd6565b500490565b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112612d2c57600080fd5b9190910192915050565b600060408236031215612d4857600080fd5b612d5061298a565b612d5983612814565b815260208084013567ffffffffffffffff80821115612d7757600080fd5b9085019036601f830112612d8a57600080fd5b813581811115612d9c57612d9c612974565b8060051b9150612dad8483016129b3565b8181529183018401918481019036841115612dc757600080fd5b938501935b83851015612de557843582529385019390850190612dcc565b94860194909452509295945050505050565b6000600019821415612e0b57612e0b612ca1565b5060010190565b6000808335601e19843603018112612e2957600080fd5b83018035915067ffffffffffffffff821115612e4457600080fd5b6020019150600581901b360382131561098a57600080fd5b60008151612e6e818560208601612790565b9290920192915050565b600080845481600182811c915080831680612e9457607f831692505b6020808410821415612eb457634e487b7160e01b86526022600452602486fd5b818015612ec85760018114612ed957612f06565b60ff19861689528489019650612f06565b60008b81526020902060005b86811015612efe5781548b820152908501908301612ee5565b505084890196505b505050505050612f168185612e5c565b95945050505050565b600082821015612f3157612f31612ca1565b500390565b60008219821115612f4957612f49612ca1565b500190565b6000808335601e19843603018112612f6557600080fd5b83018035915067ffffffffffffffff821115612f8057600080fd5b60200191503681900382131561098a57600080fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082612ff657612ff6612cd6565b500690565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613033816017850160208801612790565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613064816028840160208801612790565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906130a3908301846127bc565b9695505050505050565b6000602082840312156130bf57600080fd5b8151611a3f8161275d565b6000816130d9576130d9612ca1565b506000190190565b600084516130f3818460208901612790565b845190830190613107818360208901612790565b845191019061311a818360208801612790565b0195945050505050565b60008251613136818460208701612790565b605d60f81b920191825250600101919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e3540b374890c6461e1d27f286c74922ff424da686efca4c38ad5014792d7b7064736f6c634300080b0033000000000000000000000000177d75daacb36ce18d1099fc03e1db57c34b7fc7000000000000000000000000e1bda0c3bfa2be7f740f0119b6a34f057bd58eba0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004568747470733a2f2f6170692e77696e6b7976657273652e696f2f7075626c69632f6c616e642f6e66742f6d657461646174612f62696f6d652f74726f706963616c2f69642f000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063a217fddf116100ad578063c50b87be1161007c578063c50b87be14610472578063c87b56dd14610485578063d547741f14610498578063e985e9c5146104ab578063f2fde38b146104e757600080fd5b8063a217fddf14610431578063a22cb46514610439578063b88d4fde1461044c578063bf81941e1461045f57600080fd5b806391d14854116100f457806391d14854146103dd57806391f22c86146103f057806395652cfa1461040357806395b8a72a1461041657806395d89b411461042957600080fd5b806370a08231146103a9578063715018a6146103bc5780638456cb59146103c45780638da5cb5b146103cc57600080fd5b80632a55205a116101a857806342842e0e1161017757806342842e0e1461035d57806342966c68146103705780635327f34a146103835780635c975abb1461038b5780636352211e1461039657600080fd5b80632a55205a146102fd5780632f2ff15d1461032f57806336568abe146103425780633f4ba83a1461035557600080fd5b80631c0063b4116101e45780631c0063b4146102935780631f3491a2146102a657806323b872dd146102b9578063248a9ca3146102cc57600080fd5b806301ffc9a71461021657806306fdde031461023e578063081812fc14610253578063095ea7b31461027e575b600080fd5b610229610224366004612773565b6104fa565b60405190151581526020015b60405180910390f35b610246610525565b60405161023591906127e8565b6102666102613660046127fb565b6105b7565b6040516001600160a01b039091168152602001610235565b61029161028c366004612830565b6105de565b005b6102916102a13660046127fb565b6106f9565b6102916102b43660046127fb565b610725565b6102916102c736600461285a565b610925565b6102ef6102da3660046127fb565b60009081526007602052604090206001015490565b604051908152602001610235565b61031061030b366004612896565b610957565b604080516001600160a01b039093168352602083019190915201610235565b61029161033d3660046128b8565b610991565b6102916103503660046128b8565b6109b6565b610291610a34565b61029161036b36600461285a565b610a65565b61029161037e3660046127fb565b610a80565b6102ef610ab1565b60085460ff16610229565b6102666103a43660046127fb565b610b4e565b6102ef6103b73660046128e4565b610bae565b610291610c34565b610291610c46565b6006546001600160a01b0316610266565b6102296103eb3660046128b8565b610c75565b6102916103fe3660046128ff565b610ca0565b610291610411366004612a3c565b610d65565b610291610424366004612a85565b610d9f565b6102466110e1565b6102ef600081565b610291610447366004612ace565b6110f0565b61029161045a366004612b05565b6110fb565b61029161046d3660046128e4565b61112d565b6102916104803660046128e4565b61117c565b6102466104933660046127fb565b611230565b6102916104a63660046128b8565b611264565b6102296104b9366004612b81565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102916104f53660046128e4565b611289565b60006001600160e01b0319821663152a902d60e11b148061051f575061051f826112ff565b92915050565b60606000805461053490612bab565b80601f016020809104026020016040519081016040528092919081815260200182805461056090612bab565b80156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b5050505050905090565b60006105c282611324565b506000908152600460205260409020546001600160a01b031690565b60006105e982610b4e565b9050806001600160a01b0316836001600160a01b0316141561065c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610678575061067881336104b9565b6106ea5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610653565b6106f48383611383565b505050565b610704600033610c75565b6107205760405162461bcd60e51b815260040161065390612be6565b600a55565b610730600033610c75565b61074c5760405162461bcd60e51b815260040161065390612be6565b6000811161079c5760405162461bcd60e51b815260206004820152601960248201527f4e6f20574e4b20746f6b656e20746f207472616e736665722e000000000000006044820152606401610653565b6008546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080e9190612c1d565b9050808211156108ac5760405162461bcd60e51b815260206004820152605760248201527f546865207175616e74697479206f6620574e4b20746f207472616e736665722060448201527f63616e27742062652068696768657220746861742074686520746f74616c206160648201527f6d6f756e74206f6620574e4b20617661696c61626c652e000000000000000000608482015260a401610653565b60085460405163a9059cbb60e01b8152336004820152602481018490526101009091046001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f49190612c36565b610930335b826113f1565b61094c5760405162461bcd60e51b815260040161065390612c53565b6106f4838383611470565b600954600a5460009182916001600160a01b039091169060649061097b9086612cb7565b6109859190612cec565b915091505b9250929050565b6000828152600760205260409020600101546109ac81611617565b6106f48383611621565b6001600160a01b0381163314610a265760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610653565b610a3082826116a7565b5050565b610a3f600033610c75565b610a5b5760405162461bcd60e51b815260040161065390612be6565b610a6361170e565b565b6106f4838383604051806020016040528060008152506110fb565b610a893361092a565b610aa55760405162461bcd60e51b815260040161065390612c53565b610aae81611760565b50565b6000610abd8133610c75565b610ad95760405162461bcd60e51b815260040161065390612be6565b6008546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b499190612c1d565b905090565b6000818152600260205260408120546001600160a01b03168061051f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610653565b60006001600160a01b038216610c185760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610653565b506001600160a01b031660009081526003602052604090205490565b610c3c611769565b610a6360006117c3565b610c51600033610c75565b610c6d5760405162461bcd60e51b815260040161065390612be6565b610a63611815565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610cab600033610c75565b610cc75760405162461bcd60e51b815260040161065390612be6565b60005b818110156106f4576000838383818110610ce657610ce6612d00565b9050602002810190610cf89190612d16565b610d0190612d36565b905060005b816020015151811015610d5057610d3e826000015183602001518381518110610d3157610d31612d00565b6020026020010151611852565b80610d4881612df7565b915050610d06565b50508080610d5d90612df7565b915050610cca565b610d70600033610c75565b610d8c5760405162461bcd60e51b815260040161065390612be6565b8051610a3090600b9060208401906126c4565b610da76119a0565b6000610db2826119e6565b9050610dde7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082610c75565b610e405760405162461bcd60e51b815260206004820152602d60248201527f5369676e617475726520696e76616c6964206f7220756e617574686f72697a6560448201526c32103337b91039b4b3b732b91760991b6064820152608401610653565b610e5060608301604084016128e4565b6001600160a01b0316336001600160a01b031614610ed65760405162461bcd60e51b815260206004820152603960248201527f54686973206164647265737320686173206e6f74206265656e20617574686f7260448201527f697a656420746f20757365207468697320766f75636865722e000000000000006064820152608401610653565b81606001354210610f295760405162461bcd60e51b815260206004820152601860248201527f5468697320766f756368657220697320657870697265642e00000000000000006044820152606401610653565b600854604051636eb1769f60e11b815233600482015230602482015260009161010090046001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190612c1d565b905082602001358110156110065760405162461bcd60e51b815260206004820152602660248201527f496e73756666696369656e742066756e647320746f20627579207468657365206044820152653630b732399760d11b6064820152608401610653565b6008546040516323b872dd60e01b8152336004820152306024820152602085013560448201526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611064573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110889190612c36565b5060005b6110968480612e12565b90508110156110db576110c9336110ad8680612e12565b848181106110bd576110bd612d00565b90506020020135611852565b806110d381612df7565b91505061108c565b50505050565b60606001805461053490612bab565b610a30338383611a46565b61110533836113f1565b6111215760405162461bcd60e51b815260040161065390612c53565b6110db84848484611b15565b611138600033610c75565b6111545760405162461bcd60e51b815260040161065390612be6565b600880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611187600033610c75565b6111a35760405162461bcd60e51b815260040161065390612be6565b6001600160a01b03811661120e5760405162461bcd60e51b815260206004820152602c60248201527f526f79616c746965733a206e657720726563697069656e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401610653565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6060600b61123d83611b48565b60405160200161124e929190612e78565b6040516020818303038152906040529050919050565b60008281526007602052604090206001015461127f81611617565b6106f483836116a7565b611291611769565b6001600160a01b0381166112f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610653565b610aae816117c3565b60006001600160e01b03198216637965db0b60e01b148061051f575061051f82611c46565b6000818152600260205260409020546001600160a01b0316610aae5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610653565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906113b882610b4e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806113fd83610b4e565b9050806001600160a01b0316846001600160a01b0316148061144457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806114685750836001600160a01b031661145d846105b7565b6001600160a01b0316145b949350505050565b826001600160a01b031661148382610b4e565b6001600160a01b0316146114e75760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610653565b6001600160a01b0382166115495760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610653565b611554838383611c96565b61155f600082611383565b6001600160a01b0383166000908152600360205260408120805460019290611588908490612f1f565b90915550506001600160a01b03821660009081526003602052604081208054600192906115b6908490612f36565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610aae8133611c9e565b61162b8282610c75565b610a305760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116633390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6116b18282610c75565b15610a305760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b611716611d02565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610aae81611d4b565b6006546001600160a01b03163314610a635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610653565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61181d6119a0565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117433390565b6001600160a01b0382166118a85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610653565b6000818152600260205260409020546001600160a01b03161561190d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610653565b61191960008383611c96565b6001600160a01b0382166000908152600360205260408120805460019290611942908490612f36565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60085460ff1615610a635760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610653565b6000806119f283611df2565b9050611a3f81611a056080860186612f4e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ec992505050565b9392505050565b816001600160a01b0316836001600160a01b03161415611aa85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610653565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611b20848484611470565b611b2c84848484611eed565b6110db5760405162461bcd60e51b815260040161065390612f95565b606081611b6c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b965780611b8081612df7565b9150611b8f9050600a83612cec565b9150611b70565b60008167ffffffffffffffff811115611bb157611bb1612974565b6040519080825280601f01601f191660200182016040528015611bdb576020820181803683370190505b5090505b841561146857611bf0600183612f1f565b9150611bfd600a86612fe7565b611c08906030612f36565b60f81b818381518110611c1d57611c1d612d00565b60200101906001600160f81b031916908160001a905350611c3f600a86612cec565b9450611bdf565b60006001600160e01b031982166380ac58cd60e01b1480611c7757506001600160e01b03198216635b5e139f60e01b145b8061051f57506301ffc9a760e01b6001600160e01b031983161461051f565b6106f46119a0565b611ca88282610c75565b610a3057611cc0816001600160a01b03166014611feb565b611ccb836020611feb565b604051602001611cdc929190612ffb565b60408051601f198184030181529082905262461bcd60e51b8252610653916004016127e8565b60085460ff16610a635760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610653565b6000611d5682610b4e565b9050611d6481600084611c96565b611d6f600083611383565b6001600160a01b0381166000908152600360205260408120805460019290611d98908490612f1f565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600061051f7f1b824d21c709406b9fd6dcfc509797a99efb23e3be6e1e3f6656432f575dac31611e5c611e258580612e12565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061218792505050565b805160209182012090850135611e7860608701604088016128e4565b6040805160208101959095528401929092526060838101919091526001600160a01b03909116608083015284013560a082015260c00160405160208183030381529060405280519060200120612264565b6000806000611ed885856122b2565b91509150611ee5816122f5565b509392505050565b60006001600160a01b0384163b15611fe057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f31903390899088908890600401613070565b6020604051808303816000875af1925050508015611f6c575060408051601f3d908101601f19168201909252611f69918101906130ad565b60015b611fc6573d808015611f9a576040519150601f19603f3d011682016040523d82523d6000602084013e611f9f565b606091505b508051611fbe5760405162461bcd60e51b815260040161065390612f95565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611468565b506001949350505050565b60606000611ffa836002612cb7565b612005906002612f36565b67ffffffffffffffff81111561201d5761201d612974565b6040519080825280601f01601f191660200182016040528015612047576020820181803683370190505b509050600360fc1b8160008151811061206257612062612d00565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061209157612091612d00565b60200101906001600160f81b031916908160001a90535060006120b5846002612cb7565b6120c0906001612f36565b90505b6001811115612138576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120f4576120f4612d00565b1a60f81b82828151811061210a5761210a612d00565b60200101906001600160f81b031916908160001a90535060049490941c93612131816130ca565b90506120c3565b508315611a3f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610653565b60408051808201825260018152605b60f81b60208083019190915282519081019092526000808352606092905b845181101561223a5780156121e057604051806040016040528060018152602001600b60fa1b81525091505b82826122048784815181106121f7576121f7612d00565b6020026020010151611b48565b604051602001612216939291906130e1565b6040516020818303038152906040529250808061223290612df7565b9150506121b4565b508160405160200161224c9190613124565b60405160208183030381529060405292505050919050565b600061051f6122716124b0565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604114156122e95760208301516040840151606085015160001a6122dd878285856125d7565b9450945050505061098a565b5060009050600261098a565b600081600481111561230957612309613149565b14156123125750565b600181600481111561232657612326613149565b14156123745760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610653565b600281600481111561238857612388613149565b14156123d65760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610653565b60038160048111156123ea576123ea613149565b14156124435760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610653565b600481600481111561245757612457613149565b1415610aae5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610653565b6000306001600160a01b037f00000000000000000000000073173f8c1e02c21cde31854c8fe917fce9b94e9e1614801561250957507f000000000000000000000000000000000000000000000000000000000000000146145b1561253357507ff81503948b7e48234977ae8b82778bd48be377916808af51fbaa3a64cbcabdc990565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f50ff16a679cf3681831186c4484265bb7b52c10c39c36c1ffd1d58a864be01ed828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561260e57506000905060036126bb565b8460ff16601b1415801561262657508460ff16601c14155b1561263757506000905060046126bb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561268b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126b4576000600192509250506126bb565b9150600090505b94509492505050565b8280546126d090612bab565b90600052602060002090601f0160209004810192826126f25760008555612738565b82601f1061270b57805160ff1916838001178555612738565b82800160010185558215612738579182015b8281111561273857825182559160200191906001019061271d565b50612744929150612748565b5090565b5b808211156127445760008155600101612749565b6001600160e01b031981168114610aae57600080fd5b60006020828403121561278557600080fd5b8135611a3f8161275d565b60005b838110156127ab578181015183820152602001612793565b838111156110db5750506000910152565b600081518084526127d4816020860160208601612790565b601f01601f19169290920160200192915050565b602081526000611a3f60208301846127bc565b60006020828403121561280d57600080fd5b5035919050565b80356001600160a01b038116811461282b57600080fd5b919050565b6000806040838503121561284357600080fd5b61284c83612814565b946020939093013593505050565b60008060006060848603121561286f57600080fd5b61287884612814565b925061288660208501612814565b9150604084013590509250925092565b600080604083850312156128a957600080fd5b50508035926020909101359150565b600080604083850312156128cb57600080fd5b823591506128db60208401612814565b90509250929050565b6000602082840312156128f657600080fd5b611a3f82612814565b6000806020838503121561291257600080fd5b823567ffffffffffffffff8082111561292a57600080fd5b818501915085601f83011261293e57600080fd5b81358181111561294d57600080fd5b8660208260051b850101111561296257600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156129ad576129ad612974565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156129dc576129dc612974565b604052919050565b600067ffffffffffffffff8311156129fe576129fe612974565b612a11601f8401601f19166020016129b3565b9050828152838383011115612a2557600080fd5b828260208301376000602084830101529392505050565b600060208284031215612a4e57600080fd5b813567ffffffffffffffff811115612a6557600080fd5b8201601f81018413612a7657600080fd5b611468848235602084016129e4565b600060208284031215612a9757600080fd5b813567ffffffffffffffff811115612aae57600080fd5b820160a08185031215611a3f57600080fd5b8015158114610aae57600080fd5b60008060408385031215612ae157600080fd5b612aea83612814565b91506020830135612afa81612ac0565b809150509250929050565b60008060008060808587031215612b1b57600080fd5b612b2485612814565b9350612b3260208601612814565b925060408501359150606085013567ffffffffffffffff811115612b5557600080fd5b8501601f81018713612b6657600080fd5b612b75878235602084016129e4565b91505092959194509250565b60008060408385031215612b9457600080fd5b612b9d83612814565b91506128db60208401612814565b600181811c90821680612bbf57607f821691505b60208210811415612be057634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526017908201527f556e617574686f72697a6564206f7065726174696f6e2e000000000000000000604082015260600190565b600060208284031215612c2f57600080fd5b5051919050565b600060208284031215612c4857600080fd5b8151611a3f81612ac0565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612cd157612cd1612ca1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612cfb57612cfb612cd6565b500490565b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112612d2c57600080fd5b9190910192915050565b600060408236031215612d4857600080fd5b612d5061298a565b612d5983612814565b815260208084013567ffffffffffffffff80821115612d7757600080fd5b9085019036601f830112612d8a57600080fd5b813581811115612d9c57612d9c612974565b8060051b9150612dad8483016129b3565b8181529183018401918481019036841115612dc757600080fd5b938501935b83851015612de557843582529385019390850190612dcc565b94860194909452509295945050505050565b6000600019821415612e0b57612e0b612ca1565b5060010190565b6000808335601e19843603018112612e2957600080fd5b83018035915067ffffffffffffffff821115612e4457600080fd5b6020019150600581901b360382131561098a57600080fd5b60008151612e6e818560208601612790565b9290920192915050565b600080845481600182811c915080831680612e9457607f831692505b6020808410821415612eb457634e487b7160e01b86526022600452602486fd5b818015612ec85760018114612ed957612f06565b60ff19861689528489019650612f06565b60008b81526020902060005b86811015612efe5781548b820152908501908301612ee5565b505084890196505b505050505050612f168185612e5c565b95945050505050565b600082821015612f3157612f31612ca1565b500390565b60008219821115612f4957612f49612ca1565b500190565b6000808335601e19843603018112612f6557600080fd5b83018035915067ffffffffffffffff821115612f8057600080fd5b60200191503681900382131561098a57600080fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082612ff657612ff6612cd6565b500690565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613033816017850160208801612790565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613064816028840160208801612790565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906130a3908301846127bc565b9695505050505050565b6000602082840312156130bf57600080fd5b8151611a3f8161275d565b6000816130d9576130d9612ca1565b506000190190565b600084516130f3818460208901612790565b845190830190613107818360208901612790565b845191019061311a818360208801612790565b0195945050505050565b60008251613136818460208701612790565b605d60f81b920191825250600101919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e3540b374890c6461e1d27f286c74922ff424da686efca4c38ad5014792d7b7064736f6c634300080b0033

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

000000000000000000000000177d75daacb36ce18d1099fc03e1db57c34b7fc7000000000000000000000000e1bda0c3bfa2be7f740f0119b6a34f057bd58eba0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004568747470733a2f2f6170692e77696e6b7976657273652e696f2f7075626c69632f6c616e642f6e66742f6d657461646174612f62696f6d652f74726f706963616c2f69642f000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : signer (address): 0x177d75dAaCB36ce18D1099FC03E1db57c34B7FC7
Arg [1] : wnkAddress (address): 0xE1BDA0c3Bfa2bE7f740f0119B6a34F057BD58Eba
Arg [2] : tokenUriUrl (string): https://api.winkyverse.io/public/land/nft/metadata/biome/tropical/id/

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000177d75daacb36ce18d1099fc03e1db57c34b7fc7
Arg [1] : 000000000000000000000000e1bda0c3bfa2be7f740f0119b6a34f057bd58eba
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000045
Arg [4] : 68747470733a2f2f6170692e77696e6b7976657273652e696f2f7075626c6963
Arg [5] : 2f6c616e642f6e66742f6d657461646174612f62696f6d652f74726f70696361
Arg [6] : 6c2f69642f000000000000000000000000000000000000000000000000000000


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.