ETH Price: $3,053.50 (+3.05%)
Gas: 1 Gwei

Token

Kindred Hearts NFT (KHEARTSNFT)
 

Overview

Max Total Supply

2,932 KHEARTSNFT

Holders

533

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
janiefitzgerald.eth
Balance
2 KHEARTSNFT
0xcd7c79616238fd3a887d21eda7e1f1c058845ef4
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Kindred Hearts is a collection of 7777 programmatically and randomly generated NFTs on the Ethereum Blockchain. With over 50 Artists contributing, our first generation project is the foundation for building the Favrit community with a mission to make the world a better place.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
KindredHearts

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : KindredHeartsNFT.sol
// SPDX-License-Identifier: MIT
// Ts/22
pragma solidity ^0.8.9;
import "./BasicNFT.sol";
import "./RevealVRF.sol";
import "./RoyaltyNFT.sol";
import "./VerifyNFT.sol";
import "./MintableNFT.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

interface Token {
    function approve(address _spender, uint256 _value)
        external
        returns (bool success);
}


//       _____           _____
//   ,ad8PPPP88b,     ,d88PPPP8ba,
//  d8P"      "Y8b, ,d8P"      "Y8b
// dP'           "8a8"           `Yd
// 8(              "              )8
// I8                             8I
//  Yb,                         ,dP
//   "8a,                     ,a8"
//     "8a,                 ,a8"
//       "Yba             adP"
//         `Y8a         a8P'
//           `88,     ,88'
//             "8b   d8"
//              "8b d8"
//               `888'
//                 "
// (On-chain random VRF Revealable)
//
contract KindredHearts is
    BasicNFT,
    RevealVRF,
    RoyaltyNFT,
    VerifiableNFT,
    MintableNFT
{
    constructor(
        address _vrfCoordinator,
        address _link,
        uint256 _vrfFee,
        bytes32 _keyHash
    )
        BasicNFT("Kindred Hearts NFT", "KHEARTSNFT", "")
        RevealVRF(_vrfCoordinator, _link, _vrfFee, _keyHash)
        VerifiableNFT()
        MintableNFT(block.timestamp) // phase 1 start
    {
        currentId += 1; // start at Token ID 1
        for (uint256 i = 0; i < 17; i++) {
          _safeMint(msg.sender, currentId);
          currentId += 1;
        }
    }

    /**
     * @dev update metadata link if not locked
     */
    function setBaseURI(string memory uri) public onlyOwner {
        require(!metadataLocked, "metadata is locked");
        _baseTokenURI = uri;
    }

    /**
     * @dev hash of input traits for generation
     */
    bytes32 public provenance = 0;

    /**
     * @dev set provenance hash (before traitseed is set)
     * For proving that the inputs don't change during reveal
     */
    function setProvenance(bytes32 provenanceHash) public onlyOwner {
        require(traitseed == 0, "already revealed");
        provenance = provenanceHash;
    }

    /**
     * @dev VRF generated trait seed, keccak256(seed,tokenId) for card trait seed
     */
    function getTraitSeed() public view override returns (bytes32) {
        return traitseed;
    }

    /**
     * @dev internal overrides
     */
    function _safeMint(address to, uint256 tokenId)
        internal
        override(ERC721, MintableNFT)
    {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev max supply limit
     */
    function supplyLimit() public pure returns (uint256) {
        return 7777;
    }

    function _supplyLimit()
        internal
        pure
        override(VerifiableNFT, MintableNFT)
        returns (uint256)
    {
        return supplyLimit();
    }

    /**
     * @dev internal overrides
     */
    function _msgSender()
        internal
        view
        override(Context)
        returns (address sender)
    {
        return msgSender();
    }

    /**
     * @dev lock metadata immutable
     */
    bool public metadataLocked;

    function lockMetadata() public onlyOwner {
        metadataLocked = true;
    }

    /**
     * @dev lock weights immutable
     */
    function lockWeights() public onlyOwner {
        _weightSet();
    }

    // Example collection metadata (not individual token metadata)
    // {
    //   "name": "OpenSea Creatures",
    //   "description": "OpenSea Creatures are adorable aquatic beings primarily for demonstrating what can be done using the OpenSea platform. Adopt one today to try out all the OpenSea buying, selling, and bidding feature set.",
    //   "image": "https://openseacreatures.io/image.png",
    //   "external_link": "https://openseacreatures.io",
    //   "seller_fee_basis_points": 100, # Indicates a 1% seller fee.
    //   "fee_recipient": "0xA97F337c39cccE66adfeCB2BF99C1DdC54C2D721" # Where seller fees will be paid to.
    // }

    string private contractURI_ = "";

    /**
     * @dev collection metadata
     */
    function contractURI() public view returns (string memory) {
        return contractURI_;
    }

    /**
     * @dev set collection metadata
     */
    function setcontractURI(string memory uri) public onlyOwner {
        contractURI_ = uri;
    }

    /**
     * @dev request randomness from VRF.
     * should be done only after sale is complete.
     */
    function doReveal() public onlyOwner {
        require(traitseed == 0, "trait seed already set");
        require(currentId == supplyLimit() + 1, "cant reveal until supply limit");
        _doReveal();
    }

    /**
    * @dev update vrf config if necessary
    */
    function updateVrfConfig(uint256 _linkFee, bytes32 _keyHash) public onlyOwner {
        _updateVrfConfig(_linkFee, _keyHash);
    }

    /**
     * @dev retrieve erc20
     */
    function ownerApprove(Token address_) public onlyOwner {
        address_.approve(owner(), type(uint256).max);
    }

    /**
     * @dev set royalties receiver
     */
    function setRoyaltiesReceiver(address addr) public onlyOwner {
        _setRoyaltiesReceiver(addr);
    }

    /**
     * @dev give user(s) additional mintpass(es)
     */
    function newmintpass(address[] memory to, uint256[] memory amount)
        public
        onlyOwner
    {
        _newmintpass(to, amount);
    }

    /**
     * @dev whitelist user (allow purchasing in phase 1 and 2)
     */
    function newwhitelist(address[] memory addresses) public onlyOwner {
        _newwhitelist(addresses);
    }

    /**
     * @dev (Veriable traits) final number of layers
     */
    function newWeights(uint256 numLayers_) public onlyOwner {
        _newWeights(numLayers_);
    }

    /**
     * @dev (Veriable traits) edit layer 'numLayer' weight, ex: layer 1 = [1,1,1,10]
     */
    function editWeight(uint256 numLayer_, uint256[] memory choices_)
        public
        onlyOwner
    {
        _editWeight(numLayer_, choices_);
    }

    /**
     * @dev set phase1 timestamp
     */
    function setPhase1(uint256 unixTimestamp) public onlyOwner {
        require(phase() < 2, "cant set phase 1 after phase 1");
        _setPhase1(unixTimestamp);
    }
    /**
     * @dev set phase2 timestamp
     */
    function setPhase2(uint256 unixTimestamp) public onlyOwner {
        require(phase() < 2, "cant set phase 2 after phase 2");
        _setPhase2(unixTimestamp);
    }

    /**
     * @dev set phase3 timestamp
     */
    function setPhase3(uint256 unixTimestamp) public onlyOwner {
        require(phase() < 3, "cant set phase 3 after phase 3");
        _setPhase3(unixTimestamp);
    }
    /**
     * @dev set phase4 timestamp
     */
    function setPhase4(uint256 unixTimestamp) public onlyOwner {
        require(phase() < 4, "cant set phase 4 after phase 4");
        _setPhase4(unixTimestamp);
    }

    /**
     * @dev withdraw sent ether
     */
    function withdrawEther(uint256 amount, address recv) public onlyOwner {
        (bool sent,) = payable(recv).call{value: amount}("");
        require(sent, "transfer failed");
    }

    /**
     * @dev what do
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(BasicNFT, RoyaltyNFT)
        returns (bool)
    {
        return
            interfaceId == 0x01ffc9a7 || // ierc165 interface
            interfaceId == type(IERC165).interfaceId || 
            interfaceId == type(IERC721Enumerable).interfaceId ||
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 2 of 23 : BasicNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";

contract BasicNFT is ERC721Enumerable {
    constructor(string memory name_, string memory sym_, string memory baseTokenURI_) ERC721(name_, sym_) {
    _baseTokenURI = baseTokenURI_;
    }
    string internal _baseTokenURI = "";
    function _baseURI()
        internal
        view
        override
        returns (string memory)
    {
        return _baseTokenURI;
    }

    /**
    * @dev return array of tokenIds owned by user
    */
    function getMyTokens(address me) public view returns (uint256[] memory) {
        uint256 bal = balanceOf(me);
        uint256[] memory wallet = new uint256[](bal);
        for (uint256 i = 0; i < bal; i++) {
            wallet[i] = tokenOfOwnerByIndex(me, i);
        }
        return wallet;
    }


  
    function getAllOwners() public view returns (address[] memory){
        uint256 supply = totalSupply();
        address[] memory owners = new address[](supply);
        
        for (uint256 id_ = 1; id_ < supply; id_++ ){
            owners[id_] = ownerOf(id_);
        }
        return owners;
    }
    
    /**
    * @dev burn nft (forever)
    */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "caller is not owner nor approved"
        );
        _burn(tokenId);
    }

    // solhint-disable
    function msgSender() internal view returns (address payable sender) {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }

    /**
     * Override isApprovedForAll to auto-approve OS's proxy contract
     */
    function isApprovedForAll(address _owner, address _operator)
        public
        view
        override
        returns (bool isOperator)
    {
        // // if OpenSea's ERC721 Proxy Address is detected, auto-return true
        // if (_operator == address(0x58807baD0B376efc12F5AD86aAc70E78ed67deaE)) {
        //     return true;
        // }

        // otherwise, use the default ERC721.isApprovedForAll()
        return ERC721.isApprovedForAll(_owner, _operator);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

File 3 of 23 : RevealVRF.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";

abstract contract RevealVRF is VRFConsumerBase {
    constructor(
        address _vrfCoordinator,
        address _link,
        uint256 _linkVrfFee,
        bytes32 _keyHash
    ) VRFConsumerBase(_vrfCoordinator, _link) {
        keyHash = _keyHash;
        linkVrfFee = _linkVrfFee;
    }

    event Revealed(
        bytes32 traitseed,
        uint256 randomness,
        uint256 block,
        uint256 time
    );

    // traitseed is used to generate traits. it can only be set once.

    /**
    * @dev for layers 1-17, traitseed is set by VRF once, card=keccak256(traitseed,tokenId)
    */
    bytes32 public traitseed; // set with VRF, for layers 0-15
    /**
    * @dev for layers 16-32, generated with 
    * cardTraitsB=keccak256(keccak256(traitseed),tokenId)
    */
    bytes32 public traitseed2; // set with VRF, for layers 16-32
    uint256 public linkVrfFee = 0.01 ether; // fee for the reveal
    bytes32 public keyHash; // VRF: keyHash
    bytes32 public getTraitReqId;

    // // must be implemented in ExtremeNFT
    // function _doRevealStep2(bytes32) internal virtual;

    // function _setTraitSeed(bytes32 seed) internal virtual;
    
    /**
    * @dev update vrf config if necessary
    */
    function _updateVrfConfig(uint256 _linkFee, bytes32 _keyHash) internal {
        require(traitseed == 0, "already revealed");
        linkVrfFee = _linkFee;
        keyHash = _keyHash;
    }

    /**
    * @dev canonical card trait seed, level 2 (layers 1-17)
    */
    function getCanonicalCardTraits(uint256 tokenId_)
        public
        view
        returns (bytes32)
    {
        require(traitseed != 0, "not revealed yet");
        return keccak256(abi.encode(traitseed, tokenId_));
    }

    /**
    * @dev canonical card trait seed, level 2 (layers 17+)
    */
    function getCanonicalCardTraits2(uint256 tokenId_)
        public
        view
        returns (bytes32)
    {
        require(traitseed2 != 0, "not revealed yet");
        return keccak256(abi.encode(traitseed2, tokenId_));
    }

    /**
    * @dev internal: send reveal request
    */
    function _doReveal() internal returns (bytes32 requestId) {
        require(LINK.balanceOf(address(this)) >= linkVrfFee, "Not enough LINK");
        requestId = requestRandomness(keyHash, linkVrfFee);
        getTraitReqId = requestId;
        return requestId;
    }

    // called by rawFulfillRandomness by VRFCoordinator
    function fulfillRandomness(bytes32, uint256 randomness)
        internal
        virtual
        override
    {
        require(traitseed == 0, "trait seed already set");

        traitseed = keccak256( // solhint-disable-next-line
            abi.encode(randomness, block.timestamp, block.number)
        );
        traitseed2 = keccak256(abi.encode(traitseed)); // solhint-disable-next-line
        emit Revealed(traitseed, randomness, block.number, block.timestamp); // solhint-disable-line
    }
}

File 4 of 23 : RoyaltyNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./interfaces/IERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract RoyaltyNFT is Ownable, IERC2981 {
    address private _royaltiesReceiver; // royalties
    uint256 public constant royaltiesPercentage = 8; // solhint-disable-line

    /// @notice Getter function for _royaltiesReceiver
    /// @return the address of the royalties recipient
    function royaltiesReceiver() external view returns (address) {
        return _royaltiesReceiver;
    }

    function _setRoyaltiesReceiver(address newReceiver) internal {
        _royaltiesReceiver = newReceiver;
    }

    function royaltyInfo(uint256, uint256 _salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        return (_royaltiesReceiver, (_salePrice * royaltiesPercentage) / 100);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165)
        returns (bool)
    {
        return
            interfaceId == type(IERC2981).interfaceId ||
            interfaceId == 0x01ffc9a7 ||
            interfaceId == type(IERC165).interfaceId;
    }
}

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

// import "hardhat/console.sol";

// this specific VerifiableNFT layer is all optional
abstract contract VerifiableNFT {
    uint256[][] public weights;

    // immutable limit
    // constructor(uint256[][] memory weighted_) {
    //     weights = weighted_;
    // }
    // constructor() {}

    function _supplyLimit() internal pure virtual returns (uint256);

    // getTraitSeed returns the
    function getTraitSeed() public view virtual returns (bytes32);

    function getWeights(uint256 layerNumber)
        public
        view
        returns (uint256[] memory)
    {
        return weights[layerNumber];
    }

    function getWeightTotal(uint256 layerNumber)
        public
        view
        returns (uint256 cumulativeWeight)
    {
        cumulativeWeight = sumArray(weights[layerNumber]);
    }

    // show individual card trait with given seed
    function getCardTraits(bytes32 traitseed_, uint256 _tokenId)
        public
        pure
        returns (bytes32)
    {
        if (traitseed_ == 0) {
            revert("unrevealed");
            // return 0; // unrevealed.
        }
        return keccak256(abi.encode(traitseed_, _tokenId)); // 0x 1233 24k2 3hjk fyhs 9f8y
    }

    // Choice A 50%    50<
    // Choice B 25%    50-75
    // Choice C 15%    75-90
    // Choice D 10%    90-100

    // random_number   = 0.64
    // combined_weight = 100
    // weighted_choice = 64 (combined_weight * random_number)
    // 64.... == choice B (returns 2)
    function applyWeight(uint256 value_, uint256[] memory layerWeights_)
        public
        pure
        returns (uint256 ret)
    {
        uint256 totalWeight = sumArray(layerWeights_);
        // console.log("totalWeight:", totalWeight);
        // console.log("value_:     ", value_);
        // require(value_ < totalWeight, "not random");
        uint256 value = value_ % totalWeight;
        // console.log("value:      ", value);
        uint256 cumulativeWeight = 0;
        for (uint256 dot = 0; dot < layerWeights_.length; dot++) {
            cumulativeWeight += layerWeights_[dot];
            if (value <= cumulativeWeight) {
                // console.log("found:", cumulativeWeight, value, dot);
                ret = dot;
                break;
            }
        }
        return ret;
    }

    function sumArray(uint256[] memory arr)
        public
        pure
        returns (uint256 totalWeight)
    {
        for (uint256 i = 0; i < arr.length; ++i) {
            // solhint-disable-next-line
            assembly {
                totalWeight := add(
                    totalWeight,
                    mload(add(add(arr, 0x20), mul(i, 0x20)))
                )
            } // solhint-disable-line
        }
        return totalWeight;
    }

    function layerDecodeW(
        bytes32 traitseed_,
        uint256 tokenId,
        uint256 layerNumber,
        uint256[] memory weighted_
    ) public pure returns (uint256) {
        if (layerNumber >= 16) {
            // shift and rehash for layer16+
            traitseed_ = keccak256(abi.encode(traitseed_));
            layerNumber -= 16;
        }
        bytes32 traitBuffer = getCardTraits(traitseed_, tokenId);
        // console.logBytes(abi.encode(traitB)); // is same as trait
        uint256 i = layerNumber * 2; // doublechunk
        uint256 exact = (uint256(uint8(traitBuffer[i])) << 4) +
            uint256(uint8(traitBuffer[i + 1])); // random 2 bytes
        return applyWeight(exact, weighted_); // show one of possibilities, 0-65535
    }

    function layerDecodeTokenLayer(uint256 tokenId_, uint256 layerNumber)
        public
        view
        returns (
            uint256 // the trait. 0-65535
        )
    {
        require(weights.length != 0, "weights are not set yet");
        return
            layerDecodeW(
                getTraitSeed(),
                tokenId_,
                layerNumber,
                weights[layerNumber]
            );
    }

    function numLayers() public view returns (uint256) {
        return weights.length;
    }

    function layerDecodeTokenAll(uint256 tokenId_)
        public
        view
        returns (
            uint256[] memory // 9 layer burrito
        )
    {
        uint256 weightLength = weights.length;
        require(weightLength != 0, "weights array doesnt exist yet");
        require(weights[0][0] != 0, "weights is invalid");

        uint256[] memory layers = new uint256[](weightLength);
        bytes32 verifyTraitseed = getTraitSeed();
        for (uint256 i = 0; i < weights.length; i++) {
            // console.log("weight", i);
            layers[i] = layerDecodeW(verifyTraitseed, tokenId_, i, weights[i]);
        }
        return layers;
    }

    // reset the weights array
    function _newWeights(uint256 numLayers_) internal {
        weights = new uint256[][](numLayers_);
    }

    // edit a weight
    function _editWeight(uint256 numLayer, uint256[] memory choices) internal {
        weights[numLayer] = choices;
    }

    bytes32 public weightHash = 0x0;

    function _weightSet() internal {
        weightHash = keccak256(abi.encode(weights));
    }
}

File 6 of 23 : MintableNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/utils/Address.sol";
abstract contract MintableNFT {
    using Address for address;
    uint256 public constant DAY_LIMIT = 10;
    uint256 public currentId;
    uint256 public phase1time;
    uint256 public phase2time;
    uint256 public phase3time;
    uint256 public phase4time;
    uint256 public nMintPass; // current mintpass supply
    mapping(address => uint256) private _whitelisted;
    mapping(address => uint256) private _purchased;
    mapping(address => uint256) private mintpass;

    constructor(uint256 phase1) {
        phase1time = phase1;
    }



    // override with the mint function
    function _safeMint(address, uint256) internal virtual;

    // override with the supply limit
    function _supplyLimit() internal pure virtual returns (uint256);

    /**
     * @dev mintpass balance of user
     */
    function mintpasses(address user) public view returns (uint256) {
        return mintpass[user];
    }

    /**
     * @dev whitelist balance of user (how many can be minted during phase1)
     */
    function whitelisted(address user) public view returns (uint256) {
        return _whitelisted[user];
    }

    /**
     * @dev number of nfts purchased by user
     */
    function purchased(address user) public view returns (uint256) {
        return _purchased[user];
    }

    /**
     * @dev 1: whitelisted 10, 2: whitelisted unlimited, 3: public 10, 4: public unlimited
     */
    function phase() public view returns (uint256) {
        uint256 time = block.timestamp;
        if (time < phase1time || phase1time == 0) {
            return 0; // not started yet
        }
        if (time > (phase4time) && currentId == _supplyLimit() + 1) {
            return 5; // over
        } else if (phase4time != 0 && time >= phase4time) {
            return 4;
        } else if (phase3time != 0 && time >= phase3time) {
            return 3;
        } else if (phase2time != 0 && time >= phase2time) {
            return 2;
        }
        return 1;
    }

    /**
     * @dev phase shift time schedule
     */
    function getPhaseTime(uint256 phaseNumber)
        public
        view
        returns (uint256 timestamp)
    {
        if (phaseNumber == 1) {
            timestamp = phase1time;
        } else if (phaseNumber == 2) {
            timestamp = phase2time;
        } else if (phaseNumber == 3) {
            timestamp = phase3time;
        } else if (phaseNumber == 4) {
            timestamp = phase4time;
        } else {
            revert("invalid phase request");
        }
        return timestamp;
    }

    function _setPhase1(uint256 unixTimestamp) internal {
        phase1time = unixTimestamp;
    }

    function _setPhase2(uint256 unixTimestamp) internal {
        phase2time = unixTimestamp;
    }

    function _setPhase3(uint256 unixTimestamp) internal {
        phase3time = unixTimestamp;
    }

    function _setPhase4(uint256 unixTimestamp) internal {
        phase4time = unixTimestamp;
    }

    // owner can whitelist users. they can enter presale before public sale.
    // expose this behind onlyOwner modifier
    function _newwhitelist(address[] memory addresses) internal {
        require(addresses.length != 0, "empty list");
        for (uint256 i = 0; i < addresses.length; i++) {
            _whitelisted[addresses[i]] = DAY_LIMIT + 1; // X on day 1, an extra as marker
        }
    }

    // owner can gift mintpasses. they redeem, only paying for gas.
    // expose this behind onlyOwner modifier
    function _newmintpass(address[] memory to, uint256[] memory amount)
        internal
    {
        require(to.length == amount.length, "length mismatch");
        for (uint256 i = 0; i < amount.length; i++) {
            uint256 amt = amount[i];
            address dest_ = to[i];
            nMintPass += amt;
            _whitelisted[dest_] = DAY_LIMIT + 1; // auto whitelist, X on day 1
            mintpass[dest_] += amt;
        }
    }

    /**
     * @dev redeem nft for mintpass (check phase)
     */
    function _redeemNFT(address destination, uint256 amount) internal {
        require(mintpass[msg.sender] >= amount, "no mintpass");
        mintpass[msg.sender] -= amount;
        nMintPass -= amount;
        _coolMint(destination, amount);
    }

    uint256 public price = 0.05 ether;

    /**
     * @dev amount of wei needed per nft
     */
    function coinAmount() public view returns (uint256) {
        return price;
    }

    /**
     * @dev buy nft (check phase)
     */
    function createNFT(address destination, uint256 amount) public payable {
        require(!destination.isContract(), "is contract");
        require(msg.sender == tx.origin, "msg sender != tx origin");
        if (mintpass[msg.sender] >= amount) {
            _redeemNFT(destination, amount);
            return;
        }
        require(msg.value == amount * price, "incorrect coin amount");
        _coolMint(destination, amount);
    }

    // mint according to current phase (if valid)
    function _coolMint(address destination, uint256 amount) private {
        require(amount != 0, "amount is zero");
        require(currentId + amount < _supplyLimit() + 2, "too late to mint!");
        uint256 phase_ = phase();

        // switch phase
        if (phase_ == 1) {
            uint256 wlval = _whitelisted[msg.sender];
            require(wlval != 0, "not whitelisted");
            require(wlval != 1, "you reached phase limit");
            require(amount < wlval, "would be over phase limit");
            _whitelisted[msg.sender] -= amount; // will go to 1
        } else if (phase_ == 2) {
            // requires 1 whitelist unit
            require(_whitelisted[msg.sender] != 0, "not whitelisted");
        } else if (phase_ == 3) {
            // anyone up to 4
            require(
                _purchased[msg.sender] + amount <= DAY_LIMIT,
                "reached phase limit of 10"
            );
            _purchased[msg.sender] += amount;
        } else if (phase_ != 4) {
            // 0 or 5+
            revert("invalid phase");
        }
        for (uint256 i = 0; i < amount; i++) {
            _safeMint(destination, currentId);
            currentId += 1;
        }
    }
}

File 7 of 23 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 8 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 9 of 23 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 10 of 23 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/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 {
        _setApprovalForAll(_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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 14 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 15 of 23 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 19 of 23 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/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 private constant 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 internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* 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 20 of 23 : 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 21 of 23 : 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 22 of 23 : IERC2981.sol
pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT

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

///
/// @dev Interface for the NFT Royalty Standard
///
interface IERC2981 is IERC165 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
    /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
    /// _registerInterface(_INTERFACE_ID_ERC2981);

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) external view returns (
        address receiver,
        uint256 royaltyAmount
    );

}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_link","type":"address"},{"internalType":"uint256","name":"_vrfFee","type":"uint256"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"stateMutability":"nonpayable","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":false,"internalType":"bytes32","name":"traitseed","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"randomness","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Revealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DAY_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256[]","name":"layerWeights_","type":"uint256[]"}],"name":"applyWeight","outputs":[{"internalType":"uint256","name":"ret","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"coinAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"createNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"doReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numLayer_","type":"uint256"},{"internalType":"uint256[]","name":"choices_","type":"uint256[]"}],"name":"editWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getCanonicalCardTraits","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getCanonicalCardTraits2","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"traitseed_","type":"bytes32"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getCardTraits","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"me","type":"address"}],"name":"getMyTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseNumber","type":"uint256"}],"name":"getPhaseTime","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTraitReqId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTraitSeed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"layerNumber","type":"uint256"}],"name":"getWeightTotal","outputs":[{"internalType":"uint256","name":"cumulativeWeight","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"layerNumber","type":"uint256"}],"name":"getWeights","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":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"layerDecodeTokenAll","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"uint256","name":"layerNumber","type":"uint256"}],"name":"layerDecodeTokenLayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"traitseed_","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"layerNumber","type":"uint256"},{"internalType":"uint256[]","name":"weighted_","type":"uint256[]"}],"name":"layerDecodeW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"linkVrfFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockWeights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metadataLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"mintpasses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nMintPass","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numLayers_","type":"uint256"}],"name":"newWeights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"newmintpass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"newwhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numLayers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"address_","type":"address"}],"name":"ownerApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase1time","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase2time","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase3time","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase4time","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"purchased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"royaltiesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltiesReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unixTimestamp","type":"uint256"}],"name":"setPhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unixTimestamp","type":"uint256"}],"name":"setPhase2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unixTimestamp","type":"uint256"}],"name":"setPhase3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unixTimestamp","type":"uint256"}],"name":"setPhase4","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"provenanceHash","type":"bytes32"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setRoyaltiesReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setcontractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"name":"sumArray","outputs":[{"internalType":"uint256","name":"totalWeight","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"supplyLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitseed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitseed2","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[{"internalType":"uint256","name":"_linkFee","type":"uint256"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"name":"updateVrfConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weightHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"weights","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recv","type":"address"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040819052600060c08190526200001b91600b916200094a565b50662386f26fc10000600f556000601481905566b1a2bc2ec50000601e55601f8190556040805160208101918290528290526200005c91602191906200094a565b503480156200006a57600080fd5b506040516200577c3803806200577c8339810160408190526200008d9162000a0d565b428484848483836040518060400160405280601281526020017112da5b991c9959081219585c9d1cc813919560721b8152506040518060400160405280600a81526020016912d21150549514d3919560b21b8152506040518060200160405280600081525082826200010e62000108620001ec60201b60201c565b620001fd565b8151620001239060019060208501906200094a565b508051620001399060029060208401906200094a565b50508151620001519150600b9060208401906200094a565b5050506001600160a01b0392831660a0525016608052601055600f55505060165560158054600191906000906200018a90849062000a6b565b90915550600090505b6011811015620001e157620001b1336015546200024d60201b60201c565b600160156000828254620001c6919062000a6b565b90915550819050620001d88162000a86565b91505062000193565b505050505062000bd5565b6000620001f862000273565b905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6200026f828260405180602001604052806000815250620002d260201b60201c565b5050565b600033301415620002cc57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620002cf9050565b50335b90565b620002de83836200034e565b620002ed6000848484620004a4565b620003495760405162461bcd60e51b815260206004820152603260248201526000805160206200575c83398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b038216620003a65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000340565b6000818152600360205260409020546001600160a01b0316156200040d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000340565b6200041b6000838362000606565b6001600160a01b03821660009081526004602052604081208054600192906200044690849062000a6b565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620004c5846001600160a01b03166200061e60201b62002a8f1760201c565b15620005fa576001600160a01b03841663150b7a02620004e4620001ec565b8786866040518563ffffffff1660e01b815260040162000508949392919062000aa4565b6020604051808303816000875af192505050801562000546575060408051601f3d908101601f19168201909252620005439181019062000b1f565b60015b620005df573d80801562000577576040519150601f19603f3d011682016040523d82523d6000602084013e6200057c565b606091505b508051620005d75760405162461bcd60e51b815260206004820152603260248201526000805160206200575c83398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000340565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620005fe565b5060015b949350505050565b620003498383836200062d60201b62002a9e1760201c565b6001600160a01b03163b151590565b620006458383836200034960201b620012091760201c565b6001600160a01b038316620006a3576200069d81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b620006c9565b816001600160a01b0316836001600160a01b031614620006c957620006c9838262000709565b6001600160a01b038216620006e3576200034981620007b6565b826001600160a01b0316826001600160a01b031614620003495762000349828262000870565b600060016200072384620008c160201b62001a091760201c565b6200072f919062000b52565b60008381526008602052604090205490915080821462000783576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090620007ca9060019062000b52565b6000838152600a602052604081205460098054939450909284908110620007f557620007f562000b6c565b90600052602060002001549050806009838154811062000819576200081962000b6c565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548062000854576200085462000b82565b6001900381819060005260206000200160009055905550505050565b60006200088883620008c160201b62001a091760201c565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b60006001600160a01b0382166200092e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840162000340565b506001600160a01b031660009081526004602052604090205490565b828054620009589062000b98565b90600052602060002090601f0160209004810192826200097c5760008555620009c7565b82601f106200099757805160ff1916838001178555620009c7565b82800160010185558215620009c7579182015b82811115620009c7578251825591602001919060010190620009aa565b50620009d5929150620009d9565b5090565b5b80821115620009d55760008155600101620009da565b80516001600160a01b038116811462000a0857600080fd5b919050565b6000806000806080858703121562000a2457600080fd5b62000a2f85620009f0565b935062000a3f60208601620009f0565b6040860151606090960151949790965092505050565b634e487b7160e01b600052601160045260246000fd5b6000821982111562000a815762000a8162000a55565b500190565b600060001982141562000a9d5762000a9d62000a55565b5060010190565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b8281101562000af35785810182015185820160a00152810162000ad5565b8281111562000b0657600060a084870101525b5050601f01601f19169190910160a00195945050505050565b60006020828403121562000b3257600080fd5b81516001600160e01b03198116811462000b4b57600080fd5b9392505050565b60008282101562000b675762000b6762000a55565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600181811c9082168062000bad57607f821691505b6020821081141562000bcf57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051614b5362000c0960003960008181611da10152613c1c015260008181612bda0152613bed0152614b536000f3fe6080604052600436106104895760003560e01c80638e58440711610255578063c14c563611610144578063e7cdcf3a116100c1578063efa00ce711610085578063efa00ce714610d6a578063eff907eb14610d8a578063f0b57a6a14610daa578063f2fde38b14610dca578063f37e64bf14610dea578063f3eef26714610e0a57600080fd5b8063e7cdcf3a14610cdf578063e8a3d48514610cff578063e985e9c514610d14578063ec7339d114610d34578063ef706c9e14610d5457600080fd5b8063d921a9f911610108578063d921a9f914610c3e578063d936547e14610c5e578063da2e35f914610c94578063e00dd16114610ca9578063e2a715f714610cbf57600080fd5b8063c14c563614610ba9578063c87b56dd14610bc9578063cafa8dfe14610be9578063ce56c45414610bfe578063d5785b7614610c1e57600080fd5b8063989bdbb6116101d2578063b15abece11610196578063b15abece14610b2b578063b1c9fe6e14610b41578063b514371514610b56578063b88d4fde14610b76578063c11c956c14610b9657600080fd5b8063989bdbb614610aa257806399774ade14610ab7578063a035b1fe14610ad7578063a22cb46514610aed578063a3a51bd514610b0d57600080fd5b806394985ddd1161021957806394985ddd14610a225780639542522a14610a4257806395bef05514610a6257806395d89b4114610a775780639721f8be14610a8c57600080fd5b80638e584407146109ab5780638ea7ddbf146109c1578063926fa2f7146109d757806393e49d09146109ec578063942d2ddf14610a0c57600080fd5b806342842e0e1161037c57806361728f39116102f9578063742c6f2e116102bd578063742c6f2e146108f757806374ec2d63146109175780637e5535c61461092d578063823756c51461094d5780638ca9636e1461096d5780638da5cb5b1461098d57600080fd5b806361728f39146108725780636352211e1461088857806369d2ceb1146108a857806370a08231146108c2578063715018a6146108e257600080fd5b8063515857d411610340578063515857d4146107bc578063522fe98e146107dc578063538413271461081257806355f804b3146108325780635d7e11bf1461085257600080fd5b806342842e0e1461071c57806342966c681461073c578063444817581461075c57806347e63e181461077c5780634f6ccce71461079c57600080fd5b806318160ddd1161040a57806324c4f4ab116103ce57806324c4f4ab146106735780632a55205a146106885780632f745c59146106c75780633b5b6587146106e75780633e1a4f5d1461070757600080fd5b806318160ddd146105f357806319d1997a146106085780631e2aea061461061d578063230a1fd51461063d57806323b872dd1461065357600080fd5b8063081812fc11610451578063081812fc14610536578063095ea7b31461056e5780630f7309e81461058e57806316c12746146105a457806317516592146105c657600080fd5b806301ffc9a71461048e578063028c2348146104c357806304774e16146104da578063066e9534146104fe57806306fdde0314610514575b600080fd5b34801561049a57600080fd5b506104ae6104a936600461417f565b610e40565b60405190151581526020015b60405180910390f35b3480156104cf57600080fd5b506104d8610ebc565b005b3480156104e657600080fd5b506104f0600d5481565b6040519081526020016104ba565b34801561050a57600080fd5b506104f060165481565b34801561052057600080fd5b50610529610fbf565b6040516104ba91906141f4565b34801561054257600080fd5b50610556610551366004614207565b611051565b6040516001600160a01b0390911681526020016104ba565b34801561057a57600080fd5b506104d8610589366004614235565b6110e6565b34801561059a57600080fd5b506104f0601f5481565b3480156105b057600080fd5b506105b961120e565b6040516104ba9190614261565b3480156105d257600080fd5b506105e66105e13660046142ae565b6112ba565b6040516104ba91906142cb565b3480156105ff57600080fd5b506009546104f0565b34801561061457600080fd5b50611e616104f0565b34801561062957600080fd5b506104f06106383660046143d7565b61135b565b34801561064957600080fd5b506104f0600f5481565b34801561065f57600080fd5b506104d861066e36600461440b565b61138d565b34801561067f57600080fd5b506104f0600a81565b34801561069457600080fd5b506106a86106a336600461444c565b6113c5565b604080516001600160a01b0390931683526020830191909152016104ba565b3480156106d357600080fd5b506104f06106e2366004614235565b6113f8565b3480156106f357600080fd5b506104f061070236600461446e565b61148e565b34801561071357600080fd5b50601e546104f0565b34801561072857600080fd5b506104d861073736600461440b565b611545565b34801561074857600080fd5b506104d8610757366004614207565b611560565b34801561076857600080fd5b506104f061077736600461444c565b6115c0565b34801561078857600080fd5b506104d861079736600461444c565b611698565b3480156107a857600080fd5b506104f06107b7366004614207565b6116ef565b3480156107c857600080fd5b506104f06107d736600461444c565b611782565b3480156107e857600080fd5b506104f06107f73660046142ae565b6001600160a01b03166000908152601c602052604090205490565b34801561081e57600080fd5b506104d861082d366004614207565b6117bf565b34801561083e57600080fd5b506104d861084d36600461451e565b611868565b34801561085e57600080fd5b506104f061086d366004614207565b61190c565b34801561087e57600080fd5b506104f060105481565b34801561089457600080fd5b506105566108a3366004614207565b611992565b3480156108b457600080fd5b506020546104ae9060ff1681565b3480156108ce57600080fd5b506104f06108dd3660046142ae565b611a09565b3480156108ee57600080fd5b506104d8611a90565b34801561090357600080fd5b506104f0610912366004614207565b611ae5565b34801561092357600080fd5b506104f060115481565b34801561093957600080fd5b506104d86109483660046145ca565b611b5f565b34801561095957600080fd5b506104f061096836600461462d565b611bb2565b34801561097957600080fd5b506104f061098836600461444c565b611c2d565b34801561099957600080fd5b506000546001600160a01b0316610556565b3480156109b757600080fd5b506104f060195481565b3480156109cd57600080fd5b506104f060145481565b3480156109e357600080fd5b506104d8611c9c565b3480156109f857600080fd5b506104d8610a07366004614207565b611ced565b348015610a1857600080fd5b506104f060185481565b348015610a2e57600080fd5b506104d8610a3d36600461444c565b611d96565b348015610a4e57600080fd5b506104d8610a5d366004614669565b611e18565b348015610a6e57600080fd5b506013546104f0565b348015610a8357600080fd5b50610529611e6a565b348015610a9857600080fd5b506104f0600e5481565b348015610aae57600080fd5b506104d8611e79565b348015610ac357600080fd5b506104d8610ad23660046142ae565b611ed1565b348015610ae357600080fd5b506104f0601e5481565b348015610af957600080fd5b506104d8610b083660046146ab565b611fad565b348015610b1957600080fd5b506012546001600160a01b0316610556565b348015610b3757600080fd5b506104f060175481565b348015610b4d57600080fd5b506104f0611fbf565b348015610b6257600080fd5b506104d8610b713660046142ae565b612074565b348015610b8257600080fd5b506104d8610b913660046146e4565b6120db565b6104d8610ba4366004614235565b61211a565b348015610bb557600080fd5b506104f0610bc4366004614207565b61222c565b348015610bd557600080fd5b50610529610be4366004614207565b6122a2565b348015610bf557600080fd5b506104f0600881565b348015610c0a57600080fd5b506104d8610c19366004614757565b61237c565b348015610c2a57600080fd5b506105e6610c39366004614207565b61245a565b348015610c4a57600080fd5b506104d8610c59366004614207565b6124cf565b348015610c6a57600080fd5b506104f0610c793660046142ae565b6001600160a01b03166000908152601b602052604090205490565b348015610ca057600080fd5b50600d546104f0565b348015610cb557600080fd5b506104f060155481565b348015610ccb57600080fd5b506104f0610cda366004614207565b612578565b348015610ceb57600080fd5b506104d8610cfa366004614207565b6125d9565b348015610d0b57600080fd5b5061052961262b565b348015610d2057600080fd5b506104ae610d2f36600461477c565b61263a565b348015610d4057600080fd5b506105e6610d4f366004614207565b61266a565b348015610d6057600080fd5b506104f0601a5481565b348015610d7657600080fd5b506104d8610d8536600461451e565b6127ef565b348015610d9657600080fd5b506104d8610da536600461462d565b61284b565b348015610db657600080fd5b506104d8610dc5366004614207565b61289e565b348015610dd657600080fd5b506104d8610de53660046142ae565b61292f565b348015610df657600080fd5b506104d8610e05366004614207565b6129e6565b348015610e1657600080fd5b506104f0610e253660046142ae565b6001600160a01b03166000908152601d602052604090205490565b60006301ffc9a760e01b6001600160e01b031983161480610e7157506001600160e01b031982166301ffc9a760e01b145b80610e8c57506001600160e01b0319821663780e9d6360e01b145b80610ea757506001600160e01b0319821663152a902d60e11b145b80610eb65750610eb682612b56565b92915050565b610ec4612ba7565b6001600160a01b0316610edf6000546001600160a01b031690565b6001600160a01b031614610f0e5760405162461bcd60e51b8152600401610f05906147aa565b60405180910390fd5b600d5415610f575760405162461bcd60e51b81526020600482015260166024820152751d1c985a5d081cd9595908185b1c9958591e481cd95d60521b6044820152606401610f05565b610f64611e6160016147f5565b60155414610fb45760405162461bcd60e51b815260206004820152601e60248201527f63616e742072657665616c20756e74696c20737570706c79206c696d697400006044820152606401610f05565b610fbc612bb6565b50565b606060018054610fce9061480d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ffa9061480d565b80156110475780601f1061101c57610100808354040283529160200191611047565b820191906000526020600020905b81548152906001019060200180831161102a57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166110ca5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610f05565b506000908152600560205260409020546001600160a01b031690565b60006110f182611992565b9050806001600160a01b0316836001600160a01b0316141561115f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610f05565b806001600160a01b0316611171612ba7565b6001600160a01b0316148061118d575061118d81610d2f612ba7565b6111ff5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610f05565b6112098383612c9d565b505050565b6060600061121b60095490565b90506000816001600160401b0381111561123757611237614303565b604051908082528060200260200182016040528015611260578160200160208202803683370190505b50905060015b828110156112b35761127781611992565b82828151811061128957611289614842565b6001600160a01b0390921660209283029190910190910152806112ab81614858565b915050611266565b5092915050565b606060006112c783611a09565b90506000816001600160401b038111156112e3576112e3614303565b60405190808252806020026020018201604052801561130c578160200160208202803683370190505b50905060005b828110156113535761132485826113f8565b82828151811061133657611336614842565b60209081029190910101528061134b81614858565b915050611312565b509392505050565b6000805b82518110156113875760208102602084010151820191508061138090614858565b905061135f565b50919050565b61139e611398612ba7565b82612d0b565b6113ba5760405162461bcd60e51b8152600401610f0590614873565b611209838383612dda565b60125460009081906001600160a01b031660646113e36008866148c4565b6113ed91906148f9565b915091509250929050565b600061140383611a09565b82106114655760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610f05565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000601083106114cc576040805160208101879052016040516020818303038152906040528051906020012094506010836114c9919061490d565b92505b60006114d88686611c2d565b905060006114e78560026148c4565b90506000826114f78360016147f5565b6020811061150757611507614842565b1a600484846020811061151c5761151c614842565b61152b939291901a901b6147f5565b90506115378186611bb2565b93505050505b949350505050565b611209838383604051806020016040528060008152506120db565b61156b611398612ba7565b6115b75760405162461bcd60e51b815260206004820181905260248201527f63616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610f05565b610fbc81612f81565b6013546000906116125760405162461bcd60e51b815260206004820152601760248201527f7765696768747320617265206e6f7420736574207965740000000000000000006044820152606401610f05565b61169161161e600d5490565b84846013868154811061163357611633614842565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561168757602002820191906000526020600020905b815481526020019060010190808311611673575b505050505061148e565b9392505050565b6116a0612ba7565b6001600160a01b03166116bb6000546001600160a01b031690565b6001600160a01b0316146116e15760405162461bcd60e51b8152600401610f05906147aa565b6116eb8282613028565b5050565b60006116fa60095490565b821061175d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610f05565b6009828154811061177057611770614842565b90600052602060002001549050919050565b6013828154811061179257600080fd5b9060005260206000200181815481106117aa57600080fd5b90600052602060002001600091509150505481565b6117c7612ba7565b6001600160a01b03166117e26000546001600160a01b031690565b6001600160a01b0316146118085760405162461bcd60e51b8152600401610f05906147aa565b6004611812611fbf565b1061185f5760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652034206166746572207068617365203400006044820152606401610f05565b610fbc81601955565b611870612ba7565b6001600160a01b031661188b6000546001600160a01b031690565b6001600160a01b0316146118b15760405162461bcd60e51b8152600401610f05906147aa565b60205460ff16156118f95760405162461bcd60e51b81526020600482015260126024820152711b595d1859185d18481a5cc81b1bd8dad95960721b6044820152606401610f05565b80516116eb90600b906020840190614002565b6000816001141561191f57505060165490565b816002141561193057505060175490565b816003141561194157505060185490565b816004141561195257505060195490565b60405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a59081c1a185cd9481c995c5d595cdd605a1b6044820152606401610f05565b6000818152600360205260408120546001600160a01b031680610eb65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610f05565b60006001600160a01b038216611a745760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610f05565b506001600160a01b031660009081526004602052604090205490565b611a98612ba7565b6001600160a01b0316611ab36000546001600160a01b031690565b6001600160a01b031614611ad95760405162461bcd60e51b8152600401610f05906147aa565b611ae36000613076565b565b600d54600090611b2a5760405162461bcd60e51b815260206004820152601060248201526f1b9bdd081c995d99585b1959081e595d60821b6044820152606401610f05565b600d5460408051602081019290925281018390526060015b604051602081830303815290604052805190602001209050919050565b611b67612ba7565b6001600160a01b0316611b826000546001600160a01b031690565b6001600160a01b031614611ba85760405162461bcd60e51b8152600401610f05906147aa565b6116eb82826130c6565b600080611bbe8361135b565b90506000611bcc8286614924565b90506000805b8551811015611c2357858181518110611bed57611bed614842565b602002602001015182611c0091906147f5565b9150818311611c1157809450611c23565b80611c1b81614858565b915050611bd2565b5050505092915050565b600082611c695760405162461bcd60e51b815260206004820152600a6024820152691d5b9c995d99585b195960b21b6044820152606401610f05565b60408051602081018590529081018390526060015b60405160208183030381529060405280519060200120905092915050565b611ca4612ba7565b6001600160a01b0316611cbf6000546001600160a01b031690565b6001600160a01b031614611ce55760405162461bcd60e51b8152600401610f05906147aa565b611ae36131c7565b611cf5612ba7565b6001600160a01b0316611d106000546001600160a01b031690565b6001600160a01b031614611d365760405162461bcd60e51b8152600401610f05906147aa565b6003611d40611fbf565b10611d8d5760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652033206166746572207068617365203300006044820152606401610f05565b610fbc81601855565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611e0e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610f05565b6116eb82826131f6565b611e20612ba7565b6001600160a01b0316611e3b6000546001600160a01b031690565b6001600160a01b031614611e615760405162461bcd60e51b8152600401610f05906147aa565b610fbc816132de565b606060028054610fce9061480d565b611e81612ba7565b6001600160a01b0316611e9c6000546001600160a01b031690565b6001600160a01b031614611ec25760405162461bcd60e51b8152600401610f05906147aa565b6020805460ff19166001179055565b611ed9612ba7565b6001600160a01b0316611ef46000546001600160a01b031690565b6001600160a01b031614611f1a5760405162461bcd60e51b8152600401610f05906147aa565b806001600160a01b031663095ea7b3611f3b6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260001960248201526044016020604051808303816000875af1158015611f89573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116eb9190614938565b6116eb611fb8612ba7565b8383613386565b6016546000904290811080611fd45750601654155b15611fe157600091505090565b60195481118015611fff5750611ffa611e6160016147f5565b601554145b1561200c57600591505090565b6019541580159061201f57506019548110155b1561202c57600491505090565b6018541580159061203f57506018548110155b1561204c57600391505090565b6017541580159061205f57506017548110155b1561206c57600291505090565b600191505090565b61207c612ba7565b6001600160a01b03166120976000546001600160a01b031690565b6001600160a01b0316146120bd5760405162461bcd60e51b8152600401610f05906147aa565b601280546001600160a01b0319166001600160a01b03831617905550565b6120ec6120e6612ba7565b83612d0b565b6121085760405162461bcd60e51b8152600401610f0590614873565b61211484848484613455565b50505050565b6001600160a01b0382163b156121605760405162461bcd60e51b815260206004820152600b60248201526a1a5cc818dbdb9d1c9858dd60aa1b6044820152606401610f05565b3332146121af5760405162461bcd60e51b815260206004820152601760248201527f6d73672073656e64657220213d207478206f726967696e0000000000000000006044820152606401610f05565b336000908152601d602052604090205481116121cf576116eb8282613488565b601e546121dc90826148c4565b34146122225760405162461bcd60e51b81526020600482015260156024820152741a5b98dbdc9c9958dd0818dbda5b88185b5bdd5b9d605a1b6044820152606401610f05565b6116eb8282613519565b6000610eb66013838154811061224457612244614842565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561229857602002820191906000526020600020905b815481526020019060010190808311612284575b505050505061135b565b6000818152600360205260409020546060906001600160a01b03166123215760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610f05565b600061232b61385f565b9050600081511161234b5760405180602001604052806000815250611691565b806123558461386e565b604051602001612366929190614955565b6040516020818303038152906040529392505050565b612384612ba7565b6001600160a01b031661239f6000546001600160a01b031690565b6001600160a01b0316146123c55760405162461bcd60e51b8152600401610f05906147aa565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114612412576040519150601f19603f3d011682016040523d82523d6000602084013e612417565b606091505b50509050806112095760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610f05565b60606013828154811061246f5761246f614842565b906000526020600020018054806020026020016040519081016040528092919081815260200182805480156124c357602002820191906000526020600020905b8154815260200190600101908083116124af575b50505050509050919050565b6124d7612ba7565b6001600160a01b03166124f26000546001600160a01b031690565b6001600160a01b0316146125185760405162461bcd60e51b8152600401610f05906147aa565b6002612522611fbf565b1061256f5760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652031206166746572207068617365203100006044820152606401610f05565b610fbc81601655565b600e546000906125bd5760405162461bcd60e51b815260206004820152601060248201526f1b9bdd081c995d99585b1959081e595d60821b6044820152606401610f05565b600e546040805160208101929092528101839052606001611b42565b6125e1612ba7565b6001600160a01b03166125fc6000546001600160a01b031690565b6001600160a01b0316146126225760405162461bcd60e51b8152600401610f05906147aa565b610fbc8161396b565b606060218054610fce9061480d565b6001600160a01b03808316600090815260066020908152604080832093851683529290529081205460ff16611691565b601354606090806126bd5760405162461bcd60e51b815260206004820152601e60248201527f7765696768747320617272617920646f65736e742065786973742079657400006044820152606401610f05565b60136000815481106126d1576126d1614842565b906000526020600020016000815481106126ed576126ed614842565b90600052602060002001546000141561273d5760405162461bcd60e51b81526020600482015260126024820152711dd95a59da1d1cc81a5cc81a5b9d985b1a5960721b6044820152606401610f05565b6000816001600160401b0381111561275757612757614303565b604051908082528060200260200182016040528015612780578160200160208202803683370190505b509050600061278e600d5490565b905060005b6013548110156127e5576127b68287836013858154811061163357611633614842565b8382815181106127c8576127c8614842565b6020908102919091010152806127dd81614858565b915050612793565b5090949350505050565b6127f7612ba7565b6001600160a01b03166128126000546001600160a01b031690565b6001600160a01b0316146128385760405162461bcd60e51b8152600401610f05906147aa565b80516116eb906021906020840190614002565b612853612ba7565b6001600160a01b031661286e6000546001600160a01b031690565b6001600160a01b0316146128945760405162461bcd60e51b8152600401610f05906147aa565b6116eb82826139cb565b6128a6612ba7565b6001600160a01b03166128c16000546001600160a01b031690565b6001600160a01b0316146128e75760405162461bcd60e51b8152600401610f05906147aa565b600d541561292a5760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995d99585b195960821b6044820152606401610f05565b601f55565b612937612ba7565b6001600160a01b03166129526000546001600160a01b031690565b6001600160a01b0316146129785760405162461bcd60e51b8152600401610f05906147aa565b6001600160a01b0381166129dd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f05565b610fbc81613076565b6129ee612ba7565b6001600160a01b0316612a096000546001600160a01b031690565b6001600160a01b031614612a2f5760405162461bcd60e51b8152600401610f05906147aa565b6002612a39611fbf565b10612a865760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652032206166746572207068617365203200006044820152606401610f05565b610fbc81601755565b6001600160a01b03163b151590565b6001600160a01b038316612af957612af481600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612b1c565b816001600160a01b0316836001600160a01b031614612b1c57612b1c83826139fc565b6001600160a01b038216612b335761120981613a99565b826001600160a01b0316826001600160a01b031614611209576112098282613b48565b60006001600160e01b0319821663152a902d60e11b1480612b8757506301ffc9a760e01b6001600160e01b03198316145b80610eb657506001600160e01b031982166301ffc9a760e01b1492915050565b6000612bb1613b8c565b905090565b600f546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612c21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c459190614984565b1015612c855760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610f05565b612c93601054600f54613be9565b6011819055919050565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612cd282611992565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b0316612d845760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610f05565b6000612d8f83611992565b9050806001600160a01b0316846001600160a01b03161480612dca5750836001600160a01b0316612dbf84611051565b6001600160a01b0316145b8061153d575061153d818561263a565b826001600160a01b0316612ded82611992565b6001600160a01b031614612e515760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610f05565b6001600160a01b038216612eb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610f05565b612ebe838383613d3e565b612ec9600082612c9d565b6001600160a01b0383166000908152600460205260408120805460019290612ef290849061490d565b90915550506001600160a01b0382166000908152600460205260408120805460019290612f209084906147f5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612f8c82611992565b9050612f9a81600084613d3e565b612fa5600083612c9d565b6001600160a01b0381166000908152600460205260408120805460019290612fce90849061490d565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600d541561306b5760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995d99585b195960821b6044820152606401610f05565b600f91909155601055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80518251146131095760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610f05565b60005b815181101561120957600082828151811061312957613129614842565b60200260200101519050600084838151811061314757613147614842565b6020026020010151905081601a600082825461316391906147f5565b909155506131759050600a60016147f5565b6001600160a01b0382166000908152601b6020908152604080832093909355601d905290812080548492906131ab9084906147f5565b92505081905550505080806131bf90614858565b91505061310c565b60136040516020016131d9919061499d565b60408051601f198184030181529190528051602090910120601455565b600d541561323f5760405162461bcd60e51b81526020600482015260166024820152751d1c985a5d081cd9595908185b1c9958591e481cd95d60521b6044820152606401610f05565b6040805160208101839052429181019190915243606082015260800160408051808303601f190181528282528051602091820120600d819055908301520160408051808303601f190181528282528051602091820120600e55600d548352820183905243908201524260608201527f775d44d2f8d57bee41b0c849e00a66f0ca15ddf0e4db16b70840d70be8e5290b9060800160405180910390a15050565b80516133195760405162461bcd60e51b815260206004820152600a602482015269195b5c1d1e481b1a5cdd60b21b6044820152606401610f05565b60005b81518110156116eb57613331600a60016147f5565b601b600084848151811061334757613347614842565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550808061337e90614858565b91505061331c565b816001600160a01b0316836001600160a01b031614156133e85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f05565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613460848484612dda565b61346c84848484613d49565b6121145760405162461bcd60e51b8152600401610f0590614a2b565b336000908152601d60205260409020548111156134d55760405162461bcd60e51b815260206004820152600b60248201526a6e6f206d696e747061737360a81b6044820152606401610f05565b336000908152601d6020526040812080548392906134f490849061490d565b9250508190555080601a600082825461350d919061490d565b909155506116eb905082825b806135575760405162461bcd60e51b815260206004820152600e60248201526d616d6f756e74206973207a65726f60901b6044820152606401610f05565b613564611e6160026147f5565b8160155461357291906147f5565b106135b35760405162461bcd60e51b8152602060048201526011602482015270746f6f206c61746520746f206d696e742160781b6044820152606401610f05565b60006135bd611fbf565b905080600114156136e257336000908152601b6020526040902054806136175760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610f05565b80600114156136685760405162461bcd60e51b815260206004820152601760248201527f796f752072656163686564207068617365206c696d69740000000000000000006044820152606401610f05565b8083106136b75760405162461bcd60e51b815260206004820152601960248201527f776f756c64206265206f766572207068617365206c696d6974000000000000006044820152606401610f05565b336000908152601b6020526040812080548592906136d690849061490d565b9091555061381d915050565b806002141561373e57336000908152601b60205260409020546137395760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610f05565b61381d565b80600314156137dd57336000908152601c6020526040902054600a906137659084906147f5565b11156137b35760405162461bcd60e51b815260206004820152601960248201527f72656163686564207068617365206c696d6974206f66203130000000000000006044820152606401610f05565b336000908152601c6020526040812080548492906137d29084906147f5565b9091555061381d9050565b8060041461381d5760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420706861736560981b6044820152606401610f05565b60005b828110156121145761383484601554613e4b565b60016015600082825461384791906147f5565b9091555081905061385781614858565b915050613820565b6060600b8054610fce9061480d565b6060816138925750506040805180820190915260018152600360fc1b602082015290565b8160005b81156138bc57806138a681614858565b91506138b59050600a836148f9565b9150613896565b6000816001600160401b038111156138d6576138d6614303565b6040519080825280601f01601f191660200182016040528015613900576020820181803683370190505b5090505b841561153d5761391560018361490d565b9150613922600a86614924565b61392d9060306147f5565b60f81b81838151811061394257613942614842565b60200101906001600160f81b031916908160001a905350613964600a866148f9565b9450613904565b806001600160401b0381111561398357613983614303565b6040519080825280602002602001820160405280156139b657816020015b60608152602001906001900390816139a15790505b5080516116eb91601391602090910190614086565b80601383815481106139df576139df614842565b9060005260206000200190805190602001906112099291906140df565b60006001613a0984611a09565b613a13919061490d565b600083815260086020526040902054909150808214613a66576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090613aab9060019061490d565b6000838152600a602052604081205460098054939450909284908110613ad357613ad3614842565b906000526020600020015490508060098381548110613af457613af4614842565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480613b2c57613b2c614a7d565b6001900381819060005260206000200160009055905550505050565b6000613b5383611a09565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b600033301415613be357600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150613be69050565b50335b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001613c59929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401613c8693929190614a93565b6020604051808303816000875af1158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc99190614938565b506000838152600c6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052613d259060016147f5565b6000858152600c602052604090205561153d8482613e65565b611209838383612a9e565b60006001600160a01b0384163b15613e4357836001600160a01b031663150b7a02613d72612ba7565b8786866040518563ffffffff1660e01b8152600401613d949493929190614ac3565b6020604051808303816000875af1925050508015613dcf575060408051601f3d908101601f19168201909252613dcc91810190614b00565b60015b613e29573d808015613dfd576040519150601f19603f3d011682016040523d82523d6000602084013e613e02565b606091505b508051613e215760405162461bcd60e51b8152600401610f0590614a2b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061153d565b50600161153d565b6116eb828260405180602001604052806000815250613e81565b6040805160208101849052908101829052600090606001611c7e565b613e8b8383613eb4565b613e986000848484613d49565b6112095760405162461bcd60e51b8152600401610f0590614a2b565b6001600160a01b038216613f0a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f05565b6000818152600360205260409020546001600160a01b031615613f6f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f05565b613f7b60008383613d3e565b6001600160a01b0382166000908152600460205260408120805460019290613fa49084906147f5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461400e9061480d565b90600052602060002090601f0160209004810192826140305760008555614076565b82601f1061404957805160ff1916838001178555614076565b82800160010185558215614076579182015b8281111561407657825182559160200191906001019061405b565b50614082929150614119565b5090565b8280548282559060005260206000209081019282156140d3579160200282015b828111156140d357825180516140c39184916020909101906140df565b50916020019190600101906140a6565b5061408292915061412e565b828054828255906000526020600020908101928215614076579160200282018281111561407657825182559160200191906001019061405b565b5b80821115614082576000815560010161411a565b80821115614082576000614142828261414b565b5060010161412e565b5080546000825590600052602060002090810190610fbc9190614119565b6001600160e01b031981168114610fbc57600080fd5b60006020828403121561419157600080fd5b813561169181614169565b60005b838110156141b757818101518382015260200161419f565b838111156121145750506000910152565b600081518084526141e081602086016020860161419c565b601f01601f19169290920160200192915050565b60208152600061169160208301846141c8565b60006020828403121561421957600080fd5b5035919050565b6001600160a01b0381168114610fbc57600080fd5b6000806040838503121561424857600080fd5b823561425381614220565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156142a25783516001600160a01b03168352928401929184019160010161427d565b50909695505050505050565b6000602082840312156142c057600080fd5b813561169181614220565b6020808252825182820181905260009190848201906040850190845b818110156142a2578351835292840192918401916001016142e7565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561434157614341614303565b604052919050565b60006001600160401b0382111561436257614362614303565b5060051b60200190565b600082601f83011261437d57600080fd5b8135602061439261438d83614349565b614319565b82815260059290921b840181019181810190868411156143b157600080fd5b8286015b848110156143cc57803583529183019183016143b5565b509695505050505050565b6000602082840312156143e957600080fd5b81356001600160401b038111156143ff57600080fd5b61153d8482850161436c565b60008060006060848603121561442057600080fd5b833561442b81614220565b9250602084013561443b81614220565b929592945050506040919091013590565b6000806040838503121561445f57600080fd5b50508035926020909101359150565b6000806000806080858703121561448457600080fd5b84359350602085013592506040850135915060608501356001600160401b038111156144af57600080fd5b6144bb8782880161436c565b91505092959194509250565b60006001600160401b038311156144e0576144e0614303565b6144f3601f8401601f1916602001614319565b905082815283838301111561450757600080fd5b828260208301376000602084830101529392505050565b60006020828403121561453057600080fd5b81356001600160401b0381111561454657600080fd5b8201601f8101841361455757600080fd5b61153d848235602084016144c7565b600082601f83011261457757600080fd5b8135602061458761438d83614349565b82815260059290921b840181019181810190868411156145a657600080fd5b8286015b848110156143cc5780356145bd81614220565b83529183019183016145aa565b600080604083850312156145dd57600080fd5b82356001600160401b03808211156145f457600080fd5b61460086838701614566565b9350602085013591508082111561461657600080fd5b506146238582860161436c565b9150509250929050565b6000806040838503121561464057600080fd5b8235915060208301356001600160401b0381111561465d57600080fd5b6146238582860161436c565b60006020828403121561467b57600080fd5b81356001600160401b0381111561469157600080fd5b61153d84828501614566565b8015158114610fbc57600080fd5b600080604083850312156146be57600080fd5b82356146c981614220565b915060208301356146d98161469d565b809150509250929050565b600080600080608085870312156146fa57600080fd5b843561470581614220565b9350602085013561471581614220565b92506040850135915060608501356001600160401b0381111561473757600080fd5b8501601f8101871361474857600080fd5b6144bb878235602084016144c7565b6000806040838503121561476a57600080fd5b8235915060208301356146d981614220565b6000806040838503121561478f57600080fd5b823561479a81614220565b915060208301356146d981614220565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115614808576148086147df565b500190565b600181811c9082168061482157607f821691505b6020821081141561138757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060001982141561486c5761486c6147df565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008160001904831182151516156148de576148de6147df565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614908576149086148e3565b500490565b60008282101561491f5761491f6147df565b500390565b600082614933576149336148e3565b500690565b60006020828403121561494a57600080fd5b81516116918161469d565b6000835161496781846020880161419c565b83519083019061497b81836020880161419c565b01949350505050565b60006020828403121561499657600080fd5b5051919050565b6000602080830181845280855480835260408601915060408160051b87010192506000878152848120815b83811015614a1d57888603603f1901855281548087528284528784208888019190855b82811015614a075781548452928a0192600191820191016149eb565b50919750505093860193600191820191016149c8565b509398975050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0384168152826020820152606060408201526000614aba60608301846141c8565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614af6908301846141c8565b9695505050505050565b600060208284031215614b1257600080fd5b81516116918161416956fea2646970667358221220c0683dc1016b29441939b101686cbda74424ae1639040aa6414c45a77cf6ccec64736f6c634300080b00334552433732313a207472616e7366657220746f206e6f6e204552433732315265000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000001bc16d674ec80000aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

Deployed Bytecode

0x6080604052600436106104895760003560e01c80638e58440711610255578063c14c563611610144578063e7cdcf3a116100c1578063efa00ce711610085578063efa00ce714610d6a578063eff907eb14610d8a578063f0b57a6a14610daa578063f2fde38b14610dca578063f37e64bf14610dea578063f3eef26714610e0a57600080fd5b8063e7cdcf3a14610cdf578063e8a3d48514610cff578063e985e9c514610d14578063ec7339d114610d34578063ef706c9e14610d5457600080fd5b8063d921a9f911610108578063d921a9f914610c3e578063d936547e14610c5e578063da2e35f914610c94578063e00dd16114610ca9578063e2a715f714610cbf57600080fd5b8063c14c563614610ba9578063c87b56dd14610bc9578063cafa8dfe14610be9578063ce56c45414610bfe578063d5785b7614610c1e57600080fd5b8063989bdbb6116101d2578063b15abece11610196578063b15abece14610b2b578063b1c9fe6e14610b41578063b514371514610b56578063b88d4fde14610b76578063c11c956c14610b9657600080fd5b8063989bdbb614610aa257806399774ade14610ab7578063a035b1fe14610ad7578063a22cb46514610aed578063a3a51bd514610b0d57600080fd5b806394985ddd1161021957806394985ddd14610a225780639542522a14610a4257806395bef05514610a6257806395d89b4114610a775780639721f8be14610a8c57600080fd5b80638e584407146109ab5780638ea7ddbf146109c1578063926fa2f7146109d757806393e49d09146109ec578063942d2ddf14610a0c57600080fd5b806342842e0e1161037c57806361728f39116102f9578063742c6f2e116102bd578063742c6f2e146108f757806374ec2d63146109175780637e5535c61461092d578063823756c51461094d5780638ca9636e1461096d5780638da5cb5b1461098d57600080fd5b806361728f39146108725780636352211e1461088857806369d2ceb1146108a857806370a08231146108c2578063715018a6146108e257600080fd5b8063515857d411610340578063515857d4146107bc578063522fe98e146107dc578063538413271461081257806355f804b3146108325780635d7e11bf1461085257600080fd5b806342842e0e1461071c57806342966c681461073c578063444817581461075c57806347e63e181461077c5780634f6ccce71461079c57600080fd5b806318160ddd1161040a57806324c4f4ab116103ce57806324c4f4ab146106735780632a55205a146106885780632f745c59146106c75780633b5b6587146106e75780633e1a4f5d1461070757600080fd5b806318160ddd146105f357806319d1997a146106085780631e2aea061461061d578063230a1fd51461063d57806323b872dd1461065357600080fd5b8063081812fc11610451578063081812fc14610536578063095ea7b31461056e5780630f7309e81461058e57806316c12746146105a457806317516592146105c657600080fd5b806301ffc9a71461048e578063028c2348146104c357806304774e16146104da578063066e9534146104fe57806306fdde0314610514575b600080fd5b34801561049a57600080fd5b506104ae6104a936600461417f565b610e40565b60405190151581526020015b60405180910390f35b3480156104cf57600080fd5b506104d8610ebc565b005b3480156104e657600080fd5b506104f0600d5481565b6040519081526020016104ba565b34801561050a57600080fd5b506104f060165481565b34801561052057600080fd5b50610529610fbf565b6040516104ba91906141f4565b34801561054257600080fd5b50610556610551366004614207565b611051565b6040516001600160a01b0390911681526020016104ba565b34801561057a57600080fd5b506104d8610589366004614235565b6110e6565b34801561059a57600080fd5b506104f0601f5481565b3480156105b057600080fd5b506105b961120e565b6040516104ba9190614261565b3480156105d257600080fd5b506105e66105e13660046142ae565b6112ba565b6040516104ba91906142cb565b3480156105ff57600080fd5b506009546104f0565b34801561061457600080fd5b50611e616104f0565b34801561062957600080fd5b506104f06106383660046143d7565b61135b565b34801561064957600080fd5b506104f0600f5481565b34801561065f57600080fd5b506104d861066e36600461440b565b61138d565b34801561067f57600080fd5b506104f0600a81565b34801561069457600080fd5b506106a86106a336600461444c565b6113c5565b604080516001600160a01b0390931683526020830191909152016104ba565b3480156106d357600080fd5b506104f06106e2366004614235565b6113f8565b3480156106f357600080fd5b506104f061070236600461446e565b61148e565b34801561071357600080fd5b50601e546104f0565b34801561072857600080fd5b506104d861073736600461440b565b611545565b34801561074857600080fd5b506104d8610757366004614207565b611560565b34801561076857600080fd5b506104f061077736600461444c565b6115c0565b34801561078857600080fd5b506104d861079736600461444c565b611698565b3480156107a857600080fd5b506104f06107b7366004614207565b6116ef565b3480156107c857600080fd5b506104f06107d736600461444c565b611782565b3480156107e857600080fd5b506104f06107f73660046142ae565b6001600160a01b03166000908152601c602052604090205490565b34801561081e57600080fd5b506104d861082d366004614207565b6117bf565b34801561083e57600080fd5b506104d861084d36600461451e565b611868565b34801561085e57600080fd5b506104f061086d366004614207565b61190c565b34801561087e57600080fd5b506104f060105481565b34801561089457600080fd5b506105566108a3366004614207565b611992565b3480156108b457600080fd5b506020546104ae9060ff1681565b3480156108ce57600080fd5b506104f06108dd3660046142ae565b611a09565b3480156108ee57600080fd5b506104d8611a90565b34801561090357600080fd5b506104f0610912366004614207565b611ae5565b34801561092357600080fd5b506104f060115481565b34801561093957600080fd5b506104d86109483660046145ca565b611b5f565b34801561095957600080fd5b506104f061096836600461462d565b611bb2565b34801561097957600080fd5b506104f061098836600461444c565b611c2d565b34801561099957600080fd5b506000546001600160a01b0316610556565b3480156109b757600080fd5b506104f060195481565b3480156109cd57600080fd5b506104f060145481565b3480156109e357600080fd5b506104d8611c9c565b3480156109f857600080fd5b506104d8610a07366004614207565b611ced565b348015610a1857600080fd5b506104f060185481565b348015610a2e57600080fd5b506104d8610a3d36600461444c565b611d96565b348015610a4e57600080fd5b506104d8610a5d366004614669565b611e18565b348015610a6e57600080fd5b506013546104f0565b348015610a8357600080fd5b50610529611e6a565b348015610a9857600080fd5b506104f0600e5481565b348015610aae57600080fd5b506104d8611e79565b348015610ac357600080fd5b506104d8610ad23660046142ae565b611ed1565b348015610ae357600080fd5b506104f0601e5481565b348015610af957600080fd5b506104d8610b083660046146ab565b611fad565b348015610b1957600080fd5b506012546001600160a01b0316610556565b348015610b3757600080fd5b506104f060175481565b348015610b4d57600080fd5b506104f0611fbf565b348015610b6257600080fd5b506104d8610b713660046142ae565b612074565b348015610b8257600080fd5b506104d8610b913660046146e4565b6120db565b6104d8610ba4366004614235565b61211a565b348015610bb557600080fd5b506104f0610bc4366004614207565b61222c565b348015610bd557600080fd5b50610529610be4366004614207565b6122a2565b348015610bf557600080fd5b506104f0600881565b348015610c0a57600080fd5b506104d8610c19366004614757565b61237c565b348015610c2a57600080fd5b506105e6610c39366004614207565b61245a565b348015610c4a57600080fd5b506104d8610c59366004614207565b6124cf565b348015610c6a57600080fd5b506104f0610c793660046142ae565b6001600160a01b03166000908152601b602052604090205490565b348015610ca057600080fd5b50600d546104f0565b348015610cb557600080fd5b506104f060155481565b348015610ccb57600080fd5b506104f0610cda366004614207565b612578565b348015610ceb57600080fd5b506104d8610cfa366004614207565b6125d9565b348015610d0b57600080fd5b5061052961262b565b348015610d2057600080fd5b506104ae610d2f36600461477c565b61263a565b348015610d4057600080fd5b506105e6610d4f366004614207565b61266a565b348015610d6057600080fd5b506104f0601a5481565b348015610d7657600080fd5b506104d8610d8536600461451e565b6127ef565b348015610d9657600080fd5b506104d8610da536600461462d565b61284b565b348015610db657600080fd5b506104d8610dc5366004614207565b61289e565b348015610dd657600080fd5b506104d8610de53660046142ae565b61292f565b348015610df657600080fd5b506104d8610e05366004614207565b6129e6565b348015610e1657600080fd5b506104f0610e253660046142ae565b6001600160a01b03166000908152601d602052604090205490565b60006301ffc9a760e01b6001600160e01b031983161480610e7157506001600160e01b031982166301ffc9a760e01b145b80610e8c57506001600160e01b0319821663780e9d6360e01b145b80610ea757506001600160e01b0319821663152a902d60e11b145b80610eb65750610eb682612b56565b92915050565b610ec4612ba7565b6001600160a01b0316610edf6000546001600160a01b031690565b6001600160a01b031614610f0e5760405162461bcd60e51b8152600401610f05906147aa565b60405180910390fd5b600d5415610f575760405162461bcd60e51b81526020600482015260166024820152751d1c985a5d081cd9595908185b1c9958591e481cd95d60521b6044820152606401610f05565b610f64611e6160016147f5565b60155414610fb45760405162461bcd60e51b815260206004820152601e60248201527f63616e742072657665616c20756e74696c20737570706c79206c696d697400006044820152606401610f05565b610fbc612bb6565b50565b606060018054610fce9061480d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ffa9061480d565b80156110475780601f1061101c57610100808354040283529160200191611047565b820191906000526020600020905b81548152906001019060200180831161102a57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166110ca5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610f05565b506000908152600560205260409020546001600160a01b031690565b60006110f182611992565b9050806001600160a01b0316836001600160a01b0316141561115f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610f05565b806001600160a01b0316611171612ba7565b6001600160a01b0316148061118d575061118d81610d2f612ba7565b6111ff5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610f05565b6112098383612c9d565b505050565b6060600061121b60095490565b90506000816001600160401b0381111561123757611237614303565b604051908082528060200260200182016040528015611260578160200160208202803683370190505b50905060015b828110156112b35761127781611992565b82828151811061128957611289614842565b6001600160a01b0390921660209283029190910190910152806112ab81614858565b915050611266565b5092915050565b606060006112c783611a09565b90506000816001600160401b038111156112e3576112e3614303565b60405190808252806020026020018201604052801561130c578160200160208202803683370190505b50905060005b828110156113535761132485826113f8565b82828151811061133657611336614842565b60209081029190910101528061134b81614858565b915050611312565b509392505050565b6000805b82518110156113875760208102602084010151820191508061138090614858565b905061135f565b50919050565b61139e611398612ba7565b82612d0b565b6113ba5760405162461bcd60e51b8152600401610f0590614873565b611209838383612dda565b60125460009081906001600160a01b031660646113e36008866148c4565b6113ed91906148f9565b915091509250929050565b600061140383611a09565b82106114655760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610f05565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000601083106114cc576040805160208101879052016040516020818303038152906040528051906020012094506010836114c9919061490d565b92505b60006114d88686611c2d565b905060006114e78560026148c4565b90506000826114f78360016147f5565b6020811061150757611507614842565b1a600484846020811061151c5761151c614842565b61152b939291901a901b6147f5565b90506115378186611bb2565b93505050505b949350505050565b611209838383604051806020016040528060008152506120db565b61156b611398612ba7565b6115b75760405162461bcd60e51b815260206004820181905260248201527f63616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610f05565b610fbc81612f81565b6013546000906116125760405162461bcd60e51b815260206004820152601760248201527f7765696768747320617265206e6f7420736574207965740000000000000000006044820152606401610f05565b61169161161e600d5490565b84846013868154811061163357611633614842565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561168757602002820191906000526020600020905b815481526020019060010190808311611673575b505050505061148e565b9392505050565b6116a0612ba7565b6001600160a01b03166116bb6000546001600160a01b031690565b6001600160a01b0316146116e15760405162461bcd60e51b8152600401610f05906147aa565b6116eb8282613028565b5050565b60006116fa60095490565b821061175d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610f05565b6009828154811061177057611770614842565b90600052602060002001549050919050565b6013828154811061179257600080fd5b9060005260206000200181815481106117aa57600080fd5b90600052602060002001600091509150505481565b6117c7612ba7565b6001600160a01b03166117e26000546001600160a01b031690565b6001600160a01b0316146118085760405162461bcd60e51b8152600401610f05906147aa565b6004611812611fbf565b1061185f5760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652034206166746572207068617365203400006044820152606401610f05565b610fbc81601955565b611870612ba7565b6001600160a01b031661188b6000546001600160a01b031690565b6001600160a01b0316146118b15760405162461bcd60e51b8152600401610f05906147aa565b60205460ff16156118f95760405162461bcd60e51b81526020600482015260126024820152711b595d1859185d18481a5cc81b1bd8dad95960721b6044820152606401610f05565b80516116eb90600b906020840190614002565b6000816001141561191f57505060165490565b816002141561193057505060175490565b816003141561194157505060185490565b816004141561195257505060195490565b60405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a59081c1a185cd9481c995c5d595cdd605a1b6044820152606401610f05565b6000818152600360205260408120546001600160a01b031680610eb65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610f05565b60006001600160a01b038216611a745760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610f05565b506001600160a01b031660009081526004602052604090205490565b611a98612ba7565b6001600160a01b0316611ab36000546001600160a01b031690565b6001600160a01b031614611ad95760405162461bcd60e51b8152600401610f05906147aa565b611ae36000613076565b565b600d54600090611b2a5760405162461bcd60e51b815260206004820152601060248201526f1b9bdd081c995d99585b1959081e595d60821b6044820152606401610f05565b600d5460408051602081019290925281018390526060015b604051602081830303815290604052805190602001209050919050565b611b67612ba7565b6001600160a01b0316611b826000546001600160a01b031690565b6001600160a01b031614611ba85760405162461bcd60e51b8152600401610f05906147aa565b6116eb82826130c6565b600080611bbe8361135b565b90506000611bcc8286614924565b90506000805b8551811015611c2357858181518110611bed57611bed614842565b602002602001015182611c0091906147f5565b9150818311611c1157809450611c23565b80611c1b81614858565b915050611bd2565b5050505092915050565b600082611c695760405162461bcd60e51b815260206004820152600a6024820152691d5b9c995d99585b195960b21b6044820152606401610f05565b60408051602081018590529081018390526060015b60405160208183030381529060405280519060200120905092915050565b611ca4612ba7565b6001600160a01b0316611cbf6000546001600160a01b031690565b6001600160a01b031614611ce55760405162461bcd60e51b8152600401610f05906147aa565b611ae36131c7565b611cf5612ba7565b6001600160a01b0316611d106000546001600160a01b031690565b6001600160a01b031614611d365760405162461bcd60e51b8152600401610f05906147aa565b6003611d40611fbf565b10611d8d5760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652033206166746572207068617365203300006044820152606401610f05565b610fbc81601855565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614611e0e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610f05565b6116eb82826131f6565b611e20612ba7565b6001600160a01b0316611e3b6000546001600160a01b031690565b6001600160a01b031614611e615760405162461bcd60e51b8152600401610f05906147aa565b610fbc816132de565b606060028054610fce9061480d565b611e81612ba7565b6001600160a01b0316611e9c6000546001600160a01b031690565b6001600160a01b031614611ec25760405162461bcd60e51b8152600401610f05906147aa565b6020805460ff19166001179055565b611ed9612ba7565b6001600160a01b0316611ef46000546001600160a01b031690565b6001600160a01b031614611f1a5760405162461bcd60e51b8152600401610f05906147aa565b806001600160a01b031663095ea7b3611f3b6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260001960248201526044016020604051808303816000875af1158015611f89573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116eb9190614938565b6116eb611fb8612ba7565b8383613386565b6016546000904290811080611fd45750601654155b15611fe157600091505090565b60195481118015611fff5750611ffa611e6160016147f5565b601554145b1561200c57600591505090565b6019541580159061201f57506019548110155b1561202c57600491505090565b6018541580159061203f57506018548110155b1561204c57600391505090565b6017541580159061205f57506017548110155b1561206c57600291505090565b600191505090565b61207c612ba7565b6001600160a01b03166120976000546001600160a01b031690565b6001600160a01b0316146120bd5760405162461bcd60e51b8152600401610f05906147aa565b601280546001600160a01b0319166001600160a01b03831617905550565b6120ec6120e6612ba7565b83612d0b565b6121085760405162461bcd60e51b8152600401610f0590614873565b61211484848484613455565b50505050565b6001600160a01b0382163b156121605760405162461bcd60e51b815260206004820152600b60248201526a1a5cc818dbdb9d1c9858dd60aa1b6044820152606401610f05565b3332146121af5760405162461bcd60e51b815260206004820152601760248201527f6d73672073656e64657220213d207478206f726967696e0000000000000000006044820152606401610f05565b336000908152601d602052604090205481116121cf576116eb8282613488565b601e546121dc90826148c4565b34146122225760405162461bcd60e51b81526020600482015260156024820152741a5b98dbdc9c9958dd0818dbda5b88185b5bdd5b9d605a1b6044820152606401610f05565b6116eb8282613519565b6000610eb66013838154811061224457612244614842565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561229857602002820191906000526020600020905b815481526020019060010190808311612284575b505050505061135b565b6000818152600360205260409020546060906001600160a01b03166123215760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610f05565b600061232b61385f565b9050600081511161234b5760405180602001604052806000815250611691565b806123558461386e565b604051602001612366929190614955565b6040516020818303038152906040529392505050565b612384612ba7565b6001600160a01b031661239f6000546001600160a01b031690565b6001600160a01b0316146123c55760405162461bcd60e51b8152600401610f05906147aa565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114612412576040519150601f19603f3d011682016040523d82523d6000602084013e612417565b606091505b50509050806112095760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610f05565b60606013828154811061246f5761246f614842565b906000526020600020018054806020026020016040519081016040528092919081815260200182805480156124c357602002820191906000526020600020905b8154815260200190600101908083116124af575b50505050509050919050565b6124d7612ba7565b6001600160a01b03166124f26000546001600160a01b031690565b6001600160a01b0316146125185760405162461bcd60e51b8152600401610f05906147aa565b6002612522611fbf565b1061256f5760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652031206166746572207068617365203100006044820152606401610f05565b610fbc81601655565b600e546000906125bd5760405162461bcd60e51b815260206004820152601060248201526f1b9bdd081c995d99585b1959081e595d60821b6044820152606401610f05565b600e546040805160208101929092528101839052606001611b42565b6125e1612ba7565b6001600160a01b03166125fc6000546001600160a01b031690565b6001600160a01b0316146126225760405162461bcd60e51b8152600401610f05906147aa565b610fbc8161396b565b606060218054610fce9061480d565b6001600160a01b03808316600090815260066020908152604080832093851683529290529081205460ff16611691565b601354606090806126bd5760405162461bcd60e51b815260206004820152601e60248201527f7765696768747320617272617920646f65736e742065786973742079657400006044820152606401610f05565b60136000815481106126d1576126d1614842565b906000526020600020016000815481106126ed576126ed614842565b90600052602060002001546000141561273d5760405162461bcd60e51b81526020600482015260126024820152711dd95a59da1d1cc81a5cc81a5b9d985b1a5960721b6044820152606401610f05565b6000816001600160401b0381111561275757612757614303565b604051908082528060200260200182016040528015612780578160200160208202803683370190505b509050600061278e600d5490565b905060005b6013548110156127e5576127b68287836013858154811061163357611633614842565b8382815181106127c8576127c8614842565b6020908102919091010152806127dd81614858565b915050612793565b5090949350505050565b6127f7612ba7565b6001600160a01b03166128126000546001600160a01b031690565b6001600160a01b0316146128385760405162461bcd60e51b8152600401610f05906147aa565b80516116eb906021906020840190614002565b612853612ba7565b6001600160a01b031661286e6000546001600160a01b031690565b6001600160a01b0316146128945760405162461bcd60e51b8152600401610f05906147aa565b6116eb82826139cb565b6128a6612ba7565b6001600160a01b03166128c16000546001600160a01b031690565b6001600160a01b0316146128e75760405162461bcd60e51b8152600401610f05906147aa565b600d541561292a5760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995d99585b195960821b6044820152606401610f05565b601f55565b612937612ba7565b6001600160a01b03166129526000546001600160a01b031690565b6001600160a01b0316146129785760405162461bcd60e51b8152600401610f05906147aa565b6001600160a01b0381166129dd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f05565b610fbc81613076565b6129ee612ba7565b6001600160a01b0316612a096000546001600160a01b031690565b6001600160a01b031614612a2f5760405162461bcd60e51b8152600401610f05906147aa565b6002612a39611fbf565b10612a865760405162461bcd60e51b815260206004820152601e60248201527f63616e74207365742070686173652032206166746572207068617365203200006044820152606401610f05565b610fbc81601755565b6001600160a01b03163b151590565b6001600160a01b038316612af957612af481600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612b1c565b816001600160a01b0316836001600160a01b031614612b1c57612b1c83826139fc565b6001600160a01b038216612b335761120981613a99565b826001600160a01b0316826001600160a01b031614611209576112098282613b48565b60006001600160e01b0319821663152a902d60e11b1480612b8757506301ffc9a760e01b6001600160e01b03198316145b80610eb657506001600160e01b031982166301ffc9a760e01b1492915050565b6000612bb1613b8c565b905090565b600f546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a0823190602401602060405180830381865afa158015612c21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c459190614984565b1015612c855760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610f05565b612c93601054600f54613be9565b6011819055919050565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612cd282611992565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b0316612d845760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610f05565b6000612d8f83611992565b9050806001600160a01b0316846001600160a01b03161480612dca5750836001600160a01b0316612dbf84611051565b6001600160a01b0316145b8061153d575061153d818561263a565b826001600160a01b0316612ded82611992565b6001600160a01b031614612e515760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610f05565b6001600160a01b038216612eb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610f05565b612ebe838383613d3e565b612ec9600082612c9d565b6001600160a01b0383166000908152600460205260408120805460019290612ef290849061490d565b90915550506001600160a01b0382166000908152600460205260408120805460019290612f209084906147f5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612f8c82611992565b9050612f9a81600084613d3e565b612fa5600083612c9d565b6001600160a01b0381166000908152600460205260408120805460019290612fce90849061490d565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600d541561306b5760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995d99585b195960821b6044820152606401610f05565b600f91909155601055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80518251146131095760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610f05565b60005b815181101561120957600082828151811061312957613129614842565b60200260200101519050600084838151811061314757613147614842565b6020026020010151905081601a600082825461316391906147f5565b909155506131759050600a60016147f5565b6001600160a01b0382166000908152601b6020908152604080832093909355601d905290812080548492906131ab9084906147f5565b92505081905550505080806131bf90614858565b91505061310c565b60136040516020016131d9919061499d565b60408051601f198184030181529190528051602090910120601455565b600d541561323f5760405162461bcd60e51b81526020600482015260166024820152751d1c985a5d081cd9595908185b1c9958591e481cd95d60521b6044820152606401610f05565b6040805160208101839052429181019190915243606082015260800160408051808303601f190181528282528051602091820120600d819055908301520160408051808303601f190181528282528051602091820120600e55600d548352820183905243908201524260608201527f775d44d2f8d57bee41b0c849e00a66f0ca15ddf0e4db16b70840d70be8e5290b9060800160405180910390a15050565b80516133195760405162461bcd60e51b815260206004820152600a602482015269195b5c1d1e481b1a5cdd60b21b6044820152606401610f05565b60005b81518110156116eb57613331600a60016147f5565b601b600084848151811061334757613347614842565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550808061337e90614858565b91505061331c565b816001600160a01b0316836001600160a01b031614156133e85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f05565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613460848484612dda565b61346c84848484613d49565b6121145760405162461bcd60e51b8152600401610f0590614a2b565b336000908152601d60205260409020548111156134d55760405162461bcd60e51b815260206004820152600b60248201526a6e6f206d696e747061737360a81b6044820152606401610f05565b336000908152601d6020526040812080548392906134f490849061490d565b9250508190555080601a600082825461350d919061490d565b909155506116eb905082825b806135575760405162461bcd60e51b815260206004820152600e60248201526d616d6f756e74206973207a65726f60901b6044820152606401610f05565b613564611e6160026147f5565b8160155461357291906147f5565b106135b35760405162461bcd60e51b8152602060048201526011602482015270746f6f206c61746520746f206d696e742160781b6044820152606401610f05565b60006135bd611fbf565b905080600114156136e257336000908152601b6020526040902054806136175760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610f05565b80600114156136685760405162461bcd60e51b815260206004820152601760248201527f796f752072656163686564207068617365206c696d69740000000000000000006044820152606401610f05565b8083106136b75760405162461bcd60e51b815260206004820152601960248201527f776f756c64206265206f766572207068617365206c696d6974000000000000006044820152606401610f05565b336000908152601b6020526040812080548592906136d690849061490d565b9091555061381d915050565b806002141561373e57336000908152601b60205260409020546137395760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610f05565b61381d565b80600314156137dd57336000908152601c6020526040902054600a906137659084906147f5565b11156137b35760405162461bcd60e51b815260206004820152601960248201527f72656163686564207068617365206c696d6974206f66203130000000000000006044820152606401610f05565b336000908152601c6020526040812080548492906137d29084906147f5565b9091555061381d9050565b8060041461381d5760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420706861736560981b6044820152606401610f05565b60005b828110156121145761383484601554613e4b565b60016015600082825461384791906147f5565b9091555081905061385781614858565b915050613820565b6060600b8054610fce9061480d565b6060816138925750506040805180820190915260018152600360fc1b602082015290565b8160005b81156138bc57806138a681614858565b91506138b59050600a836148f9565b9150613896565b6000816001600160401b038111156138d6576138d6614303565b6040519080825280601f01601f191660200182016040528015613900576020820181803683370190505b5090505b841561153d5761391560018361490d565b9150613922600a86614924565b61392d9060306147f5565b60f81b81838151811061394257613942614842565b60200101906001600160f81b031916908160001a905350613964600a866148f9565b9450613904565b806001600160401b0381111561398357613983614303565b6040519080825280602002602001820160405280156139b657816020015b60608152602001906001900390816139a15790505b5080516116eb91601391602090910190614086565b80601383815481106139df576139df614842565b9060005260206000200190805190602001906112099291906140df565b60006001613a0984611a09565b613a13919061490d565b600083815260086020526040902054909150808214613a66576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090613aab9060019061490d565b6000838152600a602052604081205460098054939450909284908110613ad357613ad3614842565b906000526020600020015490508060098381548110613af457613af4614842565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480613b2c57613b2c614a7d565b6001900381819060005260206000200160009055905550505050565b6000613b5383611a09565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b600033301415613be357600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150613be69050565b50335b90565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001613c59929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401613c8693929190614a93565b6020604051808303816000875af1158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc99190614938565b506000838152600c6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052613d259060016147f5565b6000858152600c602052604090205561153d8482613e65565b611209838383612a9e565b60006001600160a01b0384163b15613e4357836001600160a01b031663150b7a02613d72612ba7565b8786866040518563ffffffff1660e01b8152600401613d949493929190614ac3565b6020604051808303816000875af1925050508015613dcf575060408051601f3d908101601f19168201909252613dcc91810190614b00565b60015b613e29573d808015613dfd576040519150601f19603f3d011682016040523d82523d6000602084013e613e02565b606091505b508051613e215760405162461bcd60e51b8152600401610f0590614a2b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061153d565b50600161153d565b6116eb828260405180602001604052806000815250613e81565b6040805160208101849052908101829052600090606001611c7e565b613e8b8383613eb4565b613e986000848484613d49565b6112095760405162461bcd60e51b8152600401610f0590614a2b565b6001600160a01b038216613f0a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f05565b6000818152600360205260409020546001600160a01b031615613f6f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610f05565b613f7b60008383613d3e565b6001600160a01b0382166000908152600460205260408120805460019290613fa49084906147f5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461400e9061480d565b90600052602060002090601f0160209004810192826140305760008555614076565b82601f1061404957805160ff1916838001178555614076565b82800160010185558215614076579182015b8281111561407657825182559160200191906001019061405b565b50614082929150614119565b5090565b8280548282559060005260206000209081019282156140d3579160200282015b828111156140d357825180516140c39184916020909101906140df565b50916020019190600101906140a6565b5061408292915061412e565b828054828255906000526020600020908101928215614076579160200282018281111561407657825182559160200191906001019061405b565b5b80821115614082576000815560010161411a565b80821115614082576000614142828261414b565b5060010161412e565b5080546000825590600052602060002090810190610fbc9190614119565b6001600160e01b031981168114610fbc57600080fd5b60006020828403121561419157600080fd5b813561169181614169565b60005b838110156141b757818101518382015260200161419f565b838111156121145750506000910152565b600081518084526141e081602086016020860161419c565b601f01601f19169290920160200192915050565b60208152600061169160208301846141c8565b60006020828403121561421957600080fd5b5035919050565b6001600160a01b0381168114610fbc57600080fd5b6000806040838503121561424857600080fd5b823561425381614220565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156142a25783516001600160a01b03168352928401929184019160010161427d565b50909695505050505050565b6000602082840312156142c057600080fd5b813561169181614220565b6020808252825182820181905260009190848201906040850190845b818110156142a2578351835292840192918401916001016142e7565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561434157614341614303565b604052919050565b60006001600160401b0382111561436257614362614303565b5060051b60200190565b600082601f83011261437d57600080fd5b8135602061439261438d83614349565b614319565b82815260059290921b840181019181810190868411156143b157600080fd5b8286015b848110156143cc57803583529183019183016143b5565b509695505050505050565b6000602082840312156143e957600080fd5b81356001600160401b038111156143ff57600080fd5b61153d8482850161436c565b60008060006060848603121561442057600080fd5b833561442b81614220565b9250602084013561443b81614220565b929592945050506040919091013590565b6000806040838503121561445f57600080fd5b50508035926020909101359150565b6000806000806080858703121561448457600080fd5b84359350602085013592506040850135915060608501356001600160401b038111156144af57600080fd5b6144bb8782880161436c565b91505092959194509250565b60006001600160401b038311156144e0576144e0614303565b6144f3601f8401601f1916602001614319565b905082815283838301111561450757600080fd5b828260208301376000602084830101529392505050565b60006020828403121561453057600080fd5b81356001600160401b0381111561454657600080fd5b8201601f8101841361455757600080fd5b61153d848235602084016144c7565b600082601f83011261457757600080fd5b8135602061458761438d83614349565b82815260059290921b840181019181810190868411156145a657600080fd5b8286015b848110156143cc5780356145bd81614220565b83529183019183016145aa565b600080604083850312156145dd57600080fd5b82356001600160401b03808211156145f457600080fd5b61460086838701614566565b9350602085013591508082111561461657600080fd5b506146238582860161436c565b9150509250929050565b6000806040838503121561464057600080fd5b8235915060208301356001600160401b0381111561465d57600080fd5b6146238582860161436c565b60006020828403121561467b57600080fd5b81356001600160401b0381111561469157600080fd5b61153d84828501614566565b8015158114610fbc57600080fd5b600080604083850312156146be57600080fd5b82356146c981614220565b915060208301356146d98161469d565b809150509250929050565b600080600080608085870312156146fa57600080fd5b843561470581614220565b9350602085013561471581614220565b92506040850135915060608501356001600160401b0381111561473757600080fd5b8501601f8101871361474857600080fd5b6144bb878235602084016144c7565b6000806040838503121561476a57600080fd5b8235915060208301356146d981614220565b6000806040838503121561478f57600080fd5b823561479a81614220565b915060208301356146d981614220565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115614808576148086147df565b500190565b600181811c9082168061482157607f821691505b6020821081141561138757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060001982141561486c5761486c6147df565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008160001904831182151516156148de576148de6147df565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614908576149086148e3565b500490565b60008282101561491f5761491f6147df565b500390565b600082614933576149336148e3565b500690565b60006020828403121561494a57600080fd5b81516116918161469d565b6000835161496781846020880161419c565b83519083019061497b81836020880161419c565b01949350505050565b60006020828403121561499657600080fd5b5051919050565b6000602080830181845280855480835260408601915060408160051b87010192506000878152848120815b83811015614a1d57888603603f1901855281548087528284528784208888019190855b82811015614a075781548452928a0192600191820191016149eb565b50919750505093860193600191820191016149c8565b509398975050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0384168152826020820152606060408201526000614aba60608301846141c8565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614af6908301846141c8565b9695505050505050565b600060208284031215614b1257600080fd5b81516116918161416956fea2646970667358221220c0683dc1016b29441939b101686cbda74424ae1639040aa6414c45a77cf6ccec64736f6c634300080b0033

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

000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000001bc16d674ec80000aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

-----Decoded View---------------
Arg [0] : _vrfCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [1] : _link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [2] : _vrfFee (uint256): 2000000000000000000
Arg [3] : _keyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [1] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [3] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.