ETH Price: $2,552.85 (+3.65%)

Token

Perpetual (PTVL)
 

Overview

Max Total Supply

0 PTVL

Holders

34

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
metakitty.eth
Balance
1 PTVL
0xa5b36A3732937375bC579fa38159347Da9938441
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:
Perpetual

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 90 runs

Other Settings:
default evmVersion
File 1 of 12 : Perpetual.sol
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./Admin.sol";

// ♺

// Perpetual
// 0xG

contract Perpetual is ERC721, IERC721Receiver, Admin {
  uint tokenId;

  address public editionFrom;
  uint    public editionFromNo;
  uint    public editionNo;
  mapping(address => uint)  public editionSupply;
  mapping(uint => string[]) public editionUri;

  mapping(uint => string) _tokenUri;

  mapping(uint => uint) public tokenIdToEditionNo;
  mapping(uint => bool) public unlockedToken;

  uint    public pValue;
  address public pToken;
  address pRecipient;
  address auth;

  mapping(uint => uint) public royalties;

  constructor() ERC721("Perpetual", "PTVL") {}

  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
    return (
      interfaceId == type(IERC721Receiver).interfaceId ||
      interfaceId == /* EIP2981 */ 0x2a55205a ||
      super.supportsInterface(interfaceId)
    );
  }

  function mint(address to, uint editionNo) external adminOnly {
    _mintToken(to, editionNo);
  }

  function mint(bytes calldata data) external payable {
    require(address(0) == editionFrom, "Cannot mint this edition");
    require(editionSupply[editionFrom] > 0, "No tokens left");
    if (auth != address(0)) {
      _auth(data, msg.sender);
    }
    if (pValue > 0) {
      require(pRecipient != address(0), "Invalid pRecipient");
      if (pToken == address(0)) {
        require(msg.value == pValue, "Invalid ETH amount");
        _fwd();
      } else {
        require(
          IERC20(pToken).transferFrom(msg.sender, pRecipient, pValue),
          "Payment failed"
        );
      }
    }
    editionSupply[editionFrom] -= 1;
    _mintToken(msg.sender, editionNo);
  }

  function mint(uint fromTokenId, bytes calldata data) external payable {
    require(msg.sender == ERC721.ownerOf(fromTokenId), "Unauthorized");
    if (auth != address(0)) {
      _auth(data, msg.sender);
    }
    _mintTokenFrom(address(this), fromTokenId, msg.sender);
  }

  function onERC721Received(
    address,
    address to,
    uint256 fromTokenId,
    bytes calldata data
  ) external override returns (bytes4) {
    require(msg.sender != address(this), "Invalid edition source");
    if (auth != address(0)) {
      _auth(data, to);
    }
    _mintTokenFrom(msg.sender, fromTokenId, to);
    return this.onERC721Received.selector;
  }

  function _mintToken(address to, uint editionNo) internal virtual {
    tokenId += 1;
    _mint(to, tokenId);
    tokenIdToEditionNo[tokenId] = editionNo;
    _tokenUri[tokenId] = editionUri[editionNo][0];
  }

  function _mintTokenFrom(address fromContract, uint fromTokenId, address to) internal virtual {
    require(editionFrom == fromContract, "Invalid edition source");
    require(
      editionFromNo == 0 ||
      tokenIdToEditionNo[fromTokenId] == editionFromNo,
      "Cannot burn this token"
    );
    require(editionSupply[fromContract] > 0, "No tokens left");
    editionSupply[fromContract] -= 1;

    if (pValue > 0) {
      require(pRecipient != address(0), "Invalid pRecipient");
      if (pToken == address(0)) {
        require(msg.value == pValue, "Invalid ETH amount");
        _fwd();
      } else {
        require(
          IERC20(pToken).transferFrom(to, pRecipient, pValue),
          "Payment failed"
        );
      }
    }

    bool isExternal = fromContract != address(this);

    if (isExternal) {
      try IBurnable(fromContract).burn(fromTokenId) {}
      catch {
        IBurnable(fromContract).transferFrom(address(this), address(0xdEaD), fromTokenId);
      }
    } else {
      require(unlockedToken[fromTokenId], "Token locked");
      unlockedToken[fromTokenId] = false;
      tokenIdToEditionNo[fromTokenId] = 0;
      _tokenUri[fromTokenId] = "";
      _burn(fromTokenId);
    }

    _mintToken(to, editionNo);
  }

  function burn(uint tokenId) external {
    require(msg.sender == ERC721.ownerOf(tokenId), "Unauthorized");
    unlockedToken[tokenId] = false;
    tokenIdToEditionNo[tokenId] = 0;
    _tokenUri[tokenId] = "";
    _burn(tokenId);
  }

  function unlock(uint tokenId) external {
    require(msg.sender == ERC721.ownerOf(tokenId), "Unauthorized");
    unlockedToken[tokenId] = true;
    _tokenUri[tokenId] = editionUri[tokenIdToEditionNo[tokenId]][1];
  }

  function configureEdition(
    address editionFrom_,
    uint editionFromNo_,
    uint editionNo_,
    uint supply,
    string[] memory uris
  ) external adminOnly {
    if (pValue > 0 && editionFrom_ != address(0) && editionFrom_ != address(this)) {
      require(
        pToken != address(0),
        "pToken for burn to mint tokens must be an ERC20 address"
      );
    }

    if (editionSupply[editionFrom] > 0) {
      editionSupply[editionFrom] = 0;
    }

    editionFrom = editionFrom_;
    require(editionFromNo_ == 0 || editionFrom_ == address(this), "External tokens cannot define an editionFromNo");
    editionFromNo = editionFromNo_;
    editionNo = editionNo_;
    editionSupply[editionFrom_] = supply;

    if (uris.length == 2) {
      editionUri[editionNo] = uris;
    }
  }

  function setUris(uint editionNo, string[] memory uris) external adminOnly {
    require(uris.length == 2, "Invalid uris");
    editionUri[editionNo] = uris;
  }

  function updateUri(uint tokenId) external {
    require(msg.sender == ERC721.ownerOf(tokenId), "Unauthorized");
    _tokenUri[tokenId] = editionUri[tokenIdToEditionNo[tokenId]][unlockedToken[tokenId] ? 1 : 0];
  }

  function tokenURI(uint tokenId) public view virtual override returns (string memory) {
    _requireMinted(tokenId);
    return _tokenUri[tokenId];
  }

  function setRoyalties(uint[] calldata tokenIds, uint value) external adminOnly {
    if (tokenIds.length == 1) {
      royalties[tokenIds[0]] = value;
    } else {
      for (uint i; i < tokenIds.length; i++) {
        royalties[tokenIds[i]] = value;
      }
    }
  }

  function royaltyInfo(uint tokenId, uint value) external view returns (address receiver, uint royaltyAmount) {
    uint tokenRoyalties = royalties[tokenId];
    if (tokenRoyalties == 1 || royalties[0] == 0 || pRecipient == address(0)) {
      return (address(0), 0);
    }
    if (tokenRoyalties == 0) {
      tokenRoyalties = royalties[0];
    }
    return (pRecipient, value * tokenRoyalties / 10000);
  }

  function setP(uint pValue_, address pToken_, address pRecipient_) external adminOnly {
    pValue = pValue_;
    pToken = pToken_;
    pRecipient = pRecipient_;
  }

  function setP(uint pValue_, address pToken_) external adminOnly {
    pValue = pValue_;
    pToken = pToken_;
  }

  function setP(address pRecipient_) external adminOnly {
    pRecipient = pRecipient_;
  }

  function _fwd() internal {
    (bool sent,) = pRecipient.call{value: msg.value}("");
    require(sent, "Failed to send ETH");
  }

  function setAuth(address auth_) external adminOnly {
    auth = auth_;
  }

  mapping(bytes32 => bool) _a;
  function _auth(bytes calldata data, address sender) internal {
    bytes32 hash = keccak256(data);
    require(_a[hash] == false, "Unauthorized");
    require(data.length > 1, "Invalid data");
    (bytes32 claims, bytes memory signature) = abi.decode(data, (bytes32, bytes));
    require(
      ECDSA.recover(
        keccak256(
          abi.encodePacked(
            "\x19Ethereum Signed Message:\n32",
            keccak256(abi.encodePacked(address(this), sender, claims))
          )
        ),
        signature
      ) == auth,
      "Unauthorized"
    );
    _a[hash] = true;
  }
}

interface IBurnable {
  function burn(uint tokenId) external;
  function transferFrom(address from, address to, uint256 tokenId) external;
}

interface IERC20 {
  function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

File 2 of 12 : Admin.sol
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;

abstract contract Admin {
  mapping(address => bool) private _admins;
  address private _owner;

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

  constructor() {
    _owner = msg.sender;
    _admins[msg.sender] = true;
  }

  function owner() public view virtual returns (address) {
    return _owner;
  }

  function isAdmin(address addr) public view virtual returns (bool) {
    return _owner == addr || true == _admins[addr];
  }

  modifier adminOnly {
    require(isAdmin(msg.sender), "Admin: caller is not an admin");
    _;
  }

  function setOwner(address newOwner) external adminOnly {
    address oldOwner = _owner;
    _owner = newOwner;
    emit OwnershipTransferred(oldOwner, newOwner);
  }

  function setAdmin(address addr, bool add) external adminOnly {
    if (add) {
      _admins[addr] = true;
    } else {
      delete _admins[addr];
    }
  }
}

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

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

File 7 of 12 : 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 8 of 12 : 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 9 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"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":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"editionFrom_","type":"address"},{"internalType":"uint256","name":"editionFromNo_","type":"uint256"},{"internalType":"uint256","name":"editionNo_","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"configureEdition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"editionFrom","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"editionFromNo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"editionNo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"editionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"editionUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"editionNo","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"royalties","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"add","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"auth_","type":"address"}],"name":"setAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pRecipient_","type":"address"}],"name":"setP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pValue_","type":"uint256"},{"internalType":"address","name":"pToken_","type":"address"},{"internalType":"address","name":"pRecipient_","type":"address"}],"name":"setP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pValue_","type":"uint256"},{"internalType":"address","name":"pToken_","type":"address"}],"name":"setP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"editionNo","type":"uint256"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setUris","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToEditionNo","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":[{"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":"uint256","name":"tokenId","type":"uint256"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unlockedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"updateUri","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604080518082018252600981526814195c9c195d1d585b60ba1b6020808301918252835180850190945260048452631415159360e21b9084015281519192916200005f91600091620000ac565b50805162000075906001906020840190620000ac565b5050600780546001600160a01b031916339081179091556000908152600660205260409020805460ff19166001179055506200018f565b828054620000ba9062000152565b90600052602060002090601f016020900481019282620000de576000855562000129565b82601f10620000f957805160ff191683800117855562000129565b8280016001018555821562000129579182015b82811115620001295782518255916020019190600101906200010c565b50620001379291506200013b565b5090565b5b808211156200013757600081556001016200013c565b600181811c908216806200016757607f821691505b602082108114156200018957634e487b7160e01b600052602260045260246000fd5b50919050565b613455806200019f6000396000f3fe6080604052600436106102315760003560e01c80636352211e11610129578063a22cb465116100b6578063c87b56dd1161007a578063c87b56dd1461070f578063db7fd4081461072f578063e765d85c14610742578063e985e9c514610762578063ecdc085714610782578063ffb5f24b146107b257600080fd5b8063a22cb4651461066c578063b0be1cf61461068c578063b82158bd146106b9578063b88d4fde146106d9578063c20500c7146106f957600080fd5b80636352211e1461053957806370a08231146105595780637ba0e2e7146105795780637be099381461058c5780637cb0b7f3146105ac5780637f77f574146105cc57806382ef2d9e146105f95780638da5cb5b1461061957806395d89b41146106375780639e9613f11461064c57600080fd5b80632a55205a116101c257806342966c681161018657806342966c68146104835780634b0bddd2146104a357806357363cc6146104c35780635841d61e146104d957806358a06f07146104f95780636198e3391461051957600080fd5b80632a55205a146103c05780632b2e05c1146103ff5780633056ebf71461041f57806340c10f191461044357806342842e0e1461046357600080fd5b806301ffc9a71461023657806306fdde031461026b578063081812fc1461028d578063095ea7b3146102c557806313af4035146102e7578063150b7a02146103075780631654683f14610340578063196694e91461036057806323b872dd1461038057806324d7806c146103a0575b600080fd5b34801561024257600080fd5b50610256610251366004612e19565b6107df565b60405190151581526020015b60405180910390f35b34801561027757600080fd5b50610280610825565b6040516102629190613073565b34801561029957600080fd5b506102ad6102a8366004612e94565b6108b7565b6040516001600160a01b039091168152602001610262565b3480156102d157600080fd5b506102e56102e0366004612ca8565b6108de565b005b3480156102f357600080fd5b506102e5610302366004612b12565b6109f9565b34801561031357600080fd5b50610327610322366004612b9c565b610a70565b6040516001600160e01b03199091168152602001610262565b34801561034c57600080fd5b506009546102ad906001600160a01b031681565b34801561036c57600080fd5b506102e561037b366004612b12565b610acb565b34801561038c57600080fd5b506102e561039b366004612b60565b610b12565b3480156103ac57600080fd5b506102566103bb366004612b12565b610b43565b3480156103cc57600080fd5b506103e06103db366004612f93565b610b81565b604080516001600160a01b039093168352602083019190915201610262565b34801561040b57600080fd5b506102e561041a366004612b12565b610c51565b34801561042b57600080fd5b5061043560115481565b604051908152602001610262565b34801561044f57600080fd5b506102e561045e366004612ca8565b610c98565b34801561046f57600080fd5b506102e561047e366004612b60565b610ccb565b34801561048f57600080fd5b506102e561049e366004612e94565b610ce6565b3480156104af57600080fd5b506102e56104be366004612c71565b610d71565b3480156104cf57600080fd5b50610435600a5481565b3480156104e557600080fd5b506102e56104f4366004612f0c565b610de5565b34801561050557600080fd5b506012546102ad906001600160a01b031681565b34801561052557600080fd5b506102e5610534366004612e94565b610e69565b34801561054557600080fd5b506102ad610554366004612e94565b610f15565b34801561056557600080fd5b50610435610574366004612b12565b610f4a565b6102e5610587366004612e53565b610fd0565b34801561059857600080fd5b506102e56105a7366004612d3c565b6111cc565b3480156105b857600080fd5b506102e56105c7366004612ed0565b611284565b3480156105d857600080fd5b506104356105e7366004612e94565b60156020526000908152604090205481565b34801561060557600080fd5b506102e5610614366004612e94565b6112dd565b34801561062557600080fd5b506007546001600160a01b03166102ad565b34801561064357600080fd5b50610280611361565b34801561065857600080fd5b50610280610667366004612f93565b611370565b34801561067857600080fd5b506102e5610687366004612c71565b611429565b34801561069857600080fd5b506104356106a7366004612e94565b600f6020526000908152604090205481565b3480156106c557600080fd5b506102e56106d4366004612cd2565b611434565b3480156106e557600080fd5b506102e56106f4366004612c0a565b61162e565b34801561070557600080fd5b50610435600b5481565b34801561071b57600080fd5b5061028061072a366004612e94565b611660565b6102e561073d366004612f48565b611709565b34801561074e57600080fd5b506102e561075d366004612ead565b611769565b34801561076e57600080fd5b5061025661077d366004612b2d565b6117b5565b34801561078e57600080fd5b5061025661079d366004612e94565b60106020526000908152604090205460ff1681565b3480156107be57600080fd5b506104356107cd366004612b12565b600c6020526000908152604090205481565b60006001600160e01b03198216630a85bd0160e11b1480610810575063152a902d60e11b6001600160e01b03198316145b8061081f575061081f826117e3565b92915050565b6060600080546108349061332d565b80601f01602080910402602001604051908101604052809291908181526020018280546108609061332d565b80156108ad5780601f10610882576101008083540402835291602001916108ad565b820191906000526020600020905b81548152906001019060200180831161089057829003601f168201915b5050505050905090565b60006108c282611833565b506000908152600460205260409020546001600160a01b031690565b60006108e982610f15565b9050806001600160a01b0316836001600160a01b0316141561095c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610978575061097881336117b5565b6109ea5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610953565b6109f48383611858565b505050565b610a0233610b43565b610a1e5760405162461bcd60e51b8152600401610953906131d8565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600033301415610a925760405162461bcd60e51b81526004016109539061320f565b6014546001600160a01b031615610aae57610aae8383876118c6565b610ab9338587611a56565b50630a85bd0160e11b95945050505050565b610ad433610b43565b610af05760405162461bcd60e51b8152600401610953906131d8565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b610b1c3382611de0565b610b385760405162461bcd60e51b81526004016109539061323f565b6109f4838383611e3f565b6007546000906001600160a01b038381169116148061081f5750506001600160a01b031660009081526006602052604090205460ff16151560011490565b60008281526015602052604081205481906001811480610bc957506000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed54155b80610bdd57506013546001600160a01b0316155b15610bef576000809250925050610c4a565b80610c2157506000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed545b6013546001600160a01b0316612710610c3a83876132f7565b610c4491906132d5565b92509250505b9250929050565b610c5a33610b43565b610c765760405162461bcd60e51b8152600401610953906131d8565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b610ca133610b43565b610cbd5760405162461bcd60e51b8152600401610953906131d8565b610cc78282611fc9565b5050565b6109f48383836040518060200160405280600081525061162e565b610cef81610f15565b6001600160a01b0316336001600160a01b031614610d1f5760405162461bcd60e51b8152600401610953906130ae565b6000818152601060209081526040808320805460ff19169055600f82528083208390558051808301808352848252858552600e90935292209151610d649291906127bc565b50610d6e81612052565b50565b610d7a33610b43565b610d965760405162461bcd60e51b8152600401610953906131d8565b8015610dc3576001600160a01b0382166000908152600660205260409020805460ff191660011790555050565b506001600160a01b03166000908152600660205260409020805460ff19169055565b610dee33610b43565b610e0a5760405162461bcd60e51b8152600401610953906131d8565b8051600214610e4a5760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964207572697360a01b6044820152606401610953565b6000828152600d6020908152604090912082516109f492840190612840565b610e7281610f15565b6001600160a01b0316336001600160a01b031614610ea25760405162461bcd60e51b8152600401610953906130ae565b6000818152601060209081526040808320805460ff19166001908117909155600f8352818420548452600d90925290912080549091908110610ee657610ee66133af565b60009182526020808320848452600e909152604090922091018054610f0a9061332d565b610cc7929190612899565b6000818152600260205260408120546001600160a01b03168061081f5760405162461bcd60e51b81526004016109539061317a565b60006001600160a01b038216610fb45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610953565b506001600160a01b031660009081526003602052604090205490565b6009546001600160a01b0316156110245760405162461bcd60e51b815260206004820152601860248201527721b0b73737ba1036b4b73a103a3434b99032b234ba34b7b760411b6044820152606401610953565b6009546001600160a01b03166000908152600c602052604090205461105b5760405162461bcd60e51b815260040161095390613086565b6014546001600160a01b031615611077576110778282336118c6565b6011541561118e576013546001600160a01b03166110a75760405162461bcd60e51b8152600401610953906131ac565b6012546001600160a01b03166110e55760115434146110d85760405162461bcd60e51b81526004016109539061314e565b6110e06120db565b61118e565b6012546013546011546040516323b872dd60e01b81526001600160a01b03938416936323b872dd936111209333939290911691600401613012565b602060405180830381600087803b15801561113a57600080fd5b505af115801561114e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111729190612db6565b61118e5760405162461bcd60e51b815260040161095390613126565b6009546001600160a01b03166000908152600c602052604081208054600192906111b9908490613316565b92505081905550610cc733600b54611fc9565b6111d533610b43565b6111f15760405162461bcd60e51b8152600401610953906131d8565b600182141561123057806015600085856000818110611212576112126133af565b90506020020135815260200190815260200160002081905550505050565b60005b8281101561127e578160156000868685818110611252576112526133af565b90506020020135815260200190815260200160002081905550808061127690613368565b915050611233565b50505050565b61128d33610b43565b6112a95760405162461bcd60e51b8152600401610953906131d8565b601192909255601280546001600160a01b039283166001600160a01b03199182161790915560138054929093169116179055565b6112e681610f15565b6001600160a01b0316336001600160a01b0316146113165760405162461bcd60e51b8152600401610953906130ae565b6000818152600f60209081526040808320548352600d825280832084845260109092529091205460ff1661134b57600061134e565b60015b60ff1681548110610ee657610ee66133af565b6060600180546108349061332d565b600d602052816000526040600020818154811061138c57600080fd5b906000526020600020016000915091505080546113a89061332d565b80601f01602080910402602001604051908101604052809291908181526020018280546113d49061332d565b80156114215780601f106113f657610100808354040283529160200191611421565b820191906000526020600020905b81548152906001019060200180831161140457829003601f168201915b505050505081565b610cc7338383612173565b61143d33610b43565b6114595760405162461bcd60e51b8152600401610953906131d8565b600060115411801561147357506001600160a01b03851615155b801561148857506001600160a01b0385163014155b15611505576012546001600160a01b03166115055760405162461bcd60e51b815260206004820152603760248201527f70546f6b656e20666f72206275726e20746f206d696e7420746f6b656e73206d60448201527675737420626520616e204552433230206164647265737360481b6064820152608401610953565b6009546001600160a01b03166000908152600c602052604090205415611541576009546001600160a01b03166000908152600c60205260408120555b600980546001600160a01b0319166001600160a01b03871617905583158061157157506001600160a01b03851630145b6115d45760405162461bcd60e51b815260206004820152602e60248201527f45787465726e616c20746f6b656e732063616e6e6f7420646566696e6520616e60448201526d2065646974696f6e46726f6d4e6f60901b6064820152608401610953565b600a849055600b8390556001600160a01b0385166000908152600c6020526040902082905580516002141561162757600b546000908152600d60209081526040909120825161162592840190612840565b505b5050505050565b6116383383611de0565b6116545760405162461bcd60e51b81526004016109539061323f565b61127e8484848461223e565b606061166b82611833565b6000828152600e6020526040902080546116849061332d565b80601f01602080910402602001604051908101604052809291908181526020018280546116b09061332d565b80156116fd5780601f106116d2576101008083540402835291602001916116fd565b820191906000526020600020905b8154815290600101906020018083116116e057829003601f168201915b50505050509050919050565b61171283610f15565b6001600160a01b0316336001600160a01b0316146117425760405162461bcd60e51b8152600401610953906130ae565b6014546001600160a01b03161561175e5761175e8282336118c6565b6109f4308433611a56565b61177233610b43565b61178e5760405162461bcd60e51b8152600401610953906131d8565b601191909155601280546001600160a01b0319166001600160a01b03909216919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061181457506001600160e01b03198216635b5e139f60e01b145b8061081f57506301ffc9a760e01b6001600160e01b031983161461081f565b61183c81612271565b610d6e5760405162461bcd60e51b81526004016109539061317a565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061188d82610f15565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600083836040516118d8929190613002565b604080519182900390912060008181526016602052919091205490915060ff16156119155760405162461bcd60e51b8152600401610953906130ae565b600183116119545760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964206461746160a01b6044820152606401610953565b60008061196385870187612dd3565b6014546040516bffffffffffffffffffffffff1930606090811b8216602084015289901b166034820152604881018490529294509092506001600160a01b031690611a109060680160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c01604051602081830303815290604052805190602001208361228e565b6001600160a01b031614611a365760405162461bcd60e51b8152600401610953906130ae565b50506000908152601660205260409020805460ff19166001179055505050565b6009546001600160a01b03848116911614611a835760405162461bcd60e51b81526004016109539061320f565b600a541580611aa15750600a546000838152600f6020526040902054145b611ae65760405162461bcd60e51b815260206004820152601660248201527521b0b73737ba10313ab937103a3434b9903a37b5b2b760511b6044820152606401610953565b6001600160a01b0383166000908152600c6020526040902054611b1b5760405162461bcd60e51b815260040161095390613086565b6001600160a01b0383166000908152600c60205260408120805460019290611b44908490613316565b909155505060115415611c60576013546001600160a01b0316611b795760405162461bcd60e51b8152600401610953906131ac565b6012546001600160a01b0316611bb7576011543414611baa5760405162461bcd60e51b81526004016109539061314e565b611bb26120db565b611c60565b6012546013546011546040516323b872dd60e01b81526001600160a01b03938416936323b872dd93611bf29387939290911691600401613012565b602060405180830381600087803b158015611c0c57600080fd5b505af1158015611c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c449190612db6565b611c605760405162461bcd60e51b815260040161095390613126565b6001600160a01b0383163014801590611d3857604051630852cd8d60e31b8152600481018490526001600160a01b038516906342966c6890602401600060405180830381600087803b158015611cb557600080fd5b505af1925050508015611cc6575060015b611d33576040516323b872dd60e01b81526001600160a01b038516906323b872dd90611cfc90309061dead908890600401613012565b600060405180830381600087803b158015611d1657600080fd5b505af1158015611d2a573d6000803e3d6000fd5b50505050611dd4565b611dd4565b60008381526010602052604090205460ff16611d855760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b881b1bd8dad95960a21b6044820152606401610953565b6000838152601060209081526040808320805460ff19169055600f82528083208390558051808301808352848252878552600e90935292209151611dca9291906127bc565b50611dd483612052565b61127e82600b54611fc9565b600080611dec83610f15565b9050806001600160a01b0316846001600160a01b03161480611e135750611e1381856117b5565b80611e375750836001600160a01b0316611e2c846108b7565b6001600160a01b0316145b949350505050565b826001600160a01b0316611e5282610f15565b6001600160a01b031614611eb65760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610953565b6001600160a01b038216611f185760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610953565b611f23600082611858565b6001600160a01b0383166000908152600360205260408120805460019290611f4c908490613316565b90915550506001600160a01b0382166000908152600360205260408120805460019290611f7a9084906132bd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061340083398151915291a4505050565b600160086000828254611fdc91906132bd565b92505081905550611fef826008546122b2565b6008546000908152600f60209081526040808320849055838352600d90915281208054909190612021576120216133af565b600091825260208083206008548452600e9091526040909220910180546120479061332d565b6109f4929190612899565b600061205d82610f15565b905061206a600083611858565b6001600160a01b0381166000908152600360205260408120805460019290612093908490613316565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020613400833981519152908390a45050565b6013546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612128576040519150601f19603f3d011682016040523d82523d6000602084013e61212d565b606091505b5050905080610d6e5760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408aa8960731b6044820152606401610953565b816001600160a01b0316836001600160a01b031614156121d15760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610953565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612249848484611e3f565b612255848484846123d3565b61127e5760405162461bcd60e51b8152600401610953906130d4565b6000908152600260205260409020546001600160a01b0316151590565b600080600061229d85856124e0565b915091506122aa81612523565b509392505050565b6001600160a01b0382166123085760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610953565b61231181612271565b1561235e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610953565b6001600160a01b03821660009081526003602052604081208054600192906123879084906132bd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020613400833981519152908290a45050565b60006001600160a01b0384163b156124d557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612417903390899088908890600401613036565b602060405180830381600087803b15801561243157600080fd5b505af1925050508015612461575060408051601f3d908101601f1916820190925261245e91810190612e36565b60015b6124bb573d80801561248f576040519150601f19603f3d011682016040523d82523d6000602084013e612494565b606091505b5080516124b35760405162461bcd60e51b8152600401610953906130d4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e37565b506001949350505050565b6000808251604114156125175760208301516040840151606085015160001a61250b878285856126d9565b94509450505050610c4a565b50600090506002610c4a565b600081600481111561253757612537613399565b14156125405750565b600181600481111561255457612554613399565b141561259d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610953565b60028160048111156125b1576125b1613399565b14156125ff5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610953565b600381600481111561261357612613613399565b141561266c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610953565b600481600481111561268057612680613399565b1415610d6e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610953565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561270657506000905060036127b3565b8460ff16601b1415801561271e57508460ff16601c14155b1561272f57506000905060046127b3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612783573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127ac576000600192509250506127b3565b9150600090505b94509492505050565b8280546127c89061332d565b90600052602060002090601f0160209004810192826127ea5760008555612830565b82601f1061280357805160ff1916838001178555612830565b82800160010185558215612830579182015b82811115612830578251825591602001919060010190612815565b5061283c929150612914565b5090565b82805482825590600052602060002090810192821561288d579160200282015b8281111561288d578251805161287d9184916020909101906127bc565b5091602001919060010190612860565b5061283c929150612929565b8280546128a59061332d565b90600052602060002090601f0160209004810192826128c75760008555612830565b82601f106128d85780548555612830565b8280016001018555821561283057600052602060002091601f016020900482015b828111156128305782548255916001019190600101906128f9565b5b8082111561283c5760008155600101612915565b8082111561283c57600061293d8282612946565b50600101612929565b5080546129529061332d565b6000825580601f10612962575050565b601f016020900490600052602060002090810190610d6e9190612914565b60006001600160401b03831115612999576129996133c5565b6129ac601f8401601f191660200161328d565b90508281528383830111156129c057600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146129ee57600080fd5b919050565b600082601f830112612a0457600080fd5b813560206001600160401b0380831115612a2057612a206133c5565b8260051b612a2f83820161328d565b8481528381019087850183890186018a1015612a4a57600080fd5b600093505b86841015612a9d57803585811115612a6657600080fd5b8901603f81018b13612a7757600080fd5b612a888b8883013560408401612980565b84525060019390930192918501918501612a4f565b5098975050505050505050565b60008083601f840112612abc57600080fd5b5081356001600160401b03811115612ad357600080fd5b602083019150836020828501011115610c4a57600080fd5b600082601f830112612afc57600080fd5b612b0b83833560208501612980565b9392505050565b600060208284031215612b2457600080fd5b612b0b826129d7565b60008060408385031215612b4057600080fd5b612b49836129d7565b9150612b57602084016129d7565b90509250929050565b600080600060608486031215612b7557600080fd5b612b7e846129d7565b9250612b8c602085016129d7565b9150604084013590509250925092565b600080600080600060808688031215612bb457600080fd5b612bbd866129d7565b9450612bcb602087016129d7565b93506040860135925060608601356001600160401b03811115612bed57600080fd5b612bf988828901612aaa565b969995985093965092949392505050565b60008060008060808587031215612c2057600080fd5b612c29856129d7565b9350612c37602086016129d7565b92506040850135915060608501356001600160401b03811115612c5957600080fd5b612c6587828801612aeb565b91505092959194509250565b60008060408385031215612c8457600080fd5b612c8d836129d7565b91506020830135612c9d816133db565b809150509250929050565b60008060408385031215612cbb57600080fd5b612cc4836129d7565b946020939093013593505050565b600080600080600060a08688031215612cea57600080fd5b612cf3866129d7565b945060208601359350604086013592506060860135915060808601356001600160401b03811115612d2357600080fd5b612d2f888289016129f3565b9150509295509295909350565b600080600060408486031215612d5157600080fd5b83356001600160401b0380821115612d6857600080fd5b818601915086601f830112612d7c57600080fd5b813581811115612d8b57600080fd5b8760208260051b8501011115612da057600080fd5b6020928301989097509590910135949350505050565b600060208284031215612dc857600080fd5b8151612b0b816133db565b60008060408385031215612de657600080fd5b8235915060208301356001600160401b03811115612e0357600080fd5b612e0f85828601612aeb565b9150509250929050565b600060208284031215612e2b57600080fd5b8135612b0b816133e9565b600060208284031215612e4857600080fd5b8151612b0b816133e9565b60008060208385031215612e6657600080fd5b82356001600160401b03811115612e7c57600080fd5b612e8885828601612aaa565b90969095509350505050565b600060208284031215612ea657600080fd5b5035919050565b60008060408385031215612ec057600080fd5b82359150612b57602084016129d7565b600080600060608486031215612ee557600080fd5b83359250612ef5602085016129d7565b9150612f03604085016129d7565b90509250925092565b60008060408385031215612f1f57600080fd5b8235915060208301356001600160401b03811115612f3c57600080fd5b612e0f858286016129f3565b600080600060408486031215612f5d57600080fd5b8335925060208401356001600160401b03811115612f7a57600080fd5b612f8686828701612aaa565b9497909650939450505050565b60008060408385031215612fa657600080fd5b50508035926020909101359150565b6000815180845260005b81811015612fdb57602081850181015186830182015201612fbf565b81811115612fed576000602083870101525b50601f01601f19169290920160200192915050565b8183823760009101908152919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061306990830184612fb5565b9695505050505050565b602081526000612b0b6020830184612fb5565b6020808252600e908201526d139bc81d1bdad95b9cc81b19599d60921b604082015260600190565b6020808252600c908201526b155b985d5d1a1bdc9a5e995960a21b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600e908201526d14185e5b595b9d0819985a5b195960921b604082015260600190565b602080825260129082015271125b9d985b1a590811551208185b5bdd5b9d60721b604082015260600190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b602080825260129082015271125b9d985b1a59081c149958da5c1a595b9d60721b604082015260600190565b6020808252601d908201527f41646d696e3a2063616c6c6572206973206e6f7420616e2061646d696e000000604082015260600190565b602080825260169082015275496e76616c69642065646974696f6e20736f7572636560501b604082015260600190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b604051601f8201601f191681016001600160401b03811182821017156132b5576132b56133c5565b604052919050565b600082198211156132d0576132d0613383565b500190565b6000826132f257634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561331157613311613383565b500290565b60008282101561332857613328613383565b500390565b600181811c9082168061334157607f821691505b6020821081141561336257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561337c5761337c613383565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610d6e57600080fd5b6001600160e01b031981168114610d6e57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212205de09002c1fc44d4bc42e0f97d38c22229f0b1204256752f80599dc7e926a64a64736f6c63430008070033

Deployed Bytecode

0x6080604052600436106102315760003560e01c80636352211e11610129578063a22cb465116100b6578063c87b56dd1161007a578063c87b56dd1461070f578063db7fd4081461072f578063e765d85c14610742578063e985e9c514610762578063ecdc085714610782578063ffb5f24b146107b257600080fd5b8063a22cb4651461066c578063b0be1cf61461068c578063b82158bd146106b9578063b88d4fde146106d9578063c20500c7146106f957600080fd5b80636352211e1461053957806370a08231146105595780637ba0e2e7146105795780637be099381461058c5780637cb0b7f3146105ac5780637f77f574146105cc57806382ef2d9e146105f95780638da5cb5b1461061957806395d89b41146106375780639e9613f11461064c57600080fd5b80632a55205a116101c257806342966c681161018657806342966c68146104835780634b0bddd2146104a357806357363cc6146104c35780635841d61e146104d957806358a06f07146104f95780636198e3391461051957600080fd5b80632a55205a146103c05780632b2e05c1146103ff5780633056ebf71461041f57806340c10f191461044357806342842e0e1461046357600080fd5b806301ffc9a71461023657806306fdde031461026b578063081812fc1461028d578063095ea7b3146102c557806313af4035146102e7578063150b7a02146103075780631654683f14610340578063196694e91461036057806323b872dd1461038057806324d7806c146103a0575b600080fd5b34801561024257600080fd5b50610256610251366004612e19565b6107df565b60405190151581526020015b60405180910390f35b34801561027757600080fd5b50610280610825565b6040516102629190613073565b34801561029957600080fd5b506102ad6102a8366004612e94565b6108b7565b6040516001600160a01b039091168152602001610262565b3480156102d157600080fd5b506102e56102e0366004612ca8565b6108de565b005b3480156102f357600080fd5b506102e5610302366004612b12565b6109f9565b34801561031357600080fd5b50610327610322366004612b9c565b610a70565b6040516001600160e01b03199091168152602001610262565b34801561034c57600080fd5b506009546102ad906001600160a01b031681565b34801561036c57600080fd5b506102e561037b366004612b12565b610acb565b34801561038c57600080fd5b506102e561039b366004612b60565b610b12565b3480156103ac57600080fd5b506102566103bb366004612b12565b610b43565b3480156103cc57600080fd5b506103e06103db366004612f93565b610b81565b604080516001600160a01b039093168352602083019190915201610262565b34801561040b57600080fd5b506102e561041a366004612b12565b610c51565b34801561042b57600080fd5b5061043560115481565b604051908152602001610262565b34801561044f57600080fd5b506102e561045e366004612ca8565b610c98565b34801561046f57600080fd5b506102e561047e366004612b60565b610ccb565b34801561048f57600080fd5b506102e561049e366004612e94565b610ce6565b3480156104af57600080fd5b506102e56104be366004612c71565b610d71565b3480156104cf57600080fd5b50610435600a5481565b3480156104e557600080fd5b506102e56104f4366004612f0c565b610de5565b34801561050557600080fd5b506012546102ad906001600160a01b031681565b34801561052557600080fd5b506102e5610534366004612e94565b610e69565b34801561054557600080fd5b506102ad610554366004612e94565b610f15565b34801561056557600080fd5b50610435610574366004612b12565b610f4a565b6102e5610587366004612e53565b610fd0565b34801561059857600080fd5b506102e56105a7366004612d3c565b6111cc565b3480156105b857600080fd5b506102e56105c7366004612ed0565b611284565b3480156105d857600080fd5b506104356105e7366004612e94565b60156020526000908152604090205481565b34801561060557600080fd5b506102e5610614366004612e94565b6112dd565b34801561062557600080fd5b506007546001600160a01b03166102ad565b34801561064357600080fd5b50610280611361565b34801561065857600080fd5b50610280610667366004612f93565b611370565b34801561067857600080fd5b506102e5610687366004612c71565b611429565b34801561069857600080fd5b506104356106a7366004612e94565b600f6020526000908152604090205481565b3480156106c557600080fd5b506102e56106d4366004612cd2565b611434565b3480156106e557600080fd5b506102e56106f4366004612c0a565b61162e565b34801561070557600080fd5b50610435600b5481565b34801561071b57600080fd5b5061028061072a366004612e94565b611660565b6102e561073d366004612f48565b611709565b34801561074e57600080fd5b506102e561075d366004612ead565b611769565b34801561076e57600080fd5b5061025661077d366004612b2d565b6117b5565b34801561078e57600080fd5b5061025661079d366004612e94565b60106020526000908152604090205460ff1681565b3480156107be57600080fd5b506104356107cd366004612b12565b600c6020526000908152604090205481565b60006001600160e01b03198216630a85bd0160e11b1480610810575063152a902d60e11b6001600160e01b03198316145b8061081f575061081f826117e3565b92915050565b6060600080546108349061332d565b80601f01602080910402602001604051908101604052809291908181526020018280546108609061332d565b80156108ad5780601f10610882576101008083540402835291602001916108ad565b820191906000526020600020905b81548152906001019060200180831161089057829003601f168201915b5050505050905090565b60006108c282611833565b506000908152600460205260409020546001600160a01b031690565b60006108e982610f15565b9050806001600160a01b0316836001600160a01b0316141561095c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610978575061097881336117b5565b6109ea5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610953565b6109f48383611858565b505050565b610a0233610b43565b610a1e5760405162461bcd60e51b8152600401610953906131d8565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600033301415610a925760405162461bcd60e51b81526004016109539061320f565b6014546001600160a01b031615610aae57610aae8383876118c6565b610ab9338587611a56565b50630a85bd0160e11b95945050505050565b610ad433610b43565b610af05760405162461bcd60e51b8152600401610953906131d8565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b610b1c3382611de0565b610b385760405162461bcd60e51b81526004016109539061323f565b6109f4838383611e3f565b6007546000906001600160a01b038381169116148061081f5750506001600160a01b031660009081526006602052604090205460ff16151560011490565b60008281526015602052604081205481906001811480610bc957506000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed54155b80610bdd57506013546001600160a01b0316155b15610bef576000809250925050610c4a565b80610c2157506000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed545b6013546001600160a01b0316612710610c3a83876132f7565b610c4491906132d5565b92509250505b9250929050565b610c5a33610b43565b610c765760405162461bcd60e51b8152600401610953906131d8565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b610ca133610b43565b610cbd5760405162461bcd60e51b8152600401610953906131d8565b610cc78282611fc9565b5050565b6109f48383836040518060200160405280600081525061162e565b610cef81610f15565b6001600160a01b0316336001600160a01b031614610d1f5760405162461bcd60e51b8152600401610953906130ae565b6000818152601060209081526040808320805460ff19169055600f82528083208390558051808301808352848252858552600e90935292209151610d649291906127bc565b50610d6e81612052565b50565b610d7a33610b43565b610d965760405162461bcd60e51b8152600401610953906131d8565b8015610dc3576001600160a01b0382166000908152600660205260409020805460ff191660011790555050565b506001600160a01b03166000908152600660205260409020805460ff19169055565b610dee33610b43565b610e0a5760405162461bcd60e51b8152600401610953906131d8565b8051600214610e4a5760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964207572697360a01b6044820152606401610953565b6000828152600d6020908152604090912082516109f492840190612840565b610e7281610f15565b6001600160a01b0316336001600160a01b031614610ea25760405162461bcd60e51b8152600401610953906130ae565b6000818152601060209081526040808320805460ff19166001908117909155600f8352818420548452600d90925290912080549091908110610ee657610ee66133af565b60009182526020808320848452600e909152604090922091018054610f0a9061332d565b610cc7929190612899565b6000818152600260205260408120546001600160a01b03168061081f5760405162461bcd60e51b81526004016109539061317a565b60006001600160a01b038216610fb45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610953565b506001600160a01b031660009081526003602052604090205490565b6009546001600160a01b0316156110245760405162461bcd60e51b815260206004820152601860248201527721b0b73737ba1036b4b73a103a3434b99032b234ba34b7b760411b6044820152606401610953565b6009546001600160a01b03166000908152600c602052604090205461105b5760405162461bcd60e51b815260040161095390613086565b6014546001600160a01b031615611077576110778282336118c6565b6011541561118e576013546001600160a01b03166110a75760405162461bcd60e51b8152600401610953906131ac565b6012546001600160a01b03166110e55760115434146110d85760405162461bcd60e51b81526004016109539061314e565b6110e06120db565b61118e565b6012546013546011546040516323b872dd60e01b81526001600160a01b03938416936323b872dd936111209333939290911691600401613012565b602060405180830381600087803b15801561113a57600080fd5b505af115801561114e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111729190612db6565b61118e5760405162461bcd60e51b815260040161095390613126565b6009546001600160a01b03166000908152600c602052604081208054600192906111b9908490613316565b92505081905550610cc733600b54611fc9565b6111d533610b43565b6111f15760405162461bcd60e51b8152600401610953906131d8565b600182141561123057806015600085856000818110611212576112126133af565b90506020020135815260200190815260200160002081905550505050565b60005b8281101561127e578160156000868685818110611252576112526133af565b90506020020135815260200190815260200160002081905550808061127690613368565b915050611233565b50505050565b61128d33610b43565b6112a95760405162461bcd60e51b8152600401610953906131d8565b601192909255601280546001600160a01b039283166001600160a01b03199182161790915560138054929093169116179055565b6112e681610f15565b6001600160a01b0316336001600160a01b0316146113165760405162461bcd60e51b8152600401610953906130ae565b6000818152600f60209081526040808320548352600d825280832084845260109092529091205460ff1661134b57600061134e565b60015b60ff1681548110610ee657610ee66133af565b6060600180546108349061332d565b600d602052816000526040600020818154811061138c57600080fd5b906000526020600020016000915091505080546113a89061332d565b80601f01602080910402602001604051908101604052809291908181526020018280546113d49061332d565b80156114215780601f106113f657610100808354040283529160200191611421565b820191906000526020600020905b81548152906001019060200180831161140457829003601f168201915b505050505081565b610cc7338383612173565b61143d33610b43565b6114595760405162461bcd60e51b8152600401610953906131d8565b600060115411801561147357506001600160a01b03851615155b801561148857506001600160a01b0385163014155b15611505576012546001600160a01b03166115055760405162461bcd60e51b815260206004820152603760248201527f70546f6b656e20666f72206275726e20746f206d696e7420746f6b656e73206d60448201527675737420626520616e204552433230206164647265737360481b6064820152608401610953565b6009546001600160a01b03166000908152600c602052604090205415611541576009546001600160a01b03166000908152600c60205260408120555b600980546001600160a01b0319166001600160a01b03871617905583158061157157506001600160a01b03851630145b6115d45760405162461bcd60e51b815260206004820152602e60248201527f45787465726e616c20746f6b656e732063616e6e6f7420646566696e6520616e60448201526d2065646974696f6e46726f6d4e6f60901b6064820152608401610953565b600a849055600b8390556001600160a01b0385166000908152600c6020526040902082905580516002141561162757600b546000908152600d60209081526040909120825161162592840190612840565b505b5050505050565b6116383383611de0565b6116545760405162461bcd60e51b81526004016109539061323f565b61127e8484848461223e565b606061166b82611833565b6000828152600e6020526040902080546116849061332d565b80601f01602080910402602001604051908101604052809291908181526020018280546116b09061332d565b80156116fd5780601f106116d2576101008083540402835291602001916116fd565b820191906000526020600020905b8154815290600101906020018083116116e057829003601f168201915b50505050509050919050565b61171283610f15565b6001600160a01b0316336001600160a01b0316146117425760405162461bcd60e51b8152600401610953906130ae565b6014546001600160a01b03161561175e5761175e8282336118c6565b6109f4308433611a56565b61177233610b43565b61178e5760405162461bcd60e51b8152600401610953906131d8565b601191909155601280546001600160a01b0319166001600160a01b03909216919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061181457506001600160e01b03198216635b5e139f60e01b145b8061081f57506301ffc9a760e01b6001600160e01b031983161461081f565b61183c81612271565b610d6e5760405162461bcd60e51b81526004016109539061317a565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061188d82610f15565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600083836040516118d8929190613002565b604080519182900390912060008181526016602052919091205490915060ff16156119155760405162461bcd60e51b8152600401610953906130ae565b600183116119545760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964206461746160a01b6044820152606401610953565b60008061196385870187612dd3565b6014546040516bffffffffffffffffffffffff1930606090811b8216602084015289901b166034820152604881018490529294509092506001600160a01b031690611a109060680160408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c01604051602081830303815290604052805190602001208361228e565b6001600160a01b031614611a365760405162461bcd60e51b8152600401610953906130ae565b50506000908152601660205260409020805460ff19166001179055505050565b6009546001600160a01b03848116911614611a835760405162461bcd60e51b81526004016109539061320f565b600a541580611aa15750600a546000838152600f6020526040902054145b611ae65760405162461bcd60e51b815260206004820152601660248201527521b0b73737ba10313ab937103a3434b9903a37b5b2b760511b6044820152606401610953565b6001600160a01b0383166000908152600c6020526040902054611b1b5760405162461bcd60e51b815260040161095390613086565b6001600160a01b0383166000908152600c60205260408120805460019290611b44908490613316565b909155505060115415611c60576013546001600160a01b0316611b795760405162461bcd60e51b8152600401610953906131ac565b6012546001600160a01b0316611bb7576011543414611baa5760405162461bcd60e51b81526004016109539061314e565b611bb26120db565b611c60565b6012546013546011546040516323b872dd60e01b81526001600160a01b03938416936323b872dd93611bf29387939290911691600401613012565b602060405180830381600087803b158015611c0c57600080fd5b505af1158015611c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c449190612db6565b611c605760405162461bcd60e51b815260040161095390613126565b6001600160a01b0383163014801590611d3857604051630852cd8d60e31b8152600481018490526001600160a01b038516906342966c6890602401600060405180830381600087803b158015611cb557600080fd5b505af1925050508015611cc6575060015b611d33576040516323b872dd60e01b81526001600160a01b038516906323b872dd90611cfc90309061dead908890600401613012565b600060405180830381600087803b158015611d1657600080fd5b505af1158015611d2a573d6000803e3d6000fd5b50505050611dd4565b611dd4565b60008381526010602052604090205460ff16611d855760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b881b1bd8dad95960a21b6044820152606401610953565b6000838152601060209081526040808320805460ff19169055600f82528083208390558051808301808352848252878552600e90935292209151611dca9291906127bc565b50611dd483612052565b61127e82600b54611fc9565b600080611dec83610f15565b9050806001600160a01b0316846001600160a01b03161480611e135750611e1381856117b5565b80611e375750836001600160a01b0316611e2c846108b7565b6001600160a01b0316145b949350505050565b826001600160a01b0316611e5282610f15565b6001600160a01b031614611eb65760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610953565b6001600160a01b038216611f185760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610953565b611f23600082611858565b6001600160a01b0383166000908152600360205260408120805460019290611f4c908490613316565b90915550506001600160a01b0382166000908152600360205260408120805460019290611f7a9084906132bd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061340083398151915291a4505050565b600160086000828254611fdc91906132bd565b92505081905550611fef826008546122b2565b6008546000908152600f60209081526040808320849055838352600d90915281208054909190612021576120216133af565b600091825260208083206008548452600e9091526040909220910180546120479061332d565b6109f4929190612899565b600061205d82610f15565b905061206a600083611858565b6001600160a01b0381166000908152600360205260408120805460019290612093908490613316565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020613400833981519152908390a45050565b6013546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612128576040519150601f19603f3d011682016040523d82523d6000602084013e61212d565b606091505b5050905080610d6e5760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408aa8960731b6044820152606401610953565b816001600160a01b0316836001600160a01b031614156121d15760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610953565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612249848484611e3f565b612255848484846123d3565b61127e5760405162461bcd60e51b8152600401610953906130d4565b6000908152600260205260409020546001600160a01b0316151590565b600080600061229d85856124e0565b915091506122aa81612523565b509392505050565b6001600160a01b0382166123085760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610953565b61231181612271565b1561235e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610953565b6001600160a01b03821660009081526003602052604081208054600192906123879084906132bd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020613400833981519152908290a45050565b60006001600160a01b0384163b156124d557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612417903390899088908890600401613036565b602060405180830381600087803b15801561243157600080fd5b505af1925050508015612461575060408051601f3d908101601f1916820190925261245e91810190612e36565b60015b6124bb573d80801561248f576040519150601f19603f3d011682016040523d82523d6000602084013e612494565b606091505b5080516124b35760405162461bcd60e51b8152600401610953906130d4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e37565b506001949350505050565b6000808251604114156125175760208301516040840151606085015160001a61250b878285856126d9565b94509450505050610c4a565b50600090506002610c4a565b600081600481111561253757612537613399565b14156125405750565b600181600481111561255457612554613399565b141561259d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610953565b60028160048111156125b1576125b1613399565b14156125ff5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610953565b600381600481111561261357612613613399565b141561266c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610953565b600481600481111561268057612680613399565b1415610d6e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610953565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561270657506000905060036127b3565b8460ff16601b1415801561271e57508460ff16601c14155b1561272f57506000905060046127b3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612783573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127ac576000600192509250506127b3565b9150600090505b94509492505050565b8280546127c89061332d565b90600052602060002090601f0160209004810192826127ea5760008555612830565b82601f1061280357805160ff1916838001178555612830565b82800160010185558215612830579182015b82811115612830578251825591602001919060010190612815565b5061283c929150612914565b5090565b82805482825590600052602060002090810192821561288d579160200282015b8281111561288d578251805161287d9184916020909101906127bc565b5091602001919060010190612860565b5061283c929150612929565b8280546128a59061332d565b90600052602060002090601f0160209004810192826128c75760008555612830565b82601f106128d85780548555612830565b8280016001018555821561283057600052602060002091601f016020900482015b828111156128305782548255916001019190600101906128f9565b5b8082111561283c5760008155600101612915565b8082111561283c57600061293d8282612946565b50600101612929565b5080546129529061332d565b6000825580601f10612962575050565b601f016020900490600052602060002090810190610d6e9190612914565b60006001600160401b03831115612999576129996133c5565b6129ac601f8401601f191660200161328d565b90508281528383830111156129c057600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146129ee57600080fd5b919050565b600082601f830112612a0457600080fd5b813560206001600160401b0380831115612a2057612a206133c5565b8260051b612a2f83820161328d565b8481528381019087850183890186018a1015612a4a57600080fd5b600093505b86841015612a9d57803585811115612a6657600080fd5b8901603f81018b13612a7757600080fd5b612a888b8883013560408401612980565b84525060019390930192918501918501612a4f565b5098975050505050505050565b60008083601f840112612abc57600080fd5b5081356001600160401b03811115612ad357600080fd5b602083019150836020828501011115610c4a57600080fd5b600082601f830112612afc57600080fd5b612b0b83833560208501612980565b9392505050565b600060208284031215612b2457600080fd5b612b0b826129d7565b60008060408385031215612b4057600080fd5b612b49836129d7565b9150612b57602084016129d7565b90509250929050565b600080600060608486031215612b7557600080fd5b612b7e846129d7565b9250612b8c602085016129d7565b9150604084013590509250925092565b600080600080600060808688031215612bb457600080fd5b612bbd866129d7565b9450612bcb602087016129d7565b93506040860135925060608601356001600160401b03811115612bed57600080fd5b612bf988828901612aaa565b969995985093965092949392505050565b60008060008060808587031215612c2057600080fd5b612c29856129d7565b9350612c37602086016129d7565b92506040850135915060608501356001600160401b03811115612c5957600080fd5b612c6587828801612aeb565b91505092959194509250565b60008060408385031215612c8457600080fd5b612c8d836129d7565b91506020830135612c9d816133db565b809150509250929050565b60008060408385031215612cbb57600080fd5b612cc4836129d7565b946020939093013593505050565b600080600080600060a08688031215612cea57600080fd5b612cf3866129d7565b945060208601359350604086013592506060860135915060808601356001600160401b03811115612d2357600080fd5b612d2f888289016129f3565b9150509295509295909350565b600080600060408486031215612d5157600080fd5b83356001600160401b0380821115612d6857600080fd5b818601915086601f830112612d7c57600080fd5b813581811115612d8b57600080fd5b8760208260051b8501011115612da057600080fd5b6020928301989097509590910135949350505050565b600060208284031215612dc857600080fd5b8151612b0b816133db565b60008060408385031215612de657600080fd5b8235915060208301356001600160401b03811115612e0357600080fd5b612e0f85828601612aeb565b9150509250929050565b600060208284031215612e2b57600080fd5b8135612b0b816133e9565b600060208284031215612e4857600080fd5b8151612b0b816133e9565b60008060208385031215612e6657600080fd5b82356001600160401b03811115612e7c57600080fd5b612e8885828601612aaa565b90969095509350505050565b600060208284031215612ea657600080fd5b5035919050565b60008060408385031215612ec057600080fd5b82359150612b57602084016129d7565b600080600060608486031215612ee557600080fd5b83359250612ef5602085016129d7565b9150612f03604085016129d7565b90509250925092565b60008060408385031215612f1f57600080fd5b8235915060208301356001600160401b03811115612f3c57600080fd5b612e0f858286016129f3565b600080600060408486031215612f5d57600080fd5b8335925060208401356001600160401b03811115612f7a57600080fd5b612f8686828701612aaa565b9497909650939450505050565b60008060408385031215612fa657600080fd5b50508035926020909101359150565b6000815180845260005b81811015612fdb57602081850181015186830182015201612fbf565b81811115612fed576000602083870101525b50601f01601f19169290920160200192915050565b8183823760009101908152919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061306990830184612fb5565b9695505050505050565b602081526000612b0b6020830184612fb5565b6020808252600e908201526d139bc81d1bdad95b9cc81b19599d60921b604082015260600190565b6020808252600c908201526b155b985d5d1a1bdc9a5e995960a21b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600e908201526d14185e5b595b9d0819985a5b195960921b604082015260600190565b602080825260129082015271125b9d985b1a590811551208185b5bdd5b9d60721b604082015260600190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b602080825260129082015271125b9d985b1a59081c149958da5c1a595b9d60721b604082015260600190565b6020808252601d908201527f41646d696e3a2063616c6c6572206973206e6f7420616e2061646d696e000000604082015260600190565b602080825260169082015275496e76616c69642065646974696f6e20736f7572636560501b604082015260600190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b604051601f8201601f191681016001600160401b03811182821017156132b5576132b56133c5565b604052919050565b600082198211156132d0576132d0613383565b500190565b6000826132f257634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561331157613311613383565b500290565b60008282101561332857613328613383565b500390565b600181811c9082168061334157607f821691505b6020821081141561336257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561337c5761337c613383565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610d6e57600080fd5b6001600160e01b031981168114610d6e57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212205de09002c1fc44d4bc42e0f97d38c22229f0b1204256752f80599dc7e926a64a64736f6c63430008070033

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.