ETH Price: $3,344.40 (-1.05%)
Gas: 2.98 Gwei

Contract

0xbbb381824FEEf3a52965052934e2A766b97E2b90
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Closed151457442022-07-15 6:53:22896 days ago1657868002IN
0xbbb38182...6b97E2b90
0 ETH0.000320210.09472017
End151457392022-07-15 6:52:16896 days ago1657867936IN
0xbbb38182...6b97E2b90
0 ETH0.0005630811.52132662
Start151457322022-07-15 6:51:14896 days ago1657867874IN
0xbbb38182...6b97E2b90
0 ETH0.0002871710.69119654
Closed150619272022-07-02 8:07:37909 days ago1656749257IN
0xbbb38182...6b97E2b90
0 ETH0.0003999912.61007317
End150619212022-07-02 8:06:27909 days ago1656749187IN
0xbbb38182...6b97E2b90
0 ETH0.0007203414.73918537
Start150619062022-07-02 8:01:41909 days ago1656748901IN
0xbbb38182...6b97E2b90
0 ETH0.0002878810.71759514
Wdraw2150267502022-06-26 2:28:34916 days ago1656210514IN
0xbbb38182...6b97E2b90
0 ETH0.0009231119.7507651
End150267432022-06-26 2:27:31916 days ago1656210451IN
0xbbb38182...6b97E2b90
0 ETH0.0011234422.98709549
Send150267372022-06-26 2:26:09916 days ago1656210369IN
0xbbb38182...6b97E2b90
0.084 ETH0.00292925.12248689
Start150267282022-06-26 2:24:04916 days ago1656210244IN
0xbbb38182...6b97E2b90
0 ETH0.0007757428.88001858
Wdraw2150267212022-06-26 2:22:34916 days ago1656210154IN
0xbbb38182...6b97E2b90
0 ETH0.0016416235.12406484
End150267182022-06-26 2:21:44916 days ago1656210104IN
0xbbb38182...6b97E2b90
0 ETH0.0016746834.26605174
Send150267062022-06-26 2:16:25916 days ago1656209785IN
0xbbb38182...6b97E2b90
0.084 ETH0.0029463325.27114944
Start150266992022-06-26 2:15:14916 days ago1656209714IN
0xbbb38182...6b97E2b90
0 ETH0.0008302430.90901839
Wdraw2150266942022-06-26 2:13:45916 days ago1656209625IN
0xbbb38182...6b97E2b90
0 ETH0.0014057230.07680023
End150266912022-06-26 2:12:53916 days ago1656209573IN
0xbbb38182...6b97E2b90
0 ETH0.0014560529.79259373
Send150266882022-06-26 2:12:35916 days ago1656209555IN
0xbbb38182...6b97E2b90
0.084 ETH0.0037260731.95906891
Start150266802022-06-26 2:10:39916 days ago1656209439IN
0xbbb38182...6b97E2b90
0 ETH0.0011035141.08251536
Wdraw2150262242022-06-25 23:58:11916 days ago1656201491IN
0xbbb38182...6b97E2b90
0 ETH0.0015370932.88751691
End150262212022-06-25 23:56:42916 days ago1656201402IN
0xbbb38182...6b97E2b90
0 ETH0.001500730.70615416
Send150262192022-06-25 23:56:03916 days ago1656201363IN
0xbbb38182...6b97E2b90
0.084 ETH0.0034443829.54296275
Start150262112022-06-25 23:54:26916 days ago1656201266IN
0xbbb38182...6b97E2b90
0 ETH0.0010130337.71389664
Wdraw2150262022022-06-25 23:52:05916 days ago1656201125IN
0xbbb38182...6b97E2b90
0 ETH0.0017667237.80062611
End150262002022-06-25 23:51:24916 days ago1656201084IN
0xbbb38182...6b97E2b90
0 ETH0.001896738.80875829
Send150261962022-06-25 23:50:36916 days ago1656201036IN
0xbbb38182...6b97E2b90
0.074 ETH0.0050917643.6727846
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
150267502022-06-26 2:28:34916 days ago1656210514
0xbbb38182...6b97E2b90
0.084 ETH
150267212022-06-26 2:22:34916 days ago1656210154
0xbbb38182...6b97E2b90
0.084 ETH
150266942022-06-26 2:13:45916 days ago1656209625
0xbbb38182...6b97E2b90
0.084 ETH
150262242022-06-25 23:58:11916 days ago1656201491
0xbbb38182...6b97E2b90
0.084 ETH
150262022022-06-25 23:52:05916 days ago1656201125
0xbbb38182...6b97E2b90
0.074 ETH
150261852022-06-25 23:48:11916 days ago1656200891
0xbbb38182...6b97E2b90
0.074 ETH
150261702022-06-25 23:42:38916 days ago1656200558
0xbbb38182...6b97E2b90
0.074 ETH
150261492022-06-25 23:36:45916 days ago1656200205
0xbbb38182...6b97E2b90
0.074 ETH
150261242022-06-25 23:29:54916 days ago1656199794
0xbbb38182...6b97E2b90
0.053 ETH
150261102022-06-25 23:24:39916 days ago1656199479
0xbbb38182...6b97E2b90
0.053 ETH
150260862022-06-25 23:16:41916 days ago1656199001
0xbbb38182...6b97E2b90
0.053 ETH
150260682022-06-25 23:12:57916 days ago1656198777
0xbbb38182...6b97E2b90
0.053 ETH
150260452022-06-25 23:09:03916 days ago1656198543
0xbbb38182...6b97E2b90
0.052 ETH
150259142022-06-25 22:35:21916 days ago1656196521
0xbbb38182...6b97E2b90
0.052 ETH
150257712022-06-25 21:53:01916 days ago1656193981
0xbbb38182...6b97E2b90
0.052 ETH
150257512022-06-25 21:48:05916 days ago1656193685
0xbbb38182...6b97E2b90
0.052 ETH
150257342022-06-25 21:43:49916 days ago1656193429
0xbbb38182...6b97E2b90
0.058 ETH
150161932022-06-24 2:59:07918 days ago1656039547
0xbbb38182...6b97E2b90
0.058 ETH
150161782022-06-24 2:55:00918 days ago1656039300
0xbbb38182...6b97E2b90
0.058 ETH
150161632022-06-24 2:50:39918 days ago1656039039
0xbbb38182...6b97E2b90
0.058 ETH
150161402022-06-24 2:45:38918 days ago1656038738
0xbbb38182...6b97E2b90
0.098 ETH
150161172022-06-24 2:41:02918 days ago1656038462
0xbbb38182...6b97E2b90
0.098 ETH
150161012022-06-24 2:37:15918 days ago1656038235
0xbbb38182...6b97E2b90
0.059 ETH
150160672022-06-24 2:27:17918 days ago1656037637
0xbbb38182...6b97E2b90
0.56 ETH
150160512022-06-24 2:22:35918 days ago1656037355
0xbbb38182...6b97E2b90
0.096 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MyStorage

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 18 : MyStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

import "LinkTokenInterface.sol";
import "VRFConsumerBase.sol";
import "Ownable.sol";
import "ERC721.sol";
import "ERC721URIStorage.sol";
import "EthUsPriceConversion.sol";
import "State.sol";

contract MyStorage is ERC721URIStorage, VRFConsumerBase, Ownable {

    // Ethereum US Dollar Price Conversion
    EthUsPriceConversion immutable ethUsConvert;

    // enum State open, end, closed the funding. 
    State immutable state;

    // The gas lane to use, which specifies the maximum gas price to bump to.
    bytes32 immutable keyHash;

    // owner of this contract who deploy it.
    address immutable s_owner;

    // VRF Link fee  
    uint256 fee;

    // Minimum Entry Fee to fund
    uint32 minimumEntreeFee;
    
    // users who send fund to this contract
    address payable[] users;

    // To keep track of the balance of each address
    mapping (address => uint256) balanceOfUsers;

    //counter for NFT Token created
    uint256 tokenCounter;

    // check if it is created NFT token or Eth withdraw
    bool isNftToken;
 
    enum Breed{PUG, SHIBA_INU, ST_BERNARD}
    // add other things
    mapping(bytes32 => address) public requestIdToSender;
    mapping(bytes32 => string) public requestIdToTokenURI;
    mapping(uint256 => Breed) public tokenIdToBreed;
    mapping(bytes32 => uint256) public requestIdToTokenId;
    event RequestedCollectible(bytes32 indexed requestId); 
    event ReturnedCollectible(bytes32 indexed requestId, uint256 randomNumber);

    event Withdraw2(uint256 num);
    event ReturnedWithdraw(bytes32 indexed requestId);
    event RequestWithdraw(bytes32 indexed requestId);

    /*
     * @notice Constructor inherits VRFConsumerBase
     *
     * @param _priceFeedAddress
     * @param _minimumEntreeFee
     * @param _vrfCoordinator - coordinator
     * @param _LinkToken
     * @param _keyHash - the gas lane to use, which specifies the maximum gas price to bump to
     * @param _fee - Link token fee for requesting random number.
     * @param _nftName - NFT token name
     * @param _symbol - NFT symbol
     */
    constructor(
        address _priceFeedAddress,
        uint32 _minimumEntreeFee,
        address _VRFCoordinator, 
        address _LinkToken, 
        bytes32 _keyhash,
        uint256 _fee,
        string memory _nftName,
        string memory _symbol
    )
    VRFConsumerBase(_VRFCoordinator, _LinkToken)
    ERC721(_nftName, _symbol) payable
    {
        minimumEntreeFee = _minimumEntreeFee;
        ethUsConvert = new EthUsPriceConversion(_priceFeedAddress, minimumEntreeFee);
        state = new State();
        s_owner = msg.sender;
        tokenCounter = 0;
        isNftToken = false;
        keyHash = _keyhash;
        fee = _fee;
    }

    /**
     * @notice Get the current Ethereum market price in Wei
     */
    function getETHprice() external view returns (uint256) {
       return ethUsConvert.getETHprice();
    }

    /**
     * @notice Get the current Ethereum market price in US Dollar
     */
    function getETHpriceUSD() external view returns (uint256) {
        return ethUsConvert.getETHpriceUSD();
    }

    /**
     * @notice Get the minimum funding amount which is $50
     */
    function getEntranceFee() external view returns (uint256) {
        return ethUsConvert.getEntranceFee();
    }

    /**
     * @notice Get current funding state.
     */
    function getCurrentState() external view returns (string memory) {
        return state.getCurrentState();
    }

    /**
     * @notice Get the total amount that users funding in this account.
     */
    function getUsersTotalAmount() external view returns (uint256) {
        return address(this).balance;
    }

    /**
     * @notice Get the balance of the user.
     * @param - user address
     */
    function getUserBalance(address user) external view returns (uint256) {
        return balanceOfUsers[user];
    }


    /**
     * @notice Open the funding account.  Users can start funding now.
     */
    function start() external onlyOwner {
        state.start();
    }

    /**
     * @notice End the state.
     */
    function end() external onlyOwner {    
        state.end();
    }

    /**
     * @notice Close the state.
     */  
    function closed() external onlyOwner {
        state.closed();
    }
    
    /**
     * @notice User can enter the fund.  Minimum $50 value of ETH.
     */
    function send() external payable {
        // $50 minimum
        require(state.getCurrentStateType() == state.getOpenState(), "Can't fund yet.  Funding is not opened yet.");
        require(msg.value >= ethUsConvert.getEntranceFee(), "Not enough ETH! Minimum $50 value of ETH require!");
        users.push(payable(msg.sender));
        balanceOfUsers[msg.sender] += msg.value;
    }

    /**
     * @notice Owner withdraw the fund.
     */
    function wdraw() external onlyOwner {

        require(
            state.getCurrentStateType() == state.getEndState(),
            "Funding must be ended before withdraw!"
        );
        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
        bytes32 requestId = requestRandomness(keyHash, fee);
        emit RequestWithdraw(requestId);
    }

    /** 
     * @notice Owner withdraw the funding.
     */
    function wdraw2() external onlyOwner {
        require(
            state.getCurrentStateType() == state.getEndState(),
            "Funding must be ended before withdraw!"
        );
        payable(s_owner).transfer(address(this).balance);
        reset();
        uint256 num = 12347;
        emit Withdraw2(num);
    }

    /**
     * @notice Set the new Link fee for randonness
     */
    function setFee(uint256 newFee) external onlyOwner {
        fee = newFee;
    }

    /**
     * @notice Set the minimum entry fee to fund in this contract
     * 
     */
     function setMinimumEntryFee(uint32 newMinEntryFee) external onlyOwner {
         minimumEntreeFee = newMinEntryFee;
     }

   
    /*
     * @notice Create a new NFT Token.
     */
    function createCollectible(string memory tokenURI) external returns (bytes32){
        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
        bytes32 requestId = requestRandomness(keyHash, fee);
        requestIdToSender[requestId] = msg.sender;
        requestIdToTokenURI[requestId] = tokenURI;
        isNftToken = true;
        emit RequestedCollectible(requestId);
    }

    /*
     * Callback function for random number
     */
    function fulfillRandomness(bytes32 requestId, uint256 randomNumber) internal override {
        if(isNftToken) {
            tokenCounter = tokenCounter + 1;
            address dogOwner = requestIdToSender[requestId];
            string memory tokenURI = requestIdToTokenURI[requestId];
            uint256 newItemId = tokenCounter;
            _safeMint(dogOwner, newItemId);
            _setTokenURI(newItemId, tokenURI);
            Breed breed = Breed(randomNumber % 3); 
            tokenIdToBreed[newItemId] = breed;
            requestIdToTokenId[requestId] = newItemId;
            
            isNftToken = false;
            emit ReturnedCollectible(requestId, randomNumber);
        }
        else { //ETH withdraw
            payable(s_owner).transfer(address(this).balance);
            reset();
            emit ReturnedWithdraw(requestId);
        }
    }

    /*
     * Reset the memory.  Clear the container. 
     */
    function reset() internal {
        for (uint256 index = 0; index < users.length; index++) {
            address user = users[index];
            balanceOfUsers[user] = 0;
        }
        users = new address payable[](0);
        state.setStateType(state.getClosedState());
    }

    /**
     * Set the token URI
     */
    function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: transfer caller is not owner nor approved"
        );
        _setTokenURI(tokenId, _tokenURI);
    }

    /**
     * @notice Get the count of NFT token created so far
     */
    function getNFTtokenCount() external view returns (uint256) {
        return tokenCounter;
    }
    
}

File 2 of 18 : 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 3 of 18 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "LinkTokenInterface.sol";

import "VRFRequestIDBase.sol";

/** ****************************************************************************
 * @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.
 * *****************************************************************************
 * @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     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) 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), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (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. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @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 ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @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.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {

  /**
   * @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 VRFConsumerBase 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 randomness the VRF output
   */
  function fulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    internal
    virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 constant private USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(
    bytes32 _keyHash,
    uint256 _fee
  )
    internal
    returns (
      bytes32 requestId
    )
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed  = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(
    address _vrfCoordinator,
    address _link
  ) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    external
  {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

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

contract VRFRequestIDBase {

  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  )
    internal
    pure
    returns (
      uint256
    )
  {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(
    bytes32 _keyHash,
    uint256 _vRFInputSeed
  )
    internal
    pure
    returns (
      bytes32
    )
  {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

File 5 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 6 of 18 : Context.sol
// SPDX-License-Identifier: MIT

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 7 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "Address.sol";
import "Context.sol";
import "Strings.sol";
import "ERC165.sol";

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: 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 = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: 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), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: 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), "ERC721: 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), "ERC721: 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, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.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 tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

File 8 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "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 9 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 10 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 11 of 18 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 12 of 18 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 13 of 18 : Strings.sol
// SPDX-License-Identifier: MIT

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 14 of 18 : ERC165.sol
// SPDX-License-Identifier: MIT

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 15 of 18 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

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

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

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

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 16 of 18 : EthUsPriceConversion.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

// Get the latest ETH/USD price from chainlink price feed
import "AggregatorV3Interface.sol";

contract EthUsPriceConversion {

    uint256 immutable usdEntryFee;
    AggregatorV3Interface immutable ethUsdPriceFeed;

    constructor(
        address _priceFeedAddress,
        uint256 minumum_entry_fee
    ) {
        ethUsdPriceFeed = AggregatorV3Interface(_priceFeedAddress);
        usdEntryFee = minumum_entry_fee * (10**18);
    }

    /**
     * @notice Get the current Ethereum market price in Wei
     */
    function getETHprice() external view returns (uint256) {
       (, int256 price, , , ) = ethUsdPriceFeed.latestRoundData();
        uint256 adjustedPrice = uint256(price) * 10**10; // 18 decimals
        return adjustedPrice;
    }

    /**
     * @notice Get the current Ethereum market price in US Dollar
     * 1000000000
     */
    function getETHpriceUSD() external view returns (uint256) {
        uint256 ethPrice = this.getETHprice();
        uint256 ethAmountInUsd = ethPrice / 1000000000000000000;
        // the actual ETH/USD conversation rate, after adjusting the extra 0s.
        return ethAmountInUsd;
    }

    /**
     * @notice Get the minimum funding amount which is $50
     */
    function getEntranceFee() external view returns (uint256) {
        uint256 adjustedPrice = this.getETHprice();

        // $50, $2,000 / ETH
        // 50/2,000
        // 50 * 100000 / 2000
        uint256 costToEnter = (usdEntryFee * 10**18) / adjustedPrice;
        return costToEnter;
    }
}

File 17 of 18 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {

  function decimals()
    external
    view
    returns (
      uint8
    );

  function description()
    external
    view
    returns (
      string memory
    );

  function version()
    external
    view
    returns (
      uint256
    );

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(
    uint80 _roundId
  )
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

}

File 18 of 18 : State.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

contract State {

    enum STATE { OPEN, END, CLOSED }
    STATE state;

    constructor() {
        state = STATE.CLOSED;
    }

    /**
     * @notice Open the funding account.  Users can start funding now.
     */
    function start() external {
        require(state == STATE.CLOSED, "Can't start yet! Current state is not closed yet!");
        state = STATE.OPEN;
    }

    /**
     * @notice End the state.
     */
    function end() external {
        require(state == STATE.OPEN, "Not opened yet.");
        state = STATE.END;
    }

    /**
     * @notice Close the state.
     */
    function closed() external {
        require(state == STATE.END, "Not ended yet.");
        state = STATE.CLOSED;
    }

    /**
     * @notice Get current funding state in string.
     */
    function getCurrentState() external view returns (string memory) {
        require((state == STATE.OPEN || state == STATE.END || state == STATE.CLOSED), "unknown state.");
        if (state == STATE.OPEN)
            return "open";
        else if (state == STATE.END)
            return "end";
        else if (state == STATE.CLOSED)
            return "closed";
        else 
            return "unknow state";
    }

    /**
     * @notice Get current funding state in enum STATE type.
     */
    function getCurrentStateType() external view returns (STATE) {
        require((state == STATE.OPEN || state == STATE.END || state == STATE.CLOSED), "unknown state.");
        return state;
    }


     /**
     * @notice Update the funding state
     * @param newState - change to new state
     */
    function setState(uint32 newState) external  {
        require((newState >= 0 && newState <=2), "Invalid number for state. 0=OPEN 1=END 2=CLOSED");
        if (newState == 0)
            state = STATE.OPEN;
        else if(newState == 1)
            state = STATE.END;
        else if(newState == 2)
            state = STATE.CLOSED;
    }

    /**
     * @notice Update the funding state
     * @param newState - change to new state
     */
    function setStateType(STATE newState) external {
        require((newState == STATE.OPEN || newState == STATE.END || newState == STATE.CLOSED), "unknown state.");
        state = newState;
    }

    /**
     * @notice Get the STATE.
     */
    function getState() external view returns (STATE) {
        return state;
    }

    /**
     * @notice Get the OPEN STATE 
     */
    function getOpenState() external pure returns (STATE) {
        return STATE.OPEN;
    }

    /**
     * @notice Get the END STATE 
     */
    function getEndState() external pure returns (STATE) {
        return STATE.END;
    }

    /**
     * @notice Get the CLOSED STATE 
     */
    function getClosedState() external pure returns (STATE) {
        return STATE.CLOSED;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_priceFeedAddress","type":"address"},{"internalType":"uint32","name":"_minimumEntreeFee","type":"uint32"},{"internalType":"address","name":"_VRFCoordinator","type":"address"},{"internalType":"address","name":"_LinkToken","type":"address"},{"internalType":"bytes32","name":"_keyhash","type":"bytes32"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"string","name":"_nftName","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestedCollectible","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"ReturnedCollectible","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"ReturnedWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"num","type":"uint256"}],"name":"Withdraw2","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenURI","type":"string"}],"name":"createCollectible","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"end","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentState","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getETHprice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getETHpriceUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEntranceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNFTtokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUsersTotalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"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":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestIdToSender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestIdToTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestIdToTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":[],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newMinEntryFee","type":"uint32"}],"name":"setMinimumEntryFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToBreed","outputs":[{"internalType":"enum MyStorage.Breed","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wdraw2","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101406040526040516200433238038062004332833981016040819052620000279162000348565b858583838160009080519060200190620000439291906200019c565b508051620000599060019060208401906200019c565b5050506001600160a01b0391821660a0521660805262000079336200014a565b600a805463ffffffff191663ffffffff8916908117909155604051899190620000a2906200022b565b6001600160a01b03909216825263ffffffff166020820152604001604051809103906000f080158015620000da573d6000803e3d6000fd5b506001600160a01b031660c052604051620000f59062000239565b604051809103906000f08015801562000112573d6000803e3d6000fd5b506001600160a01b031660e052505033610120526000600d55600e805460ff1916905561010091909152600955506200045992505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001aa906200041c565b90600052602060002090601f016020900481019282620001ce576000855562000219565b82601f10620001e957805160ff191683800117855562000219565b8280016001018555821562000219579182015b8281111562000219578251825591602001919060010190620001fc565b506200022792915062000247565b5090565b61042780620037b883390190565b6107538062003bdf83390190565b5b8082111562000227576000815560010162000248565b80516001600160a01b03811681146200027657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002a357600080fd5b81516001600160401b0380821115620002c057620002c06200027b565b604051601f8301601f19908116603f01168101908282118183101715620002eb57620002eb6200027b565b816040528381526020925086838588010111156200030857600080fd5b600091505b838210156200032c57858201830151818301840152908201906200030d565b838211156200033e5760008385830101525b9695505050505050565b600080600080600080600080610100898b0312156200036657600080fd5b62000371896200025e565b9750602089015163ffffffff811681146200038b57600080fd5b96506200039b60408a016200025e565b9550620003ab60608a016200025e565b60808a015160a08b015160c08c015192975090955093506001600160401b0380821115620003d857600080fd5b620003e68c838d0162000291565b935060e08b0151915080821115620003fd57600080fd5b506200040c8b828c0162000291565b9150509295985092959890939650565b600181811c908216806200043157607f821691505b602082108114156200045357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161328a6200052e600039600081816117e1015261230f015260008181610c2d0152611a89015260008181610cd201528181610e3701528181611165015281816111f8015281816114970152818161169301528181611726015281816118980152818161192b01528181611b0d01528181612512015261254101526000818161075301528181610a1101528181610ad701526112ec0152600081816110180152611fd0015260008181610b9d015281816119f10152611fa1015261328a6000f3fe6080604052600436106102255760003560e01c806369fe0e2d11610123578063b46300ec116100ab578063cbbc3c281161006f578063cbbc3c281461062d578063ccadfaf21461066a578063e985e9c51461067f578063efbe1c1c146106c8578063f2fde38b146106dd57600080fd5b8063b46300ec146105bb578063b88d4fde146105c3578063be9a6555146105e3578063c87b56dd146105f8578063ca29669b1461061857600080fd5b8063934327e7116100f2578063934327e71461053e57806394985ddd1461055357806395d89b4114610573578063963cf55414610588578063a22cb4651461059b57600080fd5b806369fe0e2d146104cb57806370a08231146104eb578063715018a61461050b5780638da5cb5b1461052057600080fd5b806323b872dd116101b157806342842e0e1161017557806342842e0e146104205780634372441a146104405780634773489214610460578063597e1fb5146104965780636352211e146104ab57600080fd5b806323b872dd14610396578063277d5d75146103b65780632ed78c5f146103cb57806331f1f3c3146103eb578063378aa7011461040b57600080fd5b8063095ea7b3116101f8578063095ea7b3146102dc57806309bc33a7146102fe578063162094c414610313578063219c0eee1461033357806322881f881461036957600080fd5b806301ffc9a71461022a57806306c102111461025f57806306fdde0314610282578063081812fc146102a4575b600080fd5b34801561023657600080fd5b5061024a610245366004612a74565b6106fd565b60405190151581526020015b60405180910390f35b34801561026b57600080fd5b5061027461074f565b604051908152602001610256565b34801561028e57600080fd5b506102976107d8565b6040516102569190612ae9565b3480156102b057600080fd5b506102c46102bf366004612afc565b61086a565b6040516001600160a01b039091168152602001610256565b3480156102e857600080fd5b506102fc6102f7366004612b31565b6108f7565b005b34801561030a57600080fd5b50610274610a0d565b34801561031f57600080fd5b506102fc61032e366004612c28565b610a6d565b34801561033f57600080fd5b506102c461034e366004612afc565b600f602052600090815260409020546001600160a01b031681565b34801561037557600080fd5b50610274610384366004612afc565b60126020526000908152604090205481565b3480156103a257600080fd5b506102fc6103b1366004612c6f565b610aa2565b3480156103c257600080fd5b50610274610ad3565b3480156103d757600080fd5b506102fc6103e6366004612cab565b610b33565b3480156103f757600080fd5b50610274610406366004612cd1565b610b79565b34801561041757600080fd5b50610297610cce565b34801561042c57600080fd5b506102fc61043b366004612c6f565b610d56565b34801561044c57600080fd5b5061029761045b366004612afc565b610d71565b34801561046c57600080fd5b5061027461047b366004612d06565b6001600160a01b03166000908152600c602052604090205490565b3480156104a257600080fd5b506102fc610e0b565b3480156104b757600080fd5b506102c46104c6366004612afc565b610eaa565b3480156104d757600080fd5b506102fc6104e6366004612afc565b610f21565b3480156104f757600080fd5b50610274610506366004612d06565b610f50565b34801561051757600080fd5b506102fc610fd7565b34801561052c57600080fd5b506008546001600160a01b03166102c4565b34801561054a57600080fd5b50600d54610274565b34801561055f57600080fd5b506102fc61056e366004612d21565b61100d565b34801561057f57600080fd5b5061029761108f565b34801561059457600080fd5b5047610274565b3480156105a757600080fd5b506102fc6105b6366004612d51565b61109e565b6102fc611163565b3480156105cf57600080fd5b506102fc6105de366004612d88565b61143a565b3480156105ef57600080fd5b506102fc61146b565b34801561060457600080fd5b50610297610613366004612afc565b6114f0565b34801561062457600080fd5b506102fc611667565b34801561063957600080fd5b5061065d610648366004612afc565b60116020526000908152604090205460ff1681565b6040516102569190612e38565b34801561067657600080fd5b506102fc61186c565b34801561068b57600080fd5b5061024a61069a366004612e4b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156106d457600080fd5b506102fc611ae1565b3480156106e957600080fd5b506102fc6106f8366004612d06565b611b66565b60006001600160e01b031982166380ac58cd60e01b148061072e57506001600160e01b03198216635b5e139f60e01b145b8061074957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166306c102116040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d39190612e7e565b905090565b6060600080546107e790612e97565b80601f016020809104026020016040519081016040528092919081815260200182805461081390612e97565b80156108605780601f1061083557610100808354040283529160200191610860565b820191906000526020600020905b81548152906001019060200180831161084357829003601f168201915b5050505050905090565b600061087582611c01565b6108db5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061090282610eaa565b9050806001600160a01b0316836001600160a01b031614156109705760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108d2565b336001600160a01b038216148061098c575061098c813361069a565b6109fe5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108d2565b610a088383611c1e565b505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166309bc33a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107af573d6000803e3d6000fd5b610a78335b83611c8c565b610a945760405162461bcd60e51b81526004016108d290612ed2565b610a9e8282611d72565b5050565b610aac3382611c8c565b610ac85760405162461bcd60e51b81526004016108d290612ed2565b610a08838383611dfd565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663277d5d756040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107af573d6000803e3d6000fd5b6008546001600160a01b03163314610b5d5760405162461bcd60e51b81526004016108d290612f23565b600a805463ffffffff191663ffffffff92909216919091179055565b6009546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c089190612e7e565b1015610c265760405162461bcd60e51b81526004016108d290612f58565b6000610c547f0000000000000000000000000000000000000000000000000000000000000000600954611f9d565b6000818152600f6020908152604080832080546001600160a01b03191633179055601082529091208551929350610c8f929091860190612970565b50600e805460ff1916600117905560405181907f2fbaa37f6b81f67c8dbf70820291eb8875d10741eb407b4773cbca602f1e7e3990600090a250919050565b60607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663378aa7016040518163ffffffff1660e01b8152600401600060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107d39190810190612fa3565b610a088383836040518060200160405280600081525061143a565b60106020526000908152604090208054610d8a90612e97565b80601f0160208091040260200160405190810160405280929190818152602001828054610db690612e97565b8015610e035780601f10610dd857610100808354040283529160200191610e03565b820191906000526020600020905b815481529060010190602001808311610de657829003601f168201915b505050505081565b6008546001600160a01b03163314610e355760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663597e1fb56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9057600080fd5b505af1158015610ea4573d6000803e3d6000fd5b50505050565b6000818152600260205260408120546001600160a01b0316806107495760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108d2565b6008546001600160a01b03163314610f4b5760405162461bcd60e51b81526004016108d290612f23565b600955565b60006001600160a01b038216610fbb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108d2565b506001600160a01b031660009081526003602052604090205490565b6008546001600160a01b031633146110015760405162461bcd60e51b81526004016108d290612f23565b61100b6000612119565b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110855760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016108d2565b610a9e828261216b565b6060600180546107e790612e97565b6001600160a01b0382163314156110f75760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108d2565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635a4c84456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e5919061301a565b60028111156111f6576111f6612e04565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631b5382bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611254573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611278919061301a565b600281111561128957611289612e04565b146112ea5760405162461bcd60e51b815260206004820152602b60248201527f43616e27742066756e64207965742e202046756e64696e67206973206e6f742060448201526a37b832b732b2103cb2ba1760a91b60648201526084016108d2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166309bc33a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136c9190612e7e565b3410156113d55760405162461bcd60e51b815260206004820152603160248201527f4e6f7420656e6f7567682045544821204d696e696d756d202435302076616c7560448201527065206f662045544820726571756972652160781b60648201526084016108d2565b600b8054600181019091557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b031916339081179091556000908152600c602052604081208054349290611433908490613051565b9091555050565b61144333610a72565b61145f5760405162461bcd60e51b81526004016108d290612ed2565b610ea48484848461238f565b6008546001600160a01b031633146114955760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663be9a65556040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9057600080fd5b60606114fb82611c01565b6115615760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b60648201526084016108d2565b6000828152600660205260408120805461157a90612e97565b80601f01602080910402602001604051908101604052809291908181526020018280546115a690612e97565b80156115f35780601f106115c8576101008083540402835291602001916115f3565b820191906000526020600020905b8154815290600101906020018083116115d657829003601f168201915b50505050509050600061161160408051602081019091526000815290565b9050805160001415611624575092915050565b81511561165657808260405160200161163e929190613069565b60405160208183030381529060405292505050919050565b61165f846123c2565b949350505050565b6008546001600160a01b031633146116915760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663cc7d11f56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611713919061301a565b600281111561172457611724612e04565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631b5382bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a6919061301a565b60028111156117b7576117b7612e04565b146117d45760405162461bcd60e51b81526004016108d290613098565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016904780156108fc02916000818181858888f19350505050158015611829573d6000803e3d6000fd5b5061183261249a565b60405161303b808252907f51e0a434c2a65725467e61b9aaecbc9cca22c55b2e14c47ad64f5193b28f1e0c9060200160405180910390a150565b6008546001600160a01b031633146118965760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663cc7d11f56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611918919061301a565b600281111561192957611929612e04565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631b5382bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ab919061301a565b60028111156119bc576119bc612e04565b146119d95760405162461bcd60e51b81526004016108d290613098565b6009546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a649190612e7e565b1015611a825760405162461bcd60e51b81526004016108d290612f58565b6000611ab07f0000000000000000000000000000000000000000000000000000000000000000600954611f9d565b60405190915081907fc9643854286a26f363b6bda5e92f1275c8a3088838d268e2954b543aa4ff4ab690600090a250565b6008546001600160a01b03163314611b0b5760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663efbe1c1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9057600080fd5b6008546001600160a01b03163314611b905760405162461bcd60e51b81526004016108d290612f23565b6001600160a01b038116611bf55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d2565b611bfe81612119565b50565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c5382610eaa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611c9782611c01565b611cf85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108d2565b6000611d0383610eaa565b9050806001600160a01b0316846001600160a01b03161480611d3e5750836001600160a01b0316611d338461086a565b6001600160a01b0316145b8061165f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff1661165f565b611d7b82611c01565b611dde5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016108d2565b60008281526006602090815260409091208251610a0892840190612970565b826001600160a01b0316611e1082610eaa565b6001600160a01b031614611e785760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108d2565b6001600160a01b038216611eda5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108d2565b611ee5600082611c1e565b6001600160a01b0383166000908152600360205260408120805460019290611f0e9084906130de565b90915550506001600160a01b0382166000908152600360205260408120805460019290611f3c908490613051565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f00000000000000000000000000000000000000000000000000000000000000008486600060405160200161200d929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161203a939291906130f5565b6020604051808303816000875af1158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d919061311c565b50600083815260076020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526120d9906001613051565b60008581526007602052604090205561165f8482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600e5460ff161561230257600d54612184906001613051565b600d556000828152600f60209081526040808320546010909252822080546001600160a01b0390921692916121b890612e97565b80601f01602080910402602001604051908101604052809291908181526020018280546121e490612e97565b80156122315780601f1061220657610100808354040283529160200191612231565b820191906000526020600020905b81548152906001019060200180831161221457829003601f168201915b505050505090506000600d54905061224983826125f7565b6122538183611d72565b600061226060038661314f565b600281111561227157612271612e04565b60008381526011602052604090208054919250829160ff1916600183600281111561229e5761229e612e04565b021790555060008681526012602052604090819020839055600e805460ff191690555186907fcac37b93e49a45150864be2e9fad56e52e1daeeb40d5973a4aa1efc3929b1cb7906122f29088815260200190565b60405180910390a2505050505050565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016904780156108fc02916000818181858888f19350505050158015612357573d6000803e3d6000fd5b5061236061249a565b60405182907faacae81e4bc73442319a032a916761418442e41c9a2b1334ee057d894ad3d2ab90600090a25050565b61239a848484611dfd565b6123a684848484612611565b610ea45760405162461bcd60e51b81526004016108d290613163565b60606123cd82611c01565b6124315760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108d2565b600061244860408051602081019091526000815290565b905060008151116124685760405180602001604052806000815250612493565b806124728461270c565b604051602001612483929190613069565b6040516020818303038152906040525b9392505050565b60005b600b548110156124f1576000600b82815481106124bc576124bc6131b5565b60009182526020808320909101546001600160a01b03168252600c9052604081205550806124e9816131cb565b91505061249d565b50604080516000815260208101918290525161250f91600b916129f4565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e22d1a3c7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e3535e9e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561259d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125c1919061301a565b6040518263ffffffff1660e01b81526004016125dd9190612e38565b600060405180830381600087803b158015610e9057600080fd5b610a9e82826040518060200160405280600081525061280a565b60006001600160a01b0384163b1561270457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126559033908990889088906004016131e6565b6020604051808303816000875af1925050508015612690575060408051601f3d908101601f1916820190925261268d91810190613223565b60015b6126ea573d8080156126be576040519150601f19603f3d011682016040523d82523d6000602084013e6126c3565b606091505b5080516126e25760405162461bcd60e51b81526004016108d290613163565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061165f565b50600161165f565b6060816127305750506040805180820190915260018152600360fc1b602082015290565b8160005b811561275a5780612744816131cb565b91506127539050600a83613240565b9150612734565b60008167ffffffffffffffff81111561277557612775612b5b565b6040519080825280601f01601f19166020018201604052801561279f576020820181803683370190505b5090505b841561165f576127b46001836130de565b91506127c1600a8661314f565b6127cc906030613051565b60f81b8183815181106127e1576127e16131b5565b60200101906001600160f81b031916908160001a905350612803600a86613240565b94506127a3565b612814838361283d565b6128216000848484612611565b610a085760405162461bcd60e51b81526004016108d290613163565b6001600160a01b0382166128935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108d2565b61289c81611c01565b156128e95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108d2565b6001600160a01b0382166000908152600360205260408120805460019290612912908490613051565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461297c90612e97565b90600052602060002090601f01602090048101928261299e57600085556129e4565b82601f106129b757805160ff19168380011785556129e4565b828001600101855582156129e4579182015b828111156129e45782518255916020019190600101906129c9565b506129f0929150612a49565b5090565b8280548282559060005260206000209081019282156129e4579160200282015b828111156129e457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612a14565b5b808211156129f05760008155600101612a4a565b6001600160e01b031981168114611bfe57600080fd5b600060208284031215612a8657600080fd5b813561249381612a5e565b60005b83811015612aac578181015183820152602001612a94565b83811115610ea45750506000910152565b60008151808452612ad5816020860160208601612a91565b601f01601f19169290920160200192915050565b6020815260006124936020830184612abd565b600060208284031215612b0e57600080fd5b5035919050565b80356001600160a01b0381168114612b2c57600080fd5b919050565b60008060408385031215612b4457600080fd5b612b4d83612b15565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612b9a57612b9a612b5b565b604052919050565b600067ffffffffffffffff821115612bbc57612bbc612b5b565b50601f01601f191660200190565b6000612bdd612bd884612ba2565b612b71565b9050828152838383011115612bf157600080fd5b828260208301376000602084830101529392505050565b600082601f830112612c1957600080fd5b61249383833560208501612bca565b60008060408385031215612c3b57600080fd5b82359150602083013567ffffffffffffffff811115612c5957600080fd5b612c6585828601612c08565b9150509250929050565b600080600060608486031215612c8457600080fd5b612c8d84612b15565b9250612c9b60208501612b15565b9150604084013590509250925092565b600060208284031215612cbd57600080fd5b813563ffffffff8116811461249357600080fd5b600060208284031215612ce357600080fd5b813567ffffffffffffffff811115612cfa57600080fd5b61165f84828501612c08565b600060208284031215612d1857600080fd5b61249382612b15565b60008060408385031215612d3457600080fd5b50508035926020909101359150565b8015158114611bfe57600080fd5b60008060408385031215612d6457600080fd5b612d6d83612b15565b91506020830135612d7d81612d43565b809150509250929050565b60008060008060808587031215612d9e57600080fd5b612da785612b15565b9350612db560208601612b15565b925060408501359150606085013567ffffffffffffffff811115612dd857600080fd5b8501601f81018713612de957600080fd5b612df887823560208401612bca565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b60038110611bfe57634e487b7160e01b600052602160045260246000fd5b60208101612e4583612e1a565b91905290565b60008060408385031215612e5e57600080fd5b612e6783612b15565b9150612e7560208401612b15565b90509250929050565b600060208284031215612e9057600080fd5b5051919050565b600181811c90821680612eab57607f821691505b60208210811415612ecc57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060408201526a1dda5d1a0819985d58d95d60aa1b606082015260800190565b600060208284031215612fb557600080fd5b815167ffffffffffffffff811115612fcc57600080fd5b8201601f81018413612fdd57600080fd5b8051612feb612bd882612ba2565b81815285602083850101111561300057600080fd5b613011826020830160208601612a91565b95945050505050565b60006020828403121561302c57600080fd5b81516003811061249357600080fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156130645761306461303b565b500190565b6000835161307b818460208801612a91565b83519083019061308f818360208801612a91565b01949350505050565b60208082526026908201527f46756e64696e67206d75737420626520656e646564206265666f72652077697460408201526568647261772160d01b606082015260800190565b6000828210156130f0576130f061303b565b500390565b60018060a01b03841681528260208201526060604082015260006130116060830184612abd565b60006020828403121561312e57600080fd5b815161249381612d43565b634e487b7160e01b600052601260045260246000fd5b60008261315e5761315e613139565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156131df576131df61303b565b5060010190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061321990830184612abd565b9695505050505050565b60006020828403121561323557600080fd5b815161249381612a5e565b60008261324f5761324f613139565b50049056fea26469706673582212207998e6e3520c8e824c1a1cd065c96c4e7dc5c5c3cf9a66b2a6cc51e472f30c3e64736f6c634300080c003360c060405234801561001057600080fd5b5060405161042738038061042783398101604081905261002f91610059565b6001600160a01b03821660a05261004e81670de0b6b3a7640000610093565b608052506100c09050565b6000806040838503121561006c57600080fd5b82516001600160a01b038116811461008357600080fd5b6020939093015192949293505050565b60008160001904831182151516156100bb57634e487b7160e01b600052601160045260246000fd5b500290565b60805160a0516103436100e4600039600060750152600061018401526103436000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806306c102111461004657806309bc33a714610060578063277d5d7514610068575b600080fd5b61004e610070565b60405190815260200160405180910390f35b61004e610115565b61004e6101bb565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156100d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100f59190610255565b5050509150506000816402540be40061010e91906102a5565b9392505050565b600080306001600160a01b03166306c102116040518163ffffffff1660e01b8152600401602060405180830381865afa158015610156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017a91906102d2565b90506000816101b17f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a76400006102a5565b61010e91906102eb565b600080306001600160a01b03166306c102116040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022091906102d2565b9050600061010e670de0b6b3a7640000836102eb565b805169ffffffffffffffffffff8116811461025057600080fd5b919050565b600080600080600060a0868803121561026d57600080fd5b61027686610236565b945060208601519350604086015192506060860151915061029960808701610236565b90509295509295909350565b60008160001904831182151516156102cd57634e487b7160e01b600052601160045260246000fd5b500290565b6000602082840312156102e457600080fd5b5051919050565b60008261030857634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220249cb9d065b4a967286d22c13f79715433e1b08e3a1d61fc2152b9c175e1c0f964736f6c634300080c0033608060405234801561001057600080fd5b506000805460ff191660021790556107268061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638e4fc2fd116100715780638e4fc2fd146100f9578063be9a65551461010c578063cc7d11f514610114578063e22d1a3c1461011b578063e3535e9e1461012e578063efbe1c1c1461013557600080fd5b80631865c57d146100ae5780631b5382bc146100cb578063378aa701146100d3578063597e1fb5146100e85780635a4c8445146100f2575b600080fd5b60005460ff165b6040516100c291906105fd565b60405180910390f35b6100b561013d565b6100db6101c9565b6040516100c29190610625565b6100f0610323565b005b60006100b5565b6100f061010736600461067a565b610391565b6100f0610463565b60016100b5565b6100f06101293660046106a7565b6104f5565b60026100b5565b6100f061057d565b60008060005460ff166002811115610157576101576105e7565b14806101795750600160005460ff166002811115610177576101776105e7565b145b8061019a5750600260005460ff166002811115610198576101986105e7565b145b6101bf5760405162461bcd60e51b81526004016101b6906106c8565b60405180910390fd5b5060005460ff1690565b60606000805460ff1660028111156101e3576101e36105e7565b14806102055750600160005460ff166002811115610203576102036105e7565b145b806102265750600260005460ff166002811115610224576102246105e7565b145b6102425760405162461bcd60e51b81526004016101b6906106c8565b6000805460ff16600281111561025a5761025a6105e7565b141561027f575060408051808201909152600481526337b832b760e11b602082015290565b600160005460ff166002811115610298576102986105e7565b14156102bc5750604080518082019091526003815262195b9960ea1b602082015290565b600260005460ff1660028111156102d5576102d56105e7565b14156102fc575060408051808201909152600681526518db1bdcd95960d21b602082015290565b5060408051808201909152600c81526b756e6b6e6f7720737461746560a01b602082015290565b600160005460ff16600281111561033c5761033c6105e7565b1461037a5760405162461bcd60e51b815260206004820152600e60248201526d2737ba1032b73232b2103cb2ba1760911b60448201526064016101b6565b600080546002919060ff19166001835b0217905550565b60028163ffffffff1611156104005760405162461bcd60e51b815260206004820152602f60248201527f496e76616c6964206e756d62657220666f722073746174652e20303d4f50454e60448201526e080c4f515391080c8f50d313d4d151608a1b60648201526084016101b6565b63ffffffff81166104215760008054819060ff19166001825b021790555050565b8063ffffffff166001141561044357600080546001919060ff19168280610419565b8063ffffffff1660021415610460576000805460ff191660021790555b50565b600260005460ff16600281111561047c5761047c6105e7565b146104e35760405162461bcd60e51b815260206004820152603160248201527f43616e277420737461727420796574212043757272656e74207374617465206960448201527073206e6f7420636c6f736564207965742160781b60648201526084016101b6565b60008054819060ff191660018261038a565b6000816002811115610509576105096105e7565b148061052657506001816002811115610524576105246105e7565b145b8061054257506002816002811115610540576105406105e7565b145b61055e5760405162461bcd60e51b81526004016101b6906106c8565b6000805482919060ff19166001836002811115610419576104196105e7565b6000805460ff166002811115610595576105956105e7565b146105d45760405162461bcd60e51b815260206004820152600f60248201526e2737ba1037b832b732b2103cb2ba1760891b60448201526064016101b6565b600080546001919060ff1916828061038a565b634e487b7160e01b600052602160045260246000fd5b602081016003831061061f57634e487b7160e01b600052602160045260246000fd5b91905290565b600060208083528351808285015260005b8181101561065257858101830151858201604001528201610636565b81811115610664576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561068c57600080fd5b813563ffffffff811681146106a057600080fd5b9392505050565b6000602082840312156106b957600080fd5b8135600381106106a057600080fd5b6020808252600e908201526d3ab735b737bbb71039ba30ba329760911b60408201526060019056fea2646970667358221220a023c7cd6dbfe5c82364d7f05627ddf37be0aad77e7da5c0e630994217df4ab864736f6c634300080c00330000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84190000000000000000000000000000000000000000000000000000000000000032000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000005446f6769650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003444f470000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102255760003560e01c806369fe0e2d11610123578063b46300ec116100ab578063cbbc3c281161006f578063cbbc3c281461062d578063ccadfaf21461066a578063e985e9c51461067f578063efbe1c1c146106c8578063f2fde38b146106dd57600080fd5b8063b46300ec146105bb578063b88d4fde146105c3578063be9a6555146105e3578063c87b56dd146105f8578063ca29669b1461061857600080fd5b8063934327e7116100f2578063934327e71461053e57806394985ddd1461055357806395d89b4114610573578063963cf55414610588578063a22cb4651461059b57600080fd5b806369fe0e2d146104cb57806370a08231146104eb578063715018a61461050b5780638da5cb5b1461052057600080fd5b806323b872dd116101b157806342842e0e1161017557806342842e0e146104205780634372441a146104405780634773489214610460578063597e1fb5146104965780636352211e146104ab57600080fd5b806323b872dd14610396578063277d5d75146103b65780632ed78c5f146103cb57806331f1f3c3146103eb578063378aa7011461040b57600080fd5b8063095ea7b3116101f8578063095ea7b3146102dc57806309bc33a7146102fe578063162094c414610313578063219c0eee1461033357806322881f881461036957600080fd5b806301ffc9a71461022a57806306c102111461025f57806306fdde0314610282578063081812fc146102a4575b600080fd5b34801561023657600080fd5b5061024a610245366004612a74565b6106fd565b60405190151581526020015b60405180910390f35b34801561026b57600080fd5b5061027461074f565b604051908152602001610256565b34801561028e57600080fd5b506102976107d8565b6040516102569190612ae9565b3480156102b057600080fd5b506102c46102bf366004612afc565b61086a565b6040516001600160a01b039091168152602001610256565b3480156102e857600080fd5b506102fc6102f7366004612b31565b6108f7565b005b34801561030a57600080fd5b50610274610a0d565b34801561031f57600080fd5b506102fc61032e366004612c28565b610a6d565b34801561033f57600080fd5b506102c461034e366004612afc565b600f602052600090815260409020546001600160a01b031681565b34801561037557600080fd5b50610274610384366004612afc565b60126020526000908152604090205481565b3480156103a257600080fd5b506102fc6103b1366004612c6f565b610aa2565b3480156103c257600080fd5b50610274610ad3565b3480156103d757600080fd5b506102fc6103e6366004612cab565b610b33565b3480156103f757600080fd5b50610274610406366004612cd1565b610b79565b34801561041757600080fd5b50610297610cce565b34801561042c57600080fd5b506102fc61043b366004612c6f565b610d56565b34801561044c57600080fd5b5061029761045b366004612afc565b610d71565b34801561046c57600080fd5b5061027461047b366004612d06565b6001600160a01b03166000908152600c602052604090205490565b3480156104a257600080fd5b506102fc610e0b565b3480156104b757600080fd5b506102c46104c6366004612afc565b610eaa565b3480156104d757600080fd5b506102fc6104e6366004612afc565b610f21565b3480156104f757600080fd5b50610274610506366004612d06565b610f50565b34801561051757600080fd5b506102fc610fd7565b34801561052c57600080fd5b506008546001600160a01b03166102c4565b34801561054a57600080fd5b50600d54610274565b34801561055f57600080fd5b506102fc61056e366004612d21565b61100d565b34801561057f57600080fd5b5061029761108f565b34801561059457600080fd5b5047610274565b3480156105a757600080fd5b506102fc6105b6366004612d51565b61109e565b6102fc611163565b3480156105cf57600080fd5b506102fc6105de366004612d88565b61143a565b3480156105ef57600080fd5b506102fc61146b565b34801561060457600080fd5b50610297610613366004612afc565b6114f0565b34801561062457600080fd5b506102fc611667565b34801561063957600080fd5b5061065d610648366004612afc565b60116020526000908152604090205460ff1681565b6040516102569190612e38565b34801561067657600080fd5b506102fc61186c565b34801561068b57600080fd5b5061024a61069a366004612e4b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156106d457600080fd5b506102fc611ae1565b3480156106e957600080fd5b506102fc6106f8366004612d06565b611b66565b60006001600160e01b031982166380ac58cd60e01b148061072e57506001600160e01b03198216635b5e139f60e01b145b8061074957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60007f0000000000000000000000002183eca8d5a9e839fde71854fd5f6b5598d3bd986001600160a01b03166306c102116040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d39190612e7e565b905090565b6060600080546107e790612e97565b80601f016020809104026020016040519081016040528092919081815260200182805461081390612e97565b80156108605780601f1061083557610100808354040283529160200191610860565b820191906000526020600020905b81548152906001019060200180831161084357829003601f168201915b5050505050905090565b600061087582611c01565b6108db5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061090282610eaa565b9050806001600160a01b0316836001600160a01b031614156109705760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108d2565b336001600160a01b038216148061098c575061098c813361069a565b6109fe5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108d2565b610a088383611c1e565b505050565b60007f0000000000000000000000002183eca8d5a9e839fde71854fd5f6b5598d3bd986001600160a01b03166309bc33a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107af573d6000803e3d6000fd5b610a78335b83611c8c565b610a945760405162461bcd60e51b81526004016108d290612ed2565b610a9e8282611d72565b5050565b610aac3382611c8c565b610ac85760405162461bcd60e51b81526004016108d290612ed2565b610a08838383611dfd565b60007f0000000000000000000000002183eca8d5a9e839fde71854fd5f6b5598d3bd986001600160a01b031663277d5d756040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107af573d6000803e3d6000fd5b6008546001600160a01b03163314610b5d5760405162461bcd60e51b81526004016108d290612f23565b600a805463ffffffff191663ffffffff92909216919091179055565b6009546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a0823190602401602060405180830381865afa158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c089190612e7e565b1015610c265760405162461bcd60e51b81526004016108d290612f58565b6000610c547faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445600954611f9d565b6000818152600f6020908152604080832080546001600160a01b03191633179055601082529091208551929350610c8f929091860190612970565b50600e805460ff1916600117905560405181907f2fbaa37f6b81f67c8dbf70820291eb8875d10741eb407b4773cbca602f1e7e3990600090a250919050565b60607f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663378aa7016040518163ffffffff1660e01b8152600401600060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107d39190810190612fa3565b610a088383836040518060200160405280600081525061143a565b60106020526000908152604090208054610d8a90612e97565b80601f0160208091040260200160405190810160405280929190818152602001828054610db690612e97565b8015610e035780601f10610dd857610100808354040283529160200191610e03565b820191906000526020600020905b815481529060010190602001808311610de657829003601f168201915b505050505081565b6008546001600160a01b03163314610e355760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663597e1fb56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9057600080fd5b505af1158015610ea4573d6000803e3d6000fd5b50505050565b6000818152600260205260408120546001600160a01b0316806107495760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108d2565b6008546001600160a01b03163314610f4b5760405162461bcd60e51b81526004016108d290612f23565b600955565b60006001600160a01b038216610fbb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108d2565b506001600160a01b031660009081526003602052604090205490565b6008546001600160a01b031633146110015760405162461bcd60e51b81526004016108d290612f23565b61100b6000612119565b565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146110855760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016108d2565b610a9e828261216b565b6060600180546107e790612e97565b6001600160a01b0382163314156110f75760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108d2565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b0316635a4c84456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e5919061301a565b60028111156111f6576111f6612e04565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b0316631b5382bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611254573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611278919061301a565b600281111561128957611289612e04565b146112ea5760405162461bcd60e51b815260206004820152602b60248201527f43616e27742066756e64207965742e202046756e64696e67206973206e6f742060448201526a37b832b732b2103cb2ba1760a91b60648201526084016108d2565b7f0000000000000000000000002183eca8d5a9e839fde71854fd5f6b5598d3bd986001600160a01b03166309bc33a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136c9190612e7e565b3410156113d55760405162461bcd60e51b815260206004820152603160248201527f4e6f7420656e6f7567682045544821204d696e696d756d202435302076616c7560448201527065206f662045544820726571756972652160781b60648201526084016108d2565b600b8054600181019091557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b031916339081179091556000908152600c602052604081208054349290611433908490613051565b9091555050565b61144333610a72565b61145f5760405162461bcd60e51b81526004016108d290612ed2565b610ea48484848461238f565b6008546001600160a01b031633146114955760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663be9a65556040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9057600080fd5b60606114fb82611c01565b6115615760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b60648201526084016108d2565b6000828152600660205260408120805461157a90612e97565b80601f01602080910402602001604051908101604052809291908181526020018280546115a690612e97565b80156115f35780601f106115c8576101008083540402835291602001916115f3565b820191906000526020600020905b8154815290600101906020018083116115d657829003601f168201915b50505050509050600061161160408051602081019091526000815290565b9050805160001415611624575092915050565b81511561165657808260405160200161163e929190613069565b60405160208183030381529060405292505050919050565b61165f846123c2565b949350505050565b6008546001600160a01b031633146116915760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663cc7d11f56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611713919061301a565b600281111561172457611724612e04565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b0316631b5382bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a6919061301a565b60028111156117b7576117b7612e04565b146117d45760405162461bcd60e51b81526004016108d290613098565b6040516001600160a01b037f0000000000000000000000008ef936b96084442963c49c0a1e2cbd05000d92f216904780156108fc02916000818181858888f19350505050158015611829573d6000803e3d6000fd5b5061183261249a565b60405161303b808252907f51e0a434c2a65725467e61b9aaecbc9cca22c55b2e14c47ad64f5193b28f1e0c9060200160405180910390a150565b6008546001600160a01b031633146118965760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663cc7d11f56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611918919061301a565b600281111561192957611929612e04565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b0316631b5382bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ab919061301a565b60028111156119bc576119bc612e04565b146119d95760405162461bcd60e51b81526004016108d290613098565b6009546040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a0823190602401602060405180830381865afa158015611a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a649190612e7e565b1015611a825760405162461bcd60e51b81526004016108d290612f58565b6000611ab07faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445600954611f9d565b60405190915081907fc9643854286a26f363b6bda5e92f1275c8a3088838d268e2954b543aa4ff4ab690600090a250565b6008546001600160a01b03163314611b0b5760405162461bcd60e51b81526004016108d290612f23565b7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663efbe1c1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9057600080fd5b6008546001600160a01b03163314611b905760405162461bcd60e51b81526004016108d290612f23565b6001600160a01b038116611bf55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d2565b611bfe81612119565b50565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c5382610eaa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611c9782611c01565b611cf85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108d2565b6000611d0383610eaa565b9050806001600160a01b0316846001600160a01b03161480611d3e5750836001600160a01b0316611d338461086a565b6001600160a01b0316145b8061165f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff1661165f565b611d7b82611c01565b611dde5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016108d2565b60008281526006602090815260409091208251610a0892840190612970565b826001600160a01b0316611e1082610eaa565b6001600160a01b031614611e785760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108d2565b6001600160a01b038216611eda5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108d2565b611ee5600082611c1e565b6001600160a01b0383166000908152600360205260408120805460019290611f0e9084906130de565b90915550506001600160a01b0382166000908152600360205260408120805460019290611f3c908490613051565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79528486600060405160200161200d929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161203a939291906130f5565b6020604051808303816000875af1158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d919061311c565b50600083815260076020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526120d9906001613051565b60008581526007602052604090205561165f8482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600e5460ff161561230257600d54612184906001613051565b600d556000828152600f60209081526040808320546010909252822080546001600160a01b0390921692916121b890612e97565b80601f01602080910402602001604051908101604052809291908181526020018280546121e490612e97565b80156122315780601f1061220657610100808354040283529160200191612231565b820191906000526020600020905b81548152906001019060200180831161221457829003601f168201915b505050505090506000600d54905061224983826125f7565b6122538183611d72565b600061226060038661314f565b600281111561227157612271612e04565b60008381526011602052604090208054919250829160ff1916600183600281111561229e5761229e612e04565b021790555060008681526012602052604090819020839055600e805460ff191690555186907fcac37b93e49a45150864be2e9fad56e52e1daeeb40d5973a4aa1efc3929b1cb7906122f29088815260200190565b60405180910390a2505050505050565b6040516001600160a01b037f0000000000000000000000008ef936b96084442963c49c0a1e2cbd05000d92f216904780156108fc02916000818181858888f19350505050158015612357573d6000803e3d6000fd5b5061236061249a565b60405182907faacae81e4bc73442319a032a916761418442e41c9a2b1334ee057d894ad3d2ab90600090a25050565b61239a848484611dfd565b6123a684848484612611565b610ea45760405162461bcd60e51b81526004016108d290613163565b60606123cd82611c01565b6124315760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108d2565b600061244860408051602081019091526000815290565b905060008151116124685760405180602001604052806000815250612493565b806124728461270c565b604051602001612483929190613069565b6040516020818303038152906040525b9392505050565b60005b600b548110156124f1576000600b82815481106124bc576124bc6131b5565b60009182526020808320909101546001600160a01b03168252600c9052604081205550806124e9816131cb565b91505061249d565b50604080516000815260208101918290525161250f91600b916129f4565b507f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663e22d1a3c7f00000000000000000000000002818326eb46e0e1f44c5e5c35f38d068536d76d6001600160a01b031663e3535e9e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561259d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125c1919061301a565b6040518263ffffffff1660e01b81526004016125dd9190612e38565b600060405180830381600087803b158015610e9057600080fd5b610a9e82826040518060200160405280600081525061280a565b60006001600160a01b0384163b1561270457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126559033908990889088906004016131e6565b6020604051808303816000875af1925050508015612690575060408051601f3d908101601f1916820190925261268d91810190613223565b60015b6126ea573d8080156126be576040519150601f19603f3d011682016040523d82523d6000602084013e6126c3565b606091505b5080516126e25760405162461bcd60e51b81526004016108d290613163565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061165f565b50600161165f565b6060816127305750506040805180820190915260018152600360fc1b602082015290565b8160005b811561275a5780612744816131cb565b91506127539050600a83613240565b9150612734565b60008167ffffffffffffffff81111561277557612775612b5b565b6040519080825280601f01601f19166020018201604052801561279f576020820181803683370190505b5090505b841561165f576127b46001836130de565b91506127c1600a8661314f565b6127cc906030613051565b60f81b8183815181106127e1576127e16131b5565b60200101906001600160f81b031916908160001a905350612803600a86613240565b94506127a3565b612814838361283d565b6128216000848484612611565b610a085760405162461bcd60e51b81526004016108d290613163565b6001600160a01b0382166128935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108d2565b61289c81611c01565b156128e95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108d2565b6001600160a01b0382166000908152600360205260408120805460019290612912908490613051565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461297c90612e97565b90600052602060002090601f01602090048101928261299e57600085556129e4565b82601f106129b757805160ff19168380011785556129e4565b828001600101855582156129e4579182015b828111156129e45782518255916020019190600101906129c9565b506129f0929150612a49565b5090565b8280548282559060005260206000209081019282156129e4579160200282015b828111156129e457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612a14565b5b808211156129f05760008155600101612a4a565b6001600160e01b031981168114611bfe57600080fd5b600060208284031215612a8657600080fd5b813561249381612a5e565b60005b83811015612aac578181015183820152602001612a94565b83811115610ea45750506000910152565b60008151808452612ad5816020860160208601612a91565b601f01601f19169290920160200192915050565b6020815260006124936020830184612abd565b600060208284031215612b0e57600080fd5b5035919050565b80356001600160a01b0381168114612b2c57600080fd5b919050565b60008060408385031215612b4457600080fd5b612b4d83612b15565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612b9a57612b9a612b5b565b604052919050565b600067ffffffffffffffff821115612bbc57612bbc612b5b565b50601f01601f191660200190565b6000612bdd612bd884612ba2565b612b71565b9050828152838383011115612bf157600080fd5b828260208301376000602084830101529392505050565b600082601f830112612c1957600080fd5b61249383833560208501612bca565b60008060408385031215612c3b57600080fd5b82359150602083013567ffffffffffffffff811115612c5957600080fd5b612c6585828601612c08565b9150509250929050565b600080600060608486031215612c8457600080fd5b612c8d84612b15565b9250612c9b60208501612b15565b9150604084013590509250925092565b600060208284031215612cbd57600080fd5b813563ffffffff8116811461249357600080fd5b600060208284031215612ce357600080fd5b813567ffffffffffffffff811115612cfa57600080fd5b61165f84828501612c08565b600060208284031215612d1857600080fd5b61249382612b15565b60008060408385031215612d3457600080fd5b50508035926020909101359150565b8015158114611bfe57600080fd5b60008060408385031215612d6457600080fd5b612d6d83612b15565b91506020830135612d7d81612d43565b809150509250929050565b60008060008060808587031215612d9e57600080fd5b612da785612b15565b9350612db560208601612b15565b925060408501359150606085013567ffffffffffffffff811115612dd857600080fd5b8501601f81018713612de957600080fd5b612df887823560208401612bca565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b60038110611bfe57634e487b7160e01b600052602160045260246000fd5b60208101612e4583612e1a565b91905290565b60008060408385031215612e5e57600080fd5b612e6783612b15565b9150612e7560208401612b15565b90509250929050565b600060208284031215612e9057600080fd5b5051919050565b600181811c90821680612eab57607f821691505b60208210811415612ecc57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060408201526a1dda5d1a0819985d58d95d60aa1b606082015260800190565b600060208284031215612fb557600080fd5b815167ffffffffffffffff811115612fcc57600080fd5b8201601f81018413612fdd57600080fd5b8051612feb612bd882612ba2565b81815285602083850101111561300057600080fd5b613011826020830160208601612a91565b95945050505050565b60006020828403121561302c57600080fd5b81516003811061249357600080fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156130645761306461303b565b500190565b6000835161307b818460208801612a91565b83519083019061308f818360208801612a91565b01949350505050565b60208082526026908201527f46756e64696e67206d75737420626520656e646564206265666f72652077697460408201526568647261772160d01b606082015260800190565b6000828210156130f0576130f061303b565b500390565b60018060a01b03841681528260208201526060604082015260006130116060830184612abd565b60006020828403121561312e57600080fd5b815161249381612d43565b634e487b7160e01b600052601260045260246000fd5b60008261315e5761315e613139565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156131df576131df61303b565b5060010190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061321990830184612abd565b9695505050505050565b60006020828403121561323557600080fd5b815161249381612a5e565b60008261324f5761324f613139565b50049056fea26469706673582212207998e6e3520c8e824c1a1cd065c96c4e7dc5c5c3cf9a66b2a6cc51e472f30c3e64736f6c634300080c0033

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

0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84190000000000000000000000000000000000000000000000000000000000000032000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000005446f6769650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003444f470000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _priceFeedAddress (address): 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
Arg [1] : _minimumEntreeFee (uint32): 50
Arg [2] : _VRFCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [3] : _LinkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [4] : _keyhash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [5] : _fee (uint256): 2000000000000000000
Arg [6] : _nftName (string): Dogie
Arg [7] : _symbol (string): DOG

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [2] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [3] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [4] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [5] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [9] : 446f676965000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [11] : 444f470000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.