ETH Price: $3,388.57 (+0.93%)
Gas: 5.3 Gwei

Token

Pi Protocol - ETH Silver (PiSilver)
 

Overview

Max Total Supply

29 PiSilver

Holders

12

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
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:
NFTSales

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : NFTSales.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./ERC721Min.sol";

contract OwnableDelegateProxy {}

contract OpenSeaProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

contract NFTSales is Ownable, ERC721Min, ReentrancyGuard {
    using Strings for uint256;
    using SafeERC20 for IERC20;

    address public immutable proxyRegistryAddress; // opensea proxy
    mapping(address => bool) proxyToApproved; // proxy allowance for interaction with future contract
    string private _contractURI;
    string private _tokenBaseURI = ""; // SET TO THE METADATA URI
    address public treasuryAddress; 
    bool public useBaseUriOnly = true;
    mapping(uint256 => string) public TokenURIMap; // allows for assigning individual/unique metada per token

    uint16 public maxPerAddress;
    uint16 public maxPerMint;
    uint16 maxPerAddressForThree;
    uint16 maxMint;
    uint16 public maxMintForOne;
    uint16 maxMintForThree;
    bool public saleActive;
    uint256 public price;
    uint256 priceForThree;
    //string uri; 

    address public paymentToken;
    uint256 public priceWithToken;
    uint256 public priceForThreeWithToken;

    bool public disableSalesWithETH;
    bool public disableSalesWithToken;

    struct FeeRecipient {
        address recipient;
        uint256 basisPoints;
    }

    mapping(uint256 => FeeRecipient) public FeeRecipients;
    uint256 feeRecipientCount;
    uint256 totalFeeBasisPoints;
    bool public transferDisabled;

    constructor(string memory name_, string memory symbol_, address treasury_) ERC721Min(name_, symbol_) {
        proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
        treasuryAddress = treasury_;
    }

    function totalSupply() external view returns(uint256) {
        return _owners.length;
    }

    // ** - CORE - ** //

    function buyOne() external payable {
        require(saleActive, "SALE_CLOSED");
        require(!disableSalesWithETH, "NO_ETH_SALES");
        require(price == msg.value, "INCORRECT_ETH");
        require(maxMintForOne > _owners.length, "EXCEED_MAX_SALE_SUPPLY");
        require(maxPerAddress == 0 || balanceOf(_msgSender()) < maxPerAddress, "EXCEED_MAX_PER_USER");
        _mintMin();
    }     

    function buyThree() external payable {
        require(saleActive, "SALE_CLOSED");
        require(!disableSalesWithETH, "NO_ETH_SALES");
        require(priceForThree == msg.value, "INCORRECT_ETH");
        require(maxMintForThree > _owners.length, "EXCEED_MAX_SALE_SUPPLY");
        require(maxPerAddress == 0 || balanceOf(_msgSender()) < maxPerAddressForThree, "EXCEED_MAX_PER_USER");
        _mintMin();
        _mintMin();
        _mintMin();
    }

    function buy(uint8 amount) external payable {
        require(saleActive, "SALE_CLOSED");
        require(!disableSalesWithETH, "NO_ETH_SALES");
        require(price * amount == msg.value, "INCORRECT_ETH");
        require(maxMint > _owners.length + amount, "EXCEED_MAX_SALE_SUPPLY");
        require(amount < maxPerMint, "EXCEED_MAX_PER_MINT");
        require(maxPerAddress == 0 || balanceOf(_msgSender()) + amount - 1 < maxPerAddress, "EXCEED_MAX_PER_USER");
        for (uint256 i = 0; i < amount; i++) {
            _mintMin();
        }
    }

    function buyOneWithToken() external payable {
        require(saleActive, "SALE_CLOSED");
        require(!disableSalesWithToken, "NO_TOKEN_SALES");
        IERC20(paymentToken).transferFrom(msg.sender, address(this), priceWithToken);
        require(maxMintForOne > _owners.length, "EXCEED_MAX_SALE_SUPPLY");
        require(maxPerAddress == 0 || balanceOf(_msgSender()) < maxPerAddress, "EXCEED_MAX_PER_USER");
        _mintMin();
    }     

    function buyThreeWithToken() external payable {
        require(saleActive, "SALE_CLOSED");
        require(!disableSalesWithToken, "NO_TOKEN_SALES");
        IERC20(paymentToken).transferFrom(msg.sender, address(this), priceForThreeWithToken);
        require(maxMintForThree > _owners.length, "EXCEED_MAX_SALE_SUPPLY");
        require(maxPerAddress == 0 || balanceOf(_msgSender()) < maxPerAddressForThree, "EXCEED_MAX_PER_USER");
        _mintMin();
        _mintMin();
        _mintMin();
    }

    function buyWithToken(uint16 amount) external payable {
        require(saleActive, "SALE_CLOSED");
        require(!disableSalesWithToken, "NO_TOKEN_SALES");
        IERC20(paymentToken).transferFrom(msg.sender, address(this), priceWithToken * amount);
        require(maxMint > _owners.length + amount, "EXCEED_MAX_SALE_SUPPLY");
        require(amount < maxPerMint, "EXCEED_MAX_PER_MINT");
        require(maxPerAddress == 0 || balanceOf(_msgSender()) + amount - 1 < maxPerAddress, "EXCEED_MAX_PER_USER");
        for (uint256 i = 0; i < amount; i++) {
            _mintMin();
        }
    }

    // ** - PROXY - ** //

    function mintOne(address receiver) external onlyProxy {
        _mintMin2(receiver);
    }

    function mintThree(address receiver) external onlyProxy {
        _mintMin2(receiver);
        _mintMin2(receiver);
        _mintMin2(receiver);
    }   

    function mint(address receiver, uint16 amount) external onlyProxy {
        for (uint256 i = 0; i < amount; i++) {
            _mintMin2(receiver);
        }
    }    

    // ** - ADMIN - ** //

    function addFeeRecipient(address recipient, uint256 basisPoints) external onlyOwner {
        feeRecipientCount++;
        FeeRecipients[feeRecipientCount].recipient = recipient;
        FeeRecipients[feeRecipientCount].basisPoints = basisPoints;
        totalFeeBasisPoints += basisPoints;
    }

    function editFeeRecipient(uint256 id, address recipient, uint256 basisPoints) external onlyOwner {
        require(id <= feeRecipientCount, "INVALID_ID");
        totalFeeBasisPoints = totalFeeBasisPoints - FeeRecipients[feeRecipientCount].basisPoints + basisPoints;
        FeeRecipients[feeRecipientCount].recipient = recipient;
        FeeRecipients[feeRecipientCount].basisPoints = basisPoints;
    }

    function distributeETH() public {
        require(feeRecipientCount > 0, "RECIPIENTS_NOT_SET");
        uint256 bal = address(this).balance;
        for(uint256 x = 1; x <= feeRecipientCount; x++) {
            uint256 amount = bal * FeeRecipients[x].basisPoints / totalFeeBasisPoints;
            amount = amount > address(this).balance ? address(this).balance : amount;
            (bool sent, ) = FeeRecipients[x].recipient.call{value: amount}("");
            require(sent, "FAILED_SENDING_FUNDS");
        }
        emit DistributeETH(_msgSender(), bal);
    }

    function distributeTokens() public {
        require(feeRecipientCount > 0, "RECIPIENTS_NOT_SET");
        uint256 bal = IERC20(paymentToken).balanceOf(address(this));
        for(uint256 x = 1; x <= feeRecipientCount; x++) {
            uint256 amount = bal * FeeRecipients[x].basisPoints / totalFeeBasisPoints;
            amount = amount > address(this).balance ? address(this).balance : amount;
            IERC20(paymentToken).transfer(FeeRecipients[x].recipient, amount);
        }
        emit DistributeTokens(_msgSender(), bal);
    }

    function withdrawETH() public {
        require(_msgSender() == owner() || _msgSender() == treasuryAddress || proxyToApproved[_msgSender()], "NOT_ALLOWED");
        require(treasuryAddress != address(0), "TREASURY_NOT_SET");
        uint256 bal = address(this).balance;
        (bool sent, ) = treasuryAddress.call{value: bal}("");
        require(sent, "FAILED_SENDING_FUNDS");
        emit WithdrawETH(_msgSender(), bal);
    }

    function withdrawTokens(address _token) external nonReentrant {
        require(_msgSender() == owner() || _msgSender() == treasuryAddress || proxyToApproved[_msgSender()], "NOT_ALLOWED");
        require(treasuryAddress != address(0), "TREASURY_NOT_SET");
        IERC20(_token).safeTransfer(
            treasuryAddress,
            IERC20(_token).balanceOf(address(this))
        );
    }

    function gift(address[] calldata receivers, uint256[] memory amounts) external onlyOwner {
        for (uint256 x = 0; x < receivers.length; x++) {
            for (uint256 i = 0; i < amounts[x]; i++) {
                _mintMin2(receivers[x]);
            }
        }
    }

    function setDisableSalesWithETH(bool value) external onlyOwner {
        disableSalesWithETH = value;
    }

    function setDisableSalesWithToken(bool value) external onlyOwner {
        disableSalesWithToken = value;
    }

    function updateConfig(uint16 _maxMint, uint16 _maxPerMint, uint256 _price, 
        uint16 _maxPerAddress, bool _saleActive, string calldata _uri,
        address _paymentToken, uint256 _priceWithToken) external onlyOwner
    {
        maxMint = _maxMint+1;
        maxMintForOne = _maxMint;
        maxMintForThree = _maxMint-2;
        maxPerMint = _maxPerMint + 1;
        price = _price;
        priceForThree = _price * 3;
        maxPerAddress = _maxPerAddress > 0 ? _maxPerAddress : 0;
        maxPerAddressForThree = _maxPerAddress > 1 ? _maxPerAddress - 2 : 0;
        saleActive = _saleActive;
        _tokenBaseURI = _uri;
        paymentToken = _paymentToken;
        priceWithToken = _priceWithToken;
        priceForThreeWithToken = _priceWithToken * 3;        
    }

    function updateToken(address _paymentToken, uint256 _priceWithToken) external onlyOwner {
        paymentToken = _paymentToken;
        priceWithToken = _priceWithToken;
        priceForThreeWithToken = _priceWithToken * 3;
    }

    function toggleSaleActive() external onlyOwner {
        saleActive = !saleActive;
    }    

    function setMaxPerMint(uint16 _maxPerMint) external onlyOwner {
        maxPerMint = _maxPerMint;
    }

    function setMaxMint(uint16 maxMint_) external onlyOwner {
        maxMint = maxMint_ + 1;
        maxMintForOne = maxMint_;
        maxMintForThree = maxMint_ - 2;
    }

    function setMaxPerAddress(uint16 _maxPerAddress) external onlyOwner {
        maxPerAddress = _maxPerAddress > 0 ? _maxPerAddress : 0;
        maxPerAddressForThree = _maxPerAddress > 1 ? _maxPerAddress - 2 : maxPerAddress;
    }

    function setPrice(uint256 _price) external onlyOwner {
        price = _price;
        priceForThree = _price * 3;
    }    

    // to avoid opensea listing costs
    function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
        OpenSeaProxyRegistry proxyRegistry = OpenSeaProxyRegistry(proxyRegistryAddress);
        if (
            address(proxyRegistry.proxies(_owner)) == operator ||
            proxyToApproved[operator]
        ) return true;
        return super.isApprovedForAll(_owner, operator);
    }

    function flipProxyState(address proxyAddress) public onlyOwner {
        proxyToApproved[proxyAddress] = !proxyToApproved[proxyAddress];
    }

    function isProxyToApproved(address proxyAddress) external view onlyOwner returns(bool) {
        return proxyToApproved[proxyAddress];
    }

    // ** - SETTERS - ** //

    function setVaultAddress(address addr) external onlyOwner {
        treasuryAddress = addr;
    }

    function setContractURI(string calldata URI) external onlyOwner {
        _contractURI = URI;
    }

    function setBaseURI(string calldata URI) external onlyOwner {
        _tokenBaseURI = URI;
    }

    // ** - MISC - ** //

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    function toggleUseBaseUri() external onlyOwner {
        useBaseUriOnly = !useBaseUriOnly;
    }

    function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        if (bytes(TokenURIMap[tokenId]).length > 0) return TokenURIMap[tokenId];        
        if (useBaseUriOnly) return _tokenBaseURI;
        return bytes(_tokenBaseURI).length > 0
                ? string(abi.encodePacked(_tokenBaseURI, tokenId.toString()))
                : "";
    }

    function setTokenUri(uint256 tokenId, string calldata _uri) external onlyOwner {
        TokenURIMap[tokenId] = _uri;
    }

    function isOwnerOf(address account, uint256[] calldata _tokenIds) external view returns (bool) {
        for (uint256 i; i < _tokenIds.length; ++i) {
            if (_owners[_tokenIds[i]] != account) return false;
        }
        return true;
    }

    function setTransferDisabled(bool _transferDisabled) external onlyOwner {
        transferDisabled = _transferDisabled;
    }

    function setStakingContract(address stakingContract) external onlyOwner {
        _setStakingContract(stakingContract);
    }

    function unStake(uint256 tokenId) external onlyOwner {
        _unstake(tokenId);
    } 

    function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public override {
        require(!transferDisabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED");
        super.batchSafeTransferFrom(_from, _to, _tokenIds, data_);
    }   

    function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public override {
        require(!transferDisabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED");
        super.batchTransferFrom(_from, _to, _tokenIds);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override {
        require(!transferDisabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED");
        super.safeTransferFrom(from, to, tokenId, _data);
    }

    function transferFrom(address from, address to, uint256 tokenId) public override {
        require(!transferDisabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED");
        super.transferFrom(from, to, tokenId);
    }    

    modifier onlyProxy() {
        require(proxyToApproved[_msgSender()] == true, "onlyProxy");
        _;
    }    

    event DistributeETH(address indexed sender, uint256 indexed balance);
    event DistributeTokens(address indexed sender, uint256 indexed balance);
    event WithdrawETH(address indexed sender, uint256 indexed balance);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 3 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 5 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 14 : ERC721Min.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";

abstract contract ERC721Min is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    address[] internal _owners;

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

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

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

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

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

        uint256 count = 0;
        uint256 length = _owners.length;
        for (uint256 i = 0; i < length; ++i) {
            if (owner == _owners[i]) {
                ++count;
            }
        }

        delete length;
        return count;
    }

    function getOwnerCount() external view returns(uint256) {
        return _owners.length;
    }    

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

    function batchTransferFrom(
        address _from,
        address _to,
        uint256[] memory _tokenIds
    ) public virtual {
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            transferFrom(_from, _to, _tokenIds[i]);
        }
    }

    function batchSafeTransferFrom(
        address _from,
        address _to,
        uint256[] memory _tokenIds,
        bytes memory data_
    ) public virtual {
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            safeTransferFrom(_from, _to, _tokenIds[i], 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 tokenId < _owners.length && _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId)
        internal
        view
        virtual
        returns (bool)
    {
        require(
            _exists(tokenId),
            "ERC721: operator query for nonexistent token"
        );
        address owner = ERC721Min.ownerOf(tokenId);
        return (spender == owner ||
            getApproved(tokenId) == spender ||
            isApprovedForAll(owner, 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), "MINT_TO_ZERO");
        require(!_exists(tokenId), "TOKEN_MINTED");
        _owners.push(to);
        emit Transfer(address(0), to, tokenId);
    }

    function _mintMin() internal virtual {
        _owners.push(_msgSender());
        emit Transfer(address(0), _msgSender(), _owners.length - 1);
    }

    // check to != address(0) in calling function
    function _mintMin2(address to) internal virtual {
        _owners.push(to);
        emit Transfer(address(0), to, _owners.length - 1);
    }

    /**
     * @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 = ERC721Min.ownerOf(tokenId);

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

        // Clear approvals
        _approve(address(0), tokenId);
        _owners[tokenId] = address(0);

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

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

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

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

    mapping(uint256 => bool) _isStaked;
    address internal stakingContract;

    function _setStakingContract(address _stakingContract) internal virtual {
        stakingContract = _stakingContract;
    }

    modifier onlyStakingContract() {
        require(
            _msgSender() == stakingContract,
            "ONLY_STAKING_CONTRACT"
        );
        _;
    }

    function isStaked(uint256 tokenId) external view returns(bool) {
        return _isStaked[tokenId];
    }

    function stake(address user, uint256 tokenId) external onlyStakingContract {
        require(ownerOf(tokenId) == user, "NOT_OWNER");
        require(!_isStaked[tokenId], "ALREADY_STAKED");
        _isStaked[tokenId] = !_isStaked[tokenId];
    }

    /* should only be called by contract owner */
    function _unstake(uint256 tokenId) internal virtual {
        _isStaked[tokenId] = false;
    }

    function unstake(address user, uint256 tokenId) external onlyStakingContract {
        require(ownerOf(tokenId) == user, "NOT_OWNER");
        _isStaked[tokenId] = false;
    }

    function tokenOfOwnerByIndex(address account, uint256 index) public view returns (uint256) {
        uint256 foundCount;
        for (uint256 i; i < _owners.length; ++i) {
            if (_owners[i] == account) {
                if (foundCount == index) return i;
                foundCount++;
            }
        }
        require(foundCount > 0, "NONE_FOUND");
        revert("OUT_OF_INDEX");
    }        
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 14 : 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 11 of 14 : 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 12 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

File 13 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 14 : 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"treasury_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"DistributeETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"DistributeTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"WithdrawETH","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"FeeRecipients","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TokenURIMap","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"addFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"batchSafeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"batchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyOneWithToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyThree","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyThreeWithToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"buyWithToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableSalesWithETH","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableSalesWithToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"editFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"flipProxyState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"isProxyToApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintForOne","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerAddress","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerMint","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"mintOne","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"mintThree","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":"paymentToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceForThreeWithToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceWithToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setDisableSalesWithETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setDisableSalesWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"maxMint_","type":"uint16"}],"name":"setMaxMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxPerAddress","type":"uint16"}],"name":"setMaxPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxPerMint","type":"uint16"}],"name":"setMaxPerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakingContract","type":"address"}],"name":"setStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_transferDisabled","type":"bool"}],"name":"setTransferDisabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","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":[],"name":"toggleSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleUseBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxMint","type":"uint16"},{"internalType":"uint16","name":"_maxPerMint","type":"uint16"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint16","name":"_maxPerAddress","type":"uint16"},{"internalType":"bool","name":"_saleActive","type":"bool"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"address","name":"_paymentToken","type":"address"},{"internalType":"uint256","name":"_priceWithToken","type":"uint256"}],"name":"updateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_paymentToken","type":"address"},{"internalType":"uint256","name":"_priceWithToken","type":"uint256"}],"name":"updateToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useBaseUriOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040819052600060a08190526200001b91600b9162000130565b50600c805460ff60a01b1916600160a01b1790553480156200003c57600080fd5b5060405162004e2138038062004e218339810160408190526200005f91620002a3565b82826200006c33620000e0565b81516200008190600190602085019062000130565b5080516200009790600290602084019062000130565b505060016008555073a5409ec958c83c3f309868babaca7c86dcb077c1608052600c80546001600160a01b0319166001600160a01b0392909216919091179055506200036d9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200013e9062000330565b90600052602060002090601f016020900481019282620001625760008555620001ad565b82601f106200017d57805160ff1916838001178555620001ad565b82800160010185558215620001ad579182015b82811115620001ad57825182559160200191906001019062000190565b50620001bb929150620001bf565b5090565b5b80821115620001bb5760008155600101620001c0565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001fe57600080fd5b81516001600160401b03808211156200021b576200021b620001d6565b604051601f8301601f19908116603f01168101908282118183101715620002465762000246620001d6565b816040528381526020925086838588010111156200026357600080fd5b600091505b8382101562000287578582018301518183018401529082019062000268565b83821115620002995760008385830101525b9695505050505050565b600080600060608486031215620002b957600080fd5b83516001600160401b0380821115620002d157600080fd5b620002df87838801620001ec565b94506020860151915080821115620002f657600080fd5b506200030586828701620001ec565b604086015190935090506001600160a01b03811681146200032557600080fd5b809150509250925092565b600181811c908216806200034557607f821691505b602082108114156200036757634e487b7160e01b600052602260045260246000fd5b50919050565b608051614a916200039060003960008181610c0e0152612f320152614a916000f3fe6080604052600436106104525760003560e01c806385535cc51161023f578063baa51f8611610139578063e985e9c5116100b6578063f3c399191161007a578063f3c3991914610ce2578063f3f47f1214610d02578063f73c814b14610d22578063f980dc4514610d42578063fa695a9714610d6257600080fd5b8063e985e9c514610c7a578063ee84e8af14610c9a578063ef18374a14610600578063f2fde38b14610ca2578063f3993d1114610cc257600080fd5b8063c87b56dd116100fd578063c87b56dd14610bdc578063cd7c032614610bfc578063e086e5ec14610c30578063e2b16c0f14610c45578063e8a3d48514610c6557600080fd5b8063baa51f8614610b2c578063bf60dc2114610b5c578063c2962bc714610b7c578063c2a672e014610b9c578063c5f956af14610bbc57600080fd5b8063a035b1fe116101c7578063adc9772e1161018b578063adc9772e14610aaf578063b08b27a614610acf578063b4fafcae14610aef578063b88d4fde14610af7578063b8b9b54914610b1757600080fd5b8063a035b1fe14610a18578063a22cb46514610a2e578063a309a67214610a4e578063ad0be4bd14610a6e578063ad27c07114610a8e57600080fd5b8063938e3d7b1161020e578063938e3d7b1461099b57806395d89b41146109bb5780639ab1b484146109d05780639bb9e9dc146109e55780639dd373b9146109f857600080fd5b806385535cc514610923578063892dfdf6146109435780638da5cb5b1461095d57806391b7f5ed1461097b57600080fd5b806342842e0e116103505780635fbcf0d3116102d85780636ab810081161029c5780636ab81008146108a45780636b5e2896146108c657806370a08231146108ce578063715018a6146108ee5780637705f9b51461090357600080fd5b80635fbcf0d3146108095780636352211e14610828578063639814e01461084857806368428a1b146108635780636909dc121461088457600080fd5b8063507e094f1161031f578063507e094f1461075557806355f804b31461078957806357f7789e146107a95780635a4fee30146107c95780635d3eea91146107e957600080fd5b806342842e0e146106d557806349df728c146106f55780634d44660c146107155780634fab98691461073557600080fd5b806315124db4116103de5780632bce9e7b116103a25780632bce9e7b1461064a5780632f745c591461066a5780632fafb6d21461068a5780633013ce29146106a05780633100a535146106c057600080fd5b806315124db4146105c657806317c5bff9146105e657806318160ddd1461060057806323b872dd14610615578063292beb541461063557600080fd5b8063075365761161042557806307536576146104f4578063081812fc14610553578063095ea7b31461058b57806312cfa116146105ab57806314107f3c146105b357600080fd5b806301ffc9a714610457578063037f489c1461048c57806305dfd2c0146104b057806306fdde03146104d2575b600080fd5b34801561046357600080fd5b50610477610472366004613e01565b610d82565b60405190151581526020015b60405180910390f35b34801561049857600080fd5b506104a260125481565b604051908152602001610483565b3480156104bc57600080fd5b506104d06104cb366004613e33565b610dd4565b005b3480156104de57600080fd5b506104e7610eb7565b6040516104839190613ec3565b34801561050057600080fd5b5061053461050f366004613ed6565b601560205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610483565b34801561055f57600080fd5b5061057361056e366004613ed6565b610f49565b6040516001600160a01b039091168152602001610483565b34801561059757600080fd5b506104d06105a6366004613eef565b610fd1565b6104d06110e7565b6104d06105c1366004613f1b565b6111e0565b3480156105d257600080fd5b506104d06105e1366004613fa6565b61136d565b3480156105f257600080fd5b506014546104779060ff1681565b34801561060c57600080fd5b506003546104a2565b34801561062157600080fd5b506104d0610630366004614054565b611505565b34801561064157600080fd5b506104d0611562565b34801561065657600080fd5b506104d0610665366004613eef565b6115ad565b34801561067657600080fd5b506104a2610685366004613eef565b611609565b34801561069657600080fd5b506104a260135481565b3480156106ac57600080fd5b50601154610573906001600160a01b031681565b3480156106cc57600080fd5b506104d06116f5565b3480156106e157600080fd5b506104d06106f0366004614054565b611740565b34801561070157600080fd5b506104d0610710366004614084565b61175b565b34801561072157600080fd5b506104776107303660046140e5565b61190b565b34801561074157600080fd5b506104d0610750366004614139565b61198d565b34801561076157600080fd5b50600e546107769062010000900461ffff1681565b60405161ffff9091168152602001610483565b34801561079557600080fd5b506104d06107a4366004614156565b6119ca565b3480156107b557600080fd5b506104d06107c4366004614197565b611a00565b3480156107d557600080fd5b506104d06107e43660046142fe565b611a49565b3480156107f557600080fd5b506104d0610804366004613ed6565b611aa7565b34801561081557600080fd5b5060145461047790610100900460ff1681565b34801561083457600080fd5b50610573610843366004613ed6565b611aec565b34801561085457600080fd5b50600e546107769061ffff1681565b34801561086f57600080fd5b50600e5461047790600160601b900460ff1681565b34801561089057600080fd5b506104e761089f366004613ed6565b611b78565b3480156108b057600080fd5b50600e5461077690600160401b900461ffff1681565b6104d0611c12565b3480156108da57600080fd5b506104a26108e9366004614084565b611ce9565b3480156108fa57600080fd5b506104d0611dbb565b34801561090f57600080fd5b506104d061091e366004614386565b611def565b34801561092f57600080fd5b506104d061093e366004614084565b611e9c565b34801561094f57600080fd5b506018546104779060ff1681565b34801561096957600080fd5b506000546001600160a01b0316610573565b34801561098757600080fd5b506104d0610996366004613ed6565b611ee8565b3480156109a757600080fd5b506104d06109b6366004614156565b611f28565b3480156109c757600080fd5b506104e7611f5e565b3480156109dc57600080fd5b506104d0611f6d565b6104d06109f33660046143ee565b61213a565b348015610a0457600080fd5b506104d0610a13366004614084565b612342565b348015610a2457600080fd5b506104a2600f5481565b348015610a3a57600080fd5b506104d0610a49366004614409565b61238a565b348015610a5a57600080fd5b506104d0610a693660046143ee565b61244f565b348015610a7a57600080fd5b506104d0610a89366004614442565b612499565b348015610a9a57600080fd5b50600c5461047790600160a01b900460ff1681565b348015610abb57600080fd5b506104d0610aca366004613eef565b6124f7565b348015610adb57600080fd5b506104d0610aea3660046143ee565b612618565b6104d06126a9565b348015610b0357600080fd5b506104d0610b12366004614477565b6127a8565b348015610b2357600080fd5b506104d0612806565b348015610b3857600080fd5b50610477610b47366004613ed6565b60009081526006602052604090205460ff1690565b348015610b6857600080fd5b506104d0610b77366004613eef565b612987565b348015610b8857600080fd5b506104d0610b973660046143ee565b612a1a565b348015610ba857600080fd5b506104d0610bb7366004613eef565b612ab1565b348015610bc857600080fd5b50600c54610573906001600160a01b031681565b348015610be857600080fd5b506104e7610bf7366004613ed6565b612b7a565b348015610c0857600080fd5b506105737f000000000000000000000000000000000000000000000000000000000000000081565b348015610c3c57600080fd5b506104d0612d23565b348015610c5157600080fd5b506104d0610c60366004614139565b612ebd565b348015610c7157600080fd5b506104e7612f01565b348015610c8657600080fd5b50610477610c953660046144d6565b612f10565b6104d0613012565b348015610cae57600080fd5b506104d0610cbd366004614084565b613111565b348015610cce57600080fd5b506104d0610cdd366004614504565b6131a9565b348015610cee57600080fd5b506104d0610cfd366004614139565b613206565b348015610d0e57600080fd5b506104d0610d1d366004614084565b613243565b348015610d2e57600080fd5b506104d0610d3d366004614084565b613292565b348015610d4e57600080fd5b50610477610d5d366004614084565b6132e5565b348015610d6e57600080fd5b506104d0610d7d366004614084565b613333565b60006001600160e01b031982166380ac58cd60e01b1480610db357506001600160e01b03198216635b5e139f60e01b145b80610dce57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b03163314610e075760405162461bcd60e51b8152600401610dfe9061455b565b60405180910390fd5b601654831115610e465760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b6044820152606401610dfe565b6016546000908152601560205260409020600101546017548291610e69916145a6565b610e7391906145bd565b6017556016805460009081526015602052604080822080546001600160a01b0319166001600160a01b03969096169590951790945590548152919091206001015550565b606060018054610ec6906145d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef2906145d5565b8015610f3f5780601f10610f1457610100808354040283529160200191610f3f565b820191906000526020600020905b815481529060010190602001808311610f2257829003601f168201915b5050505050905090565b6000610f5482613367565b610fb55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610dfe565b506000908152600460205260409020546001600160a01b031690565b6000610fdc82611aec565b9050806001600160a01b0316836001600160a01b0316141561104a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610dfe565b336001600160a01b038216148061106657506110668133612f10565b6110d85760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610dfe565b6110e283836133b1565b505050565b600e54600160601b900460ff166111105760405162461bcd60e51b8152600401610dfe90614610565b60145460ff16156111335760405162461bcd60e51b8152600401610dfe90614635565b34601054146111545760405162461bcd60e51b8152600401610dfe9061465b565b600354600e54600160501b900461ffff16116111825760405162461bcd60e51b8152600401610dfe90614682565b600e5461ffff1615806111aa5750600e54640100000000900461ffff166111a833611ce9565b105b6111c65760405162461bcd60e51b8152600401610dfe906146b2565b6111ce61341f565b6111d661341f565b6111de61341f565b565b600e54600160601b900460ff166112095760405162461bcd60e51b8152600401610dfe90614610565b60145460ff161561122c5760405162461bcd60e51b8152600401610dfe90614635565b348160ff16600f5461123e91906146df565b1461125b5760405162461bcd60e51b8152600401610dfe9061465b565b60035461126c9060ff8316906145bd565b600e54600160301b900461ffff16116112975760405162461bcd60e51b8152600401610dfe90614682565b600e5462010000900461ffff1660ff8216106112eb5760405162461bcd60e51b8152602060048201526013602482015272115610d1515117d3505617d4115497d3525395606a1b6044820152606401610dfe565b600e5461ffff1615806113255750600e5461ffff16600160ff831661130f33611ce9565b61131991906145bd565b61132391906145a6565b105b6113415760405162461bcd60e51b8152600401610dfe906146b2565b60005b8160ff168110156113695761135761341f565b80611361816146fe565b915050611344565b5050565b6000546001600160a01b031633146113975760405162461bcd60e51b8152600401610dfe9061455b565b6113a2896001614719565b600e805469ffffffff0000000000001916600160301b61ffff9384160261ffff60401b191617600160401b928c16929092029190911790556113e560028a61473f565b600e805461ffff92909216600160501b0261ffff60501b19909216919091179055611411886001614719565b600e805461ffff92909216620100000263ffff000019909216919091179055600f8790556114408760036146df565b60105561ffff8616611453576000611455565b855b600e805461ffff191661ffff928316179055600190871611611478576000611483565b61148360028761473f565b600e80546cff000000000000ffff00000000191664010000000061ffff939093169290920260ff60601b191691909117600160601b871515021790556114cb600b8585613d52565b50601180546001600160a01b0319166001600160a01b03841617905560128190556114f78160036146df565b601355505050505050505050565b60185460ff16158061152157506000546001600160a01b031633145b8061153b57503360009081526009602052604090205460ff165b6115575760405162461bcd60e51b8152600401610dfe90614762565b6110e283838361349e565b6000546001600160a01b0316331461158c5760405162461bcd60e51b8152600401610dfe9061455b565b600c805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146115d75760405162461bcd60e51b8152600401610dfe9061455b565b601180546001600160a01b0319166001600160a01b03841617905560128190556116028160036146df565b6013555050565b60008060005b60035481101561168057846001600160a01b0316600382815481106116365761163661478d565b6000918252602090912001546001600160a01b031614156116705783821415611662579150610dce9050565b8161166c816146fe565b9250505b611679816146fe565b905061160f565b50600081116116be5760405162461bcd60e51b815260206004820152600a6024820152691393d39157d193d5539160b21b6044820152606401610dfe565b60405162461bcd60e51b815260206004820152600c60248201526b09eaaa8be9e8cbe929c888ab60a31b6044820152606401610dfe565b6000546001600160a01b0316331461171f5760405162461bcd60e51b8152600401610dfe9061455b565b600e805460ff60601b198116600160601b9182900460ff1615909102179055565b6110e2838383604051806020016040528060008152506127a8565b600260085414156117ae5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dfe565b60026008556000546001600160a01b03163314806117df5750600c546001600160a01b0316336001600160a01b0316145b806117f957503360009081526009602052604090205460ff165b6118335760405162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b6044820152606401610dfe565b600c546001600160a01b031661187e5760405162461bcd60e51b815260206004820152601060248201526f1514915054d5549657d393d517d4d15560821b6044820152606401610dfe565b600c546040516370a0823160e01b8152306004820152611903916001600160a01b0390811691908416906370a0823190602401602060405180830381865afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f291906147a3565b6001600160a01b03841691906134cf565b506001600855565b6000805b8281101561198057846001600160a01b031660038585848181106119355761193561478d565b905060200201358154811061194c5761194c61478d565b6000918252602090912001546001600160a01b031614611970576000915050611986565b611979816146fe565b905061190f565b50600190505b9392505050565b6000546001600160a01b031633146119b75760405162461bcd60e51b8152600401610dfe9061455b565b6014805460ff1916911515919091179055565b6000546001600160a01b031633146119f45760405162461bcd60e51b8152600401610dfe9061455b565b6110e2600b8383613d52565b6000546001600160a01b03163314611a2a5760405162461bcd60e51b8152600401610dfe9061455b565b6000838152600d60205260409020611a43908383613d52565b50505050565b60185460ff161580611a6557506000546001600160a01b031633145b80611a7f57503360009081526009602052604090205460ff165b611a9b5760405162461bcd60e51b8152600401610dfe90614762565b611a4384848484613521565b6000546001600160a01b03163314611ad15760405162461bcd60e51b8152600401610dfe9061455b565b6000908152600660205260409020805460ff19169055565b50565b60008060038381548110611b0257611b0261478d565b6000918252602090912001546001600160a01b0316905080610dce5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610dfe565b600d6020526000908152604090208054611b91906145d5565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbd906145d5565b8015611c0a5780601f10611bdf57610100808354040283529160200191611c0a565b820191906000526020600020905b815481529060010190602001808311611bed57829003601f168201915b505050505081565b600e54600160601b900460ff16611c3b5760405162461bcd60e51b8152600401610dfe90614610565b60145460ff1615611c5e5760405162461bcd60e51b8152600401610dfe90614635565b34600f5414611c7f5760405162461bcd60e51b8152600401610dfe9061465b565b600354600e54600160401b900461ffff1611611cad5760405162461bcd60e51b8152600401610dfe90614682565b600e5461ffff161580611ccd5750600e5461ffff16611ccb33611ce9565b105b6111d65760405162461bcd60e51b8152600401610dfe906146b2565b60006001600160a01b038216611d545760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610dfe565b600354600090815b81811015611db25760038181548110611d7757611d7761478d565b6000918252602090912001546001600160a01b0386811691161415611da257611d9f836146fe565b92505b611dab816146fe565b9050611d5c565b50909392505050565b6000546001600160a01b03163314611de55760405162461bcd60e51b8152600401610dfe9061455b565b6111de600061356b565b6000546001600160a01b03163314611e195760405162461bcd60e51b8152600401610dfe9061455b565b60005b82811015611a435760005b828281518110611e3957611e3961478d565b6020026020010151811015611e8957611e77858584818110611e5d57611e5d61478d565b9050602002016020810190611e729190614084565b6135bb565b80611e81816146fe565b915050611e27565b5080611e94816146fe565b915050611e1c565b6000546001600160a01b03163314611ec65760405162461bcd60e51b8152600401610dfe9061455b565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611f125760405162461bcd60e51b8152600401610dfe9061455b565b600f819055611f228160036146df565b60105550565b6000546001600160a01b03163314611f525760405162461bcd60e51b8152600401610dfe9061455b565b6110e2600a8383613d52565b606060028054610ec6906145d5565b600060165411611fb45760405162461bcd60e51b8152602060048201526012602482015271149150d2541251539514d7d393d517d4d15560721b6044820152606401610dfe565b6011546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611ffd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202191906147a3565b905060015b60165481116121095760175460008281526015602052604081206001015490919061205190856146df565b61205b91906147d2565b905047811161206a578061206c565b475b6011546000848152601560205260409081902054905163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af11580156120d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f491906147e6565b50508080612101906146fe565b915050612026565b50604051819033907f66902764973bf4d35892cf2fde75fcd39ea2cc28a2d6f61e51e45493ee10afe190600090a350565b600e54600160601b900460ff166121635760405162461bcd60e51b8152600401610dfe90614610565b601454610100900460ff161561218b5760405162461bcd60e51b8152600401610dfe90614803565b6011546012546001600160a01b03909116906323b872dd90339030906121b69061ffff8716906146df565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561220a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222e91906147e6565b506003546122419061ffff8316906145bd565b600e54600160301b900461ffff161161226c5760405162461bcd60e51b8152600401610dfe90614682565b600e5461ffff620100009091048116908216106122c15760405162461bcd60e51b8152602060048201526013602482015272115610d1515117d3505617d4115497d3525395606a1b6044820152606401610dfe565b600e5461ffff1615806122fd5750600e5461ffff9081169060019083166122e733611ce9565b6122f191906145bd565b6122fb91906145a6565b105b6123195760405162461bcd60e51b8152600401610dfe906146b2565b60005b8161ffff168110156113695761233061341f565b8061233a816146fe565b91505061231c565b6000546001600160a01b0316331461236c5760405162461bcd60e51b8152600401610dfe9061455b565b600780546001600160a01b0319166001600160a01b03831617905550565b6001600160a01b0382163314156123e35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610dfe565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b031633146124795760405162461bcd60e51b8152600401610dfe9061455b565b600e805461ffff909216620100000263ffff000019909216919091179055565b3360009081526009602052604090205460ff1615156001146124cd5760405162461bcd60e51b8152600401610dfe9061482b565b60005b8161ffff168110156110e2576124e5836135bb565b806124ef816146fe565b9150506124d0565b6007546001600160a01b0316336001600160a01b0316146125525760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610dfe565b816001600160a01b031661256582611aec565b6001600160a01b0316146125a75760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610dfe565b60008181526006602052604090205460ff16156125f75760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b6044820152606401610dfe565b6000908152600660205260409020805460ff19811660ff9091161517905550565b6000546001600160a01b031633146126425760405162461bcd60e51b8152600401610dfe9061455b565b60008161ffff1611612655576000612657565b805b600e805461ffff191661ffff92831617905560019082161161267f57600e5461ffff1661268a565b61268a60028261473f565b600e60046101000a81548161ffff021916908361ffff16021790555050565b600e54600160601b900460ff166126d25760405162461bcd60e51b8152600401610dfe90614610565b601454610100900460ff16156126fa5760405162461bcd60e51b8152600401610dfe90614803565b6011546012546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015612755573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277991906147e6565b50600354600e54600160401b900461ffff1611611cad5760405162461bcd60e51b8152600401610dfe90614682565b60185460ff1615806127c457506000546001600160a01b031633145b806127de57503360009081526009602052604090205460ff165b6127fa5760405162461bcd60e51b8152600401610dfe90614762565b611a438484848461364d565b60006016541161284d5760405162461bcd60e51b8152602060048201526012602482015271149150d2541251539514d7d393d517d4d15560721b6044820152606401610dfe565b4760015b60165481116129565760175460008281526015602052604081206001015490919061287c90856146df565b61288691906147d2565b90504781116128955780612897565b475b60008381526015602052604080822054905192935090916001600160a01b039091169083908381818185875af1925050503d80600081146128f4576040519150601f19603f3d011682016040523d82523d6000602084013e6128f9565b606091505b50509050806129415760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610dfe565b5050808061294e906146fe565b915050612851565b50604051819033907f0d20f677b24c0f42423a7e690ab1d066e4ae75145c497a68b1f34bd34944d12290600090a350565b6000546001600160a01b031633146129b15760405162461bcd60e51b8152600401610dfe9061455b565b601680549060006129c1836146fe565b90915550506016805460009081526015602052604080822080546001600160a01b0319166001600160a01b0387161790559154815290812060010182905560178054839290612a119084906145bd565b90915550505050565b6000546001600160a01b03163314612a445760405162461bcd60e51b8152600401610dfe9061455b565b612a4f816001614719565b600e805469ffffffff0000000000001916600160301b61ffff9384160261ffff60401b191617600160401b92841692909202919091179055612a9260028261473f565b600e600a6101000a81548161ffff021916908361ffff16021790555050565b6007546001600160a01b0316336001600160a01b031614612b0c5760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610dfe565b816001600160a01b0316612b1f82611aec565b6001600160a01b031614612b615760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610dfe565b6000908152600660205260409020805460ff1916905550565b6060612b8582613367565b612be95760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610dfe565b6000828152600d602052604081208054612c02906145d5565b90501115612ca8576000828152600d602052604090208054612c23906145d5565b80601f0160208091040260200160405190810160405280929190818152602001828054612c4f906145d5565b8015612c9c5780601f10612c7157610100808354040283529160200191612c9c565b820191906000526020600020905b815481529060010190602001808311612c7f57829003601f168201915b50505050509050919050565b600c54600160a01b900460ff1615612cc757600b8054612c23906145d5565b6000600b8054612cd6906145d5565b905011612cf25760405180602001604052806000815250610dce565b600b612cfd8361367f565b604051602001612d0e92919061486a565b60405160208183030381529060405292915050565b6000546001600160a01b0316331480612d4f5750600c546001600160a01b0316336001600160a01b0316145b80612d6957503360009081526009602052604090205460ff165b612da35760405162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b6044820152606401610dfe565b600c546001600160a01b0316612dee5760405162461bcd60e51b815260206004820152601060248201526f1514915054d5549657d393d517d4d15560821b6044820152606401610dfe565b600c5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114612e3f576040519150601f19603f3d011682016040523d82523d6000602084013e612e44565b606091505b5050905080612e8c5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610dfe565b604051829033907f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b7990600090a35050565b6000546001600160a01b03163314612ee75760405162461bcd60e51b8152600401610dfe9061455b565b601480549115156101000261ff0019909216919091179055565b6060600a8054610ec6906145d5565b60405163c455279160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000000000000000000000000000000000000000000091848116919083169063c455279190602401602060405180830381865afa158015612f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa49190614911565b6001600160a01b03161480612fd157506001600160a01b03831660009081526009602052604090205460ff165b15612fe0576001915050610dce565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b600e54600160601b900460ff1661303b5760405162461bcd60e51b8152600401610dfe90614610565b601454610100900460ff16156130635760405162461bcd60e51b8152600401610dfe90614803565b6011546013546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156130be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130e291906147e6565b50600354600e54600160501b900461ffff16116111825760405162461bcd60e51b8152600401610dfe90614682565b6000546001600160a01b0316331461313b5760405162461bcd60e51b8152600401610dfe9061455b565b6001600160a01b0381166131a05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dfe565b611ae98161356b565b60185460ff1615806131c557506000546001600160a01b031633145b806131df57503360009081526009602052604090205460ff165b6131fb5760405162461bcd60e51b8152600401610dfe90614762565b6110e283838361377c565b6000546001600160a01b031633146132305760405162461bcd60e51b8152600401610dfe9061455b565b6018805460ff1916911515919091179055565b3360009081526009602052604090205460ff1615156001146132775760405162461bcd60e51b8152600401610dfe9061482b565b613280816135bb565b613289816135bb565b611ae9816135bb565b6000546001600160a01b031633146132bc5760405162461bcd60e51b8152600401610dfe9061455b565b6001600160a01b03166000908152600960205260409020805460ff19811660ff90911615179055565b600080546001600160a01b031633146133105760405162461bcd60e51b8152600401610dfe9061455b565b506001600160a01b03811660009081526009602052604090205460ff165b919050565b3360009081526009602052604090205460ff1615156001146132895760405162461bcd60e51b8152600401610dfe9061482b565b60035460009082108015610dce575060006001600160a01b0316600383815481106133945761339461478d565b6000918252602090912001546001600160a01b0316141592915050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906133e682611aec565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b03191633179055905461346f91906145a6565b60405133906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4565b6134a833826137be565b6134c45760405162461bcd60e51b8152600401610dfe9061492e565b6110e2838383613880565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110e29084906139d6565b60005b82518110156135645761355285858584815181106135445761354461478d565b6020026020010151856127a8565b8061355c816146fe565b915050613524565b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b038516179055905461361491906145a6565b6040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450565b61365733836137be565b6136735760405162461bcd60e51b8152600401610dfe9061492e565b611a4384848484613aa8565b6060816136a35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156136cd57806136b7816146fe565b91506136c69050600a836147d2565b91506136a7565b6000816001600160401b038111156136e7576136e76141d5565b6040519080825280601f01601f191660200182016040528015613711576020820181803683370190505b5090505b841561300a576137266001836145a6565b9150613733600a8661497f565b61373e9060306145bd565b60f81b8183815181106137535761375361478d565b60200101906001600160f81b031916908160001a905350613775600a866147d2565b9450613715565b60005b8151811015611a43576137ac848484848151811061379f5761379f61478d565b6020026020010151611505565b806137b6816146fe565b91505061377f565b60006137c982613367565b61382a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610dfe565b600061383583611aec565b9050806001600160a01b0316846001600160a01b031614806138705750836001600160a01b031661386584610f49565b6001600160a01b0316145b8061300a575061300a8185612f10565b826001600160a01b031661389382611aec565b6001600160a01b0316146138fb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610dfe565b6001600160a01b03821661395d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610dfe565b6139686000826133b1565b816003828154811061397c5761397c61478d565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6000613a2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613adb9092919063ffffffff16565b8051909150156110e25780806020019051810190613a4991906147e6565b6110e25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610dfe565b613ab3848484613880565b613abf84848484613aea565b611a435760405162461bcd60e51b8152600401610dfe90614993565b606061300a8484600085613be8565b60006001600160a01b0384163b15613bdd57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613b2e9033908990889088906004016149e5565b6020604051808303816000875af1925050508015613b69575060408051601f3d908101601f19168201909252613b6691810190614a22565b60015b613bc3573d808015613b97576040519150601f19603f3d011682016040523d82523d6000602084013e613b9c565b606091505b508051613bbb5760405162461bcd60e51b8152600401610dfe90614993565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061300a565b506001949350505050565b606082471015613c495760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610dfe565b6001600160a01b0385163b613ca05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dfe565b600080866001600160a01b03168587604051613cbc9190614a3f565b60006040518083038185875af1925050503d8060008114613cf9576040519150601f19603f3d011682016040523d82523d6000602084013e613cfe565b606091505b5091509150613d0e828286613d19565b979650505050505050565b60608315613d28575081611986565b825115613d385782518084602001fd5b8160405162461bcd60e51b8152600401610dfe9190613ec3565b828054613d5e906145d5565b90600052602060002090601f016020900481019282613d805760008555613dc6565b82601f10613d995782800160ff19823516178555613dc6565b82800160010185558215613dc6579182015b82811115613dc6578235825591602001919060010190613dab565b50613dd2929150613dd6565b5090565b5b80821115613dd25760008155600101613dd7565b6001600160e01b031981168114611ae957600080fd5b600060208284031215613e1357600080fd5b813561198681613deb565b6001600160a01b0381168114611ae957600080fd5b600080600060608486031215613e4857600080fd5b833592506020840135613e5a81613e1e565b929592945050506040919091013590565b60005b83811015613e86578181015183820152602001613e6e565b83811115611a435750506000910152565b60008151808452613eaf816020860160208601613e6b565b601f01601f19169290920160200192915050565b6020815260006119866020830184613e97565b600060208284031215613ee857600080fd5b5035919050565b60008060408385031215613f0257600080fd5b8235613f0d81613e1e565b946020939093013593505050565b600060208284031215613f2d57600080fd5b813560ff8116811461198657600080fd5b803561ffff8116811461332e57600080fd5b8015158114611ae957600080fd5b60008083601f840112613f7057600080fd5b5081356001600160401b03811115613f8757600080fd5b602083019150836020828501011115613f9f57600080fd5b9250929050565b60008060008060008060008060006101008a8c031215613fc557600080fd5b613fce8a613f3e565b9850613fdc60208b01613f3e565b975060408a01359650613ff160608b01613f3e565b955060808a013561400181613f50565b945060a08a01356001600160401b0381111561401c57600080fd5b6140288c828d01613f5e565b90955093505060c08a013561403c81613e1e565b8092505060e08a013590509295985092959850929598565b60008060006060848603121561406957600080fd5b833561407481613e1e565b92506020840135613e5a81613e1e565b60006020828403121561409657600080fd5b813561198681613e1e565b60008083601f8401126140b357600080fd5b5081356001600160401b038111156140ca57600080fd5b6020830191508360208260051b8501011115613f9f57600080fd5b6000806000604084860312156140fa57600080fd5b833561410581613e1e565b925060208401356001600160401b0381111561412057600080fd5b61412c868287016140a1565b9497909650939450505050565b60006020828403121561414b57600080fd5b813561198681613f50565b6000806020838503121561416957600080fd5b82356001600160401b0381111561417f57600080fd5b61418b85828601613f5e565b90969095509350505050565b6000806000604084860312156141ac57600080fd5b8335925060208401356001600160401b038111156141c957600080fd5b61412c86828701613f5e565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614213576142136141d5565b604052919050565b600082601f83011261422c57600080fd5b813560206001600160401b03821115614247576142476141d5565b8160051b6142568282016141eb565b928352848101820192828101908785111561427057600080fd5b83870192505b84831015613d0e57823582529183019190830190614276565b600082601f8301126142a057600080fd5b81356001600160401b038111156142b9576142b96141d5565b6142cc601f8201601f19166020016141eb565b8181528460208386010111156142e157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561431457600080fd5b843561431f81613e1e565b9350602085013561432f81613e1e565b925060408501356001600160401b038082111561434b57600080fd5b6143578883890161421b565b9350606087013591508082111561436d57600080fd5b5061437a8782880161428f565b91505092959194509250565b60008060006040848603121561439b57600080fd5b83356001600160401b03808211156143b257600080fd5b6143be878388016140a1565b909550935060208601359150808211156143d757600080fd5b506143e48682870161421b565b9150509250925092565b60006020828403121561440057600080fd5b61198682613f3e565b6000806040838503121561441c57600080fd5b823561442781613e1e565b9150602083013561443781613f50565b809150509250929050565b6000806040838503121561445557600080fd5b823561446081613e1e565b915061446e60208401613f3e565b90509250929050565b6000806000806080858703121561448d57600080fd5b843561449881613e1e565b935060208501356144a881613e1e565b92506040850135915060608501356001600160401b038111156144ca57600080fd5b61437a8782880161428f565b600080604083850312156144e957600080fd5b82356144f481613e1e565b9150602083013561443781613e1e565b60008060006060848603121561451957600080fd5b833561452481613e1e565b9250602084013561453481613e1e565b915060408401356001600160401b0381111561454f57600080fd5b6143e48682870161421b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156145b8576145b8614590565b500390565b600082198211156145d0576145d0614590565b500190565b600181811c908216806145e957607f821691505b6020821081141561460a57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600b908201526a14d0531157d0d313d4d15160aa1b604082015260600190565b6020808252600c908201526b4e4f5f4554485f53414c455360a01b604082015260600190565b6020808252600d908201526c0929c869ea4a48a86a8be8aa89609b1b604082015260600190565b6020808252601690820152754558434545445f4d41585f53414c455f535550504c5960501b604082015260600190565b60208082526013908201527222ac21a2a2a22fa6a0ac2fa822a92faaa9a2a960691b604082015260600190565b60008160001904831182151516156146f9576146f9614590565b500290565b600060001982141561471257614712614590565b5060010190565b600061ffff80831681851680830382111561473657614736614590565b01949350505050565b600061ffff8381169083168181101561475a5761475a614590565b039392505050565b6020808252601190820152701514905394d1915497d11254d050931151607a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156147b557600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b6000826147e1576147e16147bc565b500490565b6000602082840312156147f857600080fd5b815161198681613f50565b6020808252600e908201526d4e4f5f544f4b454e5f53414c455360901b604082015260600190565b6020808252600990820152686f6e6c7950726f787960b81b604082015260600190565b60008151614860818560208601613e6b565b9290920192915050565b600080845481600182811c91508083168061488657607f831692505b60208084108214156148a657634e487b7160e01b86526022600452602486fd5b8180156148ba57600181146148cb576148f8565b60ff198616895284890196506148f8565b60008b81526020902060005b868110156148f05781548b8201529085019083016148d7565b505084890196505b505050505050614908818561484e565b95945050505050565b60006020828403121561492357600080fd5b815161198681613e1e565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008261498e5761498e6147bc565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614a1890830184613e97565b9695505050505050565b600060208284031215614a3457600080fd5b815161198681613deb565b60008251614a51818460208701613e6b565b919091019291505056fea2646970667358221220f9318a586357488813c286e2479abab745f07b4ece670fad4545b5395bf9714564736f6c634300080b0033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000046cf71f924c035c3242d6afb61af4eadfe0bdcd5000000000000000000000000000000000000000000000000000000000000001850692050726f746f636f6c202d204554482053696c76657200000000000000000000000000000000000000000000000000000000000000000000000000000008506953696c766572000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106104525760003560e01c806385535cc51161023f578063baa51f8611610139578063e985e9c5116100b6578063f3c399191161007a578063f3c3991914610ce2578063f3f47f1214610d02578063f73c814b14610d22578063f980dc4514610d42578063fa695a9714610d6257600080fd5b8063e985e9c514610c7a578063ee84e8af14610c9a578063ef18374a14610600578063f2fde38b14610ca2578063f3993d1114610cc257600080fd5b8063c87b56dd116100fd578063c87b56dd14610bdc578063cd7c032614610bfc578063e086e5ec14610c30578063e2b16c0f14610c45578063e8a3d48514610c6557600080fd5b8063baa51f8614610b2c578063bf60dc2114610b5c578063c2962bc714610b7c578063c2a672e014610b9c578063c5f956af14610bbc57600080fd5b8063a035b1fe116101c7578063adc9772e1161018b578063adc9772e14610aaf578063b08b27a614610acf578063b4fafcae14610aef578063b88d4fde14610af7578063b8b9b54914610b1757600080fd5b8063a035b1fe14610a18578063a22cb46514610a2e578063a309a67214610a4e578063ad0be4bd14610a6e578063ad27c07114610a8e57600080fd5b8063938e3d7b1161020e578063938e3d7b1461099b57806395d89b41146109bb5780639ab1b484146109d05780639bb9e9dc146109e55780639dd373b9146109f857600080fd5b806385535cc514610923578063892dfdf6146109435780638da5cb5b1461095d57806391b7f5ed1461097b57600080fd5b806342842e0e116103505780635fbcf0d3116102d85780636ab810081161029c5780636ab81008146108a45780636b5e2896146108c657806370a08231146108ce578063715018a6146108ee5780637705f9b51461090357600080fd5b80635fbcf0d3146108095780636352211e14610828578063639814e01461084857806368428a1b146108635780636909dc121461088457600080fd5b8063507e094f1161031f578063507e094f1461075557806355f804b31461078957806357f7789e146107a95780635a4fee30146107c95780635d3eea91146107e957600080fd5b806342842e0e146106d557806349df728c146106f55780634d44660c146107155780634fab98691461073557600080fd5b806315124db4116103de5780632bce9e7b116103a25780632bce9e7b1461064a5780632f745c591461066a5780632fafb6d21461068a5780633013ce29146106a05780633100a535146106c057600080fd5b806315124db4146105c657806317c5bff9146105e657806318160ddd1461060057806323b872dd14610615578063292beb541461063557600080fd5b8063075365761161042557806307536576146104f4578063081812fc14610553578063095ea7b31461058b57806312cfa116146105ab57806314107f3c146105b357600080fd5b806301ffc9a714610457578063037f489c1461048c57806305dfd2c0146104b057806306fdde03146104d2575b600080fd5b34801561046357600080fd5b50610477610472366004613e01565b610d82565b60405190151581526020015b60405180910390f35b34801561049857600080fd5b506104a260125481565b604051908152602001610483565b3480156104bc57600080fd5b506104d06104cb366004613e33565b610dd4565b005b3480156104de57600080fd5b506104e7610eb7565b6040516104839190613ec3565b34801561050057600080fd5b5061053461050f366004613ed6565b601560205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610483565b34801561055f57600080fd5b5061057361056e366004613ed6565b610f49565b6040516001600160a01b039091168152602001610483565b34801561059757600080fd5b506104d06105a6366004613eef565b610fd1565b6104d06110e7565b6104d06105c1366004613f1b565b6111e0565b3480156105d257600080fd5b506104d06105e1366004613fa6565b61136d565b3480156105f257600080fd5b506014546104779060ff1681565b34801561060c57600080fd5b506003546104a2565b34801561062157600080fd5b506104d0610630366004614054565b611505565b34801561064157600080fd5b506104d0611562565b34801561065657600080fd5b506104d0610665366004613eef565b6115ad565b34801561067657600080fd5b506104a2610685366004613eef565b611609565b34801561069657600080fd5b506104a260135481565b3480156106ac57600080fd5b50601154610573906001600160a01b031681565b3480156106cc57600080fd5b506104d06116f5565b3480156106e157600080fd5b506104d06106f0366004614054565b611740565b34801561070157600080fd5b506104d0610710366004614084565b61175b565b34801561072157600080fd5b506104776107303660046140e5565b61190b565b34801561074157600080fd5b506104d0610750366004614139565b61198d565b34801561076157600080fd5b50600e546107769062010000900461ffff1681565b60405161ffff9091168152602001610483565b34801561079557600080fd5b506104d06107a4366004614156565b6119ca565b3480156107b557600080fd5b506104d06107c4366004614197565b611a00565b3480156107d557600080fd5b506104d06107e43660046142fe565b611a49565b3480156107f557600080fd5b506104d0610804366004613ed6565b611aa7565b34801561081557600080fd5b5060145461047790610100900460ff1681565b34801561083457600080fd5b50610573610843366004613ed6565b611aec565b34801561085457600080fd5b50600e546107769061ffff1681565b34801561086f57600080fd5b50600e5461047790600160601b900460ff1681565b34801561089057600080fd5b506104e761089f366004613ed6565b611b78565b3480156108b057600080fd5b50600e5461077690600160401b900461ffff1681565b6104d0611c12565b3480156108da57600080fd5b506104a26108e9366004614084565b611ce9565b3480156108fa57600080fd5b506104d0611dbb565b34801561090f57600080fd5b506104d061091e366004614386565b611def565b34801561092f57600080fd5b506104d061093e366004614084565b611e9c565b34801561094f57600080fd5b506018546104779060ff1681565b34801561096957600080fd5b506000546001600160a01b0316610573565b34801561098757600080fd5b506104d0610996366004613ed6565b611ee8565b3480156109a757600080fd5b506104d06109b6366004614156565b611f28565b3480156109c757600080fd5b506104e7611f5e565b3480156109dc57600080fd5b506104d0611f6d565b6104d06109f33660046143ee565b61213a565b348015610a0457600080fd5b506104d0610a13366004614084565b612342565b348015610a2457600080fd5b506104a2600f5481565b348015610a3a57600080fd5b506104d0610a49366004614409565b61238a565b348015610a5a57600080fd5b506104d0610a693660046143ee565b61244f565b348015610a7a57600080fd5b506104d0610a89366004614442565b612499565b348015610a9a57600080fd5b50600c5461047790600160a01b900460ff1681565b348015610abb57600080fd5b506104d0610aca366004613eef565b6124f7565b348015610adb57600080fd5b506104d0610aea3660046143ee565b612618565b6104d06126a9565b348015610b0357600080fd5b506104d0610b12366004614477565b6127a8565b348015610b2357600080fd5b506104d0612806565b348015610b3857600080fd5b50610477610b47366004613ed6565b60009081526006602052604090205460ff1690565b348015610b6857600080fd5b506104d0610b77366004613eef565b612987565b348015610b8857600080fd5b506104d0610b973660046143ee565b612a1a565b348015610ba857600080fd5b506104d0610bb7366004613eef565b612ab1565b348015610bc857600080fd5b50600c54610573906001600160a01b031681565b348015610be857600080fd5b506104e7610bf7366004613ed6565b612b7a565b348015610c0857600080fd5b506105737f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c181565b348015610c3c57600080fd5b506104d0612d23565b348015610c5157600080fd5b506104d0610c60366004614139565b612ebd565b348015610c7157600080fd5b506104e7612f01565b348015610c8657600080fd5b50610477610c953660046144d6565b612f10565b6104d0613012565b348015610cae57600080fd5b506104d0610cbd366004614084565b613111565b348015610cce57600080fd5b506104d0610cdd366004614504565b6131a9565b348015610cee57600080fd5b506104d0610cfd366004614139565b613206565b348015610d0e57600080fd5b506104d0610d1d366004614084565b613243565b348015610d2e57600080fd5b506104d0610d3d366004614084565b613292565b348015610d4e57600080fd5b50610477610d5d366004614084565b6132e5565b348015610d6e57600080fd5b506104d0610d7d366004614084565b613333565b60006001600160e01b031982166380ac58cd60e01b1480610db357506001600160e01b03198216635b5e139f60e01b145b80610dce57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b03163314610e075760405162461bcd60e51b8152600401610dfe9061455b565b60405180910390fd5b601654831115610e465760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b6044820152606401610dfe565b6016546000908152601560205260409020600101546017548291610e69916145a6565b610e7391906145bd565b6017556016805460009081526015602052604080822080546001600160a01b0319166001600160a01b03969096169590951790945590548152919091206001015550565b606060018054610ec6906145d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef2906145d5565b8015610f3f5780601f10610f1457610100808354040283529160200191610f3f565b820191906000526020600020905b815481529060010190602001808311610f2257829003601f168201915b5050505050905090565b6000610f5482613367565b610fb55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610dfe565b506000908152600460205260409020546001600160a01b031690565b6000610fdc82611aec565b9050806001600160a01b0316836001600160a01b0316141561104a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610dfe565b336001600160a01b038216148061106657506110668133612f10565b6110d85760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610dfe565b6110e283836133b1565b505050565b600e54600160601b900460ff166111105760405162461bcd60e51b8152600401610dfe90614610565b60145460ff16156111335760405162461bcd60e51b8152600401610dfe90614635565b34601054146111545760405162461bcd60e51b8152600401610dfe9061465b565b600354600e54600160501b900461ffff16116111825760405162461bcd60e51b8152600401610dfe90614682565b600e5461ffff1615806111aa5750600e54640100000000900461ffff166111a833611ce9565b105b6111c65760405162461bcd60e51b8152600401610dfe906146b2565b6111ce61341f565b6111d661341f565b6111de61341f565b565b600e54600160601b900460ff166112095760405162461bcd60e51b8152600401610dfe90614610565b60145460ff161561122c5760405162461bcd60e51b8152600401610dfe90614635565b348160ff16600f5461123e91906146df565b1461125b5760405162461bcd60e51b8152600401610dfe9061465b565b60035461126c9060ff8316906145bd565b600e54600160301b900461ffff16116112975760405162461bcd60e51b8152600401610dfe90614682565b600e5462010000900461ffff1660ff8216106112eb5760405162461bcd60e51b8152602060048201526013602482015272115610d1515117d3505617d4115497d3525395606a1b6044820152606401610dfe565b600e5461ffff1615806113255750600e5461ffff16600160ff831661130f33611ce9565b61131991906145bd565b61132391906145a6565b105b6113415760405162461bcd60e51b8152600401610dfe906146b2565b60005b8160ff168110156113695761135761341f565b80611361816146fe565b915050611344565b5050565b6000546001600160a01b031633146113975760405162461bcd60e51b8152600401610dfe9061455b565b6113a2896001614719565b600e805469ffffffff0000000000001916600160301b61ffff9384160261ffff60401b191617600160401b928c16929092029190911790556113e560028a61473f565b600e805461ffff92909216600160501b0261ffff60501b19909216919091179055611411886001614719565b600e805461ffff92909216620100000263ffff000019909216919091179055600f8790556114408760036146df565b60105561ffff8616611453576000611455565b855b600e805461ffff191661ffff928316179055600190871611611478576000611483565b61148360028761473f565b600e80546cff000000000000ffff00000000191664010000000061ffff939093169290920260ff60601b191691909117600160601b871515021790556114cb600b8585613d52565b50601180546001600160a01b0319166001600160a01b03841617905560128190556114f78160036146df565b601355505050505050505050565b60185460ff16158061152157506000546001600160a01b031633145b8061153b57503360009081526009602052604090205460ff165b6115575760405162461bcd60e51b8152600401610dfe90614762565b6110e283838361349e565b6000546001600160a01b0316331461158c5760405162461bcd60e51b8152600401610dfe9061455b565b600c805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146115d75760405162461bcd60e51b8152600401610dfe9061455b565b601180546001600160a01b0319166001600160a01b03841617905560128190556116028160036146df565b6013555050565b60008060005b60035481101561168057846001600160a01b0316600382815481106116365761163661478d565b6000918252602090912001546001600160a01b031614156116705783821415611662579150610dce9050565b8161166c816146fe565b9250505b611679816146fe565b905061160f565b50600081116116be5760405162461bcd60e51b815260206004820152600a6024820152691393d39157d193d5539160b21b6044820152606401610dfe565b60405162461bcd60e51b815260206004820152600c60248201526b09eaaa8be9e8cbe929c888ab60a31b6044820152606401610dfe565b6000546001600160a01b0316331461171f5760405162461bcd60e51b8152600401610dfe9061455b565b600e805460ff60601b198116600160601b9182900460ff1615909102179055565b6110e2838383604051806020016040528060008152506127a8565b600260085414156117ae5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dfe565b60026008556000546001600160a01b03163314806117df5750600c546001600160a01b0316336001600160a01b0316145b806117f957503360009081526009602052604090205460ff165b6118335760405162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b6044820152606401610dfe565b600c546001600160a01b031661187e5760405162461bcd60e51b815260206004820152601060248201526f1514915054d5549657d393d517d4d15560821b6044820152606401610dfe565b600c546040516370a0823160e01b8152306004820152611903916001600160a01b0390811691908416906370a0823190602401602060405180830381865afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f291906147a3565b6001600160a01b03841691906134cf565b506001600855565b6000805b8281101561198057846001600160a01b031660038585848181106119355761193561478d565b905060200201358154811061194c5761194c61478d565b6000918252602090912001546001600160a01b031614611970576000915050611986565b611979816146fe565b905061190f565b50600190505b9392505050565b6000546001600160a01b031633146119b75760405162461bcd60e51b8152600401610dfe9061455b565b6014805460ff1916911515919091179055565b6000546001600160a01b031633146119f45760405162461bcd60e51b8152600401610dfe9061455b565b6110e2600b8383613d52565b6000546001600160a01b03163314611a2a5760405162461bcd60e51b8152600401610dfe9061455b565b6000838152600d60205260409020611a43908383613d52565b50505050565b60185460ff161580611a6557506000546001600160a01b031633145b80611a7f57503360009081526009602052604090205460ff165b611a9b5760405162461bcd60e51b8152600401610dfe90614762565b611a4384848484613521565b6000546001600160a01b03163314611ad15760405162461bcd60e51b8152600401610dfe9061455b565b6000908152600660205260409020805460ff19169055565b50565b60008060038381548110611b0257611b0261478d565b6000918252602090912001546001600160a01b0316905080610dce5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610dfe565b600d6020526000908152604090208054611b91906145d5565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbd906145d5565b8015611c0a5780601f10611bdf57610100808354040283529160200191611c0a565b820191906000526020600020905b815481529060010190602001808311611bed57829003601f168201915b505050505081565b600e54600160601b900460ff16611c3b5760405162461bcd60e51b8152600401610dfe90614610565b60145460ff1615611c5e5760405162461bcd60e51b8152600401610dfe90614635565b34600f5414611c7f5760405162461bcd60e51b8152600401610dfe9061465b565b600354600e54600160401b900461ffff1611611cad5760405162461bcd60e51b8152600401610dfe90614682565b600e5461ffff161580611ccd5750600e5461ffff16611ccb33611ce9565b105b6111d65760405162461bcd60e51b8152600401610dfe906146b2565b60006001600160a01b038216611d545760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610dfe565b600354600090815b81811015611db25760038181548110611d7757611d7761478d565b6000918252602090912001546001600160a01b0386811691161415611da257611d9f836146fe565b92505b611dab816146fe565b9050611d5c565b50909392505050565b6000546001600160a01b03163314611de55760405162461bcd60e51b8152600401610dfe9061455b565b6111de600061356b565b6000546001600160a01b03163314611e195760405162461bcd60e51b8152600401610dfe9061455b565b60005b82811015611a435760005b828281518110611e3957611e3961478d565b6020026020010151811015611e8957611e77858584818110611e5d57611e5d61478d565b9050602002016020810190611e729190614084565b6135bb565b80611e81816146fe565b915050611e27565b5080611e94816146fe565b915050611e1c565b6000546001600160a01b03163314611ec65760405162461bcd60e51b8152600401610dfe9061455b565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611f125760405162461bcd60e51b8152600401610dfe9061455b565b600f819055611f228160036146df565b60105550565b6000546001600160a01b03163314611f525760405162461bcd60e51b8152600401610dfe9061455b565b6110e2600a8383613d52565b606060028054610ec6906145d5565b600060165411611fb45760405162461bcd60e51b8152602060048201526012602482015271149150d2541251539514d7d393d517d4d15560721b6044820152606401610dfe565b6011546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611ffd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202191906147a3565b905060015b60165481116121095760175460008281526015602052604081206001015490919061205190856146df565b61205b91906147d2565b905047811161206a578061206c565b475b6011546000848152601560205260409081902054905163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af11580156120d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f491906147e6565b50508080612101906146fe565b915050612026565b50604051819033907f66902764973bf4d35892cf2fde75fcd39ea2cc28a2d6f61e51e45493ee10afe190600090a350565b600e54600160601b900460ff166121635760405162461bcd60e51b8152600401610dfe90614610565b601454610100900460ff161561218b5760405162461bcd60e51b8152600401610dfe90614803565b6011546012546001600160a01b03909116906323b872dd90339030906121b69061ffff8716906146df565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561220a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222e91906147e6565b506003546122419061ffff8316906145bd565b600e54600160301b900461ffff161161226c5760405162461bcd60e51b8152600401610dfe90614682565b600e5461ffff620100009091048116908216106122c15760405162461bcd60e51b8152602060048201526013602482015272115610d1515117d3505617d4115497d3525395606a1b6044820152606401610dfe565b600e5461ffff1615806122fd5750600e5461ffff9081169060019083166122e733611ce9565b6122f191906145bd565b6122fb91906145a6565b105b6123195760405162461bcd60e51b8152600401610dfe906146b2565b60005b8161ffff168110156113695761233061341f565b8061233a816146fe565b91505061231c565b6000546001600160a01b0316331461236c5760405162461bcd60e51b8152600401610dfe9061455b565b600780546001600160a01b0319166001600160a01b03831617905550565b6001600160a01b0382163314156123e35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610dfe565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b031633146124795760405162461bcd60e51b8152600401610dfe9061455b565b600e805461ffff909216620100000263ffff000019909216919091179055565b3360009081526009602052604090205460ff1615156001146124cd5760405162461bcd60e51b8152600401610dfe9061482b565b60005b8161ffff168110156110e2576124e5836135bb565b806124ef816146fe565b9150506124d0565b6007546001600160a01b0316336001600160a01b0316146125525760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610dfe565b816001600160a01b031661256582611aec565b6001600160a01b0316146125a75760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610dfe565b60008181526006602052604090205460ff16156125f75760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b6044820152606401610dfe565b6000908152600660205260409020805460ff19811660ff9091161517905550565b6000546001600160a01b031633146126425760405162461bcd60e51b8152600401610dfe9061455b565b60008161ffff1611612655576000612657565b805b600e805461ffff191661ffff92831617905560019082161161267f57600e5461ffff1661268a565b61268a60028261473f565b600e60046101000a81548161ffff021916908361ffff16021790555050565b600e54600160601b900460ff166126d25760405162461bcd60e51b8152600401610dfe90614610565b601454610100900460ff16156126fa5760405162461bcd60e51b8152600401610dfe90614803565b6011546012546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015612755573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277991906147e6565b50600354600e54600160401b900461ffff1611611cad5760405162461bcd60e51b8152600401610dfe90614682565b60185460ff1615806127c457506000546001600160a01b031633145b806127de57503360009081526009602052604090205460ff165b6127fa5760405162461bcd60e51b8152600401610dfe90614762565b611a438484848461364d565b60006016541161284d5760405162461bcd60e51b8152602060048201526012602482015271149150d2541251539514d7d393d517d4d15560721b6044820152606401610dfe565b4760015b60165481116129565760175460008281526015602052604081206001015490919061287c90856146df565b61288691906147d2565b90504781116128955780612897565b475b60008381526015602052604080822054905192935090916001600160a01b039091169083908381818185875af1925050503d80600081146128f4576040519150601f19603f3d011682016040523d82523d6000602084013e6128f9565b606091505b50509050806129415760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610dfe565b5050808061294e906146fe565b915050612851565b50604051819033907f0d20f677b24c0f42423a7e690ab1d066e4ae75145c497a68b1f34bd34944d12290600090a350565b6000546001600160a01b031633146129b15760405162461bcd60e51b8152600401610dfe9061455b565b601680549060006129c1836146fe565b90915550506016805460009081526015602052604080822080546001600160a01b0319166001600160a01b0387161790559154815290812060010182905560178054839290612a119084906145bd565b90915550505050565b6000546001600160a01b03163314612a445760405162461bcd60e51b8152600401610dfe9061455b565b612a4f816001614719565b600e805469ffffffff0000000000001916600160301b61ffff9384160261ffff60401b191617600160401b92841692909202919091179055612a9260028261473f565b600e600a6101000a81548161ffff021916908361ffff16021790555050565b6007546001600160a01b0316336001600160a01b031614612b0c5760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610dfe565b816001600160a01b0316612b1f82611aec565b6001600160a01b031614612b615760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610dfe565b6000908152600660205260409020805460ff1916905550565b6060612b8582613367565b612be95760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610dfe565b6000828152600d602052604081208054612c02906145d5565b90501115612ca8576000828152600d602052604090208054612c23906145d5565b80601f0160208091040260200160405190810160405280929190818152602001828054612c4f906145d5565b8015612c9c5780601f10612c7157610100808354040283529160200191612c9c565b820191906000526020600020905b815481529060010190602001808311612c7f57829003601f168201915b50505050509050919050565b600c54600160a01b900460ff1615612cc757600b8054612c23906145d5565b6000600b8054612cd6906145d5565b905011612cf25760405180602001604052806000815250610dce565b600b612cfd8361367f565b604051602001612d0e92919061486a565b60405160208183030381529060405292915050565b6000546001600160a01b0316331480612d4f5750600c546001600160a01b0316336001600160a01b0316145b80612d6957503360009081526009602052604090205460ff165b612da35760405162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b6044820152606401610dfe565b600c546001600160a01b0316612dee5760405162461bcd60e51b815260206004820152601060248201526f1514915054d5549657d393d517d4d15560821b6044820152606401610dfe565b600c5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114612e3f576040519150601f19603f3d011682016040523d82523d6000602084013e612e44565b606091505b5050905080612e8c5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610dfe565b604051829033907f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b7990600090a35050565b6000546001600160a01b03163314612ee75760405162461bcd60e51b8152600401610dfe9061455b565b601480549115156101000261ff0019909216919091179055565b6060600a8054610ec6906145d5565b60405163c455279160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c191848116919083169063c455279190602401602060405180830381865afa158015612f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa49190614911565b6001600160a01b03161480612fd157506001600160a01b03831660009081526009602052604090205460ff165b15612fe0576001915050610dce565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b600e54600160601b900460ff1661303b5760405162461bcd60e51b8152600401610dfe90614610565b601454610100900460ff16156130635760405162461bcd60e51b8152600401610dfe90614803565b6011546013546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156130be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130e291906147e6565b50600354600e54600160501b900461ffff16116111825760405162461bcd60e51b8152600401610dfe90614682565b6000546001600160a01b0316331461313b5760405162461bcd60e51b8152600401610dfe9061455b565b6001600160a01b0381166131a05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dfe565b611ae98161356b565b60185460ff1615806131c557506000546001600160a01b031633145b806131df57503360009081526009602052604090205460ff165b6131fb5760405162461bcd60e51b8152600401610dfe90614762565b6110e283838361377c565b6000546001600160a01b031633146132305760405162461bcd60e51b8152600401610dfe9061455b565b6018805460ff1916911515919091179055565b3360009081526009602052604090205460ff1615156001146132775760405162461bcd60e51b8152600401610dfe9061482b565b613280816135bb565b613289816135bb565b611ae9816135bb565b6000546001600160a01b031633146132bc5760405162461bcd60e51b8152600401610dfe9061455b565b6001600160a01b03166000908152600960205260409020805460ff19811660ff90911615179055565b600080546001600160a01b031633146133105760405162461bcd60e51b8152600401610dfe9061455b565b506001600160a01b03811660009081526009602052604090205460ff165b919050565b3360009081526009602052604090205460ff1615156001146132895760405162461bcd60e51b8152600401610dfe9061482b565b60035460009082108015610dce575060006001600160a01b0316600383815481106133945761339461478d565b6000918252602090912001546001600160a01b0316141592915050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906133e682611aec565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b03191633179055905461346f91906145a6565b60405133906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4565b6134a833826137be565b6134c45760405162461bcd60e51b8152600401610dfe9061492e565b6110e2838383613880565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110e29084906139d6565b60005b82518110156135645761355285858584815181106135445761354461478d565b6020026020010151856127a8565b8061355c816146fe565b915050613524565b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b038516179055905461361491906145a6565b6040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450565b61365733836137be565b6136735760405162461bcd60e51b8152600401610dfe9061492e565b611a4384848484613aa8565b6060816136a35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156136cd57806136b7816146fe565b91506136c69050600a836147d2565b91506136a7565b6000816001600160401b038111156136e7576136e76141d5565b6040519080825280601f01601f191660200182016040528015613711576020820181803683370190505b5090505b841561300a576137266001836145a6565b9150613733600a8661497f565b61373e9060306145bd565b60f81b8183815181106137535761375361478d565b60200101906001600160f81b031916908160001a905350613775600a866147d2565b9450613715565b60005b8151811015611a43576137ac848484848151811061379f5761379f61478d565b6020026020010151611505565b806137b6816146fe565b91505061377f565b60006137c982613367565b61382a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610dfe565b600061383583611aec565b9050806001600160a01b0316846001600160a01b031614806138705750836001600160a01b031661386584610f49565b6001600160a01b0316145b8061300a575061300a8185612f10565b826001600160a01b031661389382611aec565b6001600160a01b0316146138fb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610dfe565b6001600160a01b03821661395d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610dfe565b6139686000826133b1565b816003828154811061397c5761397c61478d565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6000613a2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613adb9092919063ffffffff16565b8051909150156110e25780806020019051810190613a4991906147e6565b6110e25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610dfe565b613ab3848484613880565b613abf84848484613aea565b611a435760405162461bcd60e51b8152600401610dfe90614993565b606061300a8484600085613be8565b60006001600160a01b0384163b15613bdd57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613b2e9033908990889088906004016149e5565b6020604051808303816000875af1925050508015613b69575060408051601f3d908101601f19168201909252613b6691810190614a22565b60015b613bc3573d808015613b97576040519150601f19603f3d011682016040523d82523d6000602084013e613b9c565b606091505b508051613bbb5760405162461bcd60e51b8152600401610dfe90614993565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061300a565b506001949350505050565b606082471015613c495760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610dfe565b6001600160a01b0385163b613ca05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dfe565b600080866001600160a01b03168587604051613cbc9190614a3f565b60006040518083038185875af1925050503d8060008114613cf9576040519150601f19603f3d011682016040523d82523d6000602084013e613cfe565b606091505b5091509150613d0e828286613d19565b979650505050505050565b60608315613d28575081611986565b825115613d385782518084602001fd5b8160405162461bcd60e51b8152600401610dfe9190613ec3565b828054613d5e906145d5565b90600052602060002090601f016020900481019282613d805760008555613dc6565b82601f10613d995782800160ff19823516178555613dc6565b82800160010185558215613dc6579182015b82811115613dc6578235825591602001919060010190613dab565b50613dd2929150613dd6565b5090565b5b80821115613dd25760008155600101613dd7565b6001600160e01b031981168114611ae957600080fd5b600060208284031215613e1357600080fd5b813561198681613deb565b6001600160a01b0381168114611ae957600080fd5b600080600060608486031215613e4857600080fd5b833592506020840135613e5a81613e1e565b929592945050506040919091013590565b60005b83811015613e86578181015183820152602001613e6e565b83811115611a435750506000910152565b60008151808452613eaf816020860160208601613e6b565b601f01601f19169290920160200192915050565b6020815260006119866020830184613e97565b600060208284031215613ee857600080fd5b5035919050565b60008060408385031215613f0257600080fd5b8235613f0d81613e1e565b946020939093013593505050565b600060208284031215613f2d57600080fd5b813560ff8116811461198657600080fd5b803561ffff8116811461332e57600080fd5b8015158114611ae957600080fd5b60008083601f840112613f7057600080fd5b5081356001600160401b03811115613f8757600080fd5b602083019150836020828501011115613f9f57600080fd5b9250929050565b60008060008060008060008060006101008a8c031215613fc557600080fd5b613fce8a613f3e565b9850613fdc60208b01613f3e565b975060408a01359650613ff160608b01613f3e565b955060808a013561400181613f50565b945060a08a01356001600160401b0381111561401c57600080fd5b6140288c828d01613f5e565b90955093505060c08a013561403c81613e1e565b8092505060e08a013590509295985092959850929598565b60008060006060848603121561406957600080fd5b833561407481613e1e565b92506020840135613e5a81613e1e565b60006020828403121561409657600080fd5b813561198681613e1e565b60008083601f8401126140b357600080fd5b5081356001600160401b038111156140ca57600080fd5b6020830191508360208260051b8501011115613f9f57600080fd5b6000806000604084860312156140fa57600080fd5b833561410581613e1e565b925060208401356001600160401b0381111561412057600080fd5b61412c868287016140a1565b9497909650939450505050565b60006020828403121561414b57600080fd5b813561198681613f50565b6000806020838503121561416957600080fd5b82356001600160401b0381111561417f57600080fd5b61418b85828601613f5e565b90969095509350505050565b6000806000604084860312156141ac57600080fd5b8335925060208401356001600160401b038111156141c957600080fd5b61412c86828701613f5e565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614213576142136141d5565b604052919050565b600082601f83011261422c57600080fd5b813560206001600160401b03821115614247576142476141d5565b8160051b6142568282016141eb565b928352848101820192828101908785111561427057600080fd5b83870192505b84831015613d0e57823582529183019190830190614276565b600082601f8301126142a057600080fd5b81356001600160401b038111156142b9576142b96141d5565b6142cc601f8201601f19166020016141eb565b8181528460208386010111156142e157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561431457600080fd5b843561431f81613e1e565b9350602085013561432f81613e1e565b925060408501356001600160401b038082111561434b57600080fd5b6143578883890161421b565b9350606087013591508082111561436d57600080fd5b5061437a8782880161428f565b91505092959194509250565b60008060006040848603121561439b57600080fd5b83356001600160401b03808211156143b257600080fd5b6143be878388016140a1565b909550935060208601359150808211156143d757600080fd5b506143e48682870161421b565b9150509250925092565b60006020828403121561440057600080fd5b61198682613f3e565b6000806040838503121561441c57600080fd5b823561442781613e1e565b9150602083013561443781613f50565b809150509250929050565b6000806040838503121561445557600080fd5b823561446081613e1e565b915061446e60208401613f3e565b90509250929050565b6000806000806080858703121561448d57600080fd5b843561449881613e1e565b935060208501356144a881613e1e565b92506040850135915060608501356001600160401b038111156144ca57600080fd5b61437a8782880161428f565b600080604083850312156144e957600080fd5b82356144f481613e1e565b9150602083013561443781613e1e565b60008060006060848603121561451957600080fd5b833561452481613e1e565b9250602084013561453481613e1e565b915060408401356001600160401b0381111561454f57600080fd5b6143e48682870161421b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156145b8576145b8614590565b500390565b600082198211156145d0576145d0614590565b500190565b600181811c908216806145e957607f821691505b6020821081141561460a57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600b908201526a14d0531157d0d313d4d15160aa1b604082015260600190565b6020808252600c908201526b4e4f5f4554485f53414c455360a01b604082015260600190565b6020808252600d908201526c0929c869ea4a48a86a8be8aa89609b1b604082015260600190565b6020808252601690820152754558434545445f4d41585f53414c455f535550504c5960501b604082015260600190565b60208082526013908201527222ac21a2a2a22fa6a0ac2fa822a92faaa9a2a960691b604082015260600190565b60008160001904831182151516156146f9576146f9614590565b500290565b600060001982141561471257614712614590565b5060010190565b600061ffff80831681851680830382111561473657614736614590565b01949350505050565b600061ffff8381169083168181101561475a5761475a614590565b039392505050565b6020808252601190820152701514905394d1915497d11254d050931151607a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156147b557600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b6000826147e1576147e16147bc565b500490565b6000602082840312156147f857600080fd5b815161198681613f50565b6020808252600e908201526d4e4f5f544f4b454e5f53414c455360901b604082015260600190565b6020808252600990820152686f6e6c7950726f787960b81b604082015260600190565b60008151614860818560208601613e6b565b9290920192915050565b600080845481600182811c91508083168061488657607f831692505b60208084108214156148a657634e487b7160e01b86526022600452602486fd5b8180156148ba57600181146148cb576148f8565b60ff198616895284890196506148f8565b60008b81526020902060005b868110156148f05781548b8201529085019083016148d7565b505084890196505b505050505050614908818561484e565b95945050505050565b60006020828403121561492357600080fd5b815161198681613e1e565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008261498e5761498e6147bc565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614a1890830184613e97565b9695505050505050565b600060208284031215614a3457600080fd5b815161198681613deb565b60008251614a51818460208701613e6b565b919091019291505056fea2646970667358221220f9318a586357488813c286e2479abab745f07b4ece670fad4545b5395bf9714564736f6c634300080b0033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000046cf71f924c035c3242d6afb61af4eadfe0bdcd5000000000000000000000000000000000000000000000000000000000000001850692050726f746f636f6c202d204554482053696c76657200000000000000000000000000000000000000000000000000000000000000000000000000000008506953696c766572000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Pi Protocol - ETH Silver
Arg [1] : symbol_ (string): PiSilver
Arg [2] : treasury_ (address): 0x46CF71F924c035C3242D6afb61aF4eaDFE0bDCd5

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000046cf71f924c035c3242d6afb61af4eadfe0bdcd5
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [4] : 50692050726f746f636f6c202d204554482053696c7665720000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [6] : 506953696c766572000000000000000000000000000000000000000000000000


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

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