ETH Price: $3,251.86 (+4.39%)
Gas: 2 Gwei

Token

Cash Cows Crew (MOO)
 

Overview

Max Total Supply

2,943 MOO

Holders

532

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
lokoyeti.eth
Balance
6 MOO
0xbd7bab46b450bb6955091337cfea2dee1e45e99e
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The official CC0 Cow Collection. An experiment about sharing the wealth. Milk your Cows. Get some ETH. Share the fortune. Moo0ooOoo!

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CashCows

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : CashCows.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

//-------------------------------------------------------------------------------------------
//
//   /$$$$$$                      /$$              /$$$$$$                                   
//  /$$__  $$                    | $$             /$$__  $$                                  
// | $$  \__/  /$$$$$$   /$$$$$$$| $$$$$$$       | $$  \__/  /$$$$$$  /$$  /$$  /$$  /$$$$$$$
// | $$       |____  $$ /$$_____/| $$__  $$      | $$       /$$__  $$| $$ | $$ | $$ /$$_____/
// | $$        /$$$$$$$|  $$$$$$ | $$  \ $$      | $$      | $$  \ $$| $$ | $$ | $$|  $$$$$$ 
// | $$    $$ /$$__  $$ \____  $$| $$  | $$      | $$    $$| $$  | $$| $$ | $$ | $$ \____  $$
// |  $$$$$$/|  $$$$$$$ /$$$$$$$/| $$  | $$      |  $$$$$$/|  $$$$$$/|  $$$$$/$$$$/ /$$$$$$$/
//  \______/  \_______/|_______/ |__/  |__/       \______/  \______/  \_____/\___/ |_______/
//
//-------------------------------------------------------------------------------------------
//
// Moo.

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

import "./CashCowsAbstract.sol";

/**
 * @dev Specifics of the Cash Cows collection
 */
contract CashCows is ReentrancyGuard, CashCowsAbstract { 
  // ============ Constants ============

  //additional roles
  bytes32 private constant _MINTER_ROLE = keccak256("MINTER_ROLE");
  
  //max amount that can be minted in this collection
  uint16 public constant MAX_SUPPLY = 7777;
  //the sale price per token
  uint256 public constant MINT_PRICE = 0.005 ether;

  //maximum amount that can be purchased per wallet in the public sale
  uint256 public constant MAX_PER_WALLET = 9;

  // ============ Storage ============

  //mapping of address to amount minted
  mapping(address => uint256) public minted;
  //flag for if the mint is open to the public
  bool public mintOpened;
  //maximum amount free per wallet in the public sale
  uint256 public maxFreePerWallet = 1;

  // ============ Deploy ============

  /**
   * @dev Sets the base token uri
   */
  constructor(
    string memory preview, 
    address admin
  ) CashCowsAbstract(preview, admin) {}
  
  // ============ Read Methods ============

  /**
   * @dev Returns the token collection name.
   */
  function name() external pure returns(string memory) {
    return "Cash Cows Crew";
  }

  /**
   * @dev Returns the token collection symbol.
   */
  function symbol() external pure returns(string memory) {
    return "MOO";
  }

  // ============ Write Methods ============

  /**
   * @dev Mints new tokens for the `recipient`. Its token ID will be 
   * automatically assigned
   */
  function mint(uint256 quantity) external payable nonReentrant {
    address recipient = _msgSender();
    //no contracts sorry..
    if (recipient.code.length > 0
      //has the sale started?
      || !mintOpened
      //the quantity here plus the current amount already minted 
      //should be less than the max purchase amount
      || (quantity + minted[recipient]) > MAX_PER_WALLET
      //the quantity being minted should not exceed the max supply
      || (super.totalSupply() + quantity) > MAX_SUPPLY
    ) revert InvalidCall();

    //if there are still some free
    if (minted[recipient] < maxFreePerWallet) {
      //find out how much left is free
      uint256 freeLeft = maxFreePerWallet - minted[recipient];
      //if some of the quantity still needs to be paid
      if (freeLeft < quantity 
        // and what is sent is less than what needs to be paid 
        && ((quantity - freeLeft) * MINT_PRICE) > msg.value
      ) revert InvalidCall();
    //the value sent should be the price times quantity
    } else if ((quantity * MINT_PRICE) > msg.value) 
      revert InvalidCall();

    minted[recipient] += quantity;
    _safeMint(recipient, quantity);
  }

  /**
   * @dev Allows anyone to mint tokens that was approved by the owner
   */
  function mint(
    uint256 quantity, 
    uint256 maxMint, 
    uint256 maxFree, 
    bytes memory proof
  ) external payable nonReentrant {
    address recipient = _msgSender();

    //free cannot be more than max
    if (maxMint < maxFree
      //the quantity here plus the current amount already minted 
      //should be less than the max purchase amount
      || (quantity + minted[recipient]) > maxMint
      //the quantity being minted should not exceed the max supply
      || (super.totalSupply() + quantity) > MAX_SUPPLY
      //make sure the minter signed this off
      || !hasRole(_MINTER_ROLE, ECDSA.recover(
        ECDSA.toEthSignedMessageHash(
          keccak256(abi.encodePacked(
            "mint", 
            recipient, 
            maxMint,
            maxFree
          ))
        ),
        proof
      ))
    ) revert InvalidCall();

    //if there are still some free
    if (minted[recipient] < maxFree) {
      //find out how much left is free
      uint256 freeLeft = maxFree - minted[recipient];
      //if some of the quantity still needs to be paid
      if (freeLeft < quantity 
        // and what is sent is less than what needs to be paid 
        && ((quantity - freeLeft) * MINT_PRICE) > msg.value
      ) revert InvalidCall();
    //the value sent should be the price times quantity
    } else if ((quantity * MINT_PRICE) > msg.value) 
      revert InvalidCall();

    minted[recipient] += quantity;
    _safeMint(recipient, quantity);
  }

  // ============ Admin Methods ============

  /**
   * @dev Allows the _MINTER_ROLE to mint any to anyone (in the case of 
   * a no sell out)
   */
  function mint(
    address recipient,
    uint256 quantity
  ) external onlyRole(_MINTER_ROLE) nonReentrant {
    //the quantity being minted should not exceed the max supply
    if ((super.totalSupply() + quantity) > MAX_SUPPLY) 
      revert InvalidCall();

    _safeMint(recipient, quantity);
  }

  /**
   * @dev Starts the sale
   */
  function openMint(bool yes) external onlyRole(_CURATOR_ROLE) {
    mintOpened = yes;
  }

  /**
   * @dev Allows the admin to change the public max free
   */
  function setMaxFree(uint256 max) external onlyRole(_CURATOR_ROLE) {
    maxFreePerWallet = max;
  }

  /**
   * @dev Allows the proceeds to be withdrawn. This wont be allowed
   * until the metadata has been set to discourage rug pull
   */
  function withdraw(address recipient) external onlyOwner nonReentrant {
    //cannot withdraw without setting a base URI first
    if (address(_metadata) == address(0)) revert InvalidCall();
    payable(recipient).transfer(address(this).balance);
  }
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 3 of 19 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 4 of 19 : CashCowsAbstract.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "./ERC721BAbstract.sol";
import "./IMetadata.sol";
import "./IRoyaltySplitter.sol";

/**
 * @dev Adds access control, metadata, erc2981 and royalties, and 
 * marketplace proxies. Opens set sontract URI
 */
abstract contract CashCowsAbstract is 
  Ownable,
  AccessControl, 
  ERC721BAbstract, 
  IERC721Metadata 
{ 
  // ============ Constants ============

  //roles
  bytes32 internal constant _DAO_ROLE = keccak256("DAO_ROLE");
  bytes32 internal constant _CURATOR_ROLE = keccak256("CURATOR_ROLE");
  bytes32 internal constant _APPROVED_ROLE = keccak256("APPROVED_ROLE");
  
  //bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
  bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

  //immutable preview uri json
  string private _PREVIEW_URI;

  // ============ Storage ============

  //the treasury where your money at.
  IRoyaltySplitter public treasury;
  //where 10000 == 100.00%
  uint256 public royaltyPercent = 1000;
  //the location of the metadata generator
  IMetadata internal _metadata;

  // ============ Deploy ============

  /**
   * @dev Sets the base token uri
   */
  constructor(string memory preview, address admin) {
    _setupRole(DEFAULT_ADMIN_ROLE, admin);
    _PREVIEW_URI = preview;
  }
  
  // ============ Read Methods ============

  /**
   * @dev Override isApprovedForAll to whitelist marketplaces 
   * to enable gas-less listings.
   */
  function isApprovedForAll(
    address owner, 
    address operator
  ) public view override(ERC721B, IERC721) returns(bool) {
    return hasRole(_APPROVED_ROLE, operator) 
      || super.isApprovedForAll(owner, operator);
  }

  /**
   * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
   */
  function tokenURI(
    uint256 tokenId
  ) external view returns(string memory) {
    //if token does not exist
    if(!_exists(tokenId)) revert InvalidCall();
    //if metadata is not set
    if (address(_metadata) == address(0)) return _PREVIEW_URI;
    return _metadata.tokenURI(tokenId);
  }

  // ============ Write Methods ============

  /** 
   * @dev ERC165 bytes to add to interface array - set in parent contract
   *  implementing this standard
   */
  function royaltyInfo(
    uint256 _tokenId,
    uint256 _salePrice
  ) external view returns (
    address receiver,
    uint256 royaltyAmount
  ) {
    if (address(treasury) == address(0) || !_exists(_tokenId)) 
      revert InvalidCall();
    
    return (
      payable(address(treasury)), 
      (_salePrice * royaltyPercent) / 10000
    );
  }

  /**
   * @dev Adding support for ERC2981
   */
  function supportsInterface(
    bytes4 interfaceId
  ) public view override(AccessControl, ERC721B, IERC165) returns(bool) {
    //support ERC721
    return interfaceId == type(IERC721Metadata).interfaceId
      //support ERC2981
      || interfaceId == _INTERFACE_ID_ERC2981
      //support other things
      || super.supportsInterface(interfaceId);
  }

  // ============ Admin Methods ============

  /**
   * @dev Sets the contract URI
   */
  function setURI(string memory uri) external onlyRole(_CURATOR_ROLE) {
    _setURI(uri);
  }

  /**
   * @dev Updates the metadata location
   */
  function updateMetadata(
    IMetadata metadata
  ) external onlyRole(_CURATOR_ROLE) {
    _metadata = metadata;
  }

  /**
   * @dev Updates the royalty (provisions for Cow DAO) 
   * where `percent` up to 1000 == 10.00%
   */
  function updateRoyalty(uint256 percent) external onlyRole(_DAO_ROLE) {
    if (percent > 1000) revert InvalidCall();
    royaltyPercent = percent;
  }

  /**
   * @dev Updates the treasury location, (in the case treasury needs to 
   * be updated)
   */
  function updateTreasury(IRoyaltySplitter splitter) external onlyRole(_CURATOR_ROLE) {
    treasury = splitter;
  }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 7 of 19 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 9 of 19 : ERC721BAbstract.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "erc721b/contracts/ERC721B.sol";

/**
 * @dev Packages all the specific ERC721B features needed including
 * contract URI, burnable
 */
abstract contract ERC721BAbstract is ERC721B { 
  // ============ Constants ============

  //contract URI
  string private _CONTRACT_URI;

  // ============ Storage ============

  //mapping of token id to who burned?
  mapping(uint256 => address) public burned;
  //count of how many burned
  uint256 private _totalBurned;
  
  // ============ Read Methods ============

  /**
   * @dev Returns the contract URI.
   */
  function contractURI() external view returns(string memory) {
    return _CONTRACT_URI;
  }

  /**
   * @dev Adds a provision for burnt tokens.
   */
  function ownerOf(
    uint256 tokenId
  ) public view override returns(address) {
    //error if burned
    if (burned[tokenId] != address(0)) revert NonExistentToken();
    return super.ownerOf(tokenId);
  }

  /**
   * @dev Returns all the owner's tokens. This is an incredibly 
   * ineffecient method and should not be used by other contracts.
   * It's recommended to call this on your dApp then call `ownsAll`
   * from your other contract instead.
   */
  function ownerTokens(
    address owner
  ) external view returns(uint256[] memory) {
    //get the balance
    uint256 balance = balanceOf(owner);
    //if no balance
    if (balance == 0) {
      //return empty array
      return new uint256[](0);
    }
    //this is how we can fix the array size
    uint256[] memory tokenIds = new uint256[](balance);
    //next get the total supply
    uint256 supply = totalSupply();
    //next declare the array index
    uint256 index;
    //loop through the supply
    for (uint256 i = 1; i <= supply; i++) {
      //if we found a token owner ows
      if (owner == ownerOf(i)) {
        //add it to the token ids
        tokenIds[index++] = i;
        //if the index is equal to the balance
        if (index == balance) {
          //break out to save time
          break;
        }
      }
    }
    //finally return the token ids
    return tokenIds;
  }

  /**
   * @dev Returns true if `owner` owns all the `tokenIds`
   */
  function ownsAll(
    address owner, 
    uint256[] memory tokenIds
  ) external view returns(bool) {
    for (uint256 i = 0; i < tokenIds.length; i++) {
      if (owner != ownerOf(tokenIds[i])) {
        return false;
      }
    }

    return true;
  }

  /**
   * @dev Shows the overall amount of tokens generated in the contract
   */
  function totalSupply() public view override returns(uint256) {
    return super.totalSupply() - _totalBurned;
  }

  // ============ Write Methods ============

  /**
   * @dev Burns `tokenId`. See {ERC721B-_burn}.
   *
   * Requirements:
   *
   * - The caller must own `tokenId` or be an approved operator.
   */
  function burn(uint256 tokenId) external {
    address owner = ERC721B.ownerOf(tokenId);
    if (!_isApprovedOrOwner(_msgSender(), tokenId, owner)) 
      revert InvalidCall();

    _beforeTokenTransfers(owner, address(0), tokenId, 1);
    
    // Clear approvals
    _approve(address(0), tokenId, owner);

    unchecked {
      //this is the situation when _owners are not normalized
      //get the next token id
      uint256 nextTokenId = tokenId + 1;
      //if token exists and yet it is address 0
      if (_exists(nextTokenId) && _owners[nextTokenId] == address(0)) {
        _owners[nextTokenId] = owner;
      }

      //this is the situation when _owners are normalized
      burned[tokenId] = owner;
      _balances[owner] -= 1;
      _owners[tokenId] = address(0);
      _totalBurned++;
    }

    _afterTokenTransfers(owner, address(0), tokenId, 1);

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

  // ============ Internal Methods ============

  /**
   * @dev Returns whether `tokenId` exists.
   *
   * Tokens can be managed by their owner or approved accounts via 
   * {approve} or {setApprovalForAll}.
   *
   * Tokens start existing when they are minted (`_mint`),
   * and stop existing when they are burned (`_burn`).
   *
   * The parent defines `_exists` as greater than 0 and less than 
   * the last token id
   */
  function _exists(
    uint256 tokenId
  ) internal view virtual override returns(bool) {
    return burned[tokenId] == address(0) && super._exists(tokenId);
  }

  /**
   * @dev Sets the contract URI
   */
  function _setURI(string memory uri) internal {
    _CONTRACT_URI = uri;
  }
}

File 10 of 19 : IMetadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IMetadata {
  function tokenURI(uint256 tokenId) external view returns(string memory);
}

File 11 of 19 : IRoyaltySplitter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IRoyaltySplitter {
  function releaseable(uint256 tokenId) external view returns(uint256);
  function releaseable(IERC20 token, uint256 tokenId) external view returns(uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 17 of 19 : ERC721B.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

error InvalidCall();
error BalanceQueryZeroAddress();
error NonExistentToken();
error ApprovalToCurrentOwner();
error ApprovalOwnerIsOperator();
error NotERC721Receiver();
error ERC721ReceiverNotReceived();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] 
 * Non-Fungible Token Standard, including the Metadata extension and 
 * token Auto-ID generation.
 *
 * You must provide `name()` `symbol()` and `tokenURI(uint256 tokenId)`
 * to conform with IERC721Metadata
 */
abstract contract ERC721B is Context, ERC165, IERC721 {

  // ============ Storage ============

  // The last token id minted
  uint256 private _lastTokenId;
  // Mapping from token ID to owner address
  mapping(uint256 => address) internal _owners;
  // Mapping owner address to token count
  mapping(address => uint256) internal _balances;

  // Mapping from token ID to approved address
  mapping(uint256 => address) private _tokenApprovals;
  // Mapping from owner to operator approvals
  mapping(address => mapping(address => bool)) private _operatorApprovals;

  // ============ Read Methods ============

  /**
   * @dev See {IERC721-balanceOf}.
   */
  function balanceOf(address owner) 
    public view virtual override returns(uint256) 
  {
    if (owner == address(0)) revert BalanceQueryZeroAddress();
    return _balances[owner];
  }

  /**
   * @dev Shows the overall amount of tokens generated in the contract
   */
  function totalSupply() public view virtual returns(uint256) {
    return _lastTokenId;
  }

  /**
   * @dev See {IERC721-ownerOf}.
   */
  function ownerOf(uint256 tokenId) 
    public view virtual override returns(address) 
  {
    unchecked {
      //this is the situation when _owners normalized
      uint256 id = tokenId;
      if (_owners[id] != address(0)) {
        return _owners[id];
      }
      //this is the situation when _owners is not normalized
      if (id > 0 && id <= _lastTokenId) {
        //there will never be a case where token 1 is address(0)
        while(true) {
          id--;
          if (id == 0) {
            break;
          } else if (_owners[id] != address(0)) {
            return _owners[id];
          }
        }
      }
    }

    revert NonExistentToken();
  }

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

  // ============ Approval Methods ============

  /**
   * @dev See {IERC721-approve}.
   */
  function approve(address to, uint256 tokenId) public virtual override {
    address owner = ERC721B.ownerOf(tokenId);
    if (to == owner) revert ApprovalToCurrentOwner();

    address sender = _msgSender();
    if (sender != owner && !isApprovedForAll(owner, sender)) 
      revert ApprovalToCurrentOwner();

    _approve(to, tokenId, owner);
  }

  /**
   * @dev See {IERC721-getApproved}.
   */
  function getApproved(uint256 tokenId) 
    public view virtual override returns(address) 
  {
    if (!_exists(tokenId)) revert NonExistentToken();
    return _tokenApprovals[tokenId];
  }

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

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

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

  /**
   * @dev transfers token considering approvals
   */
  function _approveTransfer(
    address spender, 
    address from, 
    address to, 
    uint256 tokenId
  ) internal virtual {
    if (!_isApprovedOrOwner(spender, tokenId, from)) 
      revert InvalidCall();

    _transfer(from, to, tokenId);
  }

  /**
   * @dev Safely transfers token considering approvals
   */
  function _approveSafeTransfer(
    address from,
    address to,
    uint256 tokenId,
    bytes memory _data
  ) internal virtual {
    _approveTransfer(_msgSender(), from, to, tokenId);
    //see: @openzep/utils/Address.sol
    if (to.code.length > 0
      && !_checkOnERC721Received(from, to, tokenId, _data)
    ) revert ERC721ReceiverNotReceived();
  }

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

  /**
   * @dev Approve `operator` to operate on all of `owner` tokens
   *
   * Emits a {ApprovalForAll} event.
   */
  function _setApprovalForAll(
    address owner,
    address operator,
    bool approved
  ) internal virtual {
    if (owner == operator) revert ApprovalOwnerIsOperator();
    _operatorApprovals[owner][operator] = approved;
    emit ApprovalForAll(owner, operator, approved);
  }

  // ============ Mint Methods ============

  /**
   * @dev Mints `tokenId` and transfers it to `to`.
   *
   * WARNING: Usage of this method is discouraged, use {_safeMint} 
   * whenever possible
   *
   * Requirements:
   *
   * - `tokenId` must not exist.
   * - `to` cannot be the zero address.
   *
   * Emits a {Transfer} event.
   */
  function _mint(
    address to,
    uint256 amount,
    bytes memory _data,
    bool safeCheck
  ) private {
    if(amount == 0 || to == address(0)) revert InvalidCall();
    uint256 startTokenId = _lastTokenId + 1;
    
    _beforeTokenTransfers(address(0), to, startTokenId, amount);
    
    unchecked {
      _lastTokenId += amount;
      _balances[to] += amount;
      _owners[startTokenId] = to;

      _afterTokenTransfers(address(0), to, startTokenId, amount);

      uint256 updatedIndex = startTokenId;
      uint256 endIndex = updatedIndex + amount;
      //if do safe check and,
      //check if contract one time (instead of loop)
      //see: @openzep/utils/Address.sol
      if (safeCheck && to.code.length > 0) {
        //loop emit transfer and received check
        do {
          emit Transfer(address(0), to, updatedIndex);
          if (!_checkOnERC721Received(address(0), to, updatedIndex++, _data))
            revert ERC721ReceiverNotReceived();
        } while (updatedIndex != endIndex);
        return;
      }

      do {
        emit Transfer(address(0), to, updatedIndex++);
      } while (updatedIndex != endIndex);
    }
  }

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

  /**
   * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], 
   * with an additional `data` parameter which is forwarded in 
   * {IERC721Receiver-onERC721Received} to contract recipients.
   */
  function _safeMint(
    address to,
    uint256 amount,
    bytes memory _data
  ) internal virtual {
    _mint(to, amount, _data, true);
  }

  // ============ Transfer Methods ============

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

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

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

  /**
   * @dev Internal function to invoke {IERC721Receiver-onERC721Received} 
   * on a target address. The call is not executed if the target address 
   * is not a contract.
   */
  function _checkOnERC721Received(
    address from,
    address to,
    uint256 tokenId,
    bytes memory _data
  ) private returns (bool) {
    try IERC721Receiver(to).onERC721Received(
      _msgSender(), from, tokenId, _data
    ) returns (bytes4 retval) {
      return retval == IERC721Receiver.onERC721Received.selector;
    } catch (bytes memory reason) {
      if (reason.length == 0) {
        revert NotERC721Receiver();
      } else {
        assembly {
          revert(add(32, reason), mload(reason))
        }
      }
    }
  }

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

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

  /**
   * @dev Transfers `tokenId` from `from` to `to`. As opposed to 
   * {transferFrom}, this imposes no restrictions on msg.sender.
   *
   * Requirements:
   *
   * - `to` cannot be the zero address.
   * - `tokenId` token must be owned by `from`.
   *
   * Emits a {Transfer} event.
   */
  function _transfer(address from, address to, uint256 tokenId) private {
    //if transfer to null or not the owner
    if (to == address(0) || from != ERC721B.ownerOf(tokenId)) 
      revert InvalidCall();

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

    unchecked {
      //this is the situation when _owners are normalized
      _balances[to] += 1;
      _balances[from] -= 1;
      _owners[tokenId] = to;
      //this is the situation when _owners are not normalized
      uint256 nextTokenId = tokenId + 1;
      if (nextTokenId <= _lastTokenId && _owners[nextTokenId] == address(0)) {
        _owners[nextTokenId] = from;
      }
    }

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

  // ============ TODO Methods ============

  /**
   * @dev Hook that is called before a set of serially-ordered token ids 
   * are about to be transferred. This includes minting.
   *
   * startTokenId - the first token id to be transferred
   * amount - 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`.
   */
  function _beforeTokenTransfers(
    address from,
    address to,
    uint256 startTokenId,
    uint256 amount
  ) internal virtual {}

  /**
   * @dev Hook that is called after a set of serially-ordered token ids 
   * have been transferred. This includes minting.
   *
   * startTokenId - the first token id to be transferred
   * amount - the amount to be transferred
   *
   * Calling conditions:
   *
   * - when `from` and `to` are both non-zero.
   * - `from` and `to` are never both zero.
   */
  function _afterTokenTransfers(
    address from,
    address to,
    uint256 startTokenId,
    uint256 amount
  ) internal virtual {}
}

File 18 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"preview","type":"string"},{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalOwnerIsOperator","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"BalanceQueryZeroAddress","type":"error"},{"inputs":[],"name":"ERC721ReceiverNotReceived","type":"error"},{"inputs":[],"name":"InvalidCall","type":"error"},{"inputs":[],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"NotERC721Receiver","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burned","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFreePerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"maxFree","type":"uint256"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintOpened","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bool","name":"yes","type":"bool"}],"name":"openMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ownerTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"ownsAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercent","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"}],"name":"setMaxFree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setURI","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":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract IRoyaltySplitter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IMetadata","name":"metadata","type":"address"}],"name":"updateMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"updateRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRoyaltySplitter","name":"splitter","type":"address"}],"name":"updateTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526103e8600d5560016011553480156200001c57600080fd5b5060405162003270380380620032708339810160408190526200003f916200025d565b6001600055818162000051336200007e565b6200005e600082620000d0565b81516200007390600b90602085019062000184565b50505050506200038b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620000dc8282620000e0565b5050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620000dc5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001403390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000192906200034e565b90600052602060002090601f016020900481019282620001b6576000855562000201565b82601f10620001d157805160ff191683800117855562000201565b8280016001018555821562000201579182015b8281111562000201578251825591602001919060010190620001e4565b506200020f92915062000213565b5090565b5b808211156200020f576000815560010162000214565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200025857600080fd5b919050565b600080604083850312156200027157600080fd5b82516001600160401b03808211156200028957600080fd5b818501915085601f8301126200029e57600080fd5b815181811115620002b357620002b36200022a565b604051601f8201601f19908116603f01168101908382118183101715620002de57620002de6200022a565b81604052828152602093508884848701011115620002fb57600080fd5b600091505b828210156200031f578482018401518183018501529083019062000300565b82821115620003315760008484830101525b95506200034391505085820162000240565b925050509250929050565b600181811c908216806200036357607f821691505b602082108114156200038557634e487b7160e01b600052602260045260246000fd5b50919050565b612ed5806200039b6000396000f3fe6080604052600436106102885760003560e01c806370a082311161015a578063a7027357116100c1578063c87b56dd1161007a578063c87b56dd14610817578063d547741f14610837578063d755bf9914610857578063e8a3d48514610877578063e985e9c51461088c578063f2fde38b146108ac57600080fd5b8063a702735714610759578063ad94d9011461076f578063b88d4fde1461078f578063bba7723e146107af578063c002d23d146107dc578063c5e2a7db146107f757600080fd5b806395d89b411161011357806395d89b41146106b55780639b70a340146106e15780639f67756d146106fb578063a0712d6814610711578063a217fddf14610724578063a22cb4651461073957600080fd5b806370a0823114610602578063715018a6146106225780637f51bb1f146106375780638da5cb5b146106575780638fffd8b51461067557806391d148541461069557600080fd5b80632a55205a116101fe57806342966c68116101b757806342966c681461054f5780634a9eee691461056f57806351cff8d91461058257806358a85bca146105a257806361d027b3146105c25780636352211e146105e257600080fd5b80632a55205a146104675780632f2ff15d146104a657806332cb6b0c146104c657806336568abe146104ef57806340c10f191461050f57806342842e0e1461052f57600080fd5b80630f2cdd6c116102505780630f2cdd6c1461037c57806318160ddd1461039f5780631e7269c5146103b457806323250cae146103e157806323b872dd14610417578063248a9ca31461043757600080fd5b806301ffc9a71461028d57806302fe5305146102c257806306fdde03146102e4578063081812fc14610324578063095ea7b31461035c575b600080fd5b34801561029957600080fd5b506102ad6102a83660046126a6565b6108cc565b60405190151581526020015b60405180910390f35b3480156102ce57600080fd5b506102e26102dd366004612770565b610912565b005b3480156102f057600080fd5b5060408051808201909152600e81526d4361736820436f7773204372657760901b60208201525b6040516102b99190612811565b34801561033057600080fd5b5061034461033f366004612824565b610938565b6040516001600160a01b0390911681526020016102b9565b34801561036857600080fd5b506102e2610377366004612852565b61097c565b34801561038857600080fd5b50610391600981565b6040519081526020016102b9565b3480156103ab57600080fd5b50610391610a0c565b3480156103c057600080fd5b506103916103cf36600461287e565b600f6020526000908152604090205481565b3480156103ed57600080fd5b506103446103fc366004612824565b6009602052600090815260409020546001600160a01b031681565b34801561042357600080fd5b506102e261043236600461289b565b610a29565b34801561044357600080fd5b50610391610452366004612824565b60009081526002602052604090206001015490565b34801561047357600080fd5b506104876104823660046128dc565b610a3a565b604080516001600160a01b0390931683526020830191909152016102b9565b3480156104b257600080fd5b506102e26104c13660046128fe565b610ab1565b3480156104d257600080fd5b506104dc611e6181565b60405161ffff90911681526020016102b9565b3480156104fb57600080fd5b506102e261050a3660046128fe565b610ad7565b34801561051b57600080fd5b506102e261052a366004612852565b610b56565b34801561053b57600080fd5b506102e261054a36600461289b565b610bf2565b34801561055b57600080fd5b506102e261056a366004612824565b610c0d565b6102e261057d36600461294e565b610d22565b34801561058e57600080fd5b506102e261059d36600461287e565b610f9d565b3480156105ae57600080fd5b506102e26105bd3660046129bd565b611056565b3480156105ce57600080fd5b50600c54610344906001600160a01b031681565b3480156105ee57600080fd5b506103446105fd366004612824565b611083565b34801561060e57600080fd5b5061039161061d36600461287e565b6110c2565b34801561062e57600080fd5b506102e2611107565b34801561064357600080fd5b506102e261065236600461287e565b61113d565b34801561066357600080fd5b506001546001600160a01b0316610344565b34801561068157600080fd5b506102e2610690366004612824565b611179565b3480156106a157600080fd5b506102ad6106b03660046128fe565b6111cd565b3480156106c157600080fd5b506040805180820190915260038152624d4f4f60e81b6020820152610317565b3480156106ed57600080fd5b506010546102ad9060ff1681565b34801561070757600080fd5b50610391600d5481565b6102e261071f366004612824565b6111f8565b34801561073057600080fd5b50610391600081565b34801561074557600080fd5b506102e26107543660046129d8565b61139d565b34801561076557600080fd5b5061039160115481565b34801561077b57600080fd5b506102ad61078a366004612a0d565b6113a8565b34801561079b57600080fd5b506102e26107aa366004612ac8565b611415565b3480156107bb57600080fd5b506107cf6107ca36600461287e565b611421565b6040516102b99190612b1c565b3480156107e857600080fd5b506103916611c37937e0800081565b34801561080357600080fd5b506102e261081236600461287e565b611524565b34801561082357600080fd5b50610317610832366004612824565b611560565b34801561084357600080fd5b506102e26108523660046128fe565b6116aa565b34801561086357600080fd5b506102e2610872366004612824565b6116d0565b34801561088357600080fd5b506103176116ef565b34801561089857600080fd5b506102ad6108a7366004612b60565b611781565b3480156108b857600080fd5b506102e26108c736600461287e565b6117e4565b60006001600160e01b03198216635b5e139f60e01b14806108fd57506001600160e01b0319821663152a902d60e11b145b8061090c575061090c8261187f565b92915050565b600080516020612e6083398151915261092b81336118a4565b61093482611908565b5050565b60006109438261191b565b61096057604051634a1850bf60e11b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061098782611944565b9050806001600160a01b0316836001600160a01b031614156109bc5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821681148015906109dd57506109db8282611781565b155b156109fb5760405163250fdee360e21b815260040160405180910390fd5b610a06848484611a01565b50505050565b6000600a54610a1a60035490565b610a249190612ba4565b905090565b610a3533848484611a5d565b505050565b600c5460009081906001600160a01b03161580610a5d5750610a5b8461191b565b155b15610a7b5760405163574b16a760e11b815260040160405180910390fd5b600c54600d546001600160a01b039091169061271090610a9b9086612bbb565b610aa59190612bda565b915091505b9250929050565b600082815260026020526040902060010154610acd81336118a4565b610a358383611a90565b6001600160a01b0381163314610b4c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109348282611b16565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b8181336118a4565b60026000541415610ba45760405162461bcd60e51b8152600401610b4390612bfc565b6002600055611e6182610bb5610a0c565b610bbf9190612c33565b1115610bde5760405163574b16a760e11b815260040160405180910390fd5b610be88383611b7d565b5050600160005550565b610a3583838360405180602001604052806000815250611415565b6000610c1882611944565b9050610c25338383611b97565b610c425760405163574b16a760e11b815260040160405180910390fd5b610c4e60008383611a01565b60018201610c5b8161191b565b8015610c7c57506000818152600460205260409020546001600160a01b0316155b15610ca957600081815260046020526040902080546001600160a01b0319166001600160a01b0384161790555b50600082815260096020908152604080832080546001600160a01b0386166001600160a01b0319918216811790925581855260058452828520805460001901905586855260049093528184208054909316909255600a805460010190555184929190600080516020612e80833981519152908390a45050565b60026000541415610d455760405162461bcd60e51b8152600401610b4390612bfc565b60026000553382841080610d7b57506001600160a01b0381166000908152600f60205260409020548490610d799087612c33565b115b80610d995750611e6185610d8d610a0c565b610d979190612c33565b115b80610e785750604051631b5a5b9d60e21b60208201526bffffffffffffffffffffffff19606083901b1660248201526038810185905260588101849052610e76907f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6906106b090610e7090607801604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b85611bea565b155b15610e965760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b0381166000908152600f6020526040902054831115610f28576001600160a01b0381166000908152600f6020526040812054610ed99085612ba4565b90508581108015610f045750346611c37937e08000610ef88389612ba4565b610f029190612bbb565b115b15610f225760405163574b16a760e11b815260040160405180910390fd5b50610f59565b34610f3a6611c37937e0800087612bbb565b1115610f595760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b0381166000908152600f602052604081208054879290610f81908490612c33565b90915550610f9190508186611b7d565b50506001600055505050565b6001546001600160a01b03163314610fc75760405162461bcd60e51b8152600401610b4390612c4b565b60026000541415610fea5760405162461bcd60e51b8152600401610b4390612bfc565b6002600055600e546001600160a01b03166110185760405163574b16a760e11b815260040160405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f1935050505015801561104d573d6000803e3d6000fd5b50506001600055565b600080516020612e6083398151915261106f81336118a4565b506010805460ff1916911515919091179055565b6000818152600960205260408120546001600160a01b0316156110b957604051634a1850bf60e11b815260040160405180910390fd5b61090c82611944565b60006001600160a01b0382166110eb576040516316285dcb60e11b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205490565b6001546001600160a01b031633146111315760405162461bcd60e51b8152600401610b4390612c4b565b61113b6000611c06565b565b600080516020612e6083398151915261115681336118a4565b50600c80546001600160a01b0319166001600160a01b0392909216919091179055565b7f3b5d4cc60d3ec3516ee8ae083bd60934f6eb2a6c54b1229985c41bfb092b26036111a481336118a4565b6103e88211156111c75760405163574b16a760e11b815260040160405180910390fd5b50600d55565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6002600054141561121b5760405162461bcd60e51b8152600401610b4390612bfc565b600260005533803b151580611233575060105460ff16155b8061126157506001600160a01b0381166000908152600f602052604090205460099061125f9084612c33565b115b8061127f5750611e6182611273610a0c565b61127d9190612c33565b115b1561129d5760405163574b16a760e11b815260040160405180910390fd5b6011546001600160a01b0382166000908152600f60205260409020541015611334576001600160a01b0381166000908152600f60205260408120546011546112e59190612ba4565b905082811080156113105750346611c37937e080006113048386612ba4565b61130e9190612bbb565b115b1561132e5760405163574b16a760e11b815260040160405180910390fd5b50611365565b346113466611c37937e0800084612bbb565b11156113655760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b0381166000908152600f60205260408120805484929061138d908490612c33565b9091555061104d90508183611b7d565b610934338383611c58565b6000805b825181101561140b576113d78382815181106113ca576113ca612c80565b6020026020010151611083565b6001600160a01b0316846001600160a01b0316146113f957600091505061090c565b8061140381612c96565b9150506113ac565b5060019392505050565b610a0684848484611cf8565b6060600061142e836110c2565b90508061144f5760408051600080825260208201909252905b509392505050565b60008167ffffffffffffffff81111561146a5761146a6126c3565b604051908082528060200260200182016040528015611493578160200160208202803683370190505b50905060006114a0610a0c565b9050600060015b828111611519576114b781611083565b6001600160a01b0316876001600160a01b03161415611507578084836114dc81612c96565b9450815181106114ee576114ee612c80565b6020026020010181815250508482141561150757611519565b8061151181612c96565b9150506114a7565b509195945050505050565b600080516020612e6083398151915261153d81336118a4565b50600e80546001600160a01b0319166001600160a01b0392909216919091179055565b606061156b8261191b565b6115885760405163574b16a760e11b815260040160405180910390fd5b600e546001600160a01b031661162a57600b80546115a590612cb1565b80601f01602080910402602001604051908101604052809291908181526020018280546115d190612cb1565b801561161e5780601f106115f35761010080835404028352916020019161161e565b820191906000526020600020905b81548152906001019060200180831161160157829003601f168201915b50505050509050919050565b600e5460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561166e57600080fd5b505afa158015611682573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261090c9190810190612cec565b6000828152600260205260409020600101546116c681336118a4565b610a358383611b16565b600080516020612e608339815191526116e981336118a4565b50601155565b6060600880546116fe90612cb1565b80601f016020809104026020016040519081016040528092919081815260200182805461172a90612cb1565b80156117775780601f1061174c57610100808354040283529160200191611777565b820191906000526020600020905b81548152906001019060200180831161175a57829003601f168201915b5050505050905090565b60006117ad7f4a0c3698e72495f6d49f6ef074f2b34cac5b153c817a7cc37789cccbb873cf5d836111cd565b806117dd57506001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff165b9392505050565b6001546001600160a01b0316331461180e5760405162461bcd60e51b8152600401610b4390612c4b565b6001600160a01b0381166118735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b43565b61187c81611c06565b50565b60006001600160e01b031982166380ac58cd60e01b148061090c575061090c82611d45565b6118ae82826111cd565b610934576118c6816001600160a01b03166014611d7a565b6118d1836020611d7a565b6040516020016118e2929190612d63565b60408051601f198184030181529082905262461bcd60e51b8252610b4391600401612811565b80516109349060089060208401906125f7565b6000818152600960205260408120546001600160a01b031615801561090c575061090c82611f16565b60008181526004602052604081205482906001600160a01b031615611981576000908152600460205260409020546001600160a01b031692915050565b60008111801561199357506003548111155b156119e7575b60001901806119a7576119e7565b6000818152600460205260409020546001600160a01b0316156119e2576000908152600460205260409020546001600160a01b031692915050565b611999565b50604051634a1850bf60e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611a68848285611b97565b611a855760405163574b16a760e11b815260040160405180910390fd5b610a06838383611f2b565b611a9a82826111cd565b6109345760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611ad23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611b2082826111cd565b156109345760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610934828260405180602001604052806000815250612063565b6000816001600160a01b0316846001600160a01b03161480611bd25750836001600160a01b0316611bc784610938565b6001600160a01b0316145b80611be25750611be28285611781565b949350505050565b6000806000611bf98585612070565b91509150611447816120dd565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611c8b5760405163079f14e360e51b815260040160405180910390fd5b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611d0433858585611a5d565b6000836001600160a01b03163b118015611d275750611d2584848484612298565b155b15610a0657604051631f11849560e21b815260040160405180910390fd5b60006001600160e01b03198216637965db0b60e01b148061090c57506301ffc9a760e01b6001600160e01b031983161461090c565b60606000611d89836002612bbb565b611d94906002612c33565b67ffffffffffffffff811115611dac57611dac6126c3565b6040519080825280601f01601f191660200182016040528015611dd6576020820181803683370190505b509050600360fc1b81600081518110611df157611df1612c80565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e2057611e20612c80565b60200101906001600160f81b031916908160001a9053506000611e44846002612bbb565b611e4f906001612c33565b90505b6001811115611ec7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e8357611e83612c80565b1a60f81b828281518110611e9957611e99612c80565b60200101906001600160f81b031916908160001a90535060049490941c93611ec081612dd8565b9050611e52565b5083156117dd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b43565b6000808211801561090c575050600354101590565b6001600160a01b0382161580611f5b5750611f4581611944565b6001600160a01b0316836001600160a01b031614155b15611f795760405163574b16a760e11b815260040160405180910390fd5b611f8560008285611a01565b6001600160a01b03808316600081815260056020908152604080832080546001908101909155948816835280832080546000190190558583526004909152902080546001600160a01b031916909117905560035490820190811180159061200157506000818152600460205260409020546001600160a01b0316155b1561202e57600081815260046020526040902080546001600160a01b0319166001600160a01b0386161790555b5080826001600160a01b0316846001600160a01b0316600080516020612e8083398151915260405160405180910390a4505050565b610a35838383600161238f565b6000808251604114156120a75760208301516040840151606085015160001a61209b878285856124db565b94509450505050610aaa565b8251604014156120d157602083015160408401516120c68683836125c8565b935093505050610aaa565b50600090506002610aaa565b60008160048111156120f1576120f1612def565b14156120fa5750565b600181600481111561210e5761210e612def565b141561215c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b43565b600281600481111561217057612170612def565b14156121be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b43565b60038160048111156121d2576121d2612def565b141561222b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b43565b600481600481111561223f5761223f612def565b141561187c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b43565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906122cd903390899088908890600401612e05565b602060405180830381600087803b1580156122e757600080fd5b505af1925050508015612317575060408051601f3d908101601f1916820190925261231491810190612e42565b60015b612372573d808015612345576040519150601f19603f3d011682016040523d82523d6000602084013e61234a565b606091505b50805161236a57604051630568cbab60e01b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b8215806123a357506001600160a01b038416155b156123c15760405163574b16a760e11b815260040160405180910390fd5b600060035460016123d29190612c33565b905060038054850190556001600160a01b03851660008181526005602090815260408083208054890190558483526004909152902080546001600160a01b03191690911790558084810183801561243357506000876001600160a01b03163b115b1561249f575b60405182906001600160a01b03891690600090600080516020612e80833981519152908290a46124726000888480600101955088612298565b61248f57604051631f11849560e21b815260040160405180910390fd5b8082141561243957505050610a06565b5b6040516001830192906001600160a01b03891690600090600080516020612e80833981519152908290a4808214156124a05750505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561251257506000905060036125bf565b8460ff16601b1415801561252a57508460ff16601c14155b1561253b57506000905060046125bf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561258f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166125b8576000600192509250506125bf565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016125e9878288856124db565b935093505050935093915050565b82805461260390612cb1565b90600052602060002090601f016020900481019282612625576000855561266b565b82601f1061263e57805160ff191683800117855561266b565b8280016001018555821561266b579182015b8281111561266b578251825591602001919060010190612650565b5061267792915061267b565b5090565b5b80821115612677576000815560010161267c565b6001600160e01b03198116811461187c57600080fd5b6000602082840312156126b857600080fd5b81356117dd81612690565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612702576127026126c3565b604052919050565b600067ffffffffffffffff821115612724576127246126c3565b50601f01601f191660200190565b60006127456127408461270a565b6126d9565b905082815283838301111561275957600080fd5b828260208301376000602084830101529392505050565b60006020828403121561278257600080fd5b813567ffffffffffffffff81111561279957600080fd5b8201601f810184136127aa57600080fd5b611be284823560208401612732565b60005b838110156127d45781810151838201526020016127bc565b83811115610a065750506000910152565b600081518084526127fd8160208601602086016127b9565b601f01601f19169290920160200192915050565b6020815260006117dd60208301846127e5565b60006020828403121561283657600080fd5b5035919050565b6001600160a01b038116811461187c57600080fd5b6000806040838503121561286557600080fd5b82356128708161283d565b946020939093013593505050565b60006020828403121561289057600080fd5b81356117dd8161283d565b6000806000606084860312156128b057600080fd5b83356128bb8161283d565b925060208401356128cb8161283d565b929592945050506040919091013590565b600080604083850312156128ef57600080fd5b50508035926020909101359150565b6000806040838503121561291157600080fd5b8235915060208301356129238161283d565b809150509250929050565b600082601f83011261293f57600080fd5b6117dd83833560208501612732565b6000806000806080858703121561296457600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff81111561299057600080fd5b61299c8782880161292e565b91505092959194509250565b803580151581146129b857600080fd5b919050565b6000602082840312156129cf57600080fd5b6117dd826129a8565b600080604083850312156129eb57600080fd5b82356129f68161283d565b9150612a04602084016129a8565b90509250929050565b60008060408385031215612a2057600080fd5b8235612a2b8161283d565b915060208381013567ffffffffffffffff80821115612a4957600080fd5b818601915086601f830112612a5d57600080fd5b813581811115612a6f57612a6f6126c3565b8060051b9150612a808483016126d9565b8181529183018401918481019089841115612a9a57600080fd5b938501935b83851015612ab857843582529385019390850190612a9f565b8096505050505050509250929050565b60008060008060808587031215612ade57600080fd5b8435612ae98161283d565b93506020850135612af98161283d565b925060408501359150606085013567ffffffffffffffff81111561299057600080fd5b6020808252825182820181905260009190848201906040850190845b81811015612b5457835183529284019291840191600101612b38565b50909695505050505050565b60008060408385031215612b7357600080fd5b8235612b7e8161283d565b915060208301356129238161283d565b634e487b7160e01b600052601160045260246000fd5b600082821015612bb657612bb6612b8e565b500390565b6000816000190483118215151615612bd557612bd5612b8e565b500290565b600082612bf757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612c4657612c46612b8e565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612caa57612caa612b8e565b5060010190565b600181811c90821680612cc557607f821691505b60208210811415612ce657634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612cfe57600080fd5b815167ffffffffffffffff811115612d1557600080fd5b8201601f81018413612d2657600080fd5b8051612d346127408261270a565b818152856020838501011115612d4957600080fd5b612d5a8260208301602086016127b9565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612d9b8160178501602088016127b9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612dcc8160288401602088016127b9565b01602801949350505050565b600081612de757612de7612b8e565b506000190190565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e38908301846127e5565b9695505050505050565b600060208284031215612e5457600080fd5b81516117dd8161269056fe850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a10ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204612328d6a4c5a65e9e8997e3aabd8d667a9c61fed05fece8e75a9e0a2356eb264736f6c634300080900330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000bf77342243b2f6dfb7a0b37793b0ffdeef669bb80000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d64546370414a4d384c6f554d7362435239695a78554d6e546b5769626574623541514d55686e3558515a55580000000000000000000000

Deployed Bytecode

0x6080604052600436106102885760003560e01c806370a082311161015a578063a7027357116100c1578063c87b56dd1161007a578063c87b56dd14610817578063d547741f14610837578063d755bf9914610857578063e8a3d48514610877578063e985e9c51461088c578063f2fde38b146108ac57600080fd5b8063a702735714610759578063ad94d9011461076f578063b88d4fde1461078f578063bba7723e146107af578063c002d23d146107dc578063c5e2a7db146107f757600080fd5b806395d89b411161011357806395d89b41146106b55780639b70a340146106e15780639f67756d146106fb578063a0712d6814610711578063a217fddf14610724578063a22cb4651461073957600080fd5b806370a0823114610602578063715018a6146106225780637f51bb1f146106375780638da5cb5b146106575780638fffd8b51461067557806391d148541461069557600080fd5b80632a55205a116101fe57806342966c68116101b757806342966c681461054f5780634a9eee691461056f57806351cff8d91461058257806358a85bca146105a257806361d027b3146105c25780636352211e146105e257600080fd5b80632a55205a146104675780632f2ff15d146104a657806332cb6b0c146104c657806336568abe146104ef57806340c10f191461050f57806342842e0e1461052f57600080fd5b80630f2cdd6c116102505780630f2cdd6c1461037c57806318160ddd1461039f5780631e7269c5146103b457806323250cae146103e157806323b872dd14610417578063248a9ca31461043757600080fd5b806301ffc9a71461028d57806302fe5305146102c257806306fdde03146102e4578063081812fc14610324578063095ea7b31461035c575b600080fd5b34801561029957600080fd5b506102ad6102a83660046126a6565b6108cc565b60405190151581526020015b60405180910390f35b3480156102ce57600080fd5b506102e26102dd366004612770565b610912565b005b3480156102f057600080fd5b5060408051808201909152600e81526d4361736820436f7773204372657760901b60208201525b6040516102b99190612811565b34801561033057600080fd5b5061034461033f366004612824565b610938565b6040516001600160a01b0390911681526020016102b9565b34801561036857600080fd5b506102e2610377366004612852565b61097c565b34801561038857600080fd5b50610391600981565b6040519081526020016102b9565b3480156103ab57600080fd5b50610391610a0c565b3480156103c057600080fd5b506103916103cf36600461287e565b600f6020526000908152604090205481565b3480156103ed57600080fd5b506103446103fc366004612824565b6009602052600090815260409020546001600160a01b031681565b34801561042357600080fd5b506102e261043236600461289b565b610a29565b34801561044357600080fd5b50610391610452366004612824565b60009081526002602052604090206001015490565b34801561047357600080fd5b506104876104823660046128dc565b610a3a565b604080516001600160a01b0390931683526020830191909152016102b9565b3480156104b257600080fd5b506102e26104c13660046128fe565b610ab1565b3480156104d257600080fd5b506104dc611e6181565b60405161ffff90911681526020016102b9565b3480156104fb57600080fd5b506102e261050a3660046128fe565b610ad7565b34801561051b57600080fd5b506102e261052a366004612852565b610b56565b34801561053b57600080fd5b506102e261054a36600461289b565b610bf2565b34801561055b57600080fd5b506102e261056a366004612824565b610c0d565b6102e261057d36600461294e565b610d22565b34801561058e57600080fd5b506102e261059d36600461287e565b610f9d565b3480156105ae57600080fd5b506102e26105bd3660046129bd565b611056565b3480156105ce57600080fd5b50600c54610344906001600160a01b031681565b3480156105ee57600080fd5b506103446105fd366004612824565b611083565b34801561060e57600080fd5b5061039161061d36600461287e565b6110c2565b34801561062e57600080fd5b506102e2611107565b34801561064357600080fd5b506102e261065236600461287e565b61113d565b34801561066357600080fd5b506001546001600160a01b0316610344565b34801561068157600080fd5b506102e2610690366004612824565b611179565b3480156106a157600080fd5b506102ad6106b03660046128fe565b6111cd565b3480156106c157600080fd5b506040805180820190915260038152624d4f4f60e81b6020820152610317565b3480156106ed57600080fd5b506010546102ad9060ff1681565b34801561070757600080fd5b50610391600d5481565b6102e261071f366004612824565b6111f8565b34801561073057600080fd5b50610391600081565b34801561074557600080fd5b506102e26107543660046129d8565b61139d565b34801561076557600080fd5b5061039160115481565b34801561077b57600080fd5b506102ad61078a366004612a0d565b6113a8565b34801561079b57600080fd5b506102e26107aa366004612ac8565b611415565b3480156107bb57600080fd5b506107cf6107ca36600461287e565b611421565b6040516102b99190612b1c565b3480156107e857600080fd5b506103916611c37937e0800081565b34801561080357600080fd5b506102e261081236600461287e565b611524565b34801561082357600080fd5b50610317610832366004612824565b611560565b34801561084357600080fd5b506102e26108523660046128fe565b6116aa565b34801561086357600080fd5b506102e2610872366004612824565b6116d0565b34801561088357600080fd5b506103176116ef565b34801561089857600080fd5b506102ad6108a7366004612b60565b611781565b3480156108b857600080fd5b506102e26108c736600461287e565b6117e4565b60006001600160e01b03198216635b5e139f60e01b14806108fd57506001600160e01b0319821663152a902d60e11b145b8061090c575061090c8261187f565b92915050565b600080516020612e6083398151915261092b81336118a4565b61093482611908565b5050565b60006109438261191b565b61096057604051634a1850bf60e11b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061098782611944565b9050806001600160a01b0316836001600160a01b031614156109bc5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821681148015906109dd57506109db8282611781565b155b156109fb5760405163250fdee360e21b815260040160405180910390fd5b610a06848484611a01565b50505050565b6000600a54610a1a60035490565b610a249190612ba4565b905090565b610a3533848484611a5d565b505050565b600c5460009081906001600160a01b03161580610a5d5750610a5b8461191b565b155b15610a7b5760405163574b16a760e11b815260040160405180910390fd5b600c54600d546001600160a01b039091169061271090610a9b9086612bbb565b610aa59190612bda565b915091505b9250929050565b600082815260026020526040902060010154610acd81336118a4565b610a358383611a90565b6001600160a01b0381163314610b4c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109348282611b16565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b8181336118a4565b60026000541415610ba45760405162461bcd60e51b8152600401610b4390612bfc565b6002600055611e6182610bb5610a0c565b610bbf9190612c33565b1115610bde5760405163574b16a760e11b815260040160405180910390fd5b610be88383611b7d565b5050600160005550565b610a3583838360405180602001604052806000815250611415565b6000610c1882611944565b9050610c25338383611b97565b610c425760405163574b16a760e11b815260040160405180910390fd5b610c4e60008383611a01565b60018201610c5b8161191b565b8015610c7c57506000818152600460205260409020546001600160a01b0316155b15610ca957600081815260046020526040902080546001600160a01b0319166001600160a01b0384161790555b50600082815260096020908152604080832080546001600160a01b0386166001600160a01b0319918216811790925581855260058452828520805460001901905586855260049093528184208054909316909255600a805460010190555184929190600080516020612e80833981519152908390a45050565b60026000541415610d455760405162461bcd60e51b8152600401610b4390612bfc565b60026000553382841080610d7b57506001600160a01b0381166000908152600f60205260409020548490610d799087612c33565b115b80610d995750611e6185610d8d610a0c565b610d979190612c33565b115b80610e785750604051631b5a5b9d60e21b60208201526bffffffffffffffffffffffff19606083901b1660248201526038810185905260588101849052610e76907f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6906106b090610e7090607801604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b85611bea565b155b15610e965760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b0381166000908152600f6020526040902054831115610f28576001600160a01b0381166000908152600f6020526040812054610ed99085612ba4565b90508581108015610f045750346611c37937e08000610ef88389612ba4565b610f029190612bbb565b115b15610f225760405163574b16a760e11b815260040160405180910390fd5b50610f59565b34610f3a6611c37937e0800087612bbb565b1115610f595760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b0381166000908152600f602052604081208054879290610f81908490612c33565b90915550610f9190508186611b7d565b50506001600055505050565b6001546001600160a01b03163314610fc75760405162461bcd60e51b8152600401610b4390612c4b565b60026000541415610fea5760405162461bcd60e51b8152600401610b4390612bfc565b6002600055600e546001600160a01b03166110185760405163574b16a760e11b815260040160405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f1935050505015801561104d573d6000803e3d6000fd5b50506001600055565b600080516020612e6083398151915261106f81336118a4565b506010805460ff1916911515919091179055565b6000818152600960205260408120546001600160a01b0316156110b957604051634a1850bf60e11b815260040160405180910390fd5b61090c82611944565b60006001600160a01b0382166110eb576040516316285dcb60e11b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205490565b6001546001600160a01b031633146111315760405162461bcd60e51b8152600401610b4390612c4b565b61113b6000611c06565b565b600080516020612e6083398151915261115681336118a4565b50600c80546001600160a01b0319166001600160a01b0392909216919091179055565b7f3b5d4cc60d3ec3516ee8ae083bd60934f6eb2a6c54b1229985c41bfb092b26036111a481336118a4565b6103e88211156111c75760405163574b16a760e11b815260040160405180910390fd5b50600d55565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6002600054141561121b5760405162461bcd60e51b8152600401610b4390612bfc565b600260005533803b151580611233575060105460ff16155b8061126157506001600160a01b0381166000908152600f602052604090205460099061125f9084612c33565b115b8061127f5750611e6182611273610a0c565b61127d9190612c33565b115b1561129d5760405163574b16a760e11b815260040160405180910390fd5b6011546001600160a01b0382166000908152600f60205260409020541015611334576001600160a01b0381166000908152600f60205260408120546011546112e59190612ba4565b905082811080156113105750346611c37937e080006113048386612ba4565b61130e9190612bbb565b115b1561132e5760405163574b16a760e11b815260040160405180910390fd5b50611365565b346113466611c37937e0800084612bbb565b11156113655760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b0381166000908152600f60205260408120805484929061138d908490612c33565b9091555061104d90508183611b7d565b610934338383611c58565b6000805b825181101561140b576113d78382815181106113ca576113ca612c80565b6020026020010151611083565b6001600160a01b0316846001600160a01b0316146113f957600091505061090c565b8061140381612c96565b9150506113ac565b5060019392505050565b610a0684848484611cf8565b6060600061142e836110c2565b90508061144f5760408051600080825260208201909252905b509392505050565b60008167ffffffffffffffff81111561146a5761146a6126c3565b604051908082528060200260200182016040528015611493578160200160208202803683370190505b50905060006114a0610a0c565b9050600060015b828111611519576114b781611083565b6001600160a01b0316876001600160a01b03161415611507578084836114dc81612c96565b9450815181106114ee576114ee612c80565b6020026020010181815250508482141561150757611519565b8061151181612c96565b9150506114a7565b509195945050505050565b600080516020612e6083398151915261153d81336118a4565b50600e80546001600160a01b0319166001600160a01b0392909216919091179055565b606061156b8261191b565b6115885760405163574b16a760e11b815260040160405180910390fd5b600e546001600160a01b031661162a57600b80546115a590612cb1565b80601f01602080910402602001604051908101604052809291908181526020018280546115d190612cb1565b801561161e5780601f106115f35761010080835404028352916020019161161e565b820191906000526020600020905b81548152906001019060200180831161160157829003601f168201915b50505050509050919050565b600e5460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561166e57600080fd5b505afa158015611682573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261090c9190810190612cec565b6000828152600260205260409020600101546116c681336118a4565b610a358383611b16565b600080516020612e608339815191526116e981336118a4565b50601155565b6060600880546116fe90612cb1565b80601f016020809104026020016040519081016040528092919081815260200182805461172a90612cb1565b80156117775780601f1061174c57610100808354040283529160200191611777565b820191906000526020600020905b81548152906001019060200180831161175a57829003601f168201915b5050505050905090565b60006117ad7f4a0c3698e72495f6d49f6ef074f2b34cac5b153c817a7cc37789cccbb873cf5d836111cd565b806117dd57506001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff165b9392505050565b6001546001600160a01b0316331461180e5760405162461bcd60e51b8152600401610b4390612c4b565b6001600160a01b0381166118735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b43565b61187c81611c06565b50565b60006001600160e01b031982166380ac58cd60e01b148061090c575061090c82611d45565b6118ae82826111cd565b610934576118c6816001600160a01b03166014611d7a565b6118d1836020611d7a565b6040516020016118e2929190612d63565b60408051601f198184030181529082905262461bcd60e51b8252610b4391600401612811565b80516109349060089060208401906125f7565b6000818152600960205260408120546001600160a01b031615801561090c575061090c82611f16565b60008181526004602052604081205482906001600160a01b031615611981576000908152600460205260409020546001600160a01b031692915050565b60008111801561199357506003548111155b156119e7575b60001901806119a7576119e7565b6000818152600460205260409020546001600160a01b0316156119e2576000908152600460205260409020546001600160a01b031692915050565b611999565b50604051634a1850bf60e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611a68848285611b97565b611a855760405163574b16a760e11b815260040160405180910390fd5b610a06838383611f2b565b611a9a82826111cd565b6109345760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611ad23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611b2082826111cd565b156109345760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610934828260405180602001604052806000815250612063565b6000816001600160a01b0316846001600160a01b03161480611bd25750836001600160a01b0316611bc784610938565b6001600160a01b0316145b80611be25750611be28285611781565b949350505050565b6000806000611bf98585612070565b91509150611447816120dd565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611c8b5760405163079f14e360e51b815260040160405180910390fd5b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611d0433858585611a5d565b6000836001600160a01b03163b118015611d275750611d2584848484612298565b155b15610a0657604051631f11849560e21b815260040160405180910390fd5b60006001600160e01b03198216637965db0b60e01b148061090c57506301ffc9a760e01b6001600160e01b031983161461090c565b60606000611d89836002612bbb565b611d94906002612c33565b67ffffffffffffffff811115611dac57611dac6126c3565b6040519080825280601f01601f191660200182016040528015611dd6576020820181803683370190505b509050600360fc1b81600081518110611df157611df1612c80565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e2057611e20612c80565b60200101906001600160f81b031916908160001a9053506000611e44846002612bbb565b611e4f906001612c33565b90505b6001811115611ec7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e8357611e83612c80565b1a60f81b828281518110611e9957611e99612c80565b60200101906001600160f81b031916908160001a90535060049490941c93611ec081612dd8565b9050611e52565b5083156117dd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b43565b6000808211801561090c575050600354101590565b6001600160a01b0382161580611f5b5750611f4581611944565b6001600160a01b0316836001600160a01b031614155b15611f795760405163574b16a760e11b815260040160405180910390fd5b611f8560008285611a01565b6001600160a01b03808316600081815260056020908152604080832080546001908101909155948816835280832080546000190190558583526004909152902080546001600160a01b031916909117905560035490820190811180159061200157506000818152600460205260409020546001600160a01b0316155b1561202e57600081815260046020526040902080546001600160a01b0319166001600160a01b0386161790555b5080826001600160a01b0316846001600160a01b0316600080516020612e8083398151915260405160405180910390a4505050565b610a35838383600161238f565b6000808251604114156120a75760208301516040840151606085015160001a61209b878285856124db565b94509450505050610aaa565b8251604014156120d157602083015160408401516120c68683836125c8565b935093505050610aaa565b50600090506002610aaa565b60008160048111156120f1576120f1612def565b14156120fa5750565b600181600481111561210e5761210e612def565b141561215c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b43565b600281600481111561217057612170612def565b14156121be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b43565b60038160048111156121d2576121d2612def565b141561222b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b43565b600481600481111561223f5761223f612def565b141561187c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b43565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906122cd903390899088908890600401612e05565b602060405180830381600087803b1580156122e757600080fd5b505af1925050508015612317575060408051601f3d908101601f1916820190925261231491810190612e42565b60015b612372573d808015612345576040519150601f19603f3d011682016040523d82523d6000602084013e61234a565b606091505b50805161236a57604051630568cbab60e01b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b8215806123a357506001600160a01b038416155b156123c15760405163574b16a760e11b815260040160405180910390fd5b600060035460016123d29190612c33565b905060038054850190556001600160a01b03851660008181526005602090815260408083208054890190558483526004909152902080546001600160a01b03191690911790558084810183801561243357506000876001600160a01b03163b115b1561249f575b60405182906001600160a01b03891690600090600080516020612e80833981519152908290a46124726000888480600101955088612298565b61248f57604051631f11849560e21b815260040160405180910390fd5b8082141561243957505050610a06565b5b6040516001830192906001600160a01b03891690600090600080516020612e80833981519152908290a4808214156124a05750505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561251257506000905060036125bf565b8460ff16601b1415801561252a57508460ff16601c14155b1561253b57506000905060046125bf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561258f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166125b8576000600192509250506125bf565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016125e9878288856124db565b935093505050935093915050565b82805461260390612cb1565b90600052602060002090601f016020900481019282612625576000855561266b565b82601f1061263e57805160ff191683800117855561266b565b8280016001018555821561266b579182015b8281111561266b578251825591602001919060010190612650565b5061267792915061267b565b5090565b5b80821115612677576000815560010161267c565b6001600160e01b03198116811461187c57600080fd5b6000602082840312156126b857600080fd5b81356117dd81612690565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612702576127026126c3565b604052919050565b600067ffffffffffffffff821115612724576127246126c3565b50601f01601f191660200190565b60006127456127408461270a565b6126d9565b905082815283838301111561275957600080fd5b828260208301376000602084830101529392505050565b60006020828403121561278257600080fd5b813567ffffffffffffffff81111561279957600080fd5b8201601f810184136127aa57600080fd5b611be284823560208401612732565b60005b838110156127d45781810151838201526020016127bc565b83811115610a065750506000910152565b600081518084526127fd8160208601602086016127b9565b601f01601f19169290920160200192915050565b6020815260006117dd60208301846127e5565b60006020828403121561283657600080fd5b5035919050565b6001600160a01b038116811461187c57600080fd5b6000806040838503121561286557600080fd5b82356128708161283d565b946020939093013593505050565b60006020828403121561289057600080fd5b81356117dd8161283d565b6000806000606084860312156128b057600080fd5b83356128bb8161283d565b925060208401356128cb8161283d565b929592945050506040919091013590565b600080604083850312156128ef57600080fd5b50508035926020909101359150565b6000806040838503121561291157600080fd5b8235915060208301356129238161283d565b809150509250929050565b600082601f83011261293f57600080fd5b6117dd83833560208501612732565b6000806000806080858703121561296457600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff81111561299057600080fd5b61299c8782880161292e565b91505092959194509250565b803580151581146129b857600080fd5b919050565b6000602082840312156129cf57600080fd5b6117dd826129a8565b600080604083850312156129eb57600080fd5b82356129f68161283d565b9150612a04602084016129a8565b90509250929050565b60008060408385031215612a2057600080fd5b8235612a2b8161283d565b915060208381013567ffffffffffffffff80821115612a4957600080fd5b818601915086601f830112612a5d57600080fd5b813581811115612a6f57612a6f6126c3565b8060051b9150612a808483016126d9565b8181529183018401918481019089841115612a9a57600080fd5b938501935b83851015612ab857843582529385019390850190612a9f565b8096505050505050509250929050565b60008060008060808587031215612ade57600080fd5b8435612ae98161283d565b93506020850135612af98161283d565b925060408501359150606085013567ffffffffffffffff81111561299057600080fd5b6020808252825182820181905260009190848201906040850190845b81811015612b5457835183529284019291840191600101612b38565b50909695505050505050565b60008060408385031215612b7357600080fd5b8235612b7e8161283d565b915060208301356129238161283d565b634e487b7160e01b600052601160045260246000fd5b600082821015612bb657612bb6612b8e565b500390565b6000816000190483118215151615612bd557612bd5612b8e565b500290565b600082612bf757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612c4657612c46612b8e565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612caa57612caa612b8e565b5060010190565b600181811c90821680612cc557607f821691505b60208210811415612ce657634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612cfe57600080fd5b815167ffffffffffffffff811115612d1557600080fd5b8201601f81018413612d2657600080fd5b8051612d346127408261270a565b818152856020838501011115612d4957600080fd5b612d5a8260208301602086016127b9565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612d9b8160178501602088016127b9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612dcc8160288401602088016127b9565b01602801949350505050565b600081612de757612de7612b8e565b506000190190565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e38908301846127e5565b9695505050505050565b600060208284031215612e5457600080fd5b81516117dd8161269056fe850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a10ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204612328d6a4c5a65e9e8997e3aabd8d667a9c61fed05fece8e75a9e0a2356eb264736f6c63430008090033

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

0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000bf77342243b2f6dfb7a0b37793b0ffdeef669bb80000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d64546370414a4d384c6f554d7362435239695a78554d6e546b5769626574623541514d55686e3558515a55580000000000000000000000

-----Decoded View---------------
Arg [0] : preview (string): ipfs://QmdTcpAJM8LoUMsbCR9iZxUMnTkWibetb5AQMUhn5XQZUX
Arg [1] : admin (address): 0xbF77342243B2f6dfb7a0b37793b0ffdEeF669bb8

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 000000000000000000000000bf77342243b2f6dfb7a0b37793b0ffdeef669bb8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [3] : 697066733a2f2f516d64546370414a4d384c6f554d7362435239695a78554d6e
Arg [4] : 546b5769626574623541514d55686e3558515a55580000000000000000000000


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.