ETH Price: $3,453.62 (+0.12%)
Gas: 6 Gwei

Token

Trunk Digital Trading Cards (TRUNKS)
 

Overview

Max Total Supply

874 TRUNKS

Holders

212

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
memoblastingman.eth
Balance
0 TRUNKS
0x32130a7128E5E59430b26CFF4dE82EBB45B43852
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:
TrunkDigitalTradingCards

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : TrunkDigitalTradingCards.sol
// SPDX-License-Identifier: BSD-3
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "operator-filter-registry/src/OperatorFilterer.sol";

import "./ERC721F.sol";
import "./Royalties.sol";
import "./Delegated.sol";

contract TrunkDigitalTradingCards is ERC721F, Royalties, OperatorFilterer, Delegated {
  using Strings for uint256;

  struct CollabConfig{
    uint64 ethPrice;
    uint8 maxFree;
    uint8 maxSupply;
    bool isEnabled;
    bool useTokenId;
  }

  string public tokenURIPrefix;
  string public tokenURISuffix;

  bool public IS_OS_ENABLED = true;
  bool public IS_PAUSED = true;
  uint16 public MAX_SUPPLY = 10000;

  mapping(address => CollabConfig) public collabs;


  modifier onlyAllowedOperator(address from) override {
    if (IS_OS_ENABLED && from != msg.sender) {
      _checkFilterOperator(msg.sender);
    }
    _;
  }

  modifier onlyAllowedOperatorApproval(address operator) override {
    if(IS_OS_ENABLED){
      _checkFilterOperator(operator);
    }
    _;
  }




  constructor()
    OperatorFilterer(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6, true)
    Royalties(msg.sender, 5, 100)
    ERC721F("Trunk Digital Trading Cards", "TRUNKS")
  {
    // UE
    collabs[0x613E5136a22206837D12eF7A85f7de2825De1334] = CollabConfig(
      0.009 ether,
      2,
      3,
      true,
      false
    );

    // UM
    collabs[0x171e138212B8b76b931C7a30e29045bcaF0E0e74] = CollabConfig(
      0.009 ether,
      2,
      3,
      true,
      true
    );

    // UC
    collabs[0x7870cc63b6B1AF0AED0D6Dd7c1eFB39300b773eB] = CollabConfig(
      0.009 ether,
      2,
      3,
      true,
      false
    );

    // PEP
    collabs[0x4250c98Fdb87CF1a977F74E331C3DD40052962a3] = CollabConfig(
      0.009 ether,
      2,
      3,
      true,
      true
    );

    // 8W
    collabs[0x43E9103650ea0462AFecF35B6B46b745A4Eb4fAb] = CollabConfig(
      0.009 ether,
      2,
      3,
      true,
      true
    );

    // GA
    collabs[address(0)] = CollabConfig(
      0.019 ether,
      0,
      1,
      true,
      false
    );
  }

  receive() external payable {}

  function withdraw() external onlyOwner {
    uint256 totalBalance = address(this).balance;
    require(totalBalance > 0, "No funds available");
    Address.sendValue(payable(owner()), totalBalance);
  }


  // payable - payable
  function collabMint(address collection, uint16 quantity, uint256 checkTokenId) external payable {
    require(!IS_PAUSED, "Sale is paused");
    require(totalSupply() + quantity < MAX_SUPPLY, "Mint/Order exceeds supply");
    
    CollabConfig memory collab = collabs[collection];
    require(collab.isEnabled, "Community mint is disabled");
    require(collab.maxSupply >= _numberMinted(msg.sender) + quantity, "Mint limit reached");

    bool isAllowed = collab.useTokenId ?
      IERC721(collection).ownerOf(checkTokenId) == msg.sender :
      IERC721(collection).balanceOf(msg.sender) > 0;
    require(isAllowed, "Wallet not authorized");

    ( , , uint256 totalValue) = calculateQuantities(collection, msg.sender, quantity);
    require(msg.value == totalValue, "Ether sent is not correct");

    _mint(msg.sender, quantity);
  }

  function mint(uint256 quantity) external payable {
    require(!IS_PAUSED, "Sale is paused");
    require(totalSupply() + quantity < MAX_SUPPLY, "Mint/Order exceeds supply");

    CollabConfig memory collab = collabs[address(0)];
    require(collab.isEnabled, "Public sale is closed");
    require(collab.maxSupply >= _numberMinted(msg.sender) + quantity, "Mint limit reached");

    ( , , uint256 totalValue) = calculateQuantities(address(0), msg.sender, uint16(quantity));
    require(msg.value == totalValue, "Ether sent is not correct");

    _mint(msg.sender, quantity);
  }


  // payable - onlyDelegates
  function burnFrom(uint16[] calldata tokenIds, address account) external payable onlyDelegates{
    for(uint256 i = 0; i < tokenIds.length; ++i){
      require(ownerOf(tokenIds[i]) == account, "Owner mismatch");
      _burn(tokenIds[i]);
    }
  }

  function mintTo(uint16[] calldata quantities, address[] calldata recipients) external payable onlyDelegates{
    require(quantities.length == recipients.length, "Uneven request");

    uint16 quantity;
    address recipient;
    uint256 supply = totalSupply();
    for(uint256 i = 0; i < quantities.length; ++i){
      quantity = quantities[i];
      require(supply + quantity < MAX_SUPPLY, "Mint/Order exceeds supply");

      recipient = recipients[i];
      _mint(recipient, quantity);
      _packedAddressData[recipient].numberMinted -= quantity;
    }
  }


  // nonpayable - onlyDelegates
  function setCollab(address collection, CollabConfig calldata config) external onlyDelegates {
    collabs[collection] = config;
  }

  function setMaxSupply(uint16 maxSupply) external onlyDelegates{
    MAX_SUPPLY = maxSupply;
  }

  function setOsStatus(bool isEnabled) external onlyDelegates{
    IS_OS_ENABLED = isEnabled;
  }

  function setPaused(bool isPaused) external onlyDelegates{
    IS_PAUSED = isPaused;
  }

  function setTokenURI( string calldata prefix, string calldata suffix ) external onlyDelegates{
    tokenURIPrefix = prefix;
    tokenURISuffix = suffix;
  }


  //nonpayable - onlyOwner
  function setDefaultRoyalty( address receiver, uint16 feeNumerator, uint16 feeDenominator ) external onlyOwner {
    _setDefaultRoyalty( receiver, feeNumerator, feeDenominator );
  }


  // view
  function calculateQuantities(address collection, address account, uint16 quantity) public view returns(uint16, uint16, uint256){
    CollabConfig memory collab = collabs[collection];

    uint16 free = 0;
    uint16 paid = quantity;
    uint16 minted = uint16(_numberMinted(account));
    if(collab.maxFree >= minted){
      free = collab.maxFree - minted;
      if(quantity > free){
        paid = quantity - free;
      }
      else{
        free = quantity;
        paid = 0;
      }
    }

    uint256 totalValue = collab.ethPrice * paid;
    return (free, paid, totalValue);
  }


  //view - IERC721Metadata
  function tokenURI( uint256 tokenId ) public view override returns( string memory ){
    require(_exists(tokenId), "Genesis: query for nonexistent token");
    return string(abi.encodePacked(tokenURIPrefix, tokenId.toString(), tokenURISuffix));
  }


  // view - override
  function supportsInterface(bytes4 interfaceId) public view override(ERC721F, Royalties) returns(bool) {
    return ERC721F.supportsInterface(interfaceId)
      || Royalties.supportsInterface(interfaceId);
  }


  //OS overrides
  function approve(address operator, uint256 tokenId)
    public
    payable
    override(ERC721F)
    onlyAllowedOperatorApproval(operator)
  {
    super.approve(operator, tokenId);
  }

  function setApprovalForAll(address operator, bool approved)
    public
    override(ERC721F)
    onlyAllowedOperatorApproval(operator)
  {
    super.setApprovalForAll(operator, approved);
  }

  function safeTransferFrom(address from, address to, uint256 tokenId)
    public
    payable
    override(ERC721F) onlyAllowedOperator(from)
  {
    super.safeTransferFrom(from, to, tokenId);
  }

  function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
    public
    payable
    override(ERC721F)
    onlyAllowedOperator(from)
  {
    super.safeTransferFrom(from, to, tokenId, data);
  }

  function transferFrom(address from, address to, uint256 tokenId)
    public
    payable
    override(ERC721F)
    onlyAllowedOperator(from)
  {
    super.transferFrom(from, to, tokenId);
  }
}

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

import "@openzeppelin/contracts/interfaces/IERC2981.sol";

contract Royalties is IERC2981{

  struct Fraction{
    uint16 numerator;
    uint16 denominator;
  }

  struct Royalty{
    address receiver;
    Fraction fraction;
  }

  Royalty public defaultRoyalty;

  constructor(address receiver, uint16 royaltyNum, uint16 royaltyDenom){
    _setDefaultRoyalty( receiver, royaltyNum, royaltyDenom );
  }

  //view: IERC2981
  /**
   * @dev See {IERC2981-royaltyInfo}.
   **/
  function royaltyInfo(uint256, uint256 _salePrice) public view virtual returns (address, uint256) {
    /*
    Royalty memory royalty = _tokenRoyaltyInfo[_tokenId];
    if (royalty.receiver == address(0)) {
        royalty = _defaultRoyaltyInfo;
    }
    */

    uint256 royaltyAmount = (_salePrice * defaultRoyalty.fraction.numerator) / defaultRoyalty.fraction.denominator;
    return (defaultRoyalty.receiver, royaltyAmount);
  }

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


  function _setDefaultRoyalty( address receiver, uint16 royaltyNum, uint16 royaltyDenom ) internal {
    defaultRoyalty.receiver = receiver;
    defaultRoyalty.fraction = Fraction(royaltyNum, royaltyDenom);
  }
}

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

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Whether the next tokenId is initialized.
        bool nextInitialized;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint16 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

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

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

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` 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 payable;

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

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

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

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

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

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

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

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 4 of 15 : ERC721F.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.9;

import "./IERC721A.sol";

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721F is IERC721A {
    struct OwnerData{
        uint64 balance;
        uint64 numberMinted;
        uint64 numberBurned;
        uint64 aux;
    }


    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }
    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;


    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

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

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

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

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

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

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

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

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner].balance;
    }

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

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

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

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        _packedAddressData[owner].aux = aux;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

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

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

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return _packedOwnershipOf(tokenId).addr;
    }

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

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    //TODO: review
    function _packedOwnershipOf(uint256 tokenId) private view returns (TokenOwnership memory packed) {
        address addr0 = address(0);
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    // If not burned.
                    while (packed.addr == addr0) {
                        packed = _packedOwnerships[curr--];
                    }
                    return packed;
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @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) public payable virtual override {
        address owner = ownerOf(tokenId);

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

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

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @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) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @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. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            !_packedOwnerships[tokenId].burned; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        if(msgSender == owner)
            return true;

        if(msgSender == approvedAddress)
            return true;

        return false;
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) public payable virtual override {
        TokenOwnership memory prevOwnership = _packedOwnershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

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

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = TokenOwnership(
                to,
                uint64(block.timestamp),
                false,
                true,
                prevOwnership.extraData
            );

            //TODO: extract this
            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (!prevOwnership.nextInitialized) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId].startTimestamp == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = TokenOwnership(
                            prevOwnership.addr,
                            prevOwnership.startTimestamp,
                            false,
                            false,
                            prevOwnership.extraData
                        );
                    }
                }
            }
        }

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @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 memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

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

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to].numberMinted += uint64(quantity);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = TokenOwnership(
                to,
                uint64(block.timestamp),
                false,
                quantity == 1,
                0
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to].balance += uint64(quantity);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = TokenOwnership(
              to,
              uint64(block.timestamp),
              false,
              quantity == 1,
              0
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

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

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

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

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

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

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

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

        address from = prevOwnership.addr;

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

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

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = TokenOwnership(
              address(0),
              uint64(block.timestamp),
              true,
              true,
              prevOwnership.extraData
            );

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

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

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

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint16 extraData) internal virtual {
        TokenOwnership storage packed = _packedOwnerships[index];
        if (packed.startTimestamp == 0) revert OwnershipNotInitializedForExtraData();

        _packedOwnerships[index].extraData = extraData;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}


    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

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

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

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

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

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

File 5 of 15 : Delegated.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";

contract Delegated is Ownable{
  mapping(address => bool) internal _delegates;

  modifier onlyDelegates {
    require(_delegates[msg.sender], "Invalid delegate" );
    _;
  }

  constructor(){
    setDelegate(owner(), true);
  }

  //onlyOwner
  function isDelegate( address addr ) external view onlyOwner returns( bool ) {
    return _delegates[addr];
  }

  function setDelegate( address addr, bool isDelegate_ ) public onlyOwner {
    _delegates[addr] = isDelegate_;
  }

  function transferOwnership(address newOwner) public override onlyOwner {
    super.transferOwnership( newOwner );
    setDelegate( owner(), true );
  }
}

File 6 of 15 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";

/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

File 7 of 15 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 14 of 15 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":[],"name":"IS_OS_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IS_PAUSED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"},{"internalType":"address","name":"account","type":"address"}],"name":"burnFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint16","name":"quantity","type":"uint16"}],"name":"calculateQuantities","outputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint16","name":"quantity","type":"uint16"},{"internalType":"uint256","name":"checkTokenId","type":"uint256"}],"name":"collabMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"collabs","outputs":[{"internalType":"uint64","name":"ethPrice","type":"uint64"},{"internalType":"uint8","name":"maxFree","type":"uint8"},{"internalType":"uint8","name":"maxSupply","type":"uint8"},{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"bool","name":"useTokenId","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyalty","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"components":[{"internalType":"uint16","name":"numerator","type":"uint16"},{"internalType":"uint16","name":"denominator","type":"uint16"}],"internalType":"struct Royalties.Fraction","name":"fraction","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isDelegate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"quantities","type":"uint16[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"mintTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","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":"collection","type":"address"},{"components":[{"internalType":"uint64","name":"ethPrice","type":"uint64"},{"internalType":"uint8","name":"maxFree","type":"uint8"},{"internalType":"uint8","name":"maxSupply","type":"uint8"},{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"bool","name":"useTokenId","type":"bool"}],"internalType":"struct TrunkDigitalTradingCards.CollabConfig","name":"config","type":"tuple"}],"name":"setCollab","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint16","name":"feeNumerator","type":"uint16"},{"internalType":"uint16","name":"feeDenominator","type":"uint16"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"isDelegate_","type":"bool"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"maxSupply","type":"uint16"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"setOsStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"},{"internalType":"string","name":"suffix","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURISuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600e805463ffffffff191663271001011790553480156200002457600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb6600133600560646040518060400160405280601b81526020017f5472756e6b204469676974616c2054726164696e672043617264730000000000815250604051806040016040528060068152602001655452554e4b5360d01b8152508160029080519060200190620000ae92919062000a8e565b508051620000c490600390602084019062000a8e565b50600080555050600880546001600160a01b0319166001600160a01b0385161790556040805180820190915261ffff80841680835290831660209092018290526009805463ffffffff1916909117620100009092029190911790555050506daaeb6d7670e522a718067333cd4e3b1562000267578015620001b557604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200019657600080fd5b505af1158015620001ab573d6000803e3d6000fd5b5050505062000267565b6001600160a01b03821615620002065760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200017b565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200024d57600080fd5b505af115801562000262573d6000803e3d6000fd5b505050505b5062000275905033620009a6565b620002946200028c600a546001600160a01b031690565b6001620009f8565b6040518060a00160405280661ff973cafa80006001600160401b03168152602001600260ff168152602001600360ff16815260200160011515815260200160001515815250600f600073613e5136a22206837d12ef7a85f7de2825de13346001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a81548160ff021916908360ff16021790555060408201518160000160096101000a81548160ff021916908360ff160217905550606082015181600001600a6101000a81548160ff021916908315150217905550608082015181600001600b6101000a81548160ff0219169083151502179055509050506040518060a00160405280661ff973cafa80006001600160401b03168152602001600260ff168152602001600360ff16815260200160011515815260200160011515815250600f600073171e138212b8b76b931c7a30e29045bcaf0e0e746001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a81548160ff021916908360ff16021790555060408201518160000160096101000a81548160ff021916908360ff160217905550606082015181600001600a6101000a81548160ff021916908315150217905550608082015181600001600b6101000a81548160ff0219169083151502179055509050506040518060a00160405280661ff973cafa80006001600160401b03168152602001600260ff168152602001600360ff16815260200160011515815260200160001515815250600f6000737870cc63b6b1af0aed0d6dd7c1efb39300b773eb6001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a81548160ff021916908360ff16021790555060408201518160000160096101000a81548160ff021916908360ff160217905550606082015181600001600a6101000a81548160ff021916908315150217905550608082015181600001600b6101000a81548160ff0219169083151502179055509050506040518060a00160405280661ff973cafa80006001600160401b03168152602001600260ff168152602001600360ff16815260200160011515815260200160011515815250600f6000734250c98fdb87cf1a977f74e331c3dd40052962a36001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a81548160ff021916908360ff16021790555060408201518160000160096101000a81548160ff021916908360ff160217905550606082015181600001600a6101000a81548160ff021916908315150217905550608082015181600001600b6101000a81548160ff0219169083151502179055509050506040518060a00160405280661ff973cafa80006001600160401b03168152602001600260ff168152602001600360ff16815260200160011515815260200160011515815250600f60007343e9103650ea0462afecf35b6b46b745a4eb4fab6001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a81548160ff021916908360ff16021790555060408201518160000160096101000a81548160ff021916908360ff160217905550606082015181600001600a6101000a81548160ff021916908315150217905550608082015181600001600b6101000a81548160ff0219169083151502179055509050506040518060a00160405280664380663abb80006001600160401b03168152602001600060ff168152602001600160ff16815260200160011515815260200160001515815250600f6000806001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a81548160ff021916908360ff16021790555060408201518160000160096101000a81548160ff021916908360ff160217905550606082015181600001600a6101000a81548160ff021916908315150217905550608082015181600001600b6101000a81548160ff02191690831515021790555090505062000b70565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000a0262000a2d565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b600a546001600160a01b0316331462000a8c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b82805462000a9c9062000b34565b90600052602060002090601f01602090048101928262000ac0576000855562000b0b565b82601f1062000adb57805160ff191683800117855562000b0b565b8280016001018555821562000b0b579182015b8281111562000b0b57825182559160200191906001019062000aee565b5062000b1992915062000b1d565b5090565b5b8082111562000b19576000815560010162000b1e565b600181811c9082168062000b4957607f821691505b60208210810362000b6a57634e487b7160e01b600052602260045260246000fd5b50919050565b6133398062000b806000396000f3fe60806040526004361061023f5760003560e01c80634a994eef1161012e578063b88d4fde116100ab578063dbbc853b1161006f578063dbbc853b14610773578063e985e9c514610788578063ebc8b6b3146107d1578063f0798dbb146107eb578063f2fde38b1461080b57600080fd5b8063b88d4fde146106f8578063c0ac99831461070b578063c87b56dd14610720578063d48ede9914610740578063d83d36df1461076057600080fd5b80638da5cb5b116100f25780638da5cb5b1461067f57806395d89b411461069d578063a0712d68146106b2578063a22cb465146106c5578063ae7bf4c8146106e557600080fd5b80634a994eef146105925780636352211e146105b257806370a08231146105d2578063715018a6146105f25780637885fdc71461060757600080fd5b8063211f9e2f116101bc5780633acc3898116101805780633acc3898146104e75780633ccfd60b1461052857806341acc66a1461053d57806341f434341461055d57806342842e0e1461057f57600080fd5b8063211f9e2f146103a457806323b872dd146103c45780632a55205a146103d757806332cb6b0c1461041657806336f0db011461044a57600080fd5b8063095ea7b311610203578063095ea7b31461031c57806310baa74c1461032f57806316c38b3c1461034e57806318160ddd1461036e5780631c92d6e61461039157600080fd5b806301ffc9a71461024b57806306421c2f1461028057806306fdde03146102a257806307779627146102c4578063081812fc146102e457600080fd5b3661024657005b600080fd5b34801561025757600080fd5b5061026b61026636600461290c565b61082b565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b36600461293b565b610857565b005b3480156102ae57600080fd5b506102b76108af565b60405161027791906129ae565b3480156102d057600080fd5b5061026b6102df3660046129d6565b610941565b3480156102f057600080fd5b506103046102ff3660046129f3565b61096e565b6040516001600160a01b039091168152602001610277565b6102a061032a366004612a0c565b6109b2565b34801561033b57600080fd5b50600e5461026b90610100900460ff1681565b34801561035a57600080fd5b506102a0610369366004612a46565b6109d7565b34801561037a57600080fd5b50600154600054035b604051908152602001610277565b6102a061039f366004612a63565b610a20565b3480156103b057600080fd5b506102a06103bf366004612a46565b610d82565b6102a06103d2366004612aa1565b610dc4565b3480156103e357600080fd5b506103f76103f2366004612ae2565b610e00565b604080516001600160a01b039093168352602083019190915201610277565b34801561042257600080fd5b50600e546104379062010000900461ffff1681565b60405161ffff9091168152602001610277565b34801561045657600080fd5b506104aa6104653660046129d6565b600f602052600090815260409020546001600160401b0381169060ff600160401b8204811691600160481b8104821691600160501b8204811691600160581b90041685565b604080516001600160401b03909616865260ff9485166020870152939092169284019290925290151560608301521515608082015260a001610277565b3480156104f357600080fd5b50610507610502366004612b04565b610e44565b6040805161ffff948516815293909216602084015290820152606001610277565b34801561053457600080fd5b506102a0610f4b565b34801561054957600080fd5b506102a0610558366004612b4b565b610fb4565b34801561056957600080fd5b506103046daaeb6d7670e522a718067333cd4e81565b6102a061058d366004612aa1565b611015565b34801561059e57600080fd5b506102a06105ad366004612b79565b61104b565b3480156105be57600080fd5b506103046105cd3660046129f3565b61107e565b3480156105de57600080fd5b506103836105ed3660046129d6565b611090565b3480156105fe57600080fd5b506102a06110de565b34801561061357600080fd5b506008546040805180820190915260095461ffff80821683526201000090910416602082015261064a916001600160a01b03169082565b604080516001600160a01b039093168352815161ffff9081166020808601919091529092015190911690820152606001610277565b34801561068b57600080fd5b50600a546001600160a01b0316610304565b3480156106a957600080fd5b506102b76110f2565b6102a06106c03660046129f3565b611101565b3480156106d157600080fd5b506102a06106e0366004612b79565b61131f565b6102a06106f3366004612bf6565b61133f565b6102a0610706366004612c77565b6114e5565b34801561071757600080fd5b506102b7611523565b34801561072c57600080fd5b506102b761073b3660046129f3565b6115b1565b34801561074c57600080fd5b506102a061075b366004612d97565b611649565b6102a061076e366004612df6565b611691565b34801561077f57600080fd5b506102b7611792565b34801561079457600080fd5b5061026b6107a3366004612e4c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107dd57600080fd5b50600e5461026b9060ff1681565b3480156107f757600080fd5b506102a0610806366004612e7a565b61179f565b34801561081757600080fd5b506102a06108263660046129d6565b6117f2565b60006108368261181f565b80610851575063152a902d60e11b6001600160e01b03198316145b92915050565b336000908152600b602052604090205460ff1661088f5760405162461bcd60e51b815260040161088690612ebb565b60405180910390fd5b600e805461ffff909216620100000263ffff000019909216919091179055565b6060600280546108be90612ee5565b80601f01602080910402602001604051908101604052809291908181526020018280546108ea90612ee5565b80156109375780601f1061090c57610100808354040283529160200191610937565b820191906000526020600020905b81548152906001019060200180831161091a57829003601f168201915b5050505050905090565b600061094b61186d565b506001600160a01b0381166000908152600b602052604090205460ff165b919050565b6000610979826118c7565b610996576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600e54829060ff16156109c8576109c8816118f2565b6109d283836119ab565b505050565b336000908152600b602052604090205460ff16610a065760405162461bcd60e51b815260040161088690612ebb565b600e80549115156101000261ff0019909216919091179055565b600e54610100900460ff1615610a695760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc81c185d5cd95960921b6044820152606401610886565b600e5461ffff620100009091048116908316610a886001546000540390565b610a929190612f35565b10610aaf5760405162461bcd60e51b815260040161088690612f4d565b6001600160a01b0383166000908152600f6020908152604091829020825160a08101845290546001600160401b038116825260ff600160401b8204811693830193909352600160481b8104831693820193909352600160501b83048216151560608201819052600160581b9093049091161515608082015290610b745760405162461bcd60e51b815260206004820152601a60248201527f436f6d6d756e697479206d696e742069732064697361626c65640000000000006044820152606401610886565b8261ffff16610b8233611a4b565b610b8c9190612f35565b816040015160ff161015610bd75760405162461bcd60e51b8152602060048201526012602482015271135a5b9d081b1a5b5a5d081c995858da195960721b6044820152606401610886565b60008160800151610c53576040516370a0823160e01b81523360048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190612f84565b11610cc9565b6040516331a9108f60e11b81526004810184905233906001600160a01b03871690636352211e90602401602060405180830381865afa158015610c9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbe9190612f9d565b6001600160a01b0316145b905080610d105760405162461bcd60e51b815260206004820152601560248201527415d85b1b195d081b9bdd08185d5d1a1bdc9a5e9959605a1b6044820152606401610886565b6000610d1d863387610e44565b92505050803414610d6c5760405162461bcd60e51b8152602060048201526019602482015278115d1a195c881cd95b9d081a5cc81b9bdd0818dbdc9c9958dd603a1b6044820152606401610886565b610d7a338661ffff16611a76565b505050505050565b336000908152600b602052604090205460ff16610db15760405162461bcd60e51b815260040161088690612ebb565b600e805460ff1916911515919091179055565b600e54839060ff168015610de157506001600160a01b0381163314155b15610def57610def336118f2565b610dfa848484611c07565b50505050565b6009546000908190819061ffff620100008204811691610e21911686612fba565b610e2b9190612fd9565b6008546001600160a01b031693509150505b9250929050565b6001600160a01b0383166000908152600f60209081526040808320815160a08101835290546001600160401b038116825260ff600160401b8204811694830194909452600160481b8104841692820192909252600160501b8204831615156060820152600160581b9091049091161515608082015281908190818581610ec989611a4b565b90508061ffff16846020015160ff1610610f1b5780846020015160ff16610ef09190612ffb565b92508261ffff168861ffff161115610f1357610f0c8389612ffb565b9150610f1b565b879250600091505b8351600090610f2f9061ffff85169061301e565b939b929a50506001600160401b03909216975095505050505050565b610f5361186d565b4780610f965760405162461bcd60e51b81526020600482015260126024820152714e6f2066756e647320617661696c61626c6560701b6044820152606401610886565b610fb1610fab600a546001600160a01b031690565b82611f0f565b50565b610fbc61186d565b600880546001600160a01b0319166001600160a01b0385161790556040805180820190915261ffff80841680835290831660209092018290526009805463ffffffff191690911762010000909202919091179055505050565b600e54839060ff16801561103257506001600160a01b0381163314155b1561104057611040336118f2565b610dfa848484612028565b61105361186d565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b600061108982612043565b5192915050565b60006001600160a01b0382166110b9576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6110e661186d565b6110f0600061212e565b565b6060600380546108be90612ee5565b600e54610100900460ff161561114a5760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc81c185d5cd95960921b6044820152606401610886565b600e5462010000900461ffff16816111656001546000540390565b61116f9190612f35565b1061118c5760405162461bcd60e51b815260040161088690612f4d565b60008052600f60209081526040805160a0810182527ff4803e074bd026baaf6ed2e288c9515f68c72fb7216eebdd7cae1718a53ec375546001600160401b038116825260ff600160401b8204811694830194909452600160481b8104841692820192909252600160501b82048316151560608201819052600160581b909204909216151560808301526112595760405162461bcd60e51b8152602060048201526015602482015274141d589b1a58c81cd85b19481a5cc818db1bdcd959605a1b6044820152606401610886565b8161126333611a4b565b61126d9190612f35565b816040015160ff1610156112b85760405162461bcd60e51b8152602060048201526012602482015271135a5b9d081b1a5b5a5d081c995858da195960721b6044820152606401610886565b60006112c660003385610e44565b925050508034146113155760405162461bcd60e51b8152602060048201526019602482015278115d1a195c881cd95b9d081a5cc81b9bdd0818dbdc9c9958dd603a1b6044820152606401610886565b6109d23384611a76565b600e54829060ff161561133557611335816118f2565b6109d28383612180565b336000908152600b602052604090205460ff1661136e5760405162461bcd60e51b815260040161088690612ebb565b8281146113ae5760405162461bcd60e51b815260206004820152600e60248201526d155b995d995b881c995c5d595cdd60921b6044820152606401610886565b60008060006113c06001546000540390565b905060005b868110156114db578787828181106113df576113df61304d565b90506020020160208101906113f4919061293b565b600e5490945061ffff6201000090910481169061141390861684612f35565b106114305760405162461bcd60e51b815260040161088690612f4d565b8585828181106114425761144261304d565b905060200201602081019061145791906129d6565b9250611467838561ffff16611a76565b6001600160a01b0383166000908152600560205260409020805461ffff861691906008906114a6908490600160401b90046001600160401b0316613063565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550806114d490613083565b90506113c5565b5050505050505050565b600e54849060ff16801561150257506001600160a01b0381163314155b1561151057611510336118f2565b61151c858585856121ec565b5050505050565b600c805461153090612ee5565b80601f016020809104026020016040519081016040528092919081815260200182805461155c90612ee5565b80156115a95780601f1061157e576101008083540402835291602001916115a9565b820191906000526020600020905b81548152906001019060200180831161158c57829003601f168201915b505050505081565b60606115bc826118c7565b6116145760405162461bcd60e51b8152602060048201526024808201527f47656e657369733a20717565727920666f72206e6f6e6578697374656e74207460448201526337b5b2b760e11b6064820152608401610886565b600c61161f83612230565b600d60405160200161163393929190613135565b6040516020818303038152906040529050919050565b336000908152600b602052604090205460ff166116785760405162461bcd60e51b815260040161088690612ebb565b611684600c858561285d565b5061151c600d838361285d565b336000908152600b602052604090205460ff166116c05760405162461bcd60e51b815260040161088690612ebb565b60005b82811015610dfa57816001600160a01b03166117088585848181106116ea576116ea61304d565b90506020020160208101906116ff919061293b565b61ffff1661107e565b6001600160a01b03161461174f5760405162461bcd60e51b815260206004820152600e60248201526d09eeedccae440dad2e6dac2e8c6d60931b6044820152606401610886565b6117828484838181106117645761176461304d565b9050602002016020810190611779919061293b565b61ffff166122c2565b61178b81613083565b90506116c3565b600d805461153090612ee5565b336000908152600b602052604090205460ff166117ce5760405162461bcd60e51b815260040161088690612ebb565b6001600160a01b0382166000908152600f602052604090208190610dfa8282613188565b6117fa61186d565b611803816122cd565b610fb1611818600a546001600160a01b031690565b600161104b565b60006301ffc9a760e01b6001600160e01b03198316148061185057506380ac58cd60e01b6001600160e01b03198316145b806108515750506001600160e01b031916635b5e139f60e01b1490565b600a546001600160a01b031633146110f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610886565b6000805482108015610851575050600090815260046020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b15610fb157604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561195f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611983919061326c565b610fb157604051633b79c77360e21b81526001600160a01b0382166004820152602401610886565b60006119b68261107e565b9050336001600160a01b038216146119ef576119d281336107a3565b6119ef576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6001600160a01b0316600090815260056020526040902054600160401b90046001600160401b031690565b6000805490829003611a9b5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03808416600081815260056020908152604080832080546001600160401b03600160401b80830482168b018216026fffffffffffffffff00000000000000001990921691909117909155815160a08101835285815242821681850190815281840186815260018b1460608401908152608084018881528b8952600490975294872092518354925191519551965161ffff16600160f01b026001600160f01b03971515600160e81b0260ff60e81b19971515600160e01b029790971661ffff60e01b1993909616600160a01b026001600160e01b031990941691909a16179190911716919091179190911791909116939093179092559082840190839083906000805160206132e48339815191528180a4600183015b818114611bdd57808360006000805160206132e4833981519152600080a4600101611bb7565b5081600003611bfe57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6000611c1282612043565b9050836001600160a01b031681600001516001600160a01b031614611c495760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054611c64818733612343565b611c8f57611c7286336107a3565b611c8f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611cb657604051633a954ecd60e21b815260040160405180910390fd5b8015611cc157600082555b6001600160a01b03808716600090815260056020908152604080832080546000196001600160401b0380831691909101811667ffffffffffffffff19928316179092558a861680865283862080548085166001908101861691909416179055835160a081018552908152428316818601908152818501878152606080840194855260808d81015161ffff9081169186019182528f8b52600490995296909820925183549251915194519651909716600160f01b026001600160f01b03961515600160e81b0260ff60e81b19951515600160e01b029590951661ffff60e01b1992909616600160a01b026001600160e01b03199093169790991696909617179490941691909117171692909217909155830151611edb5760018401600081815260046020526040812054600160a01b90046001600160401b03169003611ed9576000548114611ed9576040805160a08101825285516001600160a01b0390811682526020808801516001600160401b039081168285019081526000858701818152606087018281526080808e015161ffff908116918a019182528b8552600490975298909220965187549351915192519851909516600160f01b026001600160f01b03981515600160e81b0260ff60e81b19931515600160e01b029390931661ffff60e01b1992909516600160a01b026001600160e01b0319909416959096169490941791909117929092161717929092169190911790555b505b83856001600160a01b0316876001600160a01b03166000805160206132e483398151915260405160405180910390a4610d7a565b80471015611f5f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610886565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fac576040519150601f19603f3d011682016040523d82523d6000602084013e611fb1565b606091505b50509050806109d25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610886565b6109d2838383604051806020016040528060008152506114e5565b6040805160a08101825260008082526020820181905291810182905260608101829052608081018290529082600054811015612115575b82516001600160a01b0380841691160361210e57600081815260046020908152604091829020825160a08101845290546001600160a01b03811682526001600160401b03600160a01b8204169282019290925260ff600160e01b83048116151593820193909352600160e81b82049092161515606083015261ffff600160f01b90910416608082015292506000190161207a565b5050919050565b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6121f7848484610dc4565b6001600160a01b0383163b15610dfa5761221384848484612392565b610dfa576040516368d2bf6b60e11b815260040160405180910390fd5b6060600061223d8361247d565b60010190506000816001600160401b0381111561225c5761225c612c61565b6040519080825280601f01601f191660200182016040528015612286576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461229057509392505050565b610fb1816000612555565b6122d561186d565b6001600160a01b03811661233a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610886565b610fb18161212e565b6000826001600160a01b0316826001600160a01b0316036123665750600161238b565b836001600160a01b0316826001600160a01b0316036123875750600161238b565b5060005b9392505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906123c7903390899088908890600401613289565b6020604051808303816000875af1925050508015612402575060408051601f3d908101601f191682019092526123ff918101906132c6565b60015b612460573d808015612430576040519150601f19603f3d011682016040523d82523d6000602084013e612435565b606091505b508051600003612458576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106124bc5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106124e8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061250657662386f26fc10000830492506010015b6305f5e100831061251e576305f5e100830492506008015b612710831061253257612710830492506004015b60648310612544576064830492506002015b600a83106108515760010192915050565b600061256083612043565b805190915060008061258086600090815260066020526040902080549091565b9150915084156125c057612595818433612343565b6125c0576125a383336107a3565b6125c057604051632ce44b5f60e11b815260040160405180910390fd5b80156125cb57600082555b60056000846001600160a01b03166001600160a01b03168152602001908152602001600020600001600081819054906101000a90046001600160401b03166001900391906101000a8154816001600160401b0302191690836001600160401b031602179055506040518060a0016040528060006001600160a01b03168152602001426001600160401b03168152602001600115158152602001600115158152602001856080015161ffff168152506004600088815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a8154816001600160401b0302191690836001600160401b03160217905550604082015181600001601c6101000a81548160ff021916908315150217905550606082015181600001601d6101000a81548160ff021916908315150217905550608082015181600001601e6101000a81548161ffff021916908361ffff16021790555090505083606001516128275760018601600081815260046020526040812054600160a01b90046001600160401b031690036128255760005481146128255760008181526004602090815260409182902087518154928901519389015160608a015160808b015161ffff16600160f01b026001600160f01b03911515600160e81b0260ff60e81b19931515600160e01b029390931661ffff60e01b196001600160401b03909816600160a01b026001600160e01b03199097166001600160a01b039095169490941795909517959095169190911717929092161790555b505b60405186906000906001600160a01b038616906000805160206132e4833981519152908390a45050600180548101905550505050565b82805461286990612ee5565b90600052602060002090601f01602090048101928261288b57600085556128d1565b82601f106128a45782800160ff198235161785556128d1565b828001600101855582156128d1579182015b828111156128d15782358255916020019190600101906128b6565b506128dd9291506128e1565b5090565b5b808211156128dd57600081556001016128e2565b6001600160e01b031981168114610fb157600080fd5b60006020828403121561291e57600080fd5b813561238b816128f6565b803561ffff8116811461096957600080fd5b60006020828403121561294d57600080fd5b61238b82612929565b60005b83811015612971578181015183820152602001612959565b83811115610dfa5750506000910152565b6000815180845261299a816020860160208601612956565b601f01601f19169290920160200192915050565b60208152600061238b6020830184612982565b6001600160a01b0381168114610fb157600080fd5b6000602082840312156129e857600080fd5b813561238b816129c1565b600060208284031215612a0557600080fd5b5035919050565b60008060408385031215612a1f57600080fd5b8235612a2a816129c1565b946020939093013593505050565b8015158114610fb157600080fd5b600060208284031215612a5857600080fd5b813561238b81612a38565b600080600060608486031215612a7857600080fd5b8335612a83816129c1565b9250612a9160208501612929565b9150604084013590509250925092565b600080600060608486031215612ab657600080fd5b8335612ac1816129c1565b92506020840135612ad1816129c1565b929592945050506040919091013590565b60008060408385031215612af557600080fd5b50508035926020909101359150565b600080600060608486031215612b1957600080fd5b8335612b24816129c1565b92506020840135612b34816129c1565b9150612b4260408501612929565b90509250925092565b600080600060608486031215612b6057600080fd5b8335612b6b816129c1565b9250612b3460208501612929565b60008060408385031215612b8c57600080fd5b8235612b97816129c1565b91506020830135612ba781612a38565b809150509250929050565b60008083601f840112612bc457600080fd5b5081356001600160401b03811115612bdb57600080fd5b6020830191508360208260051b8501011115610e3d57600080fd5b60008060008060408587031215612c0c57600080fd5b84356001600160401b0380821115612c2357600080fd5b612c2f88838901612bb2565b90965094506020870135915080821115612c4857600080fd5b50612c5587828801612bb2565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612c8d57600080fd5b8435612c98816129c1565b93506020850135612ca8816129c1565b92506040850135915060608501356001600160401b0380821115612ccb57600080fd5b818701915087601f830112612cdf57600080fd5b813581811115612cf157612cf1612c61565b604051601f8201601f19908116603f01168101908382118183101715612d1957612d19612c61565b816040528281528a6020848701011115612d3257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008083601f840112612d6857600080fd5b5081356001600160401b03811115612d7f57600080fd5b602083019150836020828501011115610e3d57600080fd5b60008060008060408587031215612dad57600080fd5b84356001600160401b0380821115612dc457600080fd5b612dd088838901612d56565b90965094506020870135915080821115612de957600080fd5b50612c5587828801612d56565b600080600060408486031215612e0b57600080fd5b83356001600160401b03811115612e2157600080fd5b612e2d86828701612bb2565b9094509250506020840135612e41816129c1565b809150509250925092565b60008060408385031215612e5f57600080fd5b8235612e6a816129c1565b91506020830135612ba7816129c1565b60008082840360c0811215612e8e57600080fd5b8335612e99816129c1565b925060a0601f1982011215612ead57600080fd5b506020830190509250929050565b60208082526010908201526f496e76616c69642064656c656761746560801b604082015260600190565b600181811c90821680612ef957607f821691505b602082108103612f1957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612f4857612f48612f1f565b500190565b60208082526019908201527f4d696e742f4f72646572206578636565647320737570706c7900000000000000604082015260600190565b600060208284031215612f9657600080fd5b5051919050565b600060208284031215612faf57600080fd5b815161238b816129c1565b6000816000190483118215151615612fd457612fd4612f1f565b500290565b600082612ff657634e487b7160e01b600052601260045260246000fd5b500490565b600061ffff8381169083168181101561301657613016612f1f565b039392505050565b60006001600160401b038083168185168183048111821515161561304457613044612f1f565b02949350505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038381169083168181101561301657613016612f1f565b60006001820161309557613095612f1f565b5060010190565b8054600090600181811c90808316806130b657607f831692505b602080841082036130d757634e487b7160e01b600052602260045260246000fd5b8180156130eb57600181146130fc57613129565b60ff19861689528489019650613129565b60008881526020902060005b868110156131215781548b820152908501908301613108565b505084890196505b50505050505092915050565b6000613141828661309c565b8451613151818360208901612956565b61315d8183018661309c565b979650505050505050565b6000813560ff8116811461085157600080fd5b6000813561085181612a38565b81356001600160401b0381168082146131a057600080fd5b825467ffffffffffffffff19811682178455915068ff00000000000000006131ca60208601613168565b60401b16808268ffffffffffffffffff1985161717845569ff0000000000000000006131f860408701613168565b60481b168269ffffffffffffffffffff198516178217178455505050606082013561322281612a38565b815460ff60501b191681151560501b60ff60501b161782555061326861324a6080840161317b565b82805460ff60581b191691151560581b60ff60581b16919091179055565b5050565b60006020828403121561327e57600080fd5b815161238b81612a38565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906132bc90830184612982565b9695505050505050565b6000602082840312156132d857600080fd5b815161238b816128f656feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212202b4e728569b0732dda8f5e5a3fbb9e44ef56c3d4b8cde9a215dd850351da59eb64736f6c634300080d0033

Deployed Bytecode

0x60806040526004361061023f5760003560e01c80634a994eef1161012e578063b88d4fde116100ab578063dbbc853b1161006f578063dbbc853b14610773578063e985e9c514610788578063ebc8b6b3146107d1578063f0798dbb146107eb578063f2fde38b1461080b57600080fd5b8063b88d4fde146106f8578063c0ac99831461070b578063c87b56dd14610720578063d48ede9914610740578063d83d36df1461076057600080fd5b80638da5cb5b116100f25780638da5cb5b1461067f57806395d89b411461069d578063a0712d68146106b2578063a22cb465146106c5578063ae7bf4c8146106e557600080fd5b80634a994eef146105925780636352211e146105b257806370a08231146105d2578063715018a6146105f25780637885fdc71461060757600080fd5b8063211f9e2f116101bc5780633acc3898116101805780633acc3898146104e75780633ccfd60b1461052857806341acc66a1461053d57806341f434341461055d57806342842e0e1461057f57600080fd5b8063211f9e2f146103a457806323b872dd146103c45780632a55205a146103d757806332cb6b0c1461041657806336f0db011461044a57600080fd5b8063095ea7b311610203578063095ea7b31461031c57806310baa74c1461032f57806316c38b3c1461034e57806318160ddd1461036e5780631c92d6e61461039157600080fd5b806301ffc9a71461024b57806306421c2f1461028057806306fdde03146102a257806307779627146102c4578063081812fc146102e457600080fd5b3661024657005b600080fd5b34801561025757600080fd5b5061026b61026636600461290c565b61082b565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b36600461293b565b610857565b005b3480156102ae57600080fd5b506102b76108af565b60405161027791906129ae565b3480156102d057600080fd5b5061026b6102df3660046129d6565b610941565b3480156102f057600080fd5b506103046102ff3660046129f3565b61096e565b6040516001600160a01b039091168152602001610277565b6102a061032a366004612a0c565b6109b2565b34801561033b57600080fd5b50600e5461026b90610100900460ff1681565b34801561035a57600080fd5b506102a0610369366004612a46565b6109d7565b34801561037a57600080fd5b50600154600054035b604051908152602001610277565b6102a061039f366004612a63565b610a20565b3480156103b057600080fd5b506102a06103bf366004612a46565b610d82565b6102a06103d2366004612aa1565b610dc4565b3480156103e357600080fd5b506103f76103f2366004612ae2565b610e00565b604080516001600160a01b039093168352602083019190915201610277565b34801561042257600080fd5b50600e546104379062010000900461ffff1681565b60405161ffff9091168152602001610277565b34801561045657600080fd5b506104aa6104653660046129d6565b600f602052600090815260409020546001600160401b0381169060ff600160401b8204811691600160481b8104821691600160501b8204811691600160581b90041685565b604080516001600160401b03909616865260ff9485166020870152939092169284019290925290151560608301521515608082015260a001610277565b3480156104f357600080fd5b50610507610502366004612b04565b610e44565b6040805161ffff948516815293909216602084015290820152606001610277565b34801561053457600080fd5b506102a0610f4b565b34801561054957600080fd5b506102a0610558366004612b4b565b610fb4565b34801561056957600080fd5b506103046daaeb6d7670e522a718067333cd4e81565b6102a061058d366004612aa1565b611015565b34801561059e57600080fd5b506102a06105ad366004612b79565b61104b565b3480156105be57600080fd5b506103046105cd3660046129f3565b61107e565b3480156105de57600080fd5b506103836105ed3660046129d6565b611090565b3480156105fe57600080fd5b506102a06110de565b34801561061357600080fd5b506008546040805180820190915260095461ffff80821683526201000090910416602082015261064a916001600160a01b03169082565b604080516001600160a01b039093168352815161ffff9081166020808601919091529092015190911690820152606001610277565b34801561068b57600080fd5b50600a546001600160a01b0316610304565b3480156106a957600080fd5b506102b76110f2565b6102a06106c03660046129f3565b611101565b3480156106d157600080fd5b506102a06106e0366004612b79565b61131f565b6102a06106f3366004612bf6565b61133f565b6102a0610706366004612c77565b6114e5565b34801561071757600080fd5b506102b7611523565b34801561072c57600080fd5b506102b761073b3660046129f3565b6115b1565b34801561074c57600080fd5b506102a061075b366004612d97565b611649565b6102a061076e366004612df6565b611691565b34801561077f57600080fd5b506102b7611792565b34801561079457600080fd5b5061026b6107a3366004612e4c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107dd57600080fd5b50600e5461026b9060ff1681565b3480156107f757600080fd5b506102a0610806366004612e7a565b61179f565b34801561081757600080fd5b506102a06108263660046129d6565b6117f2565b60006108368261181f565b80610851575063152a902d60e11b6001600160e01b03198316145b92915050565b336000908152600b602052604090205460ff1661088f5760405162461bcd60e51b815260040161088690612ebb565b60405180910390fd5b600e805461ffff909216620100000263ffff000019909216919091179055565b6060600280546108be90612ee5565b80601f01602080910402602001604051908101604052809291908181526020018280546108ea90612ee5565b80156109375780601f1061090c57610100808354040283529160200191610937565b820191906000526020600020905b81548152906001019060200180831161091a57829003601f168201915b5050505050905090565b600061094b61186d565b506001600160a01b0381166000908152600b602052604090205460ff165b919050565b6000610979826118c7565b610996576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600e54829060ff16156109c8576109c8816118f2565b6109d283836119ab565b505050565b336000908152600b602052604090205460ff16610a065760405162461bcd60e51b815260040161088690612ebb565b600e80549115156101000261ff0019909216919091179055565b600e54610100900460ff1615610a695760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc81c185d5cd95960921b6044820152606401610886565b600e5461ffff620100009091048116908316610a886001546000540390565b610a929190612f35565b10610aaf5760405162461bcd60e51b815260040161088690612f4d565b6001600160a01b0383166000908152600f6020908152604091829020825160a08101845290546001600160401b038116825260ff600160401b8204811693830193909352600160481b8104831693820193909352600160501b83048216151560608201819052600160581b9093049091161515608082015290610b745760405162461bcd60e51b815260206004820152601a60248201527f436f6d6d756e697479206d696e742069732064697361626c65640000000000006044820152606401610886565b8261ffff16610b8233611a4b565b610b8c9190612f35565b816040015160ff161015610bd75760405162461bcd60e51b8152602060048201526012602482015271135a5b9d081b1a5b5a5d081c995858da195960721b6044820152606401610886565b60008160800151610c53576040516370a0823160e01b81523360048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190612f84565b11610cc9565b6040516331a9108f60e11b81526004810184905233906001600160a01b03871690636352211e90602401602060405180830381865afa158015610c9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbe9190612f9d565b6001600160a01b0316145b905080610d105760405162461bcd60e51b815260206004820152601560248201527415d85b1b195d081b9bdd08185d5d1a1bdc9a5e9959605a1b6044820152606401610886565b6000610d1d863387610e44565b92505050803414610d6c5760405162461bcd60e51b8152602060048201526019602482015278115d1a195c881cd95b9d081a5cc81b9bdd0818dbdc9c9958dd603a1b6044820152606401610886565b610d7a338661ffff16611a76565b505050505050565b336000908152600b602052604090205460ff16610db15760405162461bcd60e51b815260040161088690612ebb565b600e805460ff1916911515919091179055565b600e54839060ff168015610de157506001600160a01b0381163314155b15610def57610def336118f2565b610dfa848484611c07565b50505050565b6009546000908190819061ffff620100008204811691610e21911686612fba565b610e2b9190612fd9565b6008546001600160a01b031693509150505b9250929050565b6001600160a01b0383166000908152600f60209081526040808320815160a08101835290546001600160401b038116825260ff600160401b8204811694830194909452600160481b8104841692820192909252600160501b8204831615156060820152600160581b9091049091161515608082015281908190818581610ec989611a4b565b90508061ffff16846020015160ff1610610f1b5780846020015160ff16610ef09190612ffb565b92508261ffff168861ffff161115610f1357610f0c8389612ffb565b9150610f1b565b879250600091505b8351600090610f2f9061ffff85169061301e565b939b929a50506001600160401b03909216975095505050505050565b610f5361186d565b4780610f965760405162461bcd60e51b81526020600482015260126024820152714e6f2066756e647320617661696c61626c6560701b6044820152606401610886565b610fb1610fab600a546001600160a01b031690565b82611f0f565b50565b610fbc61186d565b600880546001600160a01b0319166001600160a01b0385161790556040805180820190915261ffff80841680835290831660209092018290526009805463ffffffff191690911762010000909202919091179055505050565b600e54839060ff16801561103257506001600160a01b0381163314155b1561104057611040336118f2565b610dfa848484612028565b61105361186d565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b600061108982612043565b5192915050565b60006001600160a01b0382166110b9576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6110e661186d565b6110f0600061212e565b565b6060600380546108be90612ee5565b600e54610100900460ff161561114a5760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc81c185d5cd95960921b6044820152606401610886565b600e5462010000900461ffff16816111656001546000540390565b61116f9190612f35565b1061118c5760405162461bcd60e51b815260040161088690612f4d565b60008052600f60209081526040805160a0810182527ff4803e074bd026baaf6ed2e288c9515f68c72fb7216eebdd7cae1718a53ec375546001600160401b038116825260ff600160401b8204811694830194909452600160481b8104841692820192909252600160501b82048316151560608201819052600160581b909204909216151560808301526112595760405162461bcd60e51b8152602060048201526015602482015274141d589b1a58c81cd85b19481a5cc818db1bdcd959605a1b6044820152606401610886565b8161126333611a4b565b61126d9190612f35565b816040015160ff1610156112b85760405162461bcd60e51b8152602060048201526012602482015271135a5b9d081b1a5b5a5d081c995858da195960721b6044820152606401610886565b60006112c660003385610e44565b925050508034146113155760405162461bcd60e51b8152602060048201526019602482015278115d1a195c881cd95b9d081a5cc81b9bdd0818dbdc9c9958dd603a1b6044820152606401610886565b6109d23384611a76565b600e54829060ff161561133557611335816118f2565b6109d28383612180565b336000908152600b602052604090205460ff1661136e5760405162461bcd60e51b815260040161088690612ebb565b8281146113ae5760405162461bcd60e51b815260206004820152600e60248201526d155b995d995b881c995c5d595cdd60921b6044820152606401610886565b60008060006113c06001546000540390565b905060005b868110156114db578787828181106113df576113df61304d565b90506020020160208101906113f4919061293b565b600e5490945061ffff6201000090910481169061141390861684612f35565b106114305760405162461bcd60e51b815260040161088690612f4d565b8585828181106114425761144261304d565b905060200201602081019061145791906129d6565b9250611467838561ffff16611a76565b6001600160a01b0383166000908152600560205260409020805461ffff861691906008906114a6908490600160401b90046001600160401b0316613063565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550806114d490613083565b90506113c5565b5050505050505050565b600e54849060ff16801561150257506001600160a01b0381163314155b1561151057611510336118f2565b61151c858585856121ec565b5050505050565b600c805461153090612ee5565b80601f016020809104026020016040519081016040528092919081815260200182805461155c90612ee5565b80156115a95780601f1061157e576101008083540402835291602001916115a9565b820191906000526020600020905b81548152906001019060200180831161158c57829003601f168201915b505050505081565b60606115bc826118c7565b6116145760405162461bcd60e51b8152602060048201526024808201527f47656e657369733a20717565727920666f72206e6f6e6578697374656e74207460448201526337b5b2b760e11b6064820152608401610886565b600c61161f83612230565b600d60405160200161163393929190613135565b6040516020818303038152906040529050919050565b336000908152600b602052604090205460ff166116785760405162461bcd60e51b815260040161088690612ebb565b611684600c858561285d565b5061151c600d838361285d565b336000908152600b602052604090205460ff166116c05760405162461bcd60e51b815260040161088690612ebb565b60005b82811015610dfa57816001600160a01b03166117088585848181106116ea576116ea61304d565b90506020020160208101906116ff919061293b565b61ffff1661107e565b6001600160a01b03161461174f5760405162461bcd60e51b815260206004820152600e60248201526d09eeedccae440dad2e6dac2e8c6d60931b6044820152606401610886565b6117828484838181106117645761176461304d565b9050602002016020810190611779919061293b565b61ffff166122c2565b61178b81613083565b90506116c3565b600d805461153090612ee5565b336000908152600b602052604090205460ff166117ce5760405162461bcd60e51b815260040161088690612ebb565b6001600160a01b0382166000908152600f602052604090208190610dfa8282613188565b6117fa61186d565b611803816122cd565b610fb1611818600a546001600160a01b031690565b600161104b565b60006301ffc9a760e01b6001600160e01b03198316148061185057506380ac58cd60e01b6001600160e01b03198316145b806108515750506001600160e01b031916635b5e139f60e01b1490565b600a546001600160a01b031633146110f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610886565b6000805482108015610851575050600090815260046020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b15610fb157604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561195f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611983919061326c565b610fb157604051633b79c77360e21b81526001600160a01b0382166004820152602401610886565b60006119b68261107e565b9050336001600160a01b038216146119ef576119d281336107a3565b6119ef576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6001600160a01b0316600090815260056020526040902054600160401b90046001600160401b031690565b6000805490829003611a9b5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03808416600081815260056020908152604080832080546001600160401b03600160401b80830482168b018216026fffffffffffffffff00000000000000001990921691909117909155815160a08101835285815242821681850190815281840186815260018b1460608401908152608084018881528b8952600490975294872092518354925191519551965161ffff16600160f01b026001600160f01b03971515600160e81b0260ff60e81b19971515600160e01b029790971661ffff60e01b1993909616600160a01b026001600160e01b031990941691909a16179190911716919091179190911791909116939093179092559082840190839083906000805160206132e48339815191528180a4600183015b818114611bdd57808360006000805160206132e4833981519152600080a4600101611bb7565b5081600003611bfe57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6000611c1282612043565b9050836001600160a01b031681600001516001600160a01b031614611c495760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054611c64818733612343565b611c8f57611c7286336107a3565b611c8f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611cb657604051633a954ecd60e21b815260040160405180910390fd5b8015611cc157600082555b6001600160a01b03808716600090815260056020908152604080832080546000196001600160401b0380831691909101811667ffffffffffffffff19928316179092558a861680865283862080548085166001908101861691909416179055835160a081018552908152428316818601908152818501878152606080840194855260808d81015161ffff9081169186019182528f8b52600490995296909820925183549251915194519651909716600160f01b026001600160f01b03961515600160e81b0260ff60e81b19951515600160e01b029590951661ffff60e01b1992909616600160a01b026001600160e01b03199093169790991696909617179490941691909117171692909217909155830151611edb5760018401600081815260046020526040812054600160a01b90046001600160401b03169003611ed9576000548114611ed9576040805160a08101825285516001600160a01b0390811682526020808801516001600160401b039081168285019081526000858701818152606087018281526080808e015161ffff908116918a019182528b8552600490975298909220965187549351915192519851909516600160f01b026001600160f01b03981515600160e81b0260ff60e81b19931515600160e01b029390931661ffff60e01b1992909516600160a01b026001600160e01b0319909416959096169490941791909117929092161717929092169190911790555b505b83856001600160a01b0316876001600160a01b03166000805160206132e483398151915260405160405180910390a4610d7a565b80471015611f5f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610886565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fac576040519150601f19603f3d011682016040523d82523d6000602084013e611fb1565b606091505b50509050806109d25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610886565b6109d2838383604051806020016040528060008152506114e5565b6040805160a08101825260008082526020820181905291810182905260608101829052608081018290529082600054811015612115575b82516001600160a01b0380841691160361210e57600081815260046020908152604091829020825160a08101845290546001600160a01b03811682526001600160401b03600160a01b8204169282019290925260ff600160e01b83048116151593820193909352600160e81b82049092161515606083015261ffff600160f01b90910416608082015292506000190161207a565b5050919050565b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6121f7848484610dc4565b6001600160a01b0383163b15610dfa5761221384848484612392565b610dfa576040516368d2bf6b60e11b815260040160405180910390fd5b6060600061223d8361247d565b60010190506000816001600160401b0381111561225c5761225c612c61565b6040519080825280601f01601f191660200182016040528015612286576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461229057509392505050565b610fb1816000612555565b6122d561186d565b6001600160a01b03811661233a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610886565b610fb18161212e565b6000826001600160a01b0316826001600160a01b0316036123665750600161238b565b836001600160a01b0316826001600160a01b0316036123875750600161238b565b5060005b9392505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906123c7903390899088908890600401613289565b6020604051808303816000875af1925050508015612402575060408051601f3d908101601f191682019092526123ff918101906132c6565b60015b612460573d808015612430576040519150601f19603f3d011682016040523d82523d6000602084013e612435565b606091505b508051600003612458576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106124bc5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106124e8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061250657662386f26fc10000830492506010015b6305f5e100831061251e576305f5e100830492506008015b612710831061253257612710830492506004015b60648310612544576064830492506002015b600a83106108515760010192915050565b600061256083612043565b805190915060008061258086600090815260066020526040902080549091565b9150915084156125c057612595818433612343565b6125c0576125a383336107a3565b6125c057604051632ce44b5f60e11b815260040160405180910390fd5b80156125cb57600082555b60056000846001600160a01b03166001600160a01b03168152602001908152602001600020600001600081819054906101000a90046001600160401b03166001900391906101000a8154816001600160401b0302191690836001600160401b031602179055506040518060a0016040528060006001600160a01b03168152602001426001600160401b03168152602001600115158152602001600115158152602001856080015161ffff168152506004600088815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a8154816001600160401b0302191690836001600160401b03160217905550604082015181600001601c6101000a81548160ff021916908315150217905550606082015181600001601d6101000a81548160ff021916908315150217905550608082015181600001601e6101000a81548161ffff021916908361ffff16021790555090505083606001516128275760018601600081815260046020526040812054600160a01b90046001600160401b031690036128255760005481146128255760008181526004602090815260409182902087518154928901519389015160608a015160808b015161ffff16600160f01b026001600160f01b03911515600160e81b0260ff60e81b19931515600160e01b029390931661ffff60e01b196001600160401b03909816600160a01b026001600160e01b03199097166001600160a01b039095169490941795909517959095169190911717929092161790555b505b60405186906000906001600160a01b038616906000805160206132e4833981519152908390a45050600180548101905550505050565b82805461286990612ee5565b90600052602060002090601f01602090048101928261288b57600085556128d1565b82601f106128a45782800160ff198235161785556128d1565b828001600101855582156128d1579182015b828111156128d15782358255916020019190600101906128b6565b506128dd9291506128e1565b5090565b5b808211156128dd57600081556001016128e2565b6001600160e01b031981168114610fb157600080fd5b60006020828403121561291e57600080fd5b813561238b816128f6565b803561ffff8116811461096957600080fd5b60006020828403121561294d57600080fd5b61238b82612929565b60005b83811015612971578181015183820152602001612959565b83811115610dfa5750506000910152565b6000815180845261299a816020860160208601612956565b601f01601f19169290920160200192915050565b60208152600061238b6020830184612982565b6001600160a01b0381168114610fb157600080fd5b6000602082840312156129e857600080fd5b813561238b816129c1565b600060208284031215612a0557600080fd5b5035919050565b60008060408385031215612a1f57600080fd5b8235612a2a816129c1565b946020939093013593505050565b8015158114610fb157600080fd5b600060208284031215612a5857600080fd5b813561238b81612a38565b600080600060608486031215612a7857600080fd5b8335612a83816129c1565b9250612a9160208501612929565b9150604084013590509250925092565b600080600060608486031215612ab657600080fd5b8335612ac1816129c1565b92506020840135612ad1816129c1565b929592945050506040919091013590565b60008060408385031215612af557600080fd5b50508035926020909101359150565b600080600060608486031215612b1957600080fd5b8335612b24816129c1565b92506020840135612b34816129c1565b9150612b4260408501612929565b90509250925092565b600080600060608486031215612b6057600080fd5b8335612b6b816129c1565b9250612b3460208501612929565b60008060408385031215612b8c57600080fd5b8235612b97816129c1565b91506020830135612ba781612a38565b809150509250929050565b60008083601f840112612bc457600080fd5b5081356001600160401b03811115612bdb57600080fd5b6020830191508360208260051b8501011115610e3d57600080fd5b60008060008060408587031215612c0c57600080fd5b84356001600160401b0380821115612c2357600080fd5b612c2f88838901612bb2565b90965094506020870135915080821115612c4857600080fd5b50612c5587828801612bb2565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612c8d57600080fd5b8435612c98816129c1565b93506020850135612ca8816129c1565b92506040850135915060608501356001600160401b0380821115612ccb57600080fd5b818701915087601f830112612cdf57600080fd5b813581811115612cf157612cf1612c61565b604051601f8201601f19908116603f01168101908382118183101715612d1957612d19612c61565b816040528281528a6020848701011115612d3257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008083601f840112612d6857600080fd5b5081356001600160401b03811115612d7f57600080fd5b602083019150836020828501011115610e3d57600080fd5b60008060008060408587031215612dad57600080fd5b84356001600160401b0380821115612dc457600080fd5b612dd088838901612d56565b90965094506020870135915080821115612de957600080fd5b50612c5587828801612d56565b600080600060408486031215612e0b57600080fd5b83356001600160401b03811115612e2157600080fd5b612e2d86828701612bb2565b9094509250506020840135612e41816129c1565b809150509250925092565b60008060408385031215612e5f57600080fd5b8235612e6a816129c1565b91506020830135612ba7816129c1565b60008082840360c0811215612e8e57600080fd5b8335612e99816129c1565b925060a0601f1982011215612ead57600080fd5b506020830190509250929050565b60208082526010908201526f496e76616c69642064656c656761746560801b604082015260600190565b600181811c90821680612ef957607f821691505b602082108103612f1957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612f4857612f48612f1f565b500190565b60208082526019908201527f4d696e742f4f72646572206578636565647320737570706c7900000000000000604082015260600190565b600060208284031215612f9657600080fd5b5051919050565b600060208284031215612faf57600080fd5b815161238b816129c1565b6000816000190483118215151615612fd457612fd4612f1f565b500290565b600082612ff657634e487b7160e01b600052601260045260246000fd5b500490565b600061ffff8381169083168181101561301657613016612f1f565b039392505050565b60006001600160401b038083168185168183048111821515161561304457613044612f1f565b02949350505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038381169083168181101561301657613016612f1f565b60006001820161309557613095612f1f565b5060010190565b8054600090600181811c90808316806130b657607f831692505b602080841082036130d757634e487b7160e01b600052602260045260246000fd5b8180156130eb57600181146130fc57613129565b60ff19861689528489019650613129565b60008881526020902060005b868110156131215781548b820152908501908301613108565b505084890196505b50505050505092915050565b6000613141828661309c565b8451613151818360208901612956565b61315d8183018661309c565b979650505050505050565b6000813560ff8116811461085157600080fd5b6000813561085181612a38565b81356001600160401b0381168082146131a057600080fd5b825467ffffffffffffffff19811682178455915068ff00000000000000006131ca60208601613168565b60401b16808268ffffffffffffffffff1985161717845569ff0000000000000000006131f860408701613168565b60481b168269ffffffffffffffffffff198516178217178455505050606082013561322281612a38565b815460ff60501b191681151560501b60ff60501b161782555061326861324a6080840161317b565b82805460ff60581b191691151560581b60ff60581b16919091179055565b5050565b60006020828403121561327e57600080fd5b815161238b81612a38565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906132bc90830184612982565b9695505050505050565b6000602082840312156132d857600080fd5b815161238b816128f656feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212202b4e728569b0732dda8f5e5a3fbb9e44ef56c3d4b8cde9a215dd850351da59eb64736f6c634300080d0033

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.