ETH Price: $3,031.02 (+3.92%)
 

Overview

Max Total Supply

4,287 MGHT

Holders

1,134

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 MGHT
0x0Ef6A10Ed240413f1aD8B14906fD5c530Cd60144
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:
MightyLlamaGenesis

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : MightyLlamaGenesis.sol
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.7;

import "erc721psi/contracts/extension/ERC721PsiAddressData.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract MightyLlamaGenesis is ERC721PsiAddressData , Ownable, VRFConsumerBaseV2 {

    VRFCoordinatorV2Interface COORDINATOR;
    LinkTokenInterface LINK;

    bytes32 private s_keyHash;
    uint64 private s_subscriptionId;
    address private vrfCoordinator;
    address private linkAddress;
    uint32 private callbackGasLimit = 200000;
    uint16 private requestConfirmations = 3;      
    uint32 private numWords =  1;
    string[] private unrevealedURIs;
    bool revealed = false;
    uint256 private cost;
    string private baseURI;
    uint256 private MAX_TOTAL_SUPPLY = 5000;
    address private contractAddress;
	uint32 private wLMaxMintAmount = 3;
	uint32 private ogMaxMintAmount = 5;
    uint32 private defaultMaxMintAmount = 2;
    string public baseExtension = '.json';
    bool public isPaused = true;
    bool public isPublicMint = false;
    bool public isWL = false;
    uint256 private lastTimeRaffleCalled;
    uint256 private interval = 1210000;
    uint256 private randomWinnerCount = 0;

    mapping(uint256 => uint256) private randomWinnerMap;
    mapping(uint256 => uint256) private reqeustIdsMap;
    mapping(uint256 => uint256) private randomTokenWinner;
    mapping(address => uint32) private whitelisted;
    mapping(address => uint256) private nftClaimed;

    constructor(address _linkAddress, address _vrfCoordinator, bytes32 _vrfKeyHash, uint64 _vrfSubscriptionId)
        VRFConsumerBaseV2 (_vrfCoordinator)
        ERC721Psi("Mighty Llama Genesis", "MGHT")
        {
            COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator);
            LINK = LinkTokenInterface(_linkAddress); 
            linkAddress = _linkAddress;
            s_subscriptionId = _vrfSubscriptionId;
            s_keyHash = _vrfKeyHash;
            lastTimeRaffleCalled = block.timestamp;
        }

    event NFTCreated(
        uint256 indexed tokenIdBatchHead,
        uint256 _quantity,
        address indexed nftContractAddress,
        address indexed creator
    );

    event RandomWinnerAnnounced(
        uint256 indexed tokenId,
        uint256 indexed requestId
    );

    modifier canRequestRandomWords() {
         require((block.timestamp - lastTimeRaffleCalled) > interval, "It can't be done now, you need to wait");
        _;
    }

	modifier totalSupplyExceed(uint256 _quantity) {
        require((_quantity + totalSupply()) <= MAX_TOTAL_SUPPLY, "No more Mighty Llama left to Mint");
        _;
    }

	modifier maxMintAmountExceed(uint256 _quantity) {
        uint256 maxMint = getAddressMaxMint(_msgSender());
         require(_quantity > 0, "number of mint needs to be greater than zero");
        require(maxMint > 0 || _isOwner(), "you are not allowed to mint yet, please try later");
        if (maxMint == wLMaxMintAmount && !isWL && !_isOwner()) {
            revert("Mint still not open for WL!");
        }
        if (maxMint == defaultMaxMintAmount && !isPublicMint && !_isOwner()) {
            revert("Mint still not open for public!");
        }        
        require((nftClaimed[_msgSender()] + _quantity) <= maxMint || _isOwner(), "You are claiming more than address limit");
        _;
    }

    function _isOwner() internal view returns (bool) {
         return  _msgSender() == owner();
    }

    function contractState(bool _isPaused) public onlyOwner {
        isPaused = _isPaused;
    }

    function setWhiteListState(bool _isWL) public onlyOwner {
        isWL = _isWL;
    }
    
    function _createNft(address _to, uint256 _quantity) internal {
        require(      
            totalSupply() + _quantity <= MAX_TOTAL_SUPPLY,
            'there is not enough token left to mint in this collection'
        );

        uint256 tokenIdBatchHead = totalSupply();
        _safeMint(_to, _quantity);
        nftClaimed[_msgSender()] += _quantity;
        emit NFTCreated(tokenIdBatchHead, _quantity, contractAddress, _to);
    }

    function mint(uint256 _quantity) external payable totalSupplyExceed(_quantity) maxMintAmountExceed(_quantity) {
            require(
                !isPaused || _isOwner(),
                'Minting not started yet, please try later'
            );
            
            _createNft(msg.sender, _quantity);
    }

    function airDrop(address _to, uint256 _quantity) public onlyOwner totalSupplyExceed(_quantity) {
        // owner can mint and send NFT to any address they want
        _createNft(_to, _quantity);
    }

	function bulkAirDrop(address[] memory _addresses) public onlyOwner totalSupplyExceed(_addresses.length) {
        // owner can mint and send NFT to any address they want
		 for (uint256 i = 0; i < _addresses.length; i++) {
            _createNft(_addresses[i], 1);
		 }
    }

    function addWhitelist(address[] memory _addresses) public onlyOwner {
        require(_addresses.length > 0, "addresss are in wrong format");
        for (uint i=0; i < _addresses.length; i++) {
           whitelisted[_addresses[i]] = wLMaxMintAmount;
        }
    }

    function addOGWhitelist(address[] memory _addresses) public onlyOwner{
		require(_addresses.length > 0, "addresss are in wrong format");
        for (uint i=0; i < _addresses.length; i++) {
            whitelisted[_addresses[i]] = ogMaxMintAmount;
        }
    } 

    function getAddressMaxMint(address _address) public view returns (uint32) {
      if(whitelisted[_address] > 0)  {
          // OG or WL
          return whitelisted[_address];
      }
      return defaultMaxMintAmount;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(
            _exists(tokenId),
            'ERC721Metadata: URI query for nonexistent token'
        );

        if (revealed == false) {
            if(tokenId % 100 == 0) {
               return unrevealedURIs[2];
            }
            if(tokenId % 20 == 0) {
               return unrevealedURIs[1];
            }
            return unrevealedURIs[0];    
        }

        string memory currentBaseURI = _baseURI();
        return
            bytes(currentBaseURI).length > 0
                ? string(
                    abi.encodePacked(
                        currentBaseURI,
                        Strings.toString(tokenId),
                        baseExtension
                    )
                )
                : '';
    }

    // Random TokenID Winner selector with ChainLink Rnadomness VRF
    function requestRandomWords() external canRequestRandomWords {
        uint256 s_requestId = COORDINATOR.requestRandomWords(
            s_keyHash,
            s_subscriptionId,
            requestConfirmations,
            callbackGasLimit,
            numWords
        );
        randomWinnerCount ++;
        reqeustIdsMap[randomWinnerCount] = s_requestId;
        lastTimeRaffleCalled = block.timestamp;
    }

    // on Randomness fullfilment select a random tokenId and save it in randomTokenWinner
    function fulfillRandomWords(
        uint256,
        uint256[] memory randomWords
    ) internal override {
        uint256 value = (randomWords[0] % totalSupply()) + 1;
        randomTokenWinner[randomWinnerCount] = value;
        emit RandomWinnerAnnounced(value, reqeustIdsMap[randomWinnerCount]);
    }

     function reveal(bool _revealed) public onlyOwner {
        revealed = _revealed;
    }

    function setPublicMintState(bool _isPublic) public onlyOwner {
        isPublicMint = _isPublic;
    }

    function getPublicMintState() public view returns(bool) {
        return isPublicMint;
    }

    function setCost(uint256 _newCost) public onlyOwner {
        cost = _newCost;
    }

    function setMaxDefaultMintAmount(uint32 _newmaxMintAmount) public onlyOwner {
        defaultMaxMintAmount = _newmaxMintAmount;
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseURI = _newBaseURI;
    }

    function setBaseExtension(string memory _newBaseExtension)
        public
        onlyOwner
    {
        baseExtension = _newBaseExtension;
    }

    function getLinkBalance() view public returns (uint256)  {
        return LINK.balanceOf(address(this));
    }

    function getLatestRandomWinner() view public returns (uint256) {
        return  randomTokenWinner[randomWinnerCount];
    }

    function getRandomWinner(uint _randomWinnerCount) view public returns (uint256) {
        return  randomTokenWinner[_randomWinnerCount];
    }

    function getRandomWinnerCount() view public returns (uint256) {
        return  randomWinnerCount;
    }

    function setupChainLinkVRF(uint64 _s_subscriptionId, uint32 _callbackGasLimit, address _linkAddress, bytes32 _s_keyHash) public onlyOwner {
        s_subscriptionId = _s_subscriptionId;
        s_keyHash =  _s_keyHash;
        linkAddress = _linkAddress;
        callbackGasLimit = _callbackGasLimit;
    }

    function getSubscriptionId() public view returns (uint64){
       return s_subscriptionId;
    }

    function setInterval(uint64 _interval) public onlyOwner {
        interval = _interval;
    }

    function getInterval() public view returns (uint){
       return interval;
    }

    function setUnrevealedURIsl(string[] memory _unrevealedURIs) public onlyOwner {
        unrevealedURIs = _unrevealedURIs;
    }

    function getUnrevealedURIs() public view onlyOwner returns (string[] memory){
       return unrevealedURIs;
    }

    function withdrawLINK(address to, uint256 value) public onlyOwner {
        require(LINK.transfer(to, value), 'Not enough LINK');
    }

    function setMaxsupply(uint256 value) public onlyOwner {
        MAX_TOTAL_SUPPLY = value;
    } 

    function withdraw() public payable onlyOwner {
        (bool success, ) = payable(msg.sender).call{
        value: address(this).balance
        }("");
        require(success);
    }

}

File 2 of 19 : ERC721PsiAddressData.sol
// SPDX-License-Identifier: MIT
/**
  ______ _____   _____ ______ ___  __ _  _  _ 
 |  ____|  __ \ / ____|____  |__ \/_ | || || |
 | |__  | |__) | |        / /   ) || | \| |/ |
 |  __| |  _  /| |       / /   / / | |\_   _/ 
 | |____| | \ \| |____  / /   / /_ | |  | |   
 |______|_|  \_\\_____|/_/   |____||_|  |_|   
                                              
                                            
 */
pragma solidity ^0.8.0;

import "solidity-bits/contracts/BitMaps.sol";
import "../ERC721Psi.sol";


/**
    @dev This extension follows the AddressData format of ERC721A, so
    it can be a dropped-in replacement for the contract that requires AddressData
*/ 
abstract contract ERC721PsiAddressData is ERC721Psi {
    // Mapping owner address to address data
    mapping(address => AddressData) _addressData;

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }


    /**
     * @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");
        return uint256(_addressData[owner].balance);   
    }

    /**
     * @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 override virtual {
        require(quantity < 2 ** 64);
        uint64 _quantity = uint64(quantity);

        if(from != address(0)){
            _addressData[from].balance -= _quantity;
        } else {
            // Mint
            _addressData[to].numberMinted += _quantity;
        }

        if(to != address(0)){
            _addressData[to].balance += _quantity;
        } else {
            // Burn
            _addressData[from].numberBurned += _quantity;
        }
        super._afterTokenTransfers(from, to, startTokenId, quantity);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 19 : 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 5 of 19 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @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 6 of 19 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 8 of 19 : 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);
    uint256 private constant MASK_FULL = type(uint256).max;

    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 Consecutively sets `amount` of bits starting from the bit at `startIndex`.
     */    
    function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal {
        uint256 bucket = startIndex >> 8;

        uint256 bucketStartIndex = (startIndex & 0xff);

        unchecked {
            if(bucketStartIndex + amount < 256) {
                bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex;
            } else {
                bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex;
                amount -= (256 - bucketStartIndex);
                bucket++;

                while(amount > 256) {
                    bitmap._data[bucket] = MASK_FULL;
                    amount -= 256;
                    bucket++;
                }

                bitmap._data[bucket] |= MASK_FULL << (256 - amount);
            }
        }
    }


    /**
     * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`.
     */    
    function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal {
        uint256 bucket = startIndex >> 8;

        uint256 bucketStartIndex = (startIndex & 0xff);

        unchecked {
            if(bucketStartIndex + amount < 256) {
                bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex);
            } else {
                bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex);
                amount -= (256 - bucketStartIndex);
                bucket++;

                while(amount > 256) {
                    bitmap._data[bucket] = 0;
                    amount -= 256;
                    bucket++;
                }

                bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount));
            }
        }
    }


    /**
     * @dev Find the closest index of the set bit before `index`.
     */
    function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) {
        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 {
                setBitIndex = (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 {
                        setBitIndex = (bucket << 8) | (255 -  bb.bitScanForward256());
                        break;
                    }
                } 
            }
        }
    }

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

File 9 of 19 : 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 "solidity-bits/contracts/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, ) = _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 tokenId) {
        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 10 of 19 : 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 >> 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 11 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 16 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_linkAddress","type":"address"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"_vrfKeyHash","type":"bytes32"},{"internalType":"uint64","name":"_vrfSubscriptionId","type":"uint64"}],"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":"uint256","name":"tokenIdBatchHead","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":true,"internalType":"address","name":"nftContractAddress","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"NFTCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"RandomWinnerAnnounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addOGWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"bulkAirDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"contractState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getAddressMaxMint","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestRandomWinner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPublicMintState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_randomWinnerCount","type":"uint256"}],"name":"getRandomWinner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomWinnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSubscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnrevealedURIs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"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":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWL","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[],"name":"requestRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_revealed","type":"bool"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_interval","type":"uint64"}],"name":"setInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_newmaxMintAmount","type":"uint32"}],"name":"setMaxDefaultMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMaxsupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPublic","type":"bool"}],"name":"setPublicMintState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"_unrevealedURIs","type":"string[]"}],"name":"setUnrevealedURIsl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isWL","type":"bool"}],"name":"setWhiteListState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_s_subscriptionId","type":"uint64"},{"internalType":"uint32","name":"_callbackGasLimit","type":"uint32"},{"internalType":"address","name":"_linkAddress","type":"address"},{"internalType":"bytes32","name":"_s_keyHash","type":"bytes32"}],"name":"setupChainLinkVRF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","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":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"withdrawLINK","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600d8054600160a01b600160f01b0319166504000c000c3560a61b179055600f805460ff19169055611388601255601380546001600160a01b03167c020000000500000003000000000000000000000000000000000000000017905560e0604052600560a081905264173539b7b760d91b60c090815262000084916014919062000234565b506015805462ffffff19166001179055621276906017556000601855348015620000ad57600080fd5b5060405162003fde38038062003fde833981016040819052620000d091620002f7565b604080518082018252601481527f4d6967687479204c6c616d612047656e657369730000000000000000000000006020808301918252835180850190945260048452631351d21560e21b90840152815186939162000132916001919062000234565b5080516200014890600290602084019062000234565b505050620001656200015f620001de60201b60201c565b620001e2565b60601b6001600160601b031916608052600980546001600160a01b03199081166001600160a01b0395861617909155600a8054821695909416948517909355600d8054909316909317909155600c80546001600160401b0319166001600160401b0390931692909217909155600b554260165562000396565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002429062000359565b90600052602060002090601f016020900481019282620002665760008555620002b1565b82601f106200028157805160ff1916838001178555620002b1565b82800160010185558215620002b1579182015b82811115620002b157825182559160200191906001019062000294565b50620002bf929150620002c3565b5090565b5b80821115620002bf5760008155600101620002c4565b80516001600160a01b0381168114620002f257600080fd5b919050565b600080600080608085870312156200030e57600080fd5b6200031985620002da565b93506200032960208601620002da565b6040860151606087015191945092506001600160401b03811681146200034e57600080fd5b939692955090935050565b600181811c908216806200036e57607f821691505b602082108114156200039057634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c613c22620003bc60003960008181610d980152610dda0152613c226000f3fe60806040526004361061031a5760003560e01c8063879fbedf116101ab578063c6682862116100f7578063de3d9fb711610095578063e739b6861161006f578063e739b6861461091d578063e985e9c514610941578063edac985b1461098a578063f2fde38b146109aa57600080fd5b8063de3d9fb7146108c0578063deb33342146108e8578063e0c862891461090857600080fd5b8063d1dbcc3d116100d1578063d1dbcc3d1461083e578063d94220fa1461085e578063da3ef23f1461088b578063dbed9f36146108ab57600080fd5b8063c6682862146107e9578063c87b56dd146107fe578063cd2e36721461081e57600080fd5b8063983fbab211610164578063b187bd261161013e578063b187bd2614610772578063b3e5e0de1461078c578063b88d4fde146107ac578063c06af3f0146107cc57600080fd5b8063983fbab21461071f578063a0712d681461073f578063a22cb4651461075257600080fd5b8063879fbedf146106775780638da5cb5b146106975780638dcd73b4146106b557806391ad27b4146106d5578063940cd05b146106ea57806395d89b411461070a57600080fd5b80633057931f1161026a57806350c5f9751161022357806359770db2116101fd57806359770db2146106025780636352211e1461062257806370a0823114610642578063715018a61461066257600080fd5b806350c5f975146105ad57806352b49210146105c257806355f804b3146105e257600080fd5b80633057931f146105045780633ccfd60b1461052357806342842e0e1461052b57806344a0d68a1461054b578063452daf4c1461056b5780634f6ccce71461058d57600080fd5b80630e3cf317116102d75780631fe543e3116102b15780631fe543e31461046f57806323b872dd1461048f5780632f613af7146104af5780632f745c59146104e457600080fd5b80630e3cf31714610410578063149835a01461043057806318160ddd1461045057600080fd5b806301ffc9a71461031f578063045f78501461035457806306fdde0314610376578063081812fc1461039857806309305a94146103d0578063095ea7b3146103f0575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461346c565b6109ca565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b5061037461036f3660046132ae565b610a37565b005b34801561038257600080fd5b5061038b610aae565b60405161034b91906137bf565b3480156103a457600080fd5b506103b86103b33660046134da565b610b40565b6040516001600160a01b03909116815260200161034b565b3480156103dc57600080fd5b506103746103eb366004613432565b610bcd565b3480156103fc57600080fd5b5061037461040b3660046132ae565b610c0a565b34801561041c57600080fd5b5061037461042b36600461337b565b610d1d565b34801561043c57600080fd5b5061037461044b3660046134da565b610d5e565b34801561045c57600080fd5b506004545b60405190815260200161034b565b34801561047b57600080fd5b5061037461048a36600461350c565b610d8d565b34801561049b57600080fd5b506103746104aa3660046131c0565b610e11565b3480156104bb57600080fd5b506104cf6104ca366004613172565b610e42565b60405163ffffffff909116815260200161034b565b3480156104f057600080fd5b506104616104ff3660046132ae565b610e9d565b34801561051057600080fd5b5060155461033f90610100900460ff1681565b610374610f68565b34801561053757600080fd5b506103746105463660046131c0565b610fea565b34801561055757600080fd5b506103746105663660046134da565b611005565b34801561057757600080fd5b50610580611034565b60405161034b919061375d565b34801561059957600080fd5b506104616105a83660046134da565b611138565b3480156105b957600080fd5b506104616111f3565b3480156105ce57600080fd5b506103746105dd3660046132d8565b611274565b3480156105ee57600080fd5b506103746105fd3660046134a6565b611310565b34801561060e57600080fd5b5061037461061d3660046135ca565b61134d565b34801561062e57600080fd5b506103b861063d3660046134da565b611385565b34801561064e57600080fd5b5061046161065d366004613172565b611399565b34801561066e57600080fd5b5061037461142c565b34801561068357600080fd5b50610374610692366004613432565b611462565b3480156106a357600080fd5b506008546001600160a01b03166103b8565b3480156106c157600080fd5b506103746106d03660046132d8565b6114a6565b3480156106e157600080fd5b50601754610461565b3480156106f657600080fd5b50610374610705366004613432565b6115af565b34801561071657600080fd5b5061038b6115ec565b34801561072b57600080fd5b5061037461073a3660046132ae565b6115fb565b61037461074d3660046134da565b6116e9565b34801561075e57600080fd5b5061037461076d366004613277565b611a25565b34801561077e57600080fd5b5060155461033f9060ff1681565b34801561079857600080fd5b506103746107a7366004613432565b611aea565b3480156107b857600080fd5b506103746107c73660046131fc565b611b30565b3480156107d857600080fd5b50601554610100900460ff1661033f565b3480156107f557600080fd5b5061038b611b62565b34801561080a57600080fd5b5061038b6108193660046134da565b611bf0565b34801561082a57600080fd5b506103746108393660046135e5565b611dbe565b34801561084a57600080fd5b506103746108593660046135af565b611e43565b34801561086a57600080fd5b506104616108793660046134da565b6000908152601b602052604090205490565b34801561089757600080fd5b506103746108a63660046134a6565b611e92565b3480156108b757600080fd5b50601854610461565b3480156108cc57600080fd5b50600c546040516001600160401b03909116815260200161034b565b3480156108f457600080fd5b5060155461033f9062010000900460ff1681565b34801561091457600080fd5b50610374611ecf565b34801561092957600080fd5b506018546000908152601b6020526040902054610461565b34801561094d57600080fd5b5061033f61095c36600461318d565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561099657600080fd5b506103746109a53660046132d8565b612034565b3480156109b657600080fd5b506103746109c5366004613172565b61213d565b60006001600160e01b031982166380ac58cd60e01b14806109fb57506001600160e01b03198216635b5e139f60e01b145b80610a1657506001600160e01b0319821663780e9d6360e01b145b80610a3157506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b8152600401610a6190613827565b60405180910390fd5b80601254610a7760045490565b610a819083613944565b1115610a9f5760405162461bcd60e51b8152600401610a61906138b0565b610aa983836121d5565b505050565b606060018054610abd90613a06565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae990613a06565b8015610b365780601f10610b0b57610100808354040283529160200191610b36565b820191906000526020600020905b815481529060010190602001808311610b1957829003601f168201915b5050505050905090565b6000610b4d826004541190565b610bb15760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a61565b506000908152600560205260409020546001600160a01b031690565b6008546001600160a01b03163314610bf75760405162461bcd60e51b8152600401610a6190613827565b6015805460ff1916911515919091179055565b6000610c1582611385565b9050806001600160a01b0316836001600160a01b03161415610c855760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610a61565b336001600160a01b0382161480610ca15750610ca1813361095c565b610d135760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610a61565b610aa983836122e6565b6008546001600160a01b03163314610d475760405162461bcd60e51b8152600401610a6190613827565b8051610d5a90600e906020840190612f6b565b5050565b6008546001600160a01b03163314610d885760405162461bcd60e51b8152600401610a6190613827565b601255565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610e075760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610a61565b610d5a8282612354565b610e1b33826123e4565b610e375760405162461bcd60e51b8152600401610a619061385c565b610aa98383836124d3565b6001600160a01b0381166000908152601c602052604081205463ffffffff1615610e8857506001600160a01b03166000908152601c602052604090205463ffffffff1690565b5050601354600160e01b900463ffffffff1690565b60008060005b600454811015610f1357610eb8816004541190565b8015610edd5750610ec881611385565b6001600160a01b0316856001600160a01b0316145b15610f015783821415610ef3579150610a319050565b81610efd81613a41565b9250505b80610f0b81613a41565b915050610ea3565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610a61565b6008546001600160a01b03163314610f925760405162461bcd60e51b8152600401610a6190613827565b604051600090339047908381818185875af1925050503d8060008114610fd4576040519150601f19603f3d011682016040523d82523d6000602084013e610fd9565b606091505b5050905080610fe757600080fd5b50565b610aa983838360405180602001604052806000815250611b30565b6008546001600160a01b0316331461102f5760405162461bcd60e51b8152600401610a6190613827565b601055565b6008546060906001600160a01b031633146110615760405162461bcd60e51b8152600401610a6190613827565b600e805480602002602001604051908101604052809291908181526020016000905b8282101561112f5783829060005260206000200180546110a290613a06565b80601f01602080910402602001604051908101604052809291908181526020018280546110ce90613a06565b801561111b5780601f106110f05761010080835404028352916020019161111b565b820191906000526020600020905b8154815290600101906020018083116110fe57829003601f168201915b505050505081526020019060010190611083565b50505050905090565b600061114360045490565b821061119f5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b6064820152608401610a61565b6000805b6004548110156111ec576111b8816004541190565b156111da57838214156111cc579392505050565b816111d681613a41565b9250505b806111e481613a41565b9150506111a3565b5050919050565b600a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561123757600080fd5b505afa15801561124b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126f91906134f3565b905090565b6008546001600160a01b0316331461129e5760405162461bcd60e51b8152600401610a6190613827565b80516012546004546112b09083613944565b11156112ce5760405162461bcd60e51b8152600401610a61906138b0565b60005b8251811015610aa9576112fe8382815181106112ef576112ef613a9c565b602002602001015160016121d5565b8061130881613a41565b9150506112d1565b6008546001600160a01b0316331461133a5760405162461bcd60e51b8152600401610a6190613827565b8051610d5a906011906020840190612fc8565b6008546001600160a01b031633146113775760405162461bcd60e51b8152600401610a6190613827565b6001600160401b0316601755565b600080611391836126cc565b509392505050565b60006001600160a01b0382166114075760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610a61565b506001600160a01b03166000908152600760205260409020546001600160401b031690565b6008546001600160a01b031633146114565760405162461bcd60e51b8152600401610a6190613827565b6114606000612765565b565b6008546001600160a01b0316331461148c5760405162461bcd60e51b8152600401610a6190613827565b601580549115156101000261ff0019909216919091179055565b6008546001600160a01b031633146114d05760405162461bcd60e51b8152600401610a6190613827565b60008151116115215760405162461bcd60e51b815260206004820152601c60248201527f61646472657373732061726520696e2077726f6e6720666f726d6174000000006044820152606401610a61565b60005b8151811015610d5a57601360189054906101000a900463ffffffff16601c600084848151811061155657611556613a9c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555080806115a790613a41565b915050611524565b6008546001600160a01b031633146115d95760405162461bcd60e51b8152600401610a6190613827565b600f805460ff1916911515919091179055565b606060028054610abd90613a06565b6008546001600160a01b031633146116255760405162461bcd60e51b8152600401610a6190613827565b600a5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561167357600080fd5b505af1158015611687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ab919061344f565b610d5a5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610a61565b806012546116f660045490565b6117009083613944565b111561171e5760405162461bcd60e51b8152600401610a61906138b0565b81600061172a33610e42565b63ffffffff169050600082116117975760405162461bcd60e51b815260206004820152602c60248201527f6e756d626572206f66206d696e74206e6565647320746f20626520677265617460448201526b6572207468616e207a65726f60a01b6064820152608401610a61565b60008111806117a957506117a96127b7565b61180f5760405162461bcd60e51b815260206004820152603160248201527f796f7520617265206e6f7420616c6c6f77656420746f206d696e74207965742c60448201527010383632b0b9b2903a393c903630ba32b960791b6064820152608401610a61565b601354600160a01b900463ffffffff1681148015611836575060155462010000900460ff16155b801561184757506118456127b7565b155b156118945760405162461bcd60e51b815260206004820152601b60248201527f4d696e74207374696c6c206e6f74206f70656e20666f7220574c2100000000006044820152606401610a61565b601354600160e01b900463ffffffff16811480156118ba5750601554610100900460ff16155b80156118cb57506118c96127b7565b155b156119185760405162461bcd60e51b815260206004820152601f60248201527f4d696e74207374696c6c206e6f74206f70656e20666f72207075626c696321006044820152606401610a61565b336000908152601d60205260409020548190611935908490613944565b11158061194557506119456127b7565b6119a25760405162461bcd60e51b815260206004820152602860248201527f596f752061726520636c61696d696e67206d6f7265207468616e2061646472656044820152671cdcc81b1a5b5a5d60c21b6064820152608401610a61565b60155460ff1615806119b757506119b76127b7565b611a155760405162461bcd60e51b815260206004820152602960248201527f4d696e74696e67206e6f742073746172746564207965742c20706c65617365206044820152683a393c903630ba32b960b91b6064820152608401610a61565b611a1f33856121d5565b50505050565b6001600160a01b038216331415611a7e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610a61565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b03163314611b145760405162461bcd60e51b8152600401610a6190613827565b60158054911515620100000262ff000019909216919091179055565b611b3a33836123e4565b611b565760405162461bcd60e51b8152600401610a619061385c565b611a1f848484846127e4565b60148054611b6f90613a06565b80601f0160208091040260200160405190810160405280929190818152602001828054611b9b90613a06565b8015611be85780601f10611bbd57610100808354040283529160200191611be8565b820191906000526020600020905b815481529060010190602001808311611bcb57829003601f168201915b505050505081565b6060611bfd826004541190565b611c615760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a61565b600f5460ff16611d5f57611c76606483613a5c565b611d2857600e600281548110611c8e57611c8e613a9c565b906000526020600020018054611ca390613a06565b80601f0160208091040260200160405190810160405280929190818152602001828054611ccf90613a06565b8015611d1c5780601f10611cf157610100808354040283529160200191611d1c565b820191906000526020600020905b815481529060010190602001808311611cff57829003601f168201915b50505050509050919050565b611d33601483613a5c565b611d4b57600e600181548110611c8e57611c8e613a9c565b600e600081548110611c8e57611c8e613a9c565b6000611d69612819565b90506000815111611d895760405180602001604052806000815250611db7565b80611d9384612828565b6014604051602001611da79392919061365c565b6040516020818303038152906040525b9392505050565b6008546001600160a01b03163314611de85760405162461bcd60e51b8152600401610a6190613827565b600c80546001600160401b0390951667ffffffffffffffff1990951694909417909355600b92909255600d805463ffffffff909216600160a01b026001600160c01b03199092166001600160a01b0390931692909217179055565b6008546001600160a01b03163314611e6d5760405162461bcd60e51b8152600401610a6190613827565b6013805463ffffffff909216600160e01b026001600160e01b03909216919091179055565b6008546001600160a01b03163314611ebc5760405162461bcd60e51b8152600401610a6190613827565b8051610d5a906014906020840190612fc8565b601754601654611edf904261399b565b11611f3b5760405162461bcd60e51b815260206004820152602660248201527f49742063616e277420626520646f6e65206e6f772c20796f75206e65656420746044820152651bc81dd85a5d60d21b6064820152608401610a61565b600954600b54600c54600d546040516305d3b1d360e41b815260048101939093526001600160401b03909116602483015261ffff600160c01b820416604483015263ffffffff600160a01b820481166064840152600160d01b9091041660848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611fcd57600080fd5b505af1158015611fe1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200591906134f3565b60188054919250600061201783613a41565b90915550506018546000908152601a602052604090205542601655565b6008546001600160a01b0316331461205e5760405162461bcd60e51b8152600401610a6190613827565b60008151116120af5760405162461bcd60e51b815260206004820152601c60248201527f61646472657373732061726520696e2077726f6e6720666f726d6174000000006044820152606401610a61565b60005b8151811015610d5a57601360149054906101000a900463ffffffff16601c60008484815181106120e4576120e4613a9c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550808061213590613a41565b9150506120b2565b6008546001600160a01b031633146121675760405162461bcd60e51b8152600401610a6190613827565b6001600160a01b0381166121cc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a61565b610fe781612765565b601254816121e260045490565b6121ec9190613944565b11156122605760405162461bcd60e51b815260206004820152603960248201527f7468657265206973206e6f7420656e6f75676820746f6b656e206c656674207460448201527f6f206d696e7420696e207468697320636f6c6c656374696f6e000000000000006064820152608401610a61565b600061226b60045490565b90506122778383612925565b336000908152601d602052604081208054849290612296908490613944565b90915550506013546040518381526001600160a01b0385811692169083907f33b66248eef1a27662cb116940fa911145bcd578ff37eea426461fec672035039060200160405180910390a4505050565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061231b82611385565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061235f60045490565b8260008151811061237257612372613a9c565b60200260200101516123849190613a5c565b61238f906001613944565b601880546000908152601b6020908152604080832085905592548252601a9052818120549151929350909183917f781f39a79b77899b04dd8d8e3641f71b0c3dd71c56ef082a44f689a6416390b791a3505050565b60006123f1826004541190565b6124555760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a61565b600061246083611385565b9050806001600160a01b0316846001600160a01b0316148061249b5750836001600160a01b031661249084610b40565b6001600160a01b0316145b806124cb57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b6000806124df836126cc565b91509150846001600160a01b0316826001600160a01b0316146125595760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610a61565b6001600160a01b0384166125bf5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610a61565b6125ca6000846122e6565b60006125d7846001613944565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015612607575060045481105b1561263d57600081815260036020526040812080546001600160a01b0319166001600160a01b03891617905561263d908261293f565b600084815260036020526040902080546001600160a01b0319166001600160a01b0387161790558184146126765761267660008561293f565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46126c4868686600161296b565b505050505050565b6000806126da836004541190565b61273b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a61565b61274483612b15565b6000818152600360205260409020546001600160a01b031694909350915050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006127cb6008546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b6127ef8484846124d3565b6127fd848484600185612b21565b611a1f5760405162461bcd60e51b8152600401610a61906137d2565b606060118054610abd90613a06565b60608161284c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612876578061286081613a41565b915061286f9050600a83613987565b9150612850565b6000816001600160401b0381111561289057612890613ab2565b6040519080825280601f01601f1916602001820160405280156128ba576020820181803683370190505b5090505b84156124cb576128cf60018361399b565b91506128dc600a86613a5c565b6128e7906030613944565b60f81b8183815181106128fc576128fc613a9c565b60200101906001600160f81b031916908160001a90535061291e600a86613987565b94506128be565b610d5a828260405180602001604052806000815250612c64565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600160401b811061297b57600080fd5b806001600160a01b038516156129e5576001600160a01b038516600090815260076020526040812080548392906129bc9084906001600160401b03166139b2565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550612a45565b6001600160a01b03841660009081526007602052604090208054829190600890612a20908490600160401b90046001600160401b031661395c565b92506101000a8154816001600160401b0302191690836001600160401b031602179055505b6001600160a01b03841615612aae576001600160a01b03841660009081526007602052604081208054839290612a859084906001600160401b031661395c565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550612b0e565b6001600160a01b03851660009081526007602052604090208054829190601090612ae9908490600160801b90046001600160401b031661395c565b92506101000a8154816001600160401b0302191690836001600160401b031602179055505b5050505050565b6000610a318183612c7f565b60006001600160a01b0385163b15612c5757506001835b612b428486613944565b811015612c5157604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290612b7b9033908b9086908990600401613720565b602060405180830381600087803b158015612b9557600080fd5b505af1925050508015612bc5575060408051601f3d908101601f19168201909252612bc291810190613489565b60015b612c1f573d808015612bf3576040519150601f19603f3d011682016040523d82523d6000602084013e612bf8565b606091505b508051612c175760405162461bcd60e51b8152600401610a61906137d2565b805181602001fd5b828015612c3c57506001600160e01b03198116630a85bd0160e11b145b92505080612c4981613a41565b915050612b38565b50612c5b565b5060015b95945050505050565b600454612c718484612d77565b6127fd600085838686612b21565b600881901c60008181526020849052604081205490919060ff808516919082181c8015612cc157612caf81612ee9565b60ff168203600884901b179350612d6e565b60008311612d2e5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610a61565b506000199091016000818152602086905260409020549091908015612d6957612d5681612ee9565b60ff0360ff16600884901b179350612d6e565b612cc1565b50505092915050565b60045481612dd55760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610a61565b6001600160a01b038316612e375760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a61565b8160046000828254612e499190613944565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b038616179055612e7f908261293f565b612e8c600084838561296b565b805b612e988383613944565b811015611a1f5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480612ee181613a41565b915050612e8e565b60006040518061012001604052806101008152602001613aed610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff612f3285612f53565b02901c81518110612f4557612f45613a9c565b016020015160f81c92915050565b6000808211612f6157600080fd5b5060008190031690565b828054828255906000526020600020908101928215612fb8579160200282015b82811115612fb85782518051612fa8918491602090910190612fc8565b5091602001919060010190612f8b565b50612fc4929150613048565b5090565b828054612fd490613a06565b90600052602060002090601f016020900481019282612ff6576000855561303c565b82601f1061300f57805160ff191683800117855561303c565b8280016001018555821561303c579182015b8281111561303c578251825591602001919060010190613021565b50612fc4929150613065565b80821115612fc457600061305c828261307a565b50600101613048565b5b80821115612fc45760008155600101613066565b50805461308690613a06565b6000825580601f10613096575050565b601f016020900490600052602060002090810190610fe79190613065565b60006001600160401b038311156130cd576130cd613ab2565b6130e0601f8401601f19166020016138f1565b90508281528383830111156130f457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461312257600080fd5b919050565b600082601f83011261313857600080fd5b611db7838335602085016130b4565b803563ffffffff8116811461312257600080fd5b80356001600160401b038116811461312257600080fd5b60006020828403121561318457600080fd5b611db78261310b565b600080604083850312156131a057600080fd5b6131a98361310b565b91506131b76020840161310b565b90509250929050565b6000806000606084860312156131d557600080fd5b6131de8461310b565b92506131ec6020850161310b565b9150604084013590509250925092565b6000806000806080858703121561321257600080fd5b61321b8561310b565b93506132296020860161310b565b92506040850135915060608501356001600160401b0381111561324b57600080fd5b8501601f8101871361325c57600080fd5b61326b878235602084016130b4565b91505092959194509250565b6000806040838503121561328a57600080fd5b6132938361310b565b915060208301356132a381613ac8565b809150509250929050565b600080604083850312156132c157600080fd5b6132ca8361310b565b946020939093013593505050565b600060208083850312156132eb57600080fd5b82356001600160401b0381111561330157600080fd5b8301601f8101851361331257600080fd5b803561332561332082613921565b6138f1565b80828252848201915084840188868560051b870101111561334557600080fd5b600094505b8385101561336f5761335b8161310b565b83526001949094019391850191850161334a565b50979650505050505050565b6000602080838503121561338e57600080fd5b82356001600160401b03808211156133a557600080fd5b818501915085601f8301126133b957600080fd5b81356133c761332082613921565b80828252858201915085850189878560051b88010111156133e757600080fd5b6000805b8581101561342257823587811115613401578283fd5b61340f8d8b838c0101613127565b86525093880193918801916001016133eb565b50919a9950505050505050505050565b60006020828403121561344457600080fd5b8135611db781613ac8565b60006020828403121561346157600080fd5b8151611db781613ac8565b60006020828403121561347e57600080fd5b8135611db781613ad6565b60006020828403121561349b57600080fd5b8151611db781613ad6565b6000602082840312156134b857600080fd5b81356001600160401b038111156134ce57600080fd5b6124cb84828501613127565b6000602082840312156134ec57600080fd5b5035919050565b60006020828403121561350557600080fd5b5051919050565b6000806040838503121561351f57600080fd5b823591506020808401356001600160401b0381111561353d57600080fd5b8401601f8101861361354e57600080fd5b803561355c61332082613921565b80828252848201915084840189868560051b870101111561357c57600080fd5b600094505b8385101561359f578035835260019490940193918501918501613581565b5080955050505050509250929050565b6000602082840312156135c157600080fd5b611db782613147565b6000602082840312156135dc57600080fd5b611db78261315b565b600080600080608085870312156135fb57600080fd5b6136048561315b565b935061361260208601613147565b92506136206040860161310b565b9396929550929360600135925050565b600081518084526136488160208601602086016139da565b601f01601f19169290920160200192915050565b60008451602061366f8285838a016139da565b8551918401916136828184848a016139da565b8554920191600090600181811c908083168061369f57607f831692505b8583108114156136bd57634e487b7160e01b85526022600452602485fd5b8080156136d157600181146136e25761370f565b60ff1985168852838801955061370f565b60008b81526020902060005b858110156137075781548a8201529084019088016136ee565b505083880195505b50939b9a5050505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375390830184613630565b9695505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156137b257603f198886030184526137a0858351613630565b94509285019290850190600101613784565b5092979650505050505050565b602081526000611db76020830184613630565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b60208082526021908201527f4e6f206d6f7265204d6967687479204c6c616d61206c65667420746f204d696e6040820152601d60fa1b606082015260800190565b604051601f8201601f191681016001600160401b038111828210171561391957613919613ab2565b604052919050565b60006001600160401b0382111561393a5761393a613ab2565b5060051b60200190565b6000821982111561395757613957613a70565b500190565b60006001600160401b0380831681851680830382111561397e5761397e613a70565b01949350505050565b60008261399657613996613a86565b500490565b6000828210156139ad576139ad613a70565b500390565b60006001600160401b03838116908316818110156139d2576139d2613a70565b039392505050565b60005b838110156139f55781810151838201526020016139dd565b83811115611a1f5750506000910152565b600181811c90821680613a1a57607f821691505b60208210811415613a3b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613a5557613a55613a70565b5060010190565b600082613a6b57613a6b613a86565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610fe757600080fd5b6001600160e01b031981168114610fe757600080fdfe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212203323311b386d12f0f9ab3650d35aa8b6dfad0121ad45d33c76070ed96891c43964736f6c63430008070033000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb0000000000000000000000002ca8e0c643bde4c2e08ab1fa0da3401adad7734d79d3d8832d904592c0bf9818b621522c988bb8b0c05cdc3b15aea1b6e8db0c150000000000000000000000000000000000000000000000000000000000000709

Deployed Bytecode

0x60806040526004361061031a5760003560e01c8063879fbedf116101ab578063c6682862116100f7578063de3d9fb711610095578063e739b6861161006f578063e739b6861461091d578063e985e9c514610941578063edac985b1461098a578063f2fde38b146109aa57600080fd5b8063de3d9fb7146108c0578063deb33342146108e8578063e0c862891461090857600080fd5b8063d1dbcc3d116100d1578063d1dbcc3d1461083e578063d94220fa1461085e578063da3ef23f1461088b578063dbed9f36146108ab57600080fd5b8063c6682862146107e9578063c87b56dd146107fe578063cd2e36721461081e57600080fd5b8063983fbab211610164578063b187bd261161013e578063b187bd2614610772578063b3e5e0de1461078c578063b88d4fde146107ac578063c06af3f0146107cc57600080fd5b8063983fbab21461071f578063a0712d681461073f578063a22cb4651461075257600080fd5b8063879fbedf146106775780638da5cb5b146106975780638dcd73b4146106b557806391ad27b4146106d5578063940cd05b146106ea57806395d89b411461070a57600080fd5b80633057931f1161026a57806350c5f9751161022357806359770db2116101fd57806359770db2146106025780636352211e1461062257806370a0823114610642578063715018a61461066257600080fd5b806350c5f975146105ad57806352b49210146105c257806355f804b3146105e257600080fd5b80633057931f146105045780633ccfd60b1461052357806342842e0e1461052b57806344a0d68a1461054b578063452daf4c1461056b5780634f6ccce71461058d57600080fd5b80630e3cf317116102d75780631fe543e3116102b15780631fe543e31461046f57806323b872dd1461048f5780632f613af7146104af5780632f745c59146104e457600080fd5b80630e3cf31714610410578063149835a01461043057806318160ddd1461045057600080fd5b806301ffc9a71461031f578063045f78501461035457806306fdde0314610376578063081812fc1461039857806309305a94146103d0578063095ea7b3146103f0575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461346c565b6109ca565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b5061037461036f3660046132ae565b610a37565b005b34801561038257600080fd5b5061038b610aae565b60405161034b91906137bf565b3480156103a457600080fd5b506103b86103b33660046134da565b610b40565b6040516001600160a01b03909116815260200161034b565b3480156103dc57600080fd5b506103746103eb366004613432565b610bcd565b3480156103fc57600080fd5b5061037461040b3660046132ae565b610c0a565b34801561041c57600080fd5b5061037461042b36600461337b565b610d1d565b34801561043c57600080fd5b5061037461044b3660046134da565b610d5e565b34801561045c57600080fd5b506004545b60405190815260200161034b565b34801561047b57600080fd5b5061037461048a36600461350c565b610d8d565b34801561049b57600080fd5b506103746104aa3660046131c0565b610e11565b3480156104bb57600080fd5b506104cf6104ca366004613172565b610e42565b60405163ffffffff909116815260200161034b565b3480156104f057600080fd5b506104616104ff3660046132ae565b610e9d565b34801561051057600080fd5b5060155461033f90610100900460ff1681565b610374610f68565b34801561053757600080fd5b506103746105463660046131c0565b610fea565b34801561055757600080fd5b506103746105663660046134da565b611005565b34801561057757600080fd5b50610580611034565b60405161034b919061375d565b34801561059957600080fd5b506104616105a83660046134da565b611138565b3480156105b957600080fd5b506104616111f3565b3480156105ce57600080fd5b506103746105dd3660046132d8565b611274565b3480156105ee57600080fd5b506103746105fd3660046134a6565b611310565b34801561060e57600080fd5b5061037461061d3660046135ca565b61134d565b34801561062e57600080fd5b506103b861063d3660046134da565b611385565b34801561064e57600080fd5b5061046161065d366004613172565b611399565b34801561066e57600080fd5b5061037461142c565b34801561068357600080fd5b50610374610692366004613432565b611462565b3480156106a357600080fd5b506008546001600160a01b03166103b8565b3480156106c157600080fd5b506103746106d03660046132d8565b6114a6565b3480156106e157600080fd5b50601754610461565b3480156106f657600080fd5b50610374610705366004613432565b6115af565b34801561071657600080fd5b5061038b6115ec565b34801561072b57600080fd5b5061037461073a3660046132ae565b6115fb565b61037461074d3660046134da565b6116e9565b34801561075e57600080fd5b5061037461076d366004613277565b611a25565b34801561077e57600080fd5b5060155461033f9060ff1681565b34801561079857600080fd5b506103746107a7366004613432565b611aea565b3480156107b857600080fd5b506103746107c73660046131fc565b611b30565b3480156107d857600080fd5b50601554610100900460ff1661033f565b3480156107f557600080fd5b5061038b611b62565b34801561080a57600080fd5b5061038b6108193660046134da565b611bf0565b34801561082a57600080fd5b506103746108393660046135e5565b611dbe565b34801561084a57600080fd5b506103746108593660046135af565b611e43565b34801561086a57600080fd5b506104616108793660046134da565b6000908152601b602052604090205490565b34801561089757600080fd5b506103746108a63660046134a6565b611e92565b3480156108b757600080fd5b50601854610461565b3480156108cc57600080fd5b50600c546040516001600160401b03909116815260200161034b565b3480156108f457600080fd5b5060155461033f9062010000900460ff1681565b34801561091457600080fd5b50610374611ecf565b34801561092957600080fd5b506018546000908152601b6020526040902054610461565b34801561094d57600080fd5b5061033f61095c36600461318d565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561099657600080fd5b506103746109a53660046132d8565b612034565b3480156109b657600080fd5b506103746109c5366004613172565b61213d565b60006001600160e01b031982166380ac58cd60e01b14806109fb57506001600160e01b03198216635b5e139f60e01b145b80610a1657506001600160e01b0319821663780e9d6360e01b145b80610a3157506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b8152600401610a6190613827565b60405180910390fd5b80601254610a7760045490565b610a819083613944565b1115610a9f5760405162461bcd60e51b8152600401610a61906138b0565b610aa983836121d5565b505050565b606060018054610abd90613a06565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae990613a06565b8015610b365780601f10610b0b57610100808354040283529160200191610b36565b820191906000526020600020905b815481529060010190602001808311610b1957829003601f168201915b5050505050905090565b6000610b4d826004541190565b610bb15760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a61565b506000908152600560205260409020546001600160a01b031690565b6008546001600160a01b03163314610bf75760405162461bcd60e51b8152600401610a6190613827565b6015805460ff1916911515919091179055565b6000610c1582611385565b9050806001600160a01b0316836001600160a01b03161415610c855760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610a61565b336001600160a01b0382161480610ca15750610ca1813361095c565b610d135760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610a61565b610aa983836122e6565b6008546001600160a01b03163314610d475760405162461bcd60e51b8152600401610a6190613827565b8051610d5a90600e906020840190612f6b565b5050565b6008546001600160a01b03163314610d885760405162461bcd60e51b8152600401610a6190613827565b601255565b336001600160a01b037f0000000000000000000000002ca8e0c643bde4c2e08ab1fa0da3401adad7734d1614610e075760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000002ca8e0c643bde4c2e08ab1fa0da3401adad7734d166024820152604401610a61565b610d5a8282612354565b610e1b33826123e4565b610e375760405162461bcd60e51b8152600401610a619061385c565b610aa98383836124d3565b6001600160a01b0381166000908152601c602052604081205463ffffffff1615610e8857506001600160a01b03166000908152601c602052604090205463ffffffff1690565b5050601354600160e01b900463ffffffff1690565b60008060005b600454811015610f1357610eb8816004541190565b8015610edd5750610ec881611385565b6001600160a01b0316856001600160a01b0316145b15610f015783821415610ef3579150610a319050565b81610efd81613a41565b9250505b80610f0b81613a41565b915050610ea3565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610a61565b6008546001600160a01b03163314610f925760405162461bcd60e51b8152600401610a6190613827565b604051600090339047908381818185875af1925050503d8060008114610fd4576040519150601f19603f3d011682016040523d82523d6000602084013e610fd9565b606091505b5050905080610fe757600080fd5b50565b610aa983838360405180602001604052806000815250611b30565b6008546001600160a01b0316331461102f5760405162461bcd60e51b8152600401610a6190613827565b601055565b6008546060906001600160a01b031633146110615760405162461bcd60e51b8152600401610a6190613827565b600e805480602002602001604051908101604052809291908181526020016000905b8282101561112f5783829060005260206000200180546110a290613a06565b80601f01602080910402602001604051908101604052809291908181526020018280546110ce90613a06565b801561111b5780601f106110f05761010080835404028352916020019161111b565b820191906000526020600020905b8154815290600101906020018083116110fe57829003601f168201915b505050505081526020019060010190611083565b50505050905090565b600061114360045490565b821061119f5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b6064820152608401610a61565b6000805b6004548110156111ec576111b8816004541190565b156111da57838214156111cc579392505050565b816111d681613a41565b9250505b806111e481613a41565b9150506111a3565b5050919050565b600a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561123757600080fd5b505afa15801561124b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126f91906134f3565b905090565b6008546001600160a01b0316331461129e5760405162461bcd60e51b8152600401610a6190613827565b80516012546004546112b09083613944565b11156112ce5760405162461bcd60e51b8152600401610a61906138b0565b60005b8251811015610aa9576112fe8382815181106112ef576112ef613a9c565b602002602001015160016121d5565b8061130881613a41565b9150506112d1565b6008546001600160a01b0316331461133a5760405162461bcd60e51b8152600401610a6190613827565b8051610d5a906011906020840190612fc8565b6008546001600160a01b031633146113775760405162461bcd60e51b8152600401610a6190613827565b6001600160401b0316601755565b600080611391836126cc565b509392505050565b60006001600160a01b0382166114075760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610a61565b506001600160a01b03166000908152600760205260409020546001600160401b031690565b6008546001600160a01b031633146114565760405162461bcd60e51b8152600401610a6190613827565b6114606000612765565b565b6008546001600160a01b0316331461148c5760405162461bcd60e51b8152600401610a6190613827565b601580549115156101000261ff0019909216919091179055565b6008546001600160a01b031633146114d05760405162461bcd60e51b8152600401610a6190613827565b60008151116115215760405162461bcd60e51b815260206004820152601c60248201527f61646472657373732061726520696e2077726f6e6720666f726d6174000000006044820152606401610a61565b60005b8151811015610d5a57601360189054906101000a900463ffffffff16601c600084848151811061155657611556613a9c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555080806115a790613a41565b915050611524565b6008546001600160a01b031633146115d95760405162461bcd60e51b8152600401610a6190613827565b600f805460ff1916911515919091179055565b606060028054610abd90613a06565b6008546001600160a01b031633146116255760405162461bcd60e51b8152600401610a6190613827565b600a5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561167357600080fd5b505af1158015611687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ab919061344f565b610d5a5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610a61565b806012546116f660045490565b6117009083613944565b111561171e5760405162461bcd60e51b8152600401610a61906138b0565b81600061172a33610e42565b63ffffffff169050600082116117975760405162461bcd60e51b815260206004820152602c60248201527f6e756d626572206f66206d696e74206e6565647320746f20626520677265617460448201526b6572207468616e207a65726f60a01b6064820152608401610a61565b60008111806117a957506117a96127b7565b61180f5760405162461bcd60e51b815260206004820152603160248201527f796f7520617265206e6f7420616c6c6f77656420746f206d696e74207965742c60448201527010383632b0b9b2903a393c903630ba32b960791b6064820152608401610a61565b601354600160a01b900463ffffffff1681148015611836575060155462010000900460ff16155b801561184757506118456127b7565b155b156118945760405162461bcd60e51b815260206004820152601b60248201527f4d696e74207374696c6c206e6f74206f70656e20666f7220574c2100000000006044820152606401610a61565b601354600160e01b900463ffffffff16811480156118ba5750601554610100900460ff16155b80156118cb57506118c96127b7565b155b156119185760405162461bcd60e51b815260206004820152601f60248201527f4d696e74207374696c6c206e6f74206f70656e20666f72207075626c696321006044820152606401610a61565b336000908152601d60205260409020548190611935908490613944565b11158061194557506119456127b7565b6119a25760405162461bcd60e51b815260206004820152602860248201527f596f752061726520636c61696d696e67206d6f7265207468616e2061646472656044820152671cdcc81b1a5b5a5d60c21b6064820152608401610a61565b60155460ff1615806119b757506119b76127b7565b611a155760405162461bcd60e51b815260206004820152602960248201527f4d696e74696e67206e6f742073746172746564207965742c20706c65617365206044820152683a393c903630ba32b960b91b6064820152608401610a61565b611a1f33856121d5565b50505050565b6001600160a01b038216331415611a7e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610a61565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b03163314611b145760405162461bcd60e51b8152600401610a6190613827565b60158054911515620100000262ff000019909216919091179055565b611b3a33836123e4565b611b565760405162461bcd60e51b8152600401610a619061385c565b611a1f848484846127e4565b60148054611b6f90613a06565b80601f0160208091040260200160405190810160405280929190818152602001828054611b9b90613a06565b8015611be85780601f10611bbd57610100808354040283529160200191611be8565b820191906000526020600020905b815481529060010190602001808311611bcb57829003601f168201915b505050505081565b6060611bfd826004541190565b611c615760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a61565b600f5460ff16611d5f57611c76606483613a5c565b611d2857600e600281548110611c8e57611c8e613a9c565b906000526020600020018054611ca390613a06565b80601f0160208091040260200160405190810160405280929190818152602001828054611ccf90613a06565b8015611d1c5780601f10611cf157610100808354040283529160200191611d1c565b820191906000526020600020905b815481529060010190602001808311611cff57829003601f168201915b50505050509050919050565b611d33601483613a5c565b611d4b57600e600181548110611c8e57611c8e613a9c565b600e600081548110611c8e57611c8e613a9c565b6000611d69612819565b90506000815111611d895760405180602001604052806000815250611db7565b80611d9384612828565b6014604051602001611da79392919061365c565b6040516020818303038152906040525b9392505050565b6008546001600160a01b03163314611de85760405162461bcd60e51b8152600401610a6190613827565b600c80546001600160401b0390951667ffffffffffffffff1990951694909417909355600b92909255600d805463ffffffff909216600160a01b026001600160c01b03199092166001600160a01b0390931692909217179055565b6008546001600160a01b03163314611e6d5760405162461bcd60e51b8152600401610a6190613827565b6013805463ffffffff909216600160e01b026001600160e01b03909216919091179055565b6008546001600160a01b03163314611ebc5760405162461bcd60e51b8152600401610a6190613827565b8051610d5a906014906020840190612fc8565b601754601654611edf904261399b565b11611f3b5760405162461bcd60e51b815260206004820152602660248201527f49742063616e277420626520646f6e65206e6f772c20796f75206e65656420746044820152651bc81dd85a5d60d21b6064820152608401610a61565b600954600b54600c54600d546040516305d3b1d360e41b815260048101939093526001600160401b03909116602483015261ffff600160c01b820416604483015263ffffffff600160a01b820481166064840152600160d01b9091041660848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611fcd57600080fd5b505af1158015611fe1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200591906134f3565b60188054919250600061201783613a41565b90915550506018546000908152601a602052604090205542601655565b6008546001600160a01b0316331461205e5760405162461bcd60e51b8152600401610a6190613827565b60008151116120af5760405162461bcd60e51b815260206004820152601c60248201527f61646472657373732061726520696e2077726f6e6720666f726d6174000000006044820152606401610a61565b60005b8151811015610d5a57601360149054906101000a900463ffffffff16601c60008484815181106120e4576120e4613a9c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550808061213590613a41565b9150506120b2565b6008546001600160a01b031633146121675760405162461bcd60e51b8152600401610a6190613827565b6001600160a01b0381166121cc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a61565b610fe781612765565b601254816121e260045490565b6121ec9190613944565b11156122605760405162461bcd60e51b815260206004820152603960248201527f7468657265206973206e6f7420656e6f75676820746f6b656e206c656674207460448201527f6f206d696e7420696e207468697320636f6c6c656374696f6e000000000000006064820152608401610a61565b600061226b60045490565b90506122778383612925565b336000908152601d602052604081208054849290612296908490613944565b90915550506013546040518381526001600160a01b0385811692169083907f33b66248eef1a27662cb116940fa911145bcd578ff37eea426461fec672035039060200160405180910390a4505050565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061231b82611385565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061235f60045490565b8260008151811061237257612372613a9c565b60200260200101516123849190613a5c565b61238f906001613944565b601880546000908152601b6020908152604080832085905592548252601a9052818120549151929350909183917f781f39a79b77899b04dd8d8e3641f71b0c3dd71c56ef082a44f689a6416390b791a3505050565b60006123f1826004541190565b6124555760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a61565b600061246083611385565b9050806001600160a01b0316846001600160a01b0316148061249b5750836001600160a01b031661249084610b40565b6001600160a01b0316145b806124cb57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b6000806124df836126cc565b91509150846001600160a01b0316826001600160a01b0316146125595760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610a61565b6001600160a01b0384166125bf5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610a61565b6125ca6000846122e6565b60006125d7846001613944565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015612607575060045481105b1561263d57600081815260036020526040812080546001600160a01b0319166001600160a01b03891617905561263d908261293f565b600084815260036020526040902080546001600160a01b0319166001600160a01b0387161790558184146126765761267660008561293f565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46126c4868686600161296b565b505050505050565b6000806126da836004541190565b61273b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a61565b61274483612b15565b6000818152600360205260409020546001600160a01b031694909350915050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006127cb6008546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b6127ef8484846124d3565b6127fd848484600185612b21565b611a1f5760405162461bcd60e51b8152600401610a61906137d2565b606060118054610abd90613a06565b60608161284c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612876578061286081613a41565b915061286f9050600a83613987565b9150612850565b6000816001600160401b0381111561289057612890613ab2565b6040519080825280601f01601f1916602001820160405280156128ba576020820181803683370190505b5090505b84156124cb576128cf60018361399b565b91506128dc600a86613a5c565b6128e7906030613944565b60f81b8183815181106128fc576128fc613a9c565b60200101906001600160f81b031916908160001a90535061291e600a86613987565b94506128be565b610d5a828260405180602001604052806000815250612c64565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600160401b811061297b57600080fd5b806001600160a01b038516156129e5576001600160a01b038516600090815260076020526040812080548392906129bc9084906001600160401b03166139b2565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550612a45565b6001600160a01b03841660009081526007602052604090208054829190600890612a20908490600160401b90046001600160401b031661395c565b92506101000a8154816001600160401b0302191690836001600160401b031602179055505b6001600160a01b03841615612aae576001600160a01b03841660009081526007602052604081208054839290612a859084906001600160401b031661395c565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550612b0e565b6001600160a01b03851660009081526007602052604090208054829190601090612ae9908490600160801b90046001600160401b031661395c565b92506101000a8154816001600160401b0302191690836001600160401b031602179055505b5050505050565b6000610a318183612c7f565b60006001600160a01b0385163b15612c5757506001835b612b428486613944565b811015612c5157604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290612b7b9033908b9086908990600401613720565b602060405180830381600087803b158015612b9557600080fd5b505af1925050508015612bc5575060408051601f3d908101601f19168201909252612bc291810190613489565b60015b612c1f573d808015612bf3576040519150601f19603f3d011682016040523d82523d6000602084013e612bf8565b606091505b508051612c175760405162461bcd60e51b8152600401610a61906137d2565b805181602001fd5b828015612c3c57506001600160e01b03198116630a85bd0160e11b145b92505080612c4981613a41565b915050612b38565b50612c5b565b5060015b95945050505050565b600454612c718484612d77565b6127fd600085838686612b21565b600881901c60008181526020849052604081205490919060ff808516919082181c8015612cc157612caf81612ee9565b60ff168203600884901b179350612d6e565b60008311612d2e5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610a61565b506000199091016000818152602086905260409020549091908015612d6957612d5681612ee9565b60ff0360ff16600884901b179350612d6e565b612cc1565b50505092915050565b60045481612dd55760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610a61565b6001600160a01b038316612e375760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a61565b8160046000828254612e499190613944565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b038616179055612e7f908261293f565b612e8c600084838561296b565b805b612e988383613944565b811015611a1f5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480612ee181613a41565b915050612e8e565b60006040518061012001604052806101008152602001613aed610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff612f3285612f53565b02901c81518110612f4557612f45613a9c565b016020015160f81c92915050565b6000808211612f6157600080fd5b5060008190031690565b828054828255906000526020600020908101928215612fb8579160200282015b82811115612fb85782518051612fa8918491602090910190612fc8565b5091602001919060010190612f8b565b50612fc4929150613048565b5090565b828054612fd490613a06565b90600052602060002090601f016020900481019282612ff6576000855561303c565b82601f1061300f57805160ff191683800117855561303c565b8280016001018555821561303c579182015b8281111561303c578251825591602001919060010190613021565b50612fc4929150613065565b80821115612fc457600061305c828261307a565b50600101613048565b5b80821115612fc45760008155600101613066565b50805461308690613a06565b6000825580601f10613096575050565b601f016020900490600052602060002090810190610fe79190613065565b60006001600160401b038311156130cd576130cd613ab2565b6130e0601f8401601f19166020016138f1565b90508281528383830111156130f457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461312257600080fd5b919050565b600082601f83011261313857600080fd5b611db7838335602085016130b4565b803563ffffffff8116811461312257600080fd5b80356001600160401b038116811461312257600080fd5b60006020828403121561318457600080fd5b611db78261310b565b600080604083850312156131a057600080fd5b6131a98361310b565b91506131b76020840161310b565b90509250929050565b6000806000606084860312156131d557600080fd5b6131de8461310b565b92506131ec6020850161310b565b9150604084013590509250925092565b6000806000806080858703121561321257600080fd5b61321b8561310b565b93506132296020860161310b565b92506040850135915060608501356001600160401b0381111561324b57600080fd5b8501601f8101871361325c57600080fd5b61326b878235602084016130b4565b91505092959194509250565b6000806040838503121561328a57600080fd5b6132938361310b565b915060208301356132a381613ac8565b809150509250929050565b600080604083850312156132c157600080fd5b6132ca8361310b565b946020939093013593505050565b600060208083850312156132eb57600080fd5b82356001600160401b0381111561330157600080fd5b8301601f8101851361331257600080fd5b803561332561332082613921565b6138f1565b80828252848201915084840188868560051b870101111561334557600080fd5b600094505b8385101561336f5761335b8161310b565b83526001949094019391850191850161334a565b50979650505050505050565b6000602080838503121561338e57600080fd5b82356001600160401b03808211156133a557600080fd5b818501915085601f8301126133b957600080fd5b81356133c761332082613921565b80828252858201915085850189878560051b88010111156133e757600080fd5b6000805b8581101561342257823587811115613401578283fd5b61340f8d8b838c0101613127565b86525093880193918801916001016133eb565b50919a9950505050505050505050565b60006020828403121561344457600080fd5b8135611db781613ac8565b60006020828403121561346157600080fd5b8151611db781613ac8565b60006020828403121561347e57600080fd5b8135611db781613ad6565b60006020828403121561349b57600080fd5b8151611db781613ad6565b6000602082840312156134b857600080fd5b81356001600160401b038111156134ce57600080fd5b6124cb84828501613127565b6000602082840312156134ec57600080fd5b5035919050565b60006020828403121561350557600080fd5b5051919050565b6000806040838503121561351f57600080fd5b823591506020808401356001600160401b0381111561353d57600080fd5b8401601f8101861361354e57600080fd5b803561355c61332082613921565b80828252848201915084840189868560051b870101111561357c57600080fd5b600094505b8385101561359f578035835260019490940193918501918501613581565b5080955050505050509250929050565b6000602082840312156135c157600080fd5b611db782613147565b6000602082840312156135dc57600080fd5b611db78261315b565b600080600080608085870312156135fb57600080fd5b6136048561315b565b935061361260208601613147565b92506136206040860161310b565b9396929550929360600135925050565b600081518084526136488160208601602086016139da565b601f01601f19169290920160200192915050565b60008451602061366f8285838a016139da565b8551918401916136828184848a016139da565b8554920191600090600181811c908083168061369f57607f831692505b8583108114156136bd57634e487b7160e01b85526022600452602485fd5b8080156136d157600181146136e25761370f565b60ff1985168852838801955061370f565b60008b81526020902060005b858110156137075781548a8201529084019088016136ee565b505083880195505b50939b9a5050505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375390830184613630565b9695505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156137b257603f198886030184526137a0858351613630565b94509285019290850190600101613784565b5092979650505050505050565b602081526000611db76020830184613630565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b60208082526021908201527f4e6f206d6f7265204d6967687479204c6c616d61206c65667420746f204d696e6040820152601d60fa1b606082015260800190565b604051601f8201601f191681016001600160401b038111828210171561391957613919613ab2565b604052919050565b60006001600160401b0382111561393a5761393a613ab2565b5060051b60200190565b6000821982111561395757613957613a70565b500190565b60006001600160401b0380831681851680830382111561397e5761397e613a70565b01949350505050565b60008261399657613996613a86565b500490565b6000828210156139ad576139ad613a70565b500390565b60006001600160401b03838116908316818110156139d2576139d2613a70565b039392505050565b60005b838110156139f55781810151838201526020016139dd565b83811115611a1f5750506000910152565b600181811c90821680613a1a57607f821691505b60208210811415613a3b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613a5557613a55613a70565b5060010190565b600082613a6b57613a6b613a86565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610fe757600080fd5b6001600160e01b031981168114610fe757600080fdfe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212203323311b386d12f0f9ab3650d35aa8b6dfad0121ad45d33c76070ed96891c43964736f6c63430008070033

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

000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb0000000000000000000000002ca8e0c643bde4c2e08ab1fa0da3401adad7734d79d3d8832d904592c0bf9818b621522c988bb8b0c05cdc3b15aea1b6e8db0c150000000000000000000000000000000000000000000000000000000000000709

-----Decoded View---------------
Arg [0] : _linkAddress (address): 0x326C977E6efc84E512bB9C30f76E30c160eD06FB
Arg [1] : _vrfCoordinator (address): 0x2Ca8E0C643bDe4C2E08ab1fA0da3401AdAD7734D
Arg [2] : _vrfKeyHash (bytes32): 0x79d3d8832d904592c0bf9818b621522c988bb8b0c05cdc3b15aea1b6e8db0c15
Arg [3] : _vrfSubscriptionId (uint64): 1801

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb
Arg [1] : 0000000000000000000000002ca8e0c643bde4c2e08ab1fa0da3401adad7734d
Arg [2] : 79d3d8832d904592c0bf9818b621522c988bb8b0c05cdc3b15aea1b6e8db0c15
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000709


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.