ETH Price: $3,410.75 (+2.98%)

Token

WHIM (WHIM)
 

Overview

Max Total Supply

1,138 WHIM

Holders

889

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 WHIM
0x7aaf40b3a7bc11711bba004bd3cf8547e40103bf
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
WHIM

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 22 : WHIM.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;

import {ERC721Psi} from './ERC721Psi.sol';
import {ERC2981Base, ERC2981ContractWideRoyalties} from './ERC2981ContractWideRoyalties.sol';
import {VRFConsumerBaseV2} from './VRFConsumerBaseV2.sol';
import {Pausable} from '@openzeppelin/contracts/security/Pausable.sol';
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {ERC165} from '@openzeppelin/contracts/utils/introspection/ERC165.sol';
import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import {Strings} from '@openzeppelin/contracts/utils/Strings.sol';
import {VRFCoordinatorV2Interface} from './VRFCoordinatorV2Interface.sol';

/// @notice NFTs for visitors to the WHIM stands at VeeCon and NFT.NYC.
/// @author Duffles (https://github.com/DefiMatt).
contract WHIM is
  ERC721Psi,
  ERC2981ContractWideRoyalties,
  VRFConsumerBaseV2,
  Pausable,
  Ownable
{
  using Strings for uint256;

  /*//////////////////////////////////////////////////////////////
    Enums.
  //////////////////////////////////////////////////////////////*/

  /// @notice Lifecycle management.
  enum Stage {
    /// @notice Minting hasn't started yet.
    Premint,
    /// @notice Only the owner can mint.
    OwnerMint,
    /// @notice Addresses on the allowlist can mint.
    AllowlistMint,
    /// @notice Minting has finished.
    Closed,
    /// @notice Metadata has been revealed.
    Revealed,
    /// @notice Metadata is permanently frozen.
    Frozen
  }

  /*//////////////////////////////////////////////////////////////
    Events.
  //////////////////////////////////////////////////////////////*/

  /// @notice Used by Chainlink VRF v2 to pick winning token numbers.
  event RandomToken(uint256 indexed tokenId);

  /*//////////////////////////////////////////////////////////////
    Public state.
  //////////////////////////////////////////////////////////////*/

  /**
   * @notice Base URI for computing {tokenURI}.
   *
   * @dev The URI for each token is the concatenation of the baseURI, token id
   * and '.json'.
   */
  string public baseURI;
  /// @notice Whether an address has already claimed their NFT.
  mapping(address => bool) public claimed;
  /// @notice The address of the Chainlink VRF v2 coordinator.
  VRFCoordinatorV2Interface public immutable coordinator;
  /**
   * @notice This ensures that the token ids for the legendary items cannot be
   * known in advance, even by the team.
   *
   * @dev When minting concludes and metadata is revealed, Chainlink VRF v2 will
   * provide a random offset, applied to token ids so that the metadata files
   * they map to are given by (offset + token id) mod {ERC721Psi-totalSupply}.
   */
  uint256 public offset;
  /// @notice The Merkle root used to validate addresses are on the allowlist.
  bytes32 public root;
  /**
   * @notice Allows checking the legendary tokens are correct.
   *
   * @dev N token ids will be granted legendary status. These will be determined
   * by taking the block hashes for the blocks following the contract deployment
   * block and taking each one's value in base 10 mod {ERC721Psi-totalSupply}.
   *
   * (Block hashes that generate duplicate ids will be skipped, and the process
   * will continue until all N legendary ids have been generated.)
   *
   * Until / if the metadata is frozen, legendaryTokenHash acts to ensure that
   * hypothetical changes to the legendary token ids can be spotted and reverted
   * by informing the community of their values.
   *
   * This value is the keccak256 hash of the legendary token ids in ascending
   * numerical order separated by newlines ('\n'). For example, if 218, 565,
   * 1096, 5128 and 6676 are the legendary token ids, the field value will be
   * keccak256('218\n565\n1096\n5128\n6676') =
   * 0x1cd8a88948cc5d6128719fa11a9928e55f1ceab16b5792533b24da7c2517ed9c.
   *
   * Legendary token ids will be published to allow validation. When checking
   * legendary status in the associated metadata, ensure you take {offset} into
   * consideration!
   */
  bytes32 public legendaryTokenHash;
  /// @notice The current stage in the lifecycle.
  Stage public stage;
  /**
   * @notice URI for {tokenURI} before the reveal.
   */
  string public unrevealedURI;

  /*//////////////////////////////////////////////////////////////
    Constructor.
  //////////////////////////////////////////////////////////////*/

  /**
   * @param _coordinator The address of the Chainlink VRF v2 coordinator.
   * @param royaltyReceiver Address to receive royalty payments.
   * @param royaltyAmount Permyriadage / basis points (‱) of sale amounts to be
   * paid as royalties.
   * @param _unrevealedURI URI for {tokenURI} before the reveal.
   */
  constructor(
    VRFCoordinatorV2Interface _coordinator,
    address royaltyReceiver,
    uint256 royaltyAmount,
    string memory _unrevealedURI
  ) ERC721Psi('WHIM', 'WHIM') VRFConsumerBaseV2(address(_coordinator)) {
    coordinator = _coordinator;
    _setRoyalties(royaltyReceiver, royaltyAmount);
    unrevealedURI = _unrevealedURI;
  }

  /*//////////////////////////////////////////////////////////////
    Modifiers.
  //////////////////////////////////////////////////////////////*/

  /**
   * @notice Enforce the current lifecycle stage positively.
   *
   * @param _stage The stage in the lifecycle the contract must be in.
   */
  modifier inStage(Stage _stage) {
    require(stage == _stage, 'Wrong stage');
    _;
  }

  /**
   * @notice Enforce the current lifecycle stage negatively.
   *
   * @param _stage The stage in the lifecycle the contract must *not* be in.
   */
  modifier notInStage(Stage _stage) {
    require(stage != _stage, 'Wrong stage');
    _;
  }

  /*//////////////////////////////////////////////////////////////
    Privileged functions.
  //////////////////////////////////////////////////////////////*/

  /**
   * @notice Move the to the {Stage.OwnerMint} stage of the lifecycle.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - In {Stage.Premint} stage of the lifecycle.
   */
  function moveToOwnerMint()
    external
    onlyOwner
    whenNotPaused
    inStage(Stage.Premint)
  {
    stage = Stage.OwnerMint;
  }

  /**
   * @notice Move the to the {Stage.AllowlistMint} stage of the lifecycle.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - In {Stage.OwnerMint} stage of the lifecycle.
   *
   * @param _root New non-zero value for {root}.
   */
  function moveToAllowlistMint(bytes32 _root)
    external
    onlyOwner
    whenNotPaused
    inStage(Stage.OwnerMint)
  {
    require(bytes32(0) != _root, 'Invalid root');

    root = _root;

    stage = Stage.AllowlistMint;
  }

  /**
   * @notice Move the to the {Stage.Closed} stage of the lifecycle.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - In {Stage.AllowlistMint} stage of the lifecycle.
   */
  function moveToClosed()
    external
    onlyOwner
    whenNotPaused
    inStage(Stage.AllowlistMint)
  {
    stage = Stage.Closed;
  }

  /**
   * @notice Move the to the {Stage.Frozen} stage of the lifecycle.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - In {Stage.Revealed} stage of the lifecycle.
   */
  function moveToFrozen()
    external
    onlyOwner
    whenNotPaused
    inStage(Stage.Revealed)
  {
    stage = Stage.Frozen;
  }

  /**
   * @notice Mint an arbitrary number of tokens to an arbitrary address.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - In {Stage.OwnerMint} stage of the lifecycle.
   *
   * @param to Address to mint the tokens to.
   * @param amount Number of tokens to mint.
   */
  function ownerMint(address to, uint256 amount)
    external
    onlyOwner
    whenNotPaused
    inStage(Stage.OwnerMint)
  {
    _mint(to, amount);
  }

  /**
   * @notice Pause any functions in the contract marked with the
   * {Pausable-whenNotPaused} modifier.
   *
   * @dev Can only be used:
   * - By the owner.
   */
  function pause() external onlyOwner {
    _pause();
  }

  /**
   * @notice Reveal the metadata!
   *
   * @dev Ensures fairness by requesting that Chainlink VRF v2 provide a random
   * {offset}.
   *
   * @dev NB Do not re-request randomness even if you do not receive an answer
   * right away. Doing so would give the VRF service provider the option to
   * withhold a VRF fulfillment, if it doesn't like the outcome, and wait for
   * the re-request in the hopes that it gets a better outcome.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - In {Stage.Closed} stage of the lifecycle.
   *
   * @param newBaseURI The new {baseURI}.
   * @param _legendaryTokenHash The {legendaryTokenHash} that allows checking
   * the legendary tokens are correct. NB Once the VRF callback has occurred,
   * this cannot be set again, so make sure it's correct!
   * @param keyHash Corresponds to a particular oracle job which uses that key
   * for generating the VRF proof. Different keyHashes have different gas price
   * ceilings, so selecting a specific one bounds the maximum per-request cost.
   * @param subscription The id of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks the oracle will wait
   * before responding to the request.
   * @param callbackGasLimit - How much gas to receive in the
   * {fulfillRandomWords} callback.
   * @param numWords - The number of uint256 random values to receive in the
   * {fulfillRandomWords} callback.
   */
  function reveal(
    string calldata newBaseURI,
    bytes32 _legendaryTokenHash,
    bytes32 keyHash,
    uint64 subscription,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external onlyOwner whenNotPaused inStage(Stage.Closed) {
    baseURI = newBaseURI;
    legendaryTokenHash = _legendaryTokenHash;

    coordinator.requestRandomWords(
      keyHash,
      subscription,
      minimumRequestConfirmations,
      callbackGasLimit,
      numWords
    );
  }

  /**
   * @notice Change {baseURI}.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   * - When not in the {Stage.Frozen} stage of the lifecycle.
   *
   * @param newBaseURI The new {baseURI}.
   */
  function setBaseURI(string memory newBaseURI)
    external
    onlyOwner
    whenNotPaused
    notInStage(Stage.Frozen)
  {
    baseURI = newBaseURI;
  }

  /**
   * @notice Change {root}.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   *
   * @param _root The new {root}.
   */
  function setRoot(bytes32 _root) external onlyOwner whenNotPaused {
    root = _root;
  }

  /**
   * @notice Change royalties (see {ERC2981ContractWideRoyalties-royaltyInfo}).
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   *
   * @param royaltyReceiver Address to receive royalty payments.
   * @param royaltyAmount Permyriadage / basis points (‱) of sale amounts to be
   * paid as royalties.
   */
  function setRoyalties(address royaltyReceiver, uint256 royaltyAmount)
    external
    onlyOwner
    whenNotPaused
  {
    _setRoyalties(royaltyReceiver, royaltyAmount);
  }

  /**
   * @notice Change {unrevealedURI}.
   *
   * @dev Can only be used:
   * - By the owner.
   * - When unpaused.
   *
   * @param _unrevealedURI URI for {tokenURI} before the reveal.
   */
  function setUnrevealedURI(string memory _unrevealedURI)
    external
    onlyOwner
    whenNotPaused
  {
    unrevealedURI = _unrevealedURI;
  }

  /**
   * @notice Unpause any functions in the contract marked with the
   * {Pausable-whenNotPaused} modifier.
   *
   * @dev Can only be used:
   * - By the owner.
   */
  function unpause() external onlyOwner {
    _unpause();
  }

  /*//////////////////////////////////////////////////////////////
    Public functions.
  //////////////////////////////////////////////////////////////*/

  /**
   * @notice Mint an NFT to the sender.
   *
   * @dev Can only be used:
   * - When unpaused.
   * - In {Stage.AllowlistMint} stage of the lifecycle.
   *
   * @param _proof How to climb the tree.
   */
  function mint(bytes32[] calldata _proof)
    external
    whenNotPaused
    inStage(Stage.AllowlistMint)
  {
    require(!claimed[msg.sender], 'Already claimed');
    require(
      MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))),
      'Not allowlisted'
    );

    claimed[msg.sender] = true;
    _mint(msg.sender, 1);
  }

  /*//////////////////////////////////////////////////////////////
    View functions.
  //////////////////////////////////////////////////////////////*/

  /**
   * @notice Returns the URI for the token with id `tokenId`.
   *
   * @dev Returns {unrevealedURI} pre-reveal, and the concatenation of
   * {baseURI}, ({offset} + `tokenId`) mod {ERC721Psi-totalSupply} and '.json'
   * post-reveal (see {offset} and {baseURI} for more details).
   *
   * @param tokenId The token id to get the URI for.
   * @return The URI for the token.
   */
  function tokenURI(uint256 tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(_exists(tokenId), 'Token does not exist');

    return
      stage < Stage.Revealed
        ? unrevealedURI
        : string(
          abi.encodePacked(
            baseURI,
            ((tokenId + offset) % totalSupply()).toString(),
            '.json'
          )
        );
  }

  /// @inheritdoc	ERC165
  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(ERC721Psi, ERC2981Base)
    returns (bool)
  {
    return super.supportsInterface(interfaceId);
  }

  /*//////////////////////////////////////////////////////////////
    Callbacks.
  //////////////////////////////////////////////////////////////*/

  /**
   * @notice Handles the Chainlink VRF v2 response and sets {offset}.
   *
   * @dev Because this function can only be called in the {Stage.Closed} stage
   * of the lifecycle, and it sets the lifecycle stage to {Stage.Revealed}, this
   * callback can only be executed once. This makes the {offset} permanent.
   *
   * @dev Can only be used:
   * - By the Chainlink VRF v2 coordinator (verified in
   * {VRFConsumerBaseV2-rawFulfillRandomWords}).
   * - In {Stage.Closed} stage of the lifecycle.
   *
   * @param randomWords The VRF output expanded to the requested number of
   * words. The first word is used to set {offset}.
   */
  function fulfillRandomWords(uint256, uint256[] memory randomWords)
    internal
    override
    inStage(Stage.Closed)
  {
    stage = Stage.Revealed;

    uint256 _offset = randomWords[0];
    uint256 _totalSupply = totalSupply();

    /*
     * Prevents overflow when calculating {tokenURI} if VRF returns a
     * particularly large number.
     */
    unchecked {
      if (_offset + _totalSupply < _offset) _offset -= _totalSupply;
    }

    offset = _offset;

    uint256 length = randomWords.length;

    for (uint256 i = 1; i < length; ++i) {
      emit RandomToken(randomWords[i] % _totalSupply);
    }
  }
}

File 2 of 22 : ERC721Psi.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/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/StorageSlot.sol";
import "./BitMaps.sol";


contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using Address for address;
    using Strings for uint256;
    using BitMaps for BitMaps.BitMap;

    BitMaps.BitMap private _batchHead;

    string private _name;
    string private _symbol;

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

    mapping(uint256 => address) private _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;

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

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

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

        uint count;
        for( uint i; i < _minted; ++i ){
            if(_exists(i)){
                if( owner == ownerOf(i)){
                    ++count;
                }
            }
        }
        return count;
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(tokenId);
        return owner;
    }

    function _ownerAndBatchHeadOf(uint256 tokenId) internal view returns (address owner, uint256 tokenIdBatchHead){
        require(_exists(tokenId), "ERC721Psi: owner query for nonexistent token");
        tokenIdBatchHead = _getBatchHead(tokenId);
        owner = _owners[tokenIdBatchHead];
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Psi: URI query for nonexistent token");

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

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


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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

    
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        uint256 startTokenId = _minted;
        _mint(to, quantity);
        require(
            _checkOnERC721Received(address(0), to, startTokenId, quantity, _data),
            "ERC721Psi: transfer to non ERC721Receiver implementer"
        );
    }


    function _mint(
        address to,
        uint256 quantity
    ) internal virtual {
        uint256 tokenIdBatchHead = _minted;
        
        require(quantity > 0, "ERC721Psi: quantity must be greater 0");
        require(to != address(0), "ERC721Psi: mint to the zero address");
        
        _beforeTokenTransfers(address(0), to, tokenIdBatchHead, quantity);
        _minted += quantity;
        _owners[tokenIdBatchHead] = to;
        _batchHead.set(tokenIdBatchHead);
        _afterTokenTransfers(address(0), to, tokenIdBatchHead, quantity);
        
        // Emit events
        for(uint256 tokenId=tokenIdBatchHead;tokenId < tokenIdBatchHead + quantity; tokenId++){
            emit Transfer(address(0), to, tokenId);
        } 
    }


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

        require(
            owner == from,
            "ERC721Psi: transfer of token that is not own"
        );
        require(to != address(0), "ERC721Psi: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        uint256 nextTokenId = tokenId + 1;

        if(!_batchHead.get(nextTokenId) &&  
            nextTokenId < _minted
        ) {
            _owners[nextTokenId] = from;
            _batchHead.set(nextTokenId);
        }

        _owners[tokenId] = to;
        if(tokenId != tokenIdBatchHead) {
            _batchHead.set(tokenId);
        }

        emit Transfer(from, to, tokenId);

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

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

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

    function _getBatchHead(uint256 tokenId) internal view returns (uint256 tokenIdBatchHead) {
        tokenIdBatchHead = _batchHead.scanForward(tokenId); 
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < totalSupply(), "ERC721Psi: global index out of bounds");
        
        uint count;
        for(uint i; i < _minted; i++){
            if(_exists(i)){
                if(count == index) return i;
                else count++;
            }
        }
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) {
        uint count;
        for(uint i; i < _minted; i++){
            if(_exists(i) && owner == ownerOf(i)){
                if(count == index) return i;
                else count++;
            }
        }

        revert("ERC721Psi: owner index out of bounds");
    }


    /**
     * @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
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

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

File 3 of 22 : ERC2981ContractWideRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './ERC2981Base.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
/// @dev This implementation has the same royalties for each and every tokens
abstract contract ERC2981ContractWideRoyalties is ERC2981Base {
    RoyaltyInfo private _royalties;

    /// @dev Sets token royalties
    /// @param recipient recipient of the royalties
    /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
    function _setRoyalties(address recipient, uint256 value) internal {
        require(value <= 3_000, 'ERC2981Royalties: Too high');
        _royalties = RoyaltyInfo(recipient, uint24(value));
    }

    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256 value)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        RoyaltyInfo memory royalties = _royalties;
        receiver = royalties.recipient;
        royaltyAmount = (value * royalties.amount) / 10000;
    }
}

File 4 of 22 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 5 of 22 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 8 of 22 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 9 of 22 : 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 10 of 22 : VRFCoordinatorV2Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

File 11 of 22 : 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 12 of 22 : 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 13 of 22 : 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 14 of 22 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 17 of 22 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly {
            r.slot := slot
        }
    }
}

File 18 of 22 : BitMaps.sol
// SPDX-License-Identifier: MIT
/**
   _____       ___     ___ __           ____  _ __      
  / ___/____  / (_)___/ (_) /___  __   / __ )(_) /______
  \__ \/ __ \/ / / __  / / __/ / / /  / __  / / __/ ___/
 ___/ / /_/ / / / /_/ / / /_/ /_/ /  / /_/ / / /_(__  ) 
/____/\____/_/_/\__,_/_/\__/\__, /  /_____/_/\__/____/  
                           /____/                        

- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits

 */
pragma solidity ^0.8.0;

import "./BitScan.sol";

/**
 * @dev This Library is a modified version of Openzeppelin's BitMaps library.
 * Functions of finding the index of the closest set bit from a given index are added.
 * The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB.
 * The modification of indexing makes finding the closest previous set bit more efficient in gas usage.
*/

/**
 * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.
 * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
 */

library BitMaps {
    using BitScan for uint256;
    uint256 private constant MASK_INDEX_ZERO = (1 << 255);
    struct BitMap {
        mapping(uint256 => uint256) _data;
    }

    /**
     * @dev Returns whether the bit at `index` is set.
     */
    function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {
        uint256 bucket = index >> 8;
        uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
        return bitmap._data[bucket] & mask != 0;
    }

    /**
     * @dev Sets the bit at `index` to the boolean `value`.
     */
    function setTo(
        BitMap storage bitmap,
        uint256 index,
        bool value
    ) internal {
        if (value) {
            set(bitmap, index);
        } else {
            unset(bitmap, index);
        }
    }

    /**
     * @dev Sets the bit at `index`.
     */
    function set(BitMap storage bitmap, uint256 index) internal {
        uint256 bucket = index >> 8;
        uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
        bitmap._data[bucket] |= mask;
    }

    /**
     * @dev Unsets the bit at `index`.
     */
    function unset(BitMap storage bitmap, uint256 index) internal {
        uint256 bucket = index >> 8;
        uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
        bitmap._data[bucket] &= ~mask;
    }

    /**
     * @dev Find the closest index of the set bit before `index`.
     */
    function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256) {
        uint256 bucket = index >> 8;

        // index within the bucket
        uint256 bucketIndex = (index & 0xff);

        // load a bitboard from the bitmap.
        uint256 bb = bitmap._data[bucket];

        // offset the bitboard to scan from `bucketIndex`.
        bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex)
        
        if(bb > 0) {
            unchecked {
                return (bucket << 8) | (bucketIndex -  bb.bitScanForward256());    
            }
        } else {
            while(true) {
                require(bucket > 0, "BitMaps: The set bit before the index doesn't exist.");
                unchecked {
                    bucket--;
                }
                // No offset. Always scan from the least significiant bit now.
                bb = bitmap._data[bucket];
                
                if(bb > 0) {
                    unchecked {
                        return (bucket << 8) | (255 -  bb.bitScanForward256());    
                    }
                } 
            }
        }
    }

    function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) {
        return bitmap._data[bucket];
    }
}

File 19 of 22 : 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 20 of 22 : BitScan.sol
// SPDX-License-Identifier: MIT
/**
   _____       ___     ___ __           ____  _ __      
  / ___/____  / (_)___/ (_) /___  __   / __ )(_) /______
  \__ \/ __ \/ / / __  / / __/ / / /  / __  / / __/ ___/
 ___/ / /_/ / / / /_/ / / /_/ /_/ /  / /_/ / / /_(__  ) 
/____/\____/_/_/\__,_/_/\__/\__, /  /_____/_/\__/____/  
                           /____/                        

- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits

 */

pragma solidity ^0.8.0;


library BitScan {
    uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff;
    bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8";

    /**
        @dev Isolate the least significant set bit.
     */ 
    function isolateLS1B256(uint256 bb) pure internal returns (uint256) {
        require(bb > 0);
        unchecked {
            return bb & (0 - bb);
        }
    } 

    /**
        @dev Isolate the most significant set bit.
     */ 
    function isolateMS1B256(uint256 bb) pure internal returns (uint256) {
        require(bb > 0);
        unchecked {
            bb |= bb >> 256;
            bb |= bb >> 128;
            bb |= bb >> 64;
            bb |= bb >> 32;
            bb |= bb >> 16;
            bb |= bb >> 8;
            bb |= bb >> 4;
            bb |= bb >> 2;
            bb |= bb >> 1;
            
            return (bb >> 1) + 1;
        }
    } 

    /**
        @dev Find the index of the lest significant set bit. (trailing zero count)
     */ 
    function bitScanForward256(uint256 bb) pure internal returns (uint8) {
        unchecked {
            return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]);
        }   
    }

    /**
        @dev Find the index of the most significant set bit.
     */ 
    function bitScanReverse256(uint256 bb) pure internal returns (uint8) {
        unchecked {
            return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]);
        }   
    }

    function log2(uint256 bb) pure internal returns (uint8) {
        unchecked {
            return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]);
        } 
    }
}

File 21 of 22 : ERC2981Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './IERC2981Royalties.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981Base is ERC165, IERC2981Royalties {
    struct RoyaltyInfo {
        address recipient;
        uint24 amount;
    }

    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Royalties).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 22 of 22 : IERC2981Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title IERC2981Royalties
/// @dev Interface for the ERC2981 - Token Royalty standard
interface IERC2981Royalties {
    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _value - the sale price of the NFT asset specified by _tokenId
    /// @return _receiver - address of who should be sent the royalty payment
    /// @return _royaltyAmount - the royalty payment amount for value sale price
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        returns (address _receiver, uint256 _royaltyAmount);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract VRFCoordinatorV2Interface","name":"_coordinator","type":"address"},{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"},{"internalType":"string","name":"_unrevealedURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RandomToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coordinator","outputs":[{"internalType":"contract VRFCoordinatorV2Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legendaryTokenHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"moveToAllowlistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"moveToClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"moveToFrozen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"moveToOwnerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"},{"internalType":"bytes32","name":"_legendaryTokenHash","type":"bytes32"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint64","name":"subscription","type":"uint64"},{"internalType":"uint16","name":"minimumRequestConfirmations","type":"uint16"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint32","name":"numWords","type":"uint32"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_unrevealedURI","type":"string"}],"name":"setUnrevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stage","outputs":[{"internalType":"enum WHIM.Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unrevealedURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60c0604052346200010e5762003fea803803806200001d816200012a565b92833981016080828203126200010e578151916200003b836200015f565b60209283820151906200004e826200015f565b6040830151606084015190936001600160401b0382116200010e570184601f820112156200010e578051906200008e620000888362000171565b6200012a565b958287528783830101116200010e57956000965b828810620000f8575081620000c09711620000e9575b505062000534565b6040516138219081620007c9823960805181612c38015260a05181818161087b01526131d90152f35b600091860101523880620000b8565b87810182015187890183015296810196620000a2565b600080fd5b50634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b038111838210176200015057604052565b6200015a62000113565b604052565b6001600160a01b038116036200010e57565b6020906001600160401b0381116200018f575b601f01601f19160190565b6200019962000113565b62000184565b60408051919082016001600160401b03811183821017620001d1575b60405260048252635748494d60e01b6020830152565b620001db62000113565b620001bb565b90600182811c9216801562000213575b6020831014620001fd57565b634e487b7160e01b600052602260045260246000fd5b91607f1691620001f1565b90601f82116200022c575050565b60019160009083825260208220906020601f850160051c830194106200026f575b601f0160051c01915b828110620002645750505050565b818155830162000256565b90925082906200024d565b601f811162000287575050565b6000906002825260208220906020601f850160051c83019410620002c8575b601f0160051c01915b828110620002bc57505050565b818155600101620002af565b9092508290620002a6565b601f8111620002e0575050565b600090600f825260208220906020601f850160051c8301941062000321575b601f0160051c01915b8281106200031557505050565b81815560010162000308565b9092508290620002ff565b80519091906001600160401b03811162000420575b620003598162000353600254620001e1565b6200027a565b602080601f83116001146200039857508192936000926200038c575b50508160011b916000199060031b1c191617600255565b01519050388062000375565b6002600052601f198316949091907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace926000905b87821062000407575050836001959610620003ed575b505050811b01600255565b015160001960f88460031b161c19169055388080620003e2565b80600185968294968601518155019501930190620003cc565b6200042a62000113565b62000341565b80519091906001600160401b03811162000524575b6200045d8162000457600f54620001e1565b620002d3565b602080601f83116001146200049c575081929360009262000490575b50508160011b916000199060031b1c191617600f55565b01519050388062000479565b600f600052601f198316949091907f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802926000905b8782106200050b575050836001959610620004f1575b505050811b01600f55565b015160001960f88460031b161c19169055388080620004e6565b80600185968294968601518155019501930190620004d0565b6200052e62000113565b62000445565b6200053e6200019f565b620005486200019f565b81519091906001600160401b0381116200069b575b6001916200057782620005718554620001e1565b6200021e565b60209081601f8411600114620005ff57509282620005c093620005eb989693620005f19b9a9896600092620005f3575b5050600019600383901b1c191690821b1790556200032c565b6001600160a01b0381166080526008805460ff19169055620005e233620006ab565b60a05262000708565b62000430565b565b015190503880620005a7565b60016000529190601f1984167fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6936000905b8282106200068357505093620005eb9896938693620005f19c9b99979383620005c0981062000669575b505050811b0190556200032c565b015160001960f88460031b161c191690553880806200065b565b80888697829497870151815501960194019062000631565b620006a562000113565b6200055d565b60088054610100600160a81b0319811683831b610100600160a81b03161782556040516001600160a01b03938416939190921c16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3565b610bb88211620007835760408051919082016001600160401b0381118382101762000773575b6040526001600160a01b031680825262ffffff8316602090920191909152600780546001600160b81b03191690911760a09290921b62ffffff60a01b16919091179055565b6200077d62000113565b6200072e565b60405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606490fdfe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461036f57806306fdde0314610366578063081812fc1461035d578063095ea7b31461035457806309fcb7af1461034b5780630a0090971461034257806318160ddd146103395780631fe543e31461033057806323b872dd146103275780632a55205a1461031e5780632f745c59146103155780633f4ba83a1461030c57806342842e0e146103035780634614d9e1146102fa578063484b973c146102f15780634f6ccce7146102e857806355f804b3146102df5780635c975abb146102d65780636352211e146102cd5780636c0360eb146102c45780637035bf18146102bb57806370a08231146102b2578063715018a6146102a95780638456cb59146102a05780638c7ea24b146102975780638da5cb5b1461028e57806395d89b411461028557806396f1171e1461027c578063a22cb46514610273578063b77a147b1461026a578063b88d4fde14610261578063c040e6b814610258578063c2ef0b2c1461024f578063c87b56dd14610246578063c884ef831461023d578063ca4fd33a14610234578063d55565441461022b578063dab5f34014610222578063e985e9c514610219578063ebf0c71714610210578063f2fde38b14610207578063f80def30146101fe5763fe2c7fee146101f657600080fd5b61000e611b9d565b5061000e611b49565b5061000e611a9b565b5061000e611a7c565b5061000e611a19565b5061000e6119e0565b5061000e6119c1565b5061000e61196f565b5061000e61192f565b5061000e611823565b5061000e611775565b5061000e61174a565b5061000e6116df565b5061000e611688565b5061000e61159a565b5061000e61157b565b5061000e6114d3565b5061000e6114a8565b5061000e6113a4565b5061000e611335565b5061000e6112b6565b5061000e6111cb565b5061000e611123565b5061000e61107b565b5061000e610f3d565b5061000e610f19565b5061000e610ddb565b5061000e610d1e565b5061000e610c8e565b5061000e610bfc565b5061000e610bb4565b5061000e610b08565b5061000e610ad8565b5061000e610a67565b5061000e610a3d565b5061000e61097e565b5061000e61089f565b5061000e61085a565b5061000e6107dc565b5061000e61067e565b5061000e610622565b5061000e610547565b5061000e6103a2565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602060031936011261000e5760207fffffffff000000000000000000000000000000000000000000000000000000006004356103e381610378565b167f2a55205a00000000000000000000000000000000000000000000000000000000811490811561041a575b506040519015158152f35b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915081156104af575b8115610485575b811561045b575b503861040f565b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610454565b7f780e9d63000000000000000000000000000000000000000000000000000000008114915061044d565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610446565b918091926000905b8282106104f95750116104f2575050565b6000910152565b915080602091830151818601520182916104e1565b90601f19601f60209361052c815180928187528780880191016104d9565b0116010190565b90602061054492818152019061050e565b90565b503461000e5760008060031936011261061f576040519080600180549161056d83610f6e565b808652928281169081156105fe57506001146105a4575b6105a08561059481870382610934565b60405191829182610533565b0390f35b92508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106105e6575050508101602001610594826105a0610584565b805460208587018101919091529093019281016105cb565b60ff19166020870152505060408401925061059491508390506105a0610584565b80fd5b503461000e57602060031936011261000e576020610641600435611ede565b6001600160a01b0360405191168152f35b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57604060031936011261000e57610698610652565b6024356106a481611dd5565b50916001600160a01b038084168091831614610725576106d7936106d29133149081156106d9575b50611e6d565b6124c6565b005b61071f91506107189061070033916001600160a01b03166000526006602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b386106cc565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152fd5b6064359067ffffffffffffffff8216820361000e57565b6084359061ffff8216820361000e57565b60a4359063ffffffff8216820361000e57565b60c4359063ffffffff8216820361000e57565b503461000e5760e060031936011261000e5767ffffffffffffffff60043581811161000e573660238201121561000e57806004013591821161000e57366024838301011161000e576106d79161083061078e565b6108386107a5565b906108416107b6565b9261084a6107c9565b94604435916024803592016130c6565b503461000e57600060031936011261000e5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461000e57600060031936011261000e576020600454604051908152f35b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761090a57604052565b6109126108be565b604052565b610120810190811067ffffffffffffffff82111761090a57604052565b90601f601f19910116810190811067ffffffffffffffff82111761090a57604052565b60209067ffffffffffffffff8111610971575b60051b0190565b6109796108be565b61096a565b503461000e57604060031936011261000e5760243567ffffffffffffffff811161000e573660238201121561000e578060040135906109bc82610957565b906109ca6040519283610934565b82825260209260248484019160051b8301019136831161000e57602401905b8282106109f9576106d784612c2e565b813581529084019084016109e9565b600319606091011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b503461000e576106d7610a4f36610a08565b91610a62610a5d8433612077565b611f6c565b612226565b503461000e57604060031936011261000e57604080516127106020602435610a8e846108ee565b6007549362ffffff6001600160a01b0386169586835260a01c1692839101528060001904821181151516610acb575b845193845202046020820152f35b610ad3611d89565b610abd565b503461000e57604060031936011261000e576020610b00610af7610652565b60243590612b58565b604051908152f35b503461000e57600060031936011261000e57600854610b34336001600160a01b038360081c1614611cbf565b60ff811615610b705760ff19166008557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b606460405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b503461000e576106d7610bc636610a08565b90604051926020840184811067ffffffffffffffff821117610bef575b60405260008452611fdd565b610bf76108be565b610be3565b503461000e5760008060031936011261061f57610c3560ff600854610c2e336001600160a01b038360081c1614611cbf565b1615612d55565b600e5460ff81166006811015610c6157600391610c57600260ff199314612da0565b1617600e55604051f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526021600452fd5b503461000e57604060031936011261000e57610ca8610652565b610cc760ff600854610c2e336001600160a01b038360081c1614611cbf565b60ff600e5416906006821015610cef57610ce660016106d79314612da0565b60243590612f77565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b503461000e57602060031936011261000e576020610b00600435612a92565b601f19601f60209267ffffffffffffffff8111610d5b575b01160190565b610d636108be565b610d55565b929192610d7482610d3d565b91610d826040519384610934565b82948184528183011161000e578281602093846000960137010152565b602060031982011261000e576004359067ffffffffffffffff821161000e578060238301121561000e5781602461054493600401359101610d68565b503461000e57610dea36610d9f565b610e0960ff600854610c2e336001600160a01b038360081c1614611cbf565b60ff600e54166006811015610cef576005610e25911415612da0565b805167ffffffffffffffff8111610f0c575b610e4b81610e46600954610f6e565b6132eb565b602080601f8311600114610e8557508192600092610e7a575b50506000198260011b9260031b1c191617600955005b015190503880610e64565b90601f19831693610eb860096000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90565b926000905b868210610ef45750508360019510610edb575b505050811b01600955005b015160001960f88460031b161c19169055388080610ed0565b80600185968294968601518155019501930190610ebd565b610f146108be565b610e37565b503461000e57600060031936011261000e57602060ff600854166040519015158152f35b503461000e57602060031936011261000e576020610f5c600435611dd5565b506001600160a01b0360405191168152f35b90600182811c92168015610fb7575b6020831014610f8857565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691610f7d565b60405190600082600f5491610fd583610f6e565b8083529260019081811690811561105d5750600114610ffe575b50610ffc92500383610934565b565b600f600090815291507f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8025b8483106110425750610ffc935050810160200138610fef565b81935090816020925483858a01015201910190918592611029565b935050505060ff199150166020830152610ffc826040810138610fef565b503461000e5760008060031936011261061f57604051908060095461109f81610f6e565b808552916001918083169081156105fe57506001146110c8576105a08561059481870382610934565b9250600983527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af5b82841061110b575050508101602001610594826105a0610584565b805460208587018101919091529093019281016110f0565b503461000e5760008060031936011261061f576040519080600f5461114781610f6e565b808552916001918083169081156105fe5750600114611170576105a08561059481870382610934565b9250600f83527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8025b8284106111b3575050508101602001610594826105a0610584565b80546020858701810191909152909301928101611198565b503461000e57602060031936011261000e576001600160a01b03806111ee610652565b16801561124c5760008091600454925b83811080156112415761121a575b61121590611db9565b6111fe565b8461122482611dd5565b5016820361120c579161123961121591611db9565b92905061120c565b604051848152602090f35b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f2061646472657373000000000000000000000000000000000000006064820152fd5b503461000e5760008060031936011261061f576008547fffffffffffffffffffffff0000000000000000000000000000000000000000ff6001600160a01b038260081c1691611306338414611cbf565b1660085581604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b503461000e57600060031936011261000e57600160ff19600854611366336001600160a01b038360081c1614611cbf565b61137360ff821615612d55565b16176008557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b503461000e57604060031936011261000e576113be610652565b602435906008546113e360ff6001600160a01b0392610c2e33858360081c1614611cbf565b610bb88311611464576106d79262ffffff9160405193611402856108ee565b1683521660208201526001600160a01b038151167fffffffffffffffffff000000000000000000000000000000000000000000000076ffffff0000000000000000000000000000000000000000602060075494015160a01b1692161717600755565b606460405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152fd5b503461000e57600060031936011261000e5760206001600160a01b0360085460081c16604051908152f35b503461000e5760008060031936011261061f5760405190806002546114f781610f6e565b808552916001918083169081156105fe5750600114611520576105a08561059481870382610934565b9250600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410611563575050508101602001610594826105a0610584565b80546020858701810191909152909301928101611548565b503461000e57600060031936011261000e576020600d54604051908152f35b503461000e57604060031936011261000e576115b4610652565b602435801515810361000e576001600160a01b038216913383146116445781611600611612923360005260066020526040600020906001600160a01b0316600052602052604060002090565b9060ff60ff1983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152fd5b503461000e57602060031936011261000e5760043567ffffffffffffffff80821161000e573660238301121561000e57816004013590811161000e573660248260051b8401011161000e5760246106d792016133dc565b503461000e57608060031936011261000e576116f9610652565b611701610668565b6064359167ffffffffffffffff831161000e573660238401121561000e576117366106d7933690602481600401359101610d68565b9160443591611fdd565b60061115610cef57565b503461000e57600060031936011261000e5760ff600e54166040516006821015610cef576020918152f35b503461000e57602060031936011261000e576004356117a960ff600854610c2e336001600160a01b038360081c1614611cbf565b60ff600e54166006811015610cef5760016117c49114612da0565b80156117df57600c556106d7600260ff19600e541617600e55565b606460405162461bcd60e51b815260206004820152600c60248201527f496e76616c696420726f6f7400000000000000000000000000000000000000006044820152fd5b503461000e57602060031936011261000e57600435600454808210156118eb576004611851600e5460ff1690565b61185a81611740565b101561186d5750506105a0610594610fc1565b6118e661189461188f6118af9361188a6105a096600b549061221a565b61360f565b6136e4565b6118d86040519384926118a960208501613648565b906136d1565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b03601f198101835282610934565b610594565b606460405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f6573206e6f742065786973740000000000000000000000006044820152fd5b503461000e57602060031936011261000e576001600160a01b03611951610652565b16600052600a602052602060ff604060002054166040519015158152f35b503461000e5760008060031936011261061f576119a160ff600854610c2e336001600160a01b038360081c1614611cbf565b600e5460ff81166006811015610c6157600191610c5760ff199215612da0565b503461000e57600060031936011261000e576020600b54604051908152f35b503461000e57602060031936011261000e57611a1160ff600854610c2e336001600160a01b038360081c1614611cbf565b600435600c55005b503461000e57604060031936011261000e57602060ff611a70611a3a610652565b6001600160a01b03611a4a610668565b9116600052600684526040600020906001600160a01b0316600052602052604060002090565b54166040519015158152f35b503461000e57600060031936011261000e576020600c54604051908152f35b503461000e57602060031936011261000e57611ab5610652565b6001600160a01b03611acf8160085460081c163314611cbf565b811615611adf576106d790611d0a565b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461000e5760008060031936011261061f57611b7b60ff600854610c2e336001600160a01b038360081c1614611cbf565b600e5460ff81166006811015610c6157600591610c57600460ff199314612da0565b503461000e57611bac36610d9f565b611bcb60ff600854610c2e336001600160a01b038360081c1614611cbf565b805167ffffffffffffffff8111611cb2575b611bf181611bec600f54610f6e565b61335c565b602080601f8311600114611c2b57508192600092611c20575b50506000198260011b9260031b1c191617600f55005b015190503880611c0a565b90601f19831693611c5e600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80290565b926000905b868210611c9a5750508360019510611c81575b505050811b01600f55005b015160001960f88460031b161c19169055388080611c76565b80600185968294968601518155019501930190611c63565b611cba6108be565b611bdd565b15611cc657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6008549074ffffffffffffffffffffffffffffffffffffffff008160081b167fffffffffffffffffffffff0000000000000000000000000000000000000000ff8316176008556001600160a01b038091169160081c167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a3565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001906000198114611dc9570190565b611dd1611d89565b0190565b600454811015611e0357611de890612801565b8060005260036020526001600160a01b036040600020541691565b608460405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152fd5b15611e7457565b608460405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152fd5b600454811015611f025760005260056020526001600160a01b036040600020541690565b608460405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b15611f7357565b608460405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152fd5b90612001939291611ff1610a5d8433612077565b611ffc838383612226565b6125cd565b1561200857565b60405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608490fd5b0390fd5b6004548210156120f45761208a82611dd5565b506001600160a01b038083169080831682149485156120dc575b50505082156120b257505090565b60ff9250906107006120d7926001600160a01b03166000526006602052604060002090565b541690565b6120e99192939550611ede565b1614913880806120a4565b608460405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b1561216557565b608460405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152fd5b6001907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8111611dc9570190565b801960301161220d575b60300190565b612215611d89565b612207565b81198111611dc9570190565b9061223083611dd5565b906001600160a01b0392839182861694859116036123eb576123099181169461225a86151561215e565b61226387612455565b61226c876121cf565b6122b56122b18260ff7f8000000000000000000000000000000000000000000000000000000000000000918060081c6000526000602052161c60406000205416151590565b1590565b806123e0575b612380575b50506122d6866000526003602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b8303612339575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051a4565b61237b838060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b612310565b61239b6123d9926122d6836000526003602052604060002090565b8060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b38806122c0565b5060045481106122bb565b608460405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e00000000000000000000000000000000000000006064820152fd5b80600052600560205260406000207fffffffffffffffffffffffff0000000000000000000000000000000000000000815416905560006001600160a01b0361249c83611dd5565b50167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92582604051a4565b81600052600560205261250b816040600020906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61251482611dd5565b50906001600160a01b0380911691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256000604051a4565b9081602091031261000e575161054481610378565b909261054494936080936001600160a01b0380921684521660208301526040820152816060820152019061050e565b506040513d6000823e3d90fd5b3d156125c8573d906125ae82610d3d565b916125bc6040519384610934565b82523d6000602084013e565b606090565b919290803b156127875790929160019081948285935b6125f1575b50505050505090565b6125fe86979895966121cf565b84101561277e576040958651977f150b7a0200000000000000000000000000000000000000000000000000000000998a8a5260209a8b60049b808d898c8c339385019361264a94612561565b0390828160009381856001600160a01b038c165af191928261274f575b50506126f8578c8c8c61267861259d565b805193846126f25761207384845191829162461bcd60e51b8352820160809060208152603560208201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527f31526563656976657220696d706c656d656e746572000000000000000000000060608201520190565b84925001fd5b91939699509194979a506127179396995082612723575b505096611db9565b928095929491956125e3565b7fffffffff0000000000000000000000000000000000000000000000000000000016149050388061270f565b61276f929350803d10612777575b6127678183610934565b81019061254c565b90388e612667565b503d61275d565b849796506125e8565b50505050600190565b1561279757565b608460405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e0000000000000000000000006064820152fd5b60089060ff81831c91168160005260006020526040600020548160ff181c8015156000146128435761283561283b916128e7565b60ff1690565b9003911b1790565b5050600019905b612855811515612790565b0161286a816000526000602052604060002090565b548061287a57506000199061284a565b612835612889612892926128e7565b60ff9081031690565b911b1790565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060209180518210156128da57010190565b6128e2612898565b010190565b6040516128f381610917565b7ffd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f86101008083527e01020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7560208401527f06264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c960408401527f071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee360608401527f0e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf760808401527fff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c860a08401527f16365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f660c08401527ffe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf560e0840152820152811561000e57612a66612a8c917e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff8461054495600003160260f81c906128c8565b517fff000000000000000000000000000000000000000000000000000000000000001690565b60f81c90565b60006004549182811015612aee57600091825b8481108015612ae557612ac1575b612abc90611db9565b612aa5565b92828103612ad157505050905090565b612add612abc91611db9565b939050612ab3565b50509392505050565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f66206260448201527f6f756e64730000000000000000000000000000000000000000000000000000006064820152fd5b60045491600091825b8481108015612bc55780612ba7575b612b83575b612b7e90611db9565b612b61565b92828103612b9357505050905090565b612b9f612b7e91611db9565b939050612b75565b50612bb181611dd5565b506001600160a01b03838116911614612b70565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f60448201527f756e6473000000000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803303612d1e575060ff600e54166006811015610cef576003612c7b9114612da0565b612c8d600460ff19600e541617600e55565b805115612d11575b602081015160045490818181810110612d09575b50600b5581519160015b838110612cc05750505050565b80612cd884612cd2612d0494866135ed565b5161360f565b7f96fbc8859d289018ef51f17ec7c796a5896a94fd214507b20afc26eb2a3d6ffa6000604051a2611db9565b612cb3565b900381612ca9565b612d19612898565b612c95565b604490604051907f1cf993f40000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b15612d5c57565b606460405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b15612da757565b606460405162461bcd60e51b815260206004820152600b60248201527f57726f6e672073746167650000000000000000000000000000000000000000006044820152fd5b15612df257565b608460405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b6004546001600160a01b03821691612e75831515612deb565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe821180612f6a575b600183612ec18280960194856004556122d6836000526003602052604060002090565b612f03818060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b905b612f11575b5050505050565b81612f5d575b82811015612f585780612f52918660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef81604051a4611db9565b83612f05565b612f0a565b612f65611d89565b612f17565b612f72611d89565b612e9e565b9160045491801561305c57612fc16001600160a01b03851694612f9b861515612deb565b612fad612fa8848761221a565b600455565b6122d6856000526003602052604060002090565b613003838060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b825b61300f828561221a565b811015613055579061304d8261300f938760007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef81604051a4611db9565b909150613005565b5050915050565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f74657220300000000000000000000000000000000000000000000000000000006064820152fd5b979690939291600854946130ee60ff6001600160a01b0397610c2e338a8360081c1614611cbf565b60ff600e54166006811015610cef5760036131099114612da0565b67ffffffffffffffff81116132de575b61312881610e46600954610f6e565b6000601f821160011461324b576131d5928260009695936131689360209c9d9e8992613240575b50506000198260011b9260031b1c191617600955600d55565b604051988997889687957f5d3b1d3000000000000000000000000000000000000000000000000000000000875260048701939160809367ffffffffffffffff61ffff929897939860a0880199885216602087015216604085015263ffffffff809216606085015216910152565b03927f0000000000000000000000000000000000000000000000000000000000000000165af18015613233575b6132095750565b6132299060203d811161322c575b6132218183610934565b8101906133cd565b50565b503d613217565b61323b612590565b613202565b01359050388061314f565b60096000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90601f198316815b8181106132c65750836131689360209c9d9e6131d5979460009a9997600195106132ac575b505050811b01600955600d55565b60001960f88560031b161c1991013516905538808061329e565b8d830135845560019093019260209283019201613279565b6132e66108be565b613119565b601f81116132f7575050565b600090600982527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af906020601f850160051c83019410613352575b601f0160051c01915b82811061334757505050565b81815560010161333b565b9092508290613332565b601f8111613368575050565b600090600f82527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802906020601f850160051c830194106133c3575b601f0160051c01915b8281106133b857505050565b8181556001016133ac565b90925082906133a3565b9081602091031261000e575190565b6133eb60ff6008541615612d55565b60ff600e54166006811015610cef5760026134069114612da0565b33600052600a60205260ff604060002054166134b55761347f9161347a91613475600c5491604051602081019061346a816118d833857fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060149260601b1681520190565b5190209336916134f9565b613592565b613547565b6134ac61349f336001600160a01b0316600052600a602052604060002090565b600160ff19825416179055565b610ffc33612e5c565b606460405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152fd5b929161350482610957565b916135126040519384610934565b829481845260208094019160051b810192831161000e57905b8282106135385750505050565b8135815290830190830161352b565b1561354e57565b606460405162461bcd60e51b815260206004820152600f60248201527f4e6f7420616c6c6f776c697374656400000000000000000000000000000000006044820152fd5b929091906000915b84518310156135e5576135ad83866135ed565b51908181116135d0576000526020526135ca604060002092611db9565b9161359a565b906000526020526135ca604060002092611db9565b915092501490565b6020918151811015613602575b60051b010190565b61360a612898565b6135fa565b8115613619570690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6009546000929161365882610f6e565b916001908181169081156136c4575060011461367357505050565b909192935060096000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af906000915b8483106136b1575050500190565b81816020925485870152019201916136a3565b60ff191683525050019150565b90611dd1602092828151948592016104d9565b80156137b157806000908282935b61379d575061370083610d3d565b9261370e6040519485610934565b80845281601f1961371e83610d3d565b013660208701375b6137305750505090565b8060016000199210613790575b0190600a9061377b6137536128358484066121fd565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b841a61378784876128c8565b53049081613726565b613798611d89565b61373d565b926137a9600a91611db9565b9304806136f2565b506040516137be816108ee565b600181527f300000000000000000000000000000000000000000000000000000000000000060208201529056fea26469706673582212202c6ad3d350152e5bf235256238b0c1df161acca0493c1f4cb7308a2843f4944a64736f6c634300080e0033000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000a90a6e212f3140b45b756ca695673fc35719f92700000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f532d7a5434577938427a78524a662d5933536144647745755863665f5a46716b35796a3451764744464c3800

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461036f57806306fdde0314610366578063081812fc1461035d578063095ea7b31461035457806309fcb7af1461034b5780630a0090971461034257806318160ddd146103395780631fe543e31461033057806323b872dd146103275780632a55205a1461031e5780632f745c59146103155780633f4ba83a1461030c57806342842e0e146103035780634614d9e1146102fa578063484b973c146102f15780634f6ccce7146102e857806355f804b3146102df5780635c975abb146102d65780636352211e146102cd5780636c0360eb146102c45780637035bf18146102bb57806370a08231146102b2578063715018a6146102a95780638456cb59146102a05780638c7ea24b146102975780638da5cb5b1461028e57806395d89b411461028557806396f1171e1461027c578063a22cb46514610273578063b77a147b1461026a578063b88d4fde14610261578063c040e6b814610258578063c2ef0b2c1461024f578063c87b56dd14610246578063c884ef831461023d578063ca4fd33a14610234578063d55565441461022b578063dab5f34014610222578063e985e9c514610219578063ebf0c71714610210578063f2fde38b14610207578063f80def30146101fe5763fe2c7fee146101f657600080fd5b61000e611b9d565b5061000e611b49565b5061000e611a9b565b5061000e611a7c565b5061000e611a19565b5061000e6119e0565b5061000e6119c1565b5061000e61196f565b5061000e61192f565b5061000e611823565b5061000e611775565b5061000e61174a565b5061000e6116df565b5061000e611688565b5061000e61159a565b5061000e61157b565b5061000e6114d3565b5061000e6114a8565b5061000e6113a4565b5061000e611335565b5061000e6112b6565b5061000e6111cb565b5061000e611123565b5061000e61107b565b5061000e610f3d565b5061000e610f19565b5061000e610ddb565b5061000e610d1e565b5061000e610c8e565b5061000e610bfc565b5061000e610bb4565b5061000e610b08565b5061000e610ad8565b5061000e610a67565b5061000e610a3d565b5061000e61097e565b5061000e61089f565b5061000e61085a565b5061000e6107dc565b5061000e61067e565b5061000e610622565b5061000e610547565b5061000e6103a2565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602060031936011261000e5760207fffffffff000000000000000000000000000000000000000000000000000000006004356103e381610378565b167f2a55205a00000000000000000000000000000000000000000000000000000000811490811561041a575b506040519015158152f35b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915081156104af575b8115610485575b811561045b575b503861040f565b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610454565b7f780e9d63000000000000000000000000000000000000000000000000000000008114915061044d565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610446565b918091926000905b8282106104f95750116104f2575050565b6000910152565b915080602091830151818601520182916104e1565b90601f19601f60209361052c815180928187528780880191016104d9565b0116010190565b90602061054492818152019061050e565b90565b503461000e5760008060031936011261061f576040519080600180549161056d83610f6e565b808652928281169081156105fe57506001146105a4575b6105a08561059481870382610934565b60405191829182610533565b0390f35b92508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106105e6575050508101602001610594826105a0610584565b805460208587018101919091529093019281016105cb565b60ff19166020870152505060408401925061059491508390506105a0610584565b80fd5b503461000e57602060031936011261000e576020610641600435611ede565b6001600160a01b0360405191168152f35b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57604060031936011261000e57610698610652565b6024356106a481611dd5565b50916001600160a01b038084168091831614610725576106d7936106d29133149081156106d9575b50611e6d565b6124c6565b005b61071f91506107189061070033916001600160a01b03166000526006602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b386106cc565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152fd5b6064359067ffffffffffffffff8216820361000e57565b6084359061ffff8216820361000e57565b60a4359063ffffffff8216820361000e57565b60c4359063ffffffff8216820361000e57565b503461000e5760e060031936011261000e5767ffffffffffffffff60043581811161000e573660238201121561000e57806004013591821161000e57366024838301011161000e576106d79161083061078e565b6108386107a5565b906108416107b6565b9261084a6107c9565b94604435916024803592016130c6565b503461000e57600060031936011261000e5760206040516001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909168152f35b503461000e57600060031936011261000e576020600454604051908152f35b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761090a57604052565b6109126108be565b604052565b610120810190811067ffffffffffffffff82111761090a57604052565b90601f601f19910116810190811067ffffffffffffffff82111761090a57604052565b60209067ffffffffffffffff8111610971575b60051b0190565b6109796108be565b61096a565b503461000e57604060031936011261000e5760243567ffffffffffffffff811161000e573660238201121561000e578060040135906109bc82610957565b906109ca6040519283610934565b82825260209260248484019160051b8301019136831161000e57602401905b8282106109f9576106d784612c2e565b813581529084019084016109e9565b600319606091011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b503461000e576106d7610a4f36610a08565b91610a62610a5d8433612077565b611f6c565b612226565b503461000e57604060031936011261000e57604080516127106020602435610a8e846108ee565b6007549362ffffff6001600160a01b0386169586835260a01c1692839101528060001904821181151516610acb575b845193845202046020820152f35b610ad3611d89565b610abd565b503461000e57604060031936011261000e576020610b00610af7610652565b60243590612b58565b604051908152f35b503461000e57600060031936011261000e57600854610b34336001600160a01b038360081c1614611cbf565b60ff811615610b705760ff19166008557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b606460405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b503461000e576106d7610bc636610a08565b90604051926020840184811067ffffffffffffffff821117610bef575b60405260008452611fdd565b610bf76108be565b610be3565b503461000e5760008060031936011261061f57610c3560ff600854610c2e336001600160a01b038360081c1614611cbf565b1615612d55565b600e5460ff81166006811015610c6157600391610c57600260ff199314612da0565b1617600e55604051f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526021600452fd5b503461000e57604060031936011261000e57610ca8610652565b610cc760ff600854610c2e336001600160a01b038360081c1614611cbf565b60ff600e5416906006821015610cef57610ce660016106d79314612da0565b60243590612f77565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b503461000e57602060031936011261000e576020610b00600435612a92565b601f19601f60209267ffffffffffffffff8111610d5b575b01160190565b610d636108be565b610d55565b929192610d7482610d3d565b91610d826040519384610934565b82948184528183011161000e578281602093846000960137010152565b602060031982011261000e576004359067ffffffffffffffff821161000e578060238301121561000e5781602461054493600401359101610d68565b503461000e57610dea36610d9f565b610e0960ff600854610c2e336001600160a01b038360081c1614611cbf565b60ff600e54166006811015610cef576005610e25911415612da0565b805167ffffffffffffffff8111610f0c575b610e4b81610e46600954610f6e565b6132eb565b602080601f8311600114610e8557508192600092610e7a575b50506000198260011b9260031b1c191617600955005b015190503880610e64565b90601f19831693610eb860096000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90565b926000905b868210610ef45750508360019510610edb575b505050811b01600955005b015160001960f88460031b161c19169055388080610ed0565b80600185968294968601518155019501930190610ebd565b610f146108be565b610e37565b503461000e57600060031936011261000e57602060ff600854166040519015158152f35b503461000e57602060031936011261000e576020610f5c600435611dd5565b506001600160a01b0360405191168152f35b90600182811c92168015610fb7575b6020831014610f8857565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691610f7d565b60405190600082600f5491610fd583610f6e565b8083529260019081811690811561105d5750600114610ffe575b50610ffc92500383610934565b565b600f600090815291507f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8025b8483106110425750610ffc935050810160200138610fef565b81935090816020925483858a01015201910190918592611029565b935050505060ff199150166020830152610ffc826040810138610fef565b503461000e5760008060031936011261061f57604051908060095461109f81610f6e565b808552916001918083169081156105fe57506001146110c8576105a08561059481870382610934565b9250600983527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af5b82841061110b575050508101602001610594826105a0610584565b805460208587018101919091529093019281016110f0565b503461000e5760008060031936011261061f576040519080600f5461114781610f6e565b808552916001918083169081156105fe5750600114611170576105a08561059481870382610934565b9250600f83527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8025b8284106111b3575050508101602001610594826105a0610584565b80546020858701810191909152909301928101611198565b503461000e57602060031936011261000e576001600160a01b03806111ee610652565b16801561124c5760008091600454925b83811080156112415761121a575b61121590611db9565b6111fe565b8461122482611dd5565b5016820361120c579161123961121591611db9565b92905061120c565b604051848152602090f35b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f2061646472657373000000000000000000000000000000000000006064820152fd5b503461000e5760008060031936011261061f576008547fffffffffffffffffffffff0000000000000000000000000000000000000000ff6001600160a01b038260081c1691611306338414611cbf565b1660085581604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b503461000e57600060031936011261000e57600160ff19600854611366336001600160a01b038360081c1614611cbf565b61137360ff821615612d55565b16176008557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b503461000e57604060031936011261000e576113be610652565b602435906008546113e360ff6001600160a01b0392610c2e33858360081c1614611cbf565b610bb88311611464576106d79262ffffff9160405193611402856108ee565b1683521660208201526001600160a01b038151167fffffffffffffffffff000000000000000000000000000000000000000000000076ffffff0000000000000000000000000000000000000000602060075494015160a01b1692161717600755565b606460405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152fd5b503461000e57600060031936011261000e5760206001600160a01b0360085460081c16604051908152f35b503461000e5760008060031936011261061f5760405190806002546114f781610f6e565b808552916001918083169081156105fe5750600114611520576105a08561059481870382610934565b9250600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410611563575050508101602001610594826105a0610584565b80546020858701810191909152909301928101611548565b503461000e57600060031936011261000e576020600d54604051908152f35b503461000e57604060031936011261000e576115b4610652565b602435801515810361000e576001600160a01b038216913383146116445781611600611612923360005260066020526040600020906001600160a01b0316600052602052604060002090565b9060ff60ff1983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152fd5b503461000e57602060031936011261000e5760043567ffffffffffffffff80821161000e573660238301121561000e57816004013590811161000e573660248260051b8401011161000e5760246106d792016133dc565b503461000e57608060031936011261000e576116f9610652565b611701610668565b6064359167ffffffffffffffff831161000e573660238401121561000e576117366106d7933690602481600401359101610d68565b9160443591611fdd565b60061115610cef57565b503461000e57600060031936011261000e5760ff600e54166040516006821015610cef576020918152f35b503461000e57602060031936011261000e576004356117a960ff600854610c2e336001600160a01b038360081c1614611cbf565b60ff600e54166006811015610cef5760016117c49114612da0565b80156117df57600c556106d7600260ff19600e541617600e55565b606460405162461bcd60e51b815260206004820152600c60248201527f496e76616c696420726f6f7400000000000000000000000000000000000000006044820152fd5b503461000e57602060031936011261000e57600435600454808210156118eb576004611851600e5460ff1690565b61185a81611740565b101561186d5750506105a0610594610fc1565b6118e661189461188f6118af9361188a6105a096600b549061221a565b61360f565b6136e4565b6118d86040519384926118a960208501613648565b906136d1565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b03601f198101835282610934565b610594565b606460405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f6573206e6f742065786973740000000000000000000000006044820152fd5b503461000e57602060031936011261000e576001600160a01b03611951610652565b16600052600a602052602060ff604060002054166040519015158152f35b503461000e5760008060031936011261061f576119a160ff600854610c2e336001600160a01b038360081c1614611cbf565b600e5460ff81166006811015610c6157600191610c5760ff199215612da0565b503461000e57600060031936011261000e576020600b54604051908152f35b503461000e57602060031936011261000e57611a1160ff600854610c2e336001600160a01b038360081c1614611cbf565b600435600c55005b503461000e57604060031936011261000e57602060ff611a70611a3a610652565b6001600160a01b03611a4a610668565b9116600052600684526040600020906001600160a01b0316600052602052604060002090565b54166040519015158152f35b503461000e57600060031936011261000e576020600c54604051908152f35b503461000e57602060031936011261000e57611ab5610652565b6001600160a01b03611acf8160085460081c163314611cbf565b811615611adf576106d790611d0a565b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461000e5760008060031936011261061f57611b7b60ff600854610c2e336001600160a01b038360081c1614611cbf565b600e5460ff81166006811015610c6157600591610c57600460ff199314612da0565b503461000e57611bac36610d9f565b611bcb60ff600854610c2e336001600160a01b038360081c1614611cbf565b805167ffffffffffffffff8111611cb2575b611bf181611bec600f54610f6e565b61335c565b602080601f8311600114611c2b57508192600092611c20575b50506000198260011b9260031b1c191617600f55005b015190503880611c0a565b90601f19831693611c5e600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80290565b926000905b868210611c9a5750508360019510611c81575b505050811b01600f55005b015160001960f88460031b161c19169055388080611c76565b80600185968294968601518155019501930190611c63565b611cba6108be565b611bdd565b15611cc657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6008549074ffffffffffffffffffffffffffffffffffffffff008160081b167fffffffffffffffffffffff0000000000000000000000000000000000000000ff8316176008556001600160a01b038091169160081c167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a3565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001906000198114611dc9570190565b611dd1611d89565b0190565b600454811015611e0357611de890612801565b8060005260036020526001600160a01b036040600020541691565b608460405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152fd5b15611e7457565b608460405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152fd5b600454811015611f025760005260056020526001600160a01b036040600020541690565b608460405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b15611f7357565b608460405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152fd5b90612001939291611ff1610a5d8433612077565b611ffc838383612226565b6125cd565b1561200857565b60405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608490fd5b0390fd5b6004548210156120f45761208a82611dd5565b506001600160a01b038083169080831682149485156120dc575b50505082156120b257505090565b60ff9250906107006120d7926001600160a01b03166000526006602052604060002090565b541690565b6120e99192939550611ede565b1614913880806120a4565b608460405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b1561216557565b608460405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152fd5b6001907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8111611dc9570190565b801960301161220d575b60300190565b612215611d89565b612207565b81198111611dc9570190565b9061223083611dd5565b906001600160a01b0392839182861694859116036123eb576123099181169461225a86151561215e565b61226387612455565b61226c876121cf565b6122b56122b18260ff7f8000000000000000000000000000000000000000000000000000000000000000918060081c6000526000602052161c60406000205416151590565b1590565b806123e0575b612380575b50506122d6866000526003602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b8303612339575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051a4565b61237b838060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b612310565b61239b6123d9926122d6836000526003602052604060002090565b8060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b38806122c0565b5060045481106122bb565b608460405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e00000000000000000000000000000000000000006064820152fd5b80600052600560205260406000207fffffffffffffffffffffffff0000000000000000000000000000000000000000815416905560006001600160a01b0361249c83611dd5565b50167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92582604051a4565b81600052600560205261250b816040600020906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61251482611dd5565b50906001600160a01b0380911691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256000604051a4565b9081602091031261000e575161054481610378565b909261054494936080936001600160a01b0380921684521660208301526040820152816060820152019061050e565b506040513d6000823e3d90fd5b3d156125c8573d906125ae82610d3d565b916125bc6040519384610934565b82523d6000602084013e565b606090565b919290803b156127875790929160019081948285935b6125f1575b50505050505090565b6125fe86979895966121cf565b84101561277e576040958651977f150b7a0200000000000000000000000000000000000000000000000000000000998a8a5260209a8b60049b808d898c8c339385019361264a94612561565b0390828160009381856001600160a01b038c165af191928261274f575b50506126f8578c8c8c61267861259d565b805193846126f25761207384845191829162461bcd60e51b8352820160809060208152603560208201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527f31526563656976657220696d706c656d656e746572000000000000000000000060608201520190565b84925001fd5b91939699509194979a506127179396995082612723575b505096611db9565b928095929491956125e3565b7fffffffff0000000000000000000000000000000000000000000000000000000016149050388061270f565b61276f929350803d10612777575b6127678183610934565b81019061254c565b90388e612667565b503d61275d565b849796506125e8565b50505050600190565b1561279757565b608460405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e0000000000000000000000006064820152fd5b60089060ff81831c91168160005260006020526040600020548160ff181c8015156000146128435761283561283b916128e7565b60ff1690565b9003911b1790565b5050600019905b612855811515612790565b0161286a816000526000602052604060002090565b548061287a57506000199061284a565b612835612889612892926128e7565b60ff9081031690565b911b1790565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060209180518210156128da57010190565b6128e2612898565b010190565b6040516128f381610917565b7ffd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f86101008083527e01020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7560208401527f06264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c960408401527f071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee360608401527f0e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf760808401527fff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c860a08401527f16365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f660c08401527ffe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf560e0840152820152811561000e57612a66612a8c917e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff8461054495600003160260f81c906128c8565b517fff000000000000000000000000000000000000000000000000000000000000001690565b60f81c90565b60006004549182811015612aee57600091825b8481108015612ae557612ac1575b612abc90611db9565b612aa5565b92828103612ad157505050905090565b612add612abc91611db9565b939050612ab3565b50509392505050565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f66206260448201527f6f756e64730000000000000000000000000000000000000000000000000000006064820152fd5b60045491600091825b8481108015612bc55780612ba7575b612b83575b612b7e90611db9565b612b61565b92828103612b9357505050905090565b612b9f612b7e91611db9565b939050612b75565b50612bb181611dd5565b506001600160a01b03838116911614612b70565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f60448201527f756e6473000000000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916803303612d1e575060ff600e54166006811015610cef576003612c7b9114612da0565b612c8d600460ff19600e541617600e55565b805115612d11575b602081015160045490818181810110612d09575b50600b5581519160015b838110612cc05750505050565b80612cd884612cd2612d0494866135ed565b5161360f565b7f96fbc8859d289018ef51f17ec7c796a5896a94fd214507b20afc26eb2a3d6ffa6000604051a2611db9565b612cb3565b900381612ca9565b612d19612898565b612c95565b604490604051907f1cf993f40000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b15612d5c57565b606460405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b15612da757565b606460405162461bcd60e51b815260206004820152600b60248201527f57726f6e672073746167650000000000000000000000000000000000000000006044820152fd5b15612df257565b608460405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b6004546001600160a01b03821691612e75831515612deb565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe821180612f6a575b600183612ec18280960194856004556122d6836000526003602052604060002090565b612f03818060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b905b612f11575b5050505050565b81612f5d575b82811015612f585780612f52918660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef81604051a4611db9565b83612f05565b612f0a565b612f65611d89565b612f17565b612f72611d89565b612e9e565b9160045491801561305c57612fc16001600160a01b03851694612f9b861515612deb565b612fad612fa8848761221a565b600455565b6122d6856000526003602052604060002090565b613003838060081c60005260006020527f800000000000000000000000000000000000000000000000000000000000000060ff604060002092161c8154179055565b825b61300f828561221a565b811015613055579061304d8261300f938760007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef81604051a4611db9565b909150613005565b5050915050565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f74657220300000000000000000000000000000000000000000000000000000006064820152fd5b979690939291600854946130ee60ff6001600160a01b0397610c2e338a8360081c1614611cbf565b60ff600e54166006811015610cef5760036131099114612da0565b67ffffffffffffffff81116132de575b61312881610e46600954610f6e565b6000601f821160011461324b576131d5928260009695936131689360209c9d9e8992613240575b50506000198260011b9260031b1c191617600955600d55565b604051988997889687957f5d3b1d3000000000000000000000000000000000000000000000000000000000875260048701939160809367ffffffffffffffff61ffff929897939860a0880199885216602087015216604085015263ffffffff809216606085015216910152565b03927f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909165af18015613233575b6132095750565b6132299060203d811161322c575b6132218183610934565b8101906133cd565b50565b503d613217565b61323b612590565b613202565b01359050388061314f565b60096000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90601f198316815b8181106132c65750836131689360209c9d9e6131d5979460009a9997600195106132ac575b505050811b01600955600d55565b60001960f88560031b161c1991013516905538808061329e565b8d830135845560019093019260209283019201613279565b6132e66108be565b613119565b601f81116132f7575050565b600090600982527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af906020601f850160051c83019410613352575b601f0160051c01915b82811061334757505050565b81815560010161333b565b9092508290613332565b601f8111613368575050565b600090600f82527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802906020601f850160051c830194106133c3575b601f0160051c01915b8281106133b857505050565b8181556001016133ac565b90925082906133a3565b9081602091031261000e575190565b6133eb60ff6008541615612d55565b60ff600e54166006811015610cef5760026134069114612da0565b33600052600a60205260ff604060002054166134b55761347f9161347a91613475600c5491604051602081019061346a816118d833857fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060149260601b1681520190565b5190209336916134f9565b613592565b613547565b6134ac61349f336001600160a01b0316600052600a602052604060002090565b600160ff19825416179055565b610ffc33612e5c565b606460405162461bcd60e51b815260206004820152600f60248201527f416c726561647920636c61696d656400000000000000000000000000000000006044820152fd5b929161350482610957565b916135126040519384610934565b829481845260208094019160051b810192831161000e57905b8282106135385750505050565b8135815290830190830161352b565b1561354e57565b606460405162461bcd60e51b815260206004820152600f60248201527f4e6f7420616c6c6f776c697374656400000000000000000000000000000000006044820152fd5b929091906000915b84518310156135e5576135ad83866135ed565b51908181116135d0576000526020526135ca604060002092611db9565b9161359a565b906000526020526135ca604060002092611db9565b915092501490565b6020918151811015613602575b60051b010190565b61360a612898565b6135fa565b8115613619570690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6009546000929161365882610f6e565b916001908181169081156136c4575060011461367357505050565b909192935060096000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af906000915b8483106136b1575050500190565b81816020925485870152019201916136a3565b60ff191683525050019150565b90611dd1602092828151948592016104d9565b80156137b157806000908282935b61379d575061370083610d3d565b9261370e6040519485610934565b80845281601f1961371e83610d3d565b013660208701375b6137305750505090565b8060016000199210613790575b0190600a9061377b6137536128358484066121fd565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b841a61378784876128c8565b53049081613726565b613798611d89565b61373d565b926137a9600a91611db9565b9304806136f2565b506040516137be816108ee565b600181527f300000000000000000000000000000000000000000000000000000000000000060208201529056fea26469706673582212202c6ad3d350152e5bf235256238b0c1df161acca0493c1f4cb7308a2843f4944a64736f6c634300080e0033

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

000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000a90a6e212f3140b45b756ca695673fc35719f92700000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f532d7a5434577938427a78524a662d5933536144647745755863665f5a46716b35796a3451764744464c3800

-----Decoded View---------------
Arg [0] : _coordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [1] : royaltyReceiver (address): 0xA90A6e212f3140B45B756ca695673fc35719f927
Arg [2] : royaltyAmount (uint256): 500
Arg [3] : _unrevealedURI (string): https://arweave.net/S-zT4Wy8BzxRJf-Y3SaDdwEuXcf_ZFqk5yj4QvGDFL8

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [1] : 000000000000000000000000a90a6e212f3140b45b756ca695673fc35719f927
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 000000000000000000000000000000000000000000000000000000000000003f
Arg [5] : 68747470733a2f2f617277656176652e6e65742f532d7a5434577938427a7852
Arg [6] : 4a662d5933536144647745755863665f5a46716b35796a3451764744464c3800


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.