Contract 0x8219c102f356084299d6ae27ea7240f543a854ea

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd91864ba623c9bd50772b98f93f73bf0cf212a3fde8e913532f21bfc5f063e3f0x60806040239109662022-01-19 15:12:05124 days 21 hrs ago0x15064de4a9eb4d5498796ab870b52a0af84a9548 IN  Create: Troll0 MATIC7.4136331,500
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Troll

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
constantinople EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 22 : Troll.sol
pragma solidity ^0.8.7;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";

import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";


import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "./ERC721EnumerableUpgradeable.sol";
import "./VRFConsumerBaseUpgradeable.sol";

interface IInvite {
    function balanceOf(address owner) external returns (uint256);
}

interface IBeryl {
    function burn(address from, uint256 amount) external;
    function balanceOf(address owner) external returns (uint256);
}

interface IMine {
    function randomTrollOwner(uint256 seed) external view returns (address);
}

interface IRenderer {
    function tokenMetadata(uint256 tokenId, bool isDwarf, uint8[15] calldata traitarray) external view returns (string memory);
}

contract Troll is ReentrancyGuardUpgradeable, ERC721EnumerableUpgradeable, OwnableUpgradeable, PausableUpgradeable, VRFConsumerBaseUpgradeable {

    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
    using AddressUpgradeable for address;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    // mint variables
    uint256 public constant MAX_TOKENS = 25000;     // max number of tokens that can be minted
    uint256 public PAID_TOKENS;     // max number of tokens that can be minted for WETH

    uint16 public minted;                           // number of tokens have been minted so far
    string public baseURI;

    uint256 public constant MINT_PRICE = .03 ether;                         // mint price
    uint256 public constant MINT_PRICE_INV = .01 ether;                     // mint price for invited

    uint256 public constant MINT_ADDR_LIMIT = 50;                     // mint limit

    // mappings
    mapping(uint256 => DwarfTroll) private tokenTraits;                     // mapping from tokenId to a struct containing the token's traits
    mapping(uint256 => uint256) private existingCombinations;              // mapping from hashed(tokenTrait) to the tokenId it's associated with

    struct DwarfTroll {bool isDwarf; uint8[15] traitarray; uint8 alphaIndex;}

    // 0 - 8 are associated with dwarf, 9 - 13 are associated with troll
    uint8[][18] public rarities;
    uint8[][18] public aliases;

    IMine public mine;      // STAKING
    IBeryl public beryl;    // ERC20 Token
    IInvite public invite;  // Invites
    IRenderer public renderer;  // Renderer and Metadata

    IERC20Upgradeable public weth;

    address private project_wallet;

    bool isPublicSale;

    mapping(address => uint256) private mintersList;

    //Chainlink Setup:
    bytes32 internal keyHash;
    uint256 public fee;
    uint256 internal randomResult;
    uint256 internal randomNumber;
    address public linkToken;
    uint256 public vrfcooldown;

    struct Minting {
        address minter;
        uint256 tokenId;
        bool fulfilled;
    }

    mapping(bytes32=>Minting) mintings;

    function initialize(address _beryl, address _invite, address _renderer, address _vrfCoordinator, address _link, address _weth) initializer public {

        __ERC721_init("Troll Game", "TROLLGAME");
        __ERC721Enumerable_init();
        __Ownable_init();
        __ReentrancyGuard_init();
        __Pausable_init();
        __VRFConsumerBase_init(_vrfCoordinator,_link);


        // Chainklink
        keyHash = 0xf86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da;
        fee = 0.0001 * 10 ** 18; // 0.0001 LINK (Varies by network)
        linkToken = _link;
        vrfcooldown = 300;

        // Team wallet
        project_wallet = 0x15064dE4a9EB4d5498796ab870B52a0af84a9548;

        isPublicSale = false;

        PAID_TOKENS = 5000;

        _pause();

        // Initate Interfaces
        beryl = IBeryl(_beryl);
        invite = IInvite(_invite);
        renderer = IRenderer(_renderer);

        weth = IERC20Upgradeable(_weth);

        rarities[0] = [255,255];
        rarities[1] = [39,51,59,67,125,131,189,197,204,217];
        rarities[2] = [39,51,59,67,125,131,189,197,204,217];
        rarities[3] = [59,111,145,197];
        rarities[4] = [34,59,118,164,197,222];
        rarities[5] = [39,51,59,67,125,131,189,197,204,217];
        rarities[6] = [59,111,145,197];

        aliases[0] = [1,0]; // skin
        aliases[1] = [9,8,7,6,5,4,3,2,1,0];  //Back
        aliases[2] = [9,8,7,6,5,4,3,2,1,0]; //Wear
        aliases[3] = [3,2,1,0]; //Beard
        aliases[4] = [5,4,3,2,1,0]; //Foot
        aliases[5] = [9,8,7,6,5,4,3,2,1,0]; // Head
        aliases[6] = [3,2,1,0]; //Tool

        rarities[7] = [32,64,96,128,160,192,244,255];
        rarities[8] = [39,51,59,67,125,131,189,197,204,217];
        rarities[9] = [39,51,59,67,125,131,189,197,204,217];
        rarities[10] = [39,131,212];
        rarities[11] = [39,51,59,67,125,131,189,197,204,217];
        rarities[12] = [39,51,59,67,125,131,189,197,204,217];
        rarities[13] = [51,102,153,204];
        rarities[14] = [255];

        aliases[7] = [7,6,5,4,3,2,1,0]; // skin
        aliases[8] = [9,8,7,6,5,4,3,2,1,0]; //Head
        aliases[9] = [9,8,7,6,5,4,3,2,1,0]; //Accessories
        aliases[10] = [2,1,0]; //Armor
        aliases[11] = [9,8,7,6,5,4,3,2,1,0]; //Foot
        aliases[12] = [9,8,7,6,5,4,3,2,1,0]; //Clothing
        aliases[13] = [3,2,1,0]; //Weapon
        aliases[14] = [0]; //bg

    }


    function mintCostForBeryl(uint256 tokenId) public view returns (uint256) {
        if (tokenId <= PAID_TOKENS) return 0;
        if (tokenId <= 10000) return 200 ether;
        if (tokenId <= 11250) return 225 ether;
        if (tokenId <= 12500) return 250 ether;
        if (tokenId <= 13750) return 275 ether;
        if (tokenId <= 15000) return 300 ether;
        if (tokenId <= 16250) return 325 ether;
        if (tokenId <= 17500) return 350 ether;
        if (tokenId <= 18750) return 375 ether;
        if (tokenId <= 20000) return 400 ether;
        if (tokenId <= 21500) return 425 ether;
        if (tokenId <= 22500) return 450 ether;
        if (tokenId <= 23750) return 475 ether;
        return 500 ether;
    }

    function mint(uint256 amount) external payable whenNotPaused nonReentrant() {

        address msgSender = _msgSender();

        require(!_msgSender().isContract(), "Contracts are not allowed");
        require(tx.origin == msgSender, "Only EOA");
        require(minted + amount <= MAX_TOKENS, "All tokens minted");
        require(amount > 0 && amount <= 10, "Invalid mint amount");
        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");

        if (minted < PAID_TOKENS) {

            if (!isPublicSale){
                require(invite.balanceOf(msgSender) > 0, "Sales are only for those who have invitations, try in an hour");
            }

            uint256 ethPrice;

            if (invite.balanceOf(msgSender) > 0)    //Have invitation
                ethPrice = MINT_PRICE_INV;          //0.1
            else
                ethPrice = MINT_PRICE;              //0.3

            uint256 mintCostEther = ethPrice * amount;

            uint256 balance = weth.balanceOf(msgSender);

            require(minted + amount <= PAID_TOKENS, "All gen0 tokens on-sale already sold");
            require(mintersList[msgSender] + amount <= MINT_ADDR_LIMIT, 'Exceed limit per wallet');

            require(balance >= mintCostEther, "Not enough wETH");
            weth.safeTransferFrom(msgSender, address(this), mintCostEther);

        }
        else {


            uint256 amountPrice = 0;

            for (uint i = 0; i < amount; i++) {
                amountPrice += mintCostForBeryl(minted + 1 + i);
            }

            require(amountPrice <= beryl.balanceOf(msgSender), "You need to send enough beryl");
            beryl.burn(msgSender, amountPrice);

        }


        for (uint i = 0; i < amount; i++) {

            minted++;

            bytes32 requestId = requestRandomness(keyHash, fee);
            mintings[requestId] = Minting(msgSender, minted, false);

            if (minted - 1 < PAID_TOKENS) {
                mintersList[msgSender] += 1;
            }

        }

    }


    //generator

    function generate(uint256 tokenId, uint256 seed) internal returns (DwarfTroll memory t) {

        t = selectTraits(seed);
        if (existingCombinations[structToHash(t.isDwarf, t.traitarray, t.alphaIndex)] == 0) {
            tokenTraits[tokenId] = t;
            existingCombinations[structToHash(t.isDwarf, t.traitarray, t.alphaIndex)] = tokenId;
            return t;
        }
        return generate(tokenId, random(seed));
    }




    function selectTrait(uint16 seed, uint8 traitType) private view returns (uint8) {

        uint8 trait = uint8(seed) % uint8(rarities[traitType].length);
        if (seed >> 8 < rarities[traitType][trait]) return trait;
        return aliases[traitType][trait];

    }

    // selects the species and all of its traits based on the seed value
    function selectTraits(uint256 seed) internal view returns (DwarfTroll memory t) {
        t.isDwarf = (seed & 0xFFFF) % 10 != 0;
        uint8 shift = t.isDwarf ? 0 : 7;                                          // 0 if its a Dwarf, 7 if its Troll

        seed >>= 16;
        if (t.isDwarf) {

            // / 0 - 6 are associated with dwarf,

            t.traitarray[0] = selectTrait(uint16(seed & 0xFFFF), 0 + shift);
            seed >>= 16;
            t.traitarray[1] = selectTrait(uint16(seed & 0xFFFF), 1 + shift);
            seed >>= 16;
            t.traitarray[2] = selectTrait(uint16(seed & 0xFFFF), 2 + shift);
            seed >>= 16;
            t.traitarray[3] = selectTrait(uint16(seed & 0xFFFF), 3 + shift);
            seed >>= 16;
            t.traitarray[4] = selectTrait(uint16(seed & 0xFFFF), 4 + shift);
            seed >>= 16;
            t.traitarray[5] = selectTrait(uint16(seed & 0xFFFF), 5 + shift);
            seed >>= 16;
            t.traitarray[6] = selectTrait(uint16(seed & 0xFFFF), 6 + shift);
            seed >>= 16;

            t.alphaIndex = 0;

        } else {
            // 7 - 13 are associated with Trolls

            t.traitarray[7] = selectTrait(uint16(seed & 0xFFFF), 0 + shift);
            seed >>= 16;
            t.traitarray[8] = selectTrait(uint16(seed & 0xFFFF), 1 + shift);
            seed >>= 16;
            t.traitarray[9] = selectTrait(uint16(seed & 0xFFFF), 2 + shift);
            seed >>= 16;
            t.traitarray[10] = selectTrait(uint16(seed & 0xFFFF), 3 + shift);
            seed >>= 16;
            t.traitarray[11] = selectTrait(uint16(seed & 0xFFFF), 4 + shift);
            seed >>= 16;
            t.traitarray[12] = selectTrait(uint16(seed & 0xFFFF), 5 + shift);
            seed >>= 16;
            t.traitarray[13] = selectTrait(uint16(seed & 0xFFFF), 6 + shift);

            t.alphaIndex = t.traitarray[13];

        }
    }

    // converts a struct to a 256 bit hash to check for uniqueness
    function structToHash(bool isDwarf, uint8[15] memory traitarray, uint8 alphaIndex) internal pure returns (uint256) {
        if(isDwarf){
            return uint256(bytes32(abi.encodePacked(true,
                traitarray[0],
                traitarray[1],
                traitarray[2],
                traitarray[3],
                traitarray[4],
                traitarray[5],
                traitarray[6],
                "0",
                "0",
                "0",
                "0",
                "0",
                "0",
                "0",
                alphaIndex)));
        }
        else{
            return uint256(bytes32(abi.encodePacked(false,
                "0",
                "0",
                "0",
                "0",
                "0",
                "0",
                "0",
                traitarray[7],
                traitarray[8],
                traitarray[9],
                traitarray[10],
                traitarray[11],
                traitarray[12],
                traitarray[13],
                alphaIndex)));
        }

    }


    // Select who the NFT goes to --- The first 20% (ETH purchases) go to the minter & the remaining 80% have a 10% chance to be given to a random staked Troll
    function selectRecipient(uint256 seed, address minter) private view returns (address) {

        if (minted <= PAID_TOKENS || ((seed >> 245) % 10) != 0) return minter;

        address thief = mine.randomTrollOwner(seed >> 144);

        if (thief == address(0x0)) return minter;
        return thief;
    }


    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        if (_msgSender() != address(mine))
            require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _transfer(from, to, tokenId);
    }

    function getTokenTraits(uint256 tokenId) public view returns (DwarfTroll memory) {
        return tokenTraits[tokenId];
    }

    // called after deployment, set Mine contract
    function setMine(address _mine) external onlyOwner {
        mine = IMine(_mine);
        getRandomChainlink();
    }

    function setBeryl(address erc20Address) public onlyOwner {
        beryl = IBeryl(erc20Address);
    }

    function setRenderer(address _renderer) public onlyOwner {
        renderer = IRenderer(_renderer);
    }

    function setPaused(bool _paused) external onlyOwner {
        if (_paused) _pause();
        else _unpause();
    }

    function flipPublicSale() external onlyOwner{
        isPublicSale = !isPublicSale;
    }


    function withdraw() public payable onlyOwner {
        payable(project_wallet).transfer(address(this).balance);
    }

    function withdrawWeth() public onlyOwner {
        uint256 balance = weth.balanceOf(address(this));
        weth.transfer(project_wallet, balance);
    }


    function airDrop(address[] calldata addressArrays) external onlyOwner  {

        uint256 addrLength = addressArrays.length;

        require(addrLength + minted <= 1000, 'There are no freemint left');

        getRandomChainlink();

        for (uint256 i; i < addrLength; i++ ){

            minted++;

            uint256 seed = random(minted);
            generate(minted, seed);
            _safeMint(addressArrays[i], minted);

            mintersList[addressArrays[i]] += 1;

        }

    }

    function setPaidTokens(uint256 num) external onlyOwner {
        PAID_TOKENS = num;
    }

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

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

    function getTokenIds(address _owner) public view returns (uint256[] memory _tokensOfOwner) {
        _tokensOfOwner = new uint256[](balanceOf(_owner));
        for (uint256 i;i<balanceOf(_owner);i++){
            _tokensOfOwner[i] = tokenOfOwnerByIndex(_owner, i);
        }
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {

        DwarfTroll memory traits = tokenTraits[tokenId];

        return renderer.tokenMetadata(tokenId, traits.isDwarf, traits.traitarray);

    }

    //Randomness

    function random(uint256 seed) private view returns (uint256) {
        return uint256(keccak256(abi.encodePacked(
                tx.origin,
                blockhash(block.number - 1),
                block.timestamp,
                seed,
                randomNumber
            )));
    }

    function changeLinkFee(uint256 _fee) external onlyOwner {
        fee = _fee;
    }

    function getRandomChainlink() internal returns (bytes32 requestId) {

        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
        return requestRandomness(keyHash, fee);

    }

    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {

        randomNumber = randomness;

        Minting storage minting = mintings[requestId];

        if (minting.minter != address(0)){

            uint256 seed;

            seed = random(minting.tokenId);
            generate(minting.tokenId, seed);                        // Generates Token Traits and adds it to the array
            address recipient = selectRecipient(seed, minting.minter);     // Selects who the NFT is going to.

            _mint(recipient, minting.tokenId);

        }

    }

    function withdrawLINK() external onlyOwner {
        uint256 tokenSupply = IERC20Upgradeable(linkToken).balanceOf(address(this));
        IERC20Upgradeable(linkToken).transfer(msg.sender, tokenSupply);
    }

    function changeLinkAddress(address _newaddress) external onlyOwner{
        linkToken = _newaddress;
    }

    function changeLinkHash(bytes32 _newhash) external onlyOwner{
        keyHash = _newhash;
    }

}

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

import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";

import "@chainlink/contracts/src/v0.8/VRFRequestIDBase.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.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 VRFConsumerBaseUpgradeable is VRFRequestIDBase, Initializable {

    /**
     * @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 USER_SEED_PLACEHOLDER;

    /**
     * @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 LINK;
    address private vrfCoordinator;

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

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

    // 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 3 of 22 : ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;


import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.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 ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    using AddressUpgradeable for address;

    function __ERC721Enumerable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721Enumerable_init_unchained();
    }

    function __ERC721Enumerable_init_unchained() internal initializer {
    }
    // 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(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {
        return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(!_msgSender().isContract(), "Contracts are not allowed big man");
        require(index < ERC721Upgradeable.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(!_msgSender().isContract(), "Contracts are not allowed big man");
        require(index < ERC721EnumerableUpgradeable.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 = ERC721Upgradeable.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 = ERC721Upgradeable.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();
    }
    uint256[46] private __gap;
}

File 4 of 22 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 5 of 22 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 IERC165Upgradeable {
    /**
     * @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 6 of 22 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal initializer {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal initializer {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}

File 7 of 22 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 8 of 22 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 9 of 22 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev 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 10 of 22 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @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 11 of 22 : IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {
    /**
     * @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 tokenId);

    /**
     * @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 12 of 22 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 22 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 IERC721ReceiverUpgradeable {
    /**
     * @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 14 of 22 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable 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.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
        return
            interfaceId == type(IERC721Upgradeable).interfaceId ||
            interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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 = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721Upgradeable.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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.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 {}
    uint256[44] private __gap;
}

File 15 of 22 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 16 of 22 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 17 of 22 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

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

    uint256 private _status;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 18 of 22 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _paused = false;
    }

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

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

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

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

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

File 19 of 22 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

File 20 of 22 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        _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);
    }
    uint256[49] private __gap;
}

File 21 of 22 : 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 22 of 22 : 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));
  }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_ADDR_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE_INV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAID_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addressArrays","type":"address[]"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"aliases","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beryl","outputs":[{"internalType":"contract IBeryl","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newaddress","type":"address"}],"name":"changeLinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"changeLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newhash","type":"bytes32"}],"name":"changeLinkHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getTokenIds","outputs":[{"internalType":"uint256[]","name":"_tokensOfOwner","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenTraits","outputs":[{"components":[{"internalType":"bool","name":"isDwarf","type":"bool"},{"internalType":"uint8[15]","name":"traitarray","type":"uint8[15]"},{"internalType":"uint8","name":"alphaIndex","type":"uint8"}],"internalType":"struct Troll.DwarfTroll","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beryl","type":"address"},{"internalType":"address","name":"_invite","type":"address"},{"internalType":"address","name":"_renderer","type":"address"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_link","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invite","outputs":[{"internalType":"contract IInvite","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"linkToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mine","outputs":[{"internalType":"contract IMine","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintCostForBeryl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rarities","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":"renderer","outputs":[{"internalType":"contract IRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"}],"name":"setBeryl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mine","type":"address"}],"name":"setMine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"setPaidTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_renderer","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","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":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vrfcooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawLINK","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawWeth","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061587280620000216000396000f3fe6080604052600436106103745760003560e01c806370a08231116101d1578063a6e0544711610102578063d004b036116100a0578063eec30bfd1161006f578063eec30bfd14610a12578063f2fde38b14610a33578063f47c84c514610a53578063fc68f75b14610a6957600080fd5b8063d004b03614610964578063ddca3f4314610991578063dfb1651a146109a8578063e985e9c5146109c957600080fd5b8063c002d23d116100dc578063c002d23d146108f2578063c084f5401461090d578063c87b56dd14610924578063cc2a9a5b1461094457600080fd5b8063a6e054471461089d578063adc2112f146108bd578063b88d4fde146108d257600080fd5b806394985ddd1161016f57806399e4d8ef1161014957806399e4d8ef1461083257806399f4b25114610849578063a0712d681461086a578063a22cb4651461087d57600080fd5b806394985ddd146107d057806394e56847146107f057806395d89b411461081d57600080fd5b8063873efeff116101ab578063873efeff1461075c578063880846051461077c5780638ada6b0f146107915780638da5cb5b146107b257600080fd5b806370a0823114610707578063715018a614610727578063717e6ffc1461073c57600080fd5b80633ccfd60b116102ab578063569c9e8e116102495780635a862dcc116102235780635a862dcc146106a45780635c975abb146106b95780636352211e146106d25780636c0360eb146106f257600080fd5b8063569c9e8e1461064857806356d3163d1461066357806357970e931461068357600080fd5b80634f02c420116102855780634f02c420146105c45780634f6ccce7146105f35780635109dbb31461061357806355f804b31461062857600080fd5b80633ccfd60b1461057b5780633fc8cef31461058357806342842e0e146105a457600080fd5b806316c38b3c116103185780632f745c59116102f25780632f745c59146104e957806333df4b2c146105095780633431a7531461053b578063368383911461055b57600080fd5b806316c38b3c1461048a57806318160ddd146104aa57806323b872dd146104c957600080fd5b806306fdde031161035457806306fdde03146103f0578063081812fc14610412578063095ea7b31461044a578063152182ac1461046a57600080fd5b80621333a714610379578062b6849f1461039b57806301ffc9a7146103bb575b600080fd5b34801561038557600080fd5b50610399610394366004614ce5565b610a89565b005b3480156103a757600080fd5b506103996103b6366004614ef5565b610ae4565b3480156103c757600080fd5b506103db6103d6366004614fdf565b610c94565b60405190151581526020015b60405180910390f35b3480156103fc57600080fd5b50610405610cbf565b6040516103e79190615373565b34801561041e57600080fd5b5061043261042d366004614fa4565b610d51565b6040516001600160a01b0390911681526020016103e7565b34801561045657600080fd5b50610399610465366004614ec9565b610de6565b34801561047657600080fd5b50610399610485366004614ce5565b610efc565b34801561049657600080fd5b506103996104a5366004614f6a565b610f49565b3480156104b657600080fd5b5060cb545b6040519081526020016103e7565b3480156104d557600080fd5b506103996104e4366004614dda565b610f8c565b3480156104f557600080fd5b506104bb610504366004614ec9565b610fd9565b34801561051557600080fd5b50610529610524366004614fbd565b6110a0565b60405160ff90911681526020016103e7565b34801561054757600080fd5b50610399610556366004614fa4565b6110e7565b34801561056757600080fd5b50610529610576366004614fbd565b611117565b610399611128565b34801561058f57600080fd5b5061019054610432906001600160a01b031681565b3480156105b057600080fd5b506103996105bf366004614dda565b61118d565b3480156105d057600080fd5b50610164546105e09061ffff1681565b60405161ffff90911681526020016103e7565b3480156105ff57600080fd5b506104bb61060e366004614fa4565b6111a8565b34801561061f57600080fd5b506104bb603281565b34801561063457600080fd5b50610399610643366004615019565b61125b565b34801561065457600080fd5b506104bb662386f26fc1000081565b34801561066f57600080fd5b5061039961067e366004614ce5565b611299565b34801561068f57600080fd5b5061019754610432906001600160a01b031681565b3480156106b057600080fd5b506103996112e6565b3480156106c557600080fd5b5061012d5460ff166103db565b3480156106de57600080fd5b506104326106ed366004614fa4565b61141a565b3480156106fe57600080fd5b50610405611491565b34801561071357600080fd5b506104bb610722366004614ce5565b611520565b34801561073357600080fd5b506103996115a7565b34801561074857600080fd5b50610399610757366004614fa4565b6115dd565b34801561076857600080fd5b50610399610777366004614fa4565b61160d565b34801561078857600080fd5b5061039961163d565b34801561079d57600080fd5b5061018f54610432906001600160a01b031681565b3480156107be57600080fd5b5060fb546001600160a01b0316610432565b3480156107dc57600080fd5b506103996107eb366004614fbd565b611689565b3480156107fc57600080fd5b5061081061080b366004614fa4565b6116ee565b6040516103e79190615538565b34801561082957600080fd5b50610405611784565b34801561083e57600080fd5b506104bb6101985481565b34801561085557600080fd5b5061018c54610432906001600160a01b031681565b610399610878366004614fa4565b611793565b34801561088957600080fd5b50610399610898366004614e9b565b612068565b3480156108a957600080fd5b506104bb6108b8366004614fa4565b612073565b3480156108c957600080fd5b506103996121c3565b3480156108de57600080fd5b506103996108ed366004614e1b565b6122a3565b3480156108fe57600080fd5b506104bb666a94d74f43000081565b34801561091957600080fd5b506104bb6101635481565b34801561093057600080fd5b5061040561093f366004614fa4565b6122d5565b34801561095057600080fd5b5061039961095f366004614d58565b6123f3565b34801561097057600080fd5b5061098461097f366004614ce5565b612e5f565b6040516103e7919061532f565b34801561099d57600080fd5b506104bb6101945481565b3480156109b457600080fd5b5061018d54610432906001600160a01b031681565b3480156109d557600080fd5b506103db6109e4366004614d1f565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b348015610a1e57600080fd5b5061018e54610432906001600160a01b031681565b348015610a3f57600080fd5b50610399610a4e366004614ce5565b612f00565b348015610a5f57600080fd5b506104bb6161a881565b348015610a7557600080fd5b50610399610a84366004614ce5565b612f98565b60fb546001600160a01b03163314610abc5760405162461bcd60e51b8152600401610ab3906154b2565b60405180910390fd5b61018c80546001600160a01b0319166001600160a01b038316179055610ae0612fe5565b5050565b60fb546001600160a01b03163314610b0e5760405162461bcd60e51b8152600401610ab3906154b2565b6101645481906103e890610b269061ffff1683615607565b1115610b745760405162461bcd60e51b815260206004820152601a60248201527f546865726520617265206e6f20667265656d696e74206c6566740000000000006044820152606401610ab3565b610b7c612fe5565b5060005b81811015610c8e57610164805461ffff16906000610b9d83615722565b82546101009290920a61ffff8181021990931691831602179091556101645460009250610bca911661309a565b61016454909150610bdf9061ffff1682613103565b50610c17858584818110610bf557610bf56157d7565b9050602002016020810190610c0a9190614ce5565b6101645461ffff166131e4565b60016101926000878786818110610c3057610c306157d7565b9050602002016020810190610c459190614ce5565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c749190615607565b90915550829150610c86905081615744565b915050610b80565b50505050565b60006001600160e01b0319821663780e9d6360e01b1480610cb95750610cb9826131fe565b92915050565b606060978054610cce906156ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610cfa906156ed565b8015610d475780601f10610d1c57610100808354040283529160200191610d47565b820191906000526020600020905b815481529060010190602001808311610d2a57829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316610dca5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ab3565b506000908152609b60205260409020546001600160a01b031690565b6000610df18261141a565b9050806001600160a01b0316836001600160a01b03161415610e5f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ab3565b336001600160a01b0382161480610e7b5750610e7b81336109e4565b610eed5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ab3565b610ef7838361324e565b505050565b60fb546001600160a01b03163314610f265760405162461bcd60e51b8152600401610ab3906154b2565b61018d80546001600160a01b0319166001600160a01b0392909216919091179055565b60fb546001600160a01b03163314610f735760405162461bcd60e51b8152600401610ab3906154b2565b8015610f8457610f816132bc565b50565b610f81613356565b61018c546001600160a01b0316336001600160a01b031614610fce57610fb233826133d2565b610fce5760405162461bcd60e51b8152600401610ab3906154e7565b610ef78383836134c9565b6000610fef335b6001600160a01b03163b151590565b1561100c5760405162461bcd60e51b8152600401610ab3906153d8565b61101583611520565b82106110775760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ab3565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b61016882601281106110b157600080fd5b0181815481106110c057600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b60fb546001600160a01b031633146111115760405162461bcd60e51b8152600401610ab3906154b2565b61016355565b61017a82601281106110b157600080fd5b60fb546001600160a01b031633146111525760405162461bcd60e51b8152600401610ab3906154b2565b610191546040516001600160a01b0390911690303180156108fc02916000818181858888f19350505050158015610f81573d6000803e3d6000fd5b610ef7838383604051806020016040528060008152506122a3565b60006111b333610fe0565b156111d05760405162461bcd60e51b8152600401610ab3906153d8565b60cb5482106112365760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ab3565b60cb8281548110611249576112496157d7565b90600052602060002001549050919050565b60fb546001600160a01b031633146112855760405162461bcd60e51b8152600401610ab3906154b2565b8051610ae090610165906020840190614ad2565b60fb546001600160a01b031633146112c35760405162461bcd60e51b8152600401610ab3906154b2565b61018f80546001600160a01b0319166001600160a01b0392909216919091179055565b60fb546001600160a01b031633146113105760405162461bcd60e51b8152600401610ab3906154b2565b610190546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561135557600080fd5b505afa158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d91906150d9565b610190546101915460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044015b602060405180830381600087803b1580156113e257600080fd5b505af11580156113f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190614f87565b6000818152609960205260408120546001600160a01b031680610cb95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610ab3565b610165805461149f906156ed565b80601f01602080910402602001604051908101604052809291908181526020018280546114cb906156ed565b80156115185780601f106114ed57610100808354040283529160200191611518565b820191906000526020600020905b8154815290600101906020018083116114fb57829003601f168201915b505050505081565b60006001600160a01b03821661158b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610ab3565b506001600160a01b03166000908152609a602052604090205490565b60fb546001600160a01b031633146115d15760405162461bcd60e51b8152600401610ab3906154b2565b6115db6000613674565b565b60fb546001600160a01b031633146116075760405162461bcd60e51b8152600401610ab3906154b2565b61019355565b60fb546001600160a01b031633146116375760405162461bcd60e51b8152600401610ab3906154b2565b61019455565b60fb546001600160a01b031633146116675760405162461bcd60e51b8152600401610ab3906154b2565b610191805460ff60a01b198116600160a01b9182900460ff1615909102179055565b610161546001600160a01b031633146116e45760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610ab3565b610ae082826136c6565b6116f6614b56565b6000828152610166602090815260408083208151606081018352815460ff161515815282516101e08101938490529094919385019290916001850191600f918390855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611739575050509284525050506002919091015460ff1660209091015292915050565b606060988054610cce906156ed565b61012d5460ff16156117da5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ab3565b6002600154141561182d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab3565b60026001553361183c81610fe0565b156118895760405162461bcd60e51b815260206004820152601960248201527f436f6e74726163747320617265206e6f7420616c6c6f776564000000000000006044820152606401610ab3565b326001600160a01b038216146118cc5760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b6044820152606401610ab3565b610164546161a8906118e390849061ffff16615607565b11156119255760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b6044820152606401610ab3565b6000821180156119365750600a8211155b6119785760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b6044820152606401610ab3565b61019454610160546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156119c057600080fd5b505afa1580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f891906150d9565b1015611a165760405162461bcd60e51b8152600401610ab390615419565b610163546101645461ffff161015611dae5761019154600160a01b900460ff16611b2e5761018e546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a0823190602401602060405180830381600087803b158015611a8357600080fd5b505af1158015611a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abb91906150d9565b11611b2e5760405162461bcd60e51b815260206004820152603d60248201527f53616c657320617265206f6e6c7920666f722074686f73652077686f2068617660448201527f6520696e7669746174696f6e732c2074727920696e20616e20686f75720000006064820152608401610ab3565b61018e546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381600087803b158015611b7a57600080fd5b505af1158015611b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb291906150d9565b1115611bc65750662386f26fc10000611bd0565b50666a94d74f4300005b6000611bdc8483615644565b610190546040516370a0823160e01b81526001600160a01b038681166004830152929350600092909116906370a082319060240160206040518083038186803b158015611c2857600080fd5b505afa158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6091906150d9565b610163546101645491925090611c7b90879061ffff16615607565b1115611cd55760405162461bcd60e51b8152602060048201526024808201527f416c6c2067656e3020746f6b656e73206f6e2d73616c6520616c7265616479206044820152631cdbdb1960e21b6064820152608401610ab3565b6001600160a01b03841660009081526101926020526040902054603290611cfd908790615607565b1115611d4b5760405162461bcd60e51b815260206004820152601760248201527f457863656564206c696d6974207065722077616c6c65740000000000000000006044820152606401610ab3565b81811015611d8d5760405162461bcd60e51b815260206004820152600f60248201526e09cdee840cadcdeeaced040ee8aa89608b1b6044820152606401610ab3565b61019054611da6906001600160a01b031685308561373b565b505050611f38565b6000805b83811015611dff5761016454611de1908290611dd39061ffff1660016155e1565b61ffff166108b89190615607565b611deb9083615607565b915080611df781615744565b915050611db2565b5061018d546040516370a0823160e01b81526001600160a01b038481166004830152909116906370a0823190602401602060405180830381600087803b158015611e4857600080fd5b505af1158015611e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8091906150d9565b811115611ecf5760405162461bcd60e51b815260206004820152601d60248201527f596f75206e65656420746f2073656e6420656e6f75676820626572796c0000006044820152606401610ab3565b61018d54604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401600060405180830381600087803b158015611f1e57600080fd5b505af1158015611f32573d6000803e3d6000fd5b50505050505b60005b8281101561205f57610164805461ffff16906000611f5883615722565b91906101000a81548161ffff021916908361ffff160217905550506000611f856101935461019454613795565b604080516060810182526001600160a01b038681168252610164805461ffff9081166020808601918252600086880181815289825261019990925296909620945185546001600160a01b0319169416939093178455915160018085019190915593516002909301805460ff1916931515939093179092556101635491549394509092612012929116615663565b61ffff16101561204c576001600160a01b038316600090815261019260205260408120805460019290612046908490615607565b90915550505b508061205781615744565b915050611f3b565b50506001805550565b610ae03383836138f7565b600061016354821161208757506000919050565b61271082116120a05750680ad78ebc5ac6200000919050565b612bf282116120b95750680c328093e61ee40000919050565b6130d482116120d25750680d8d726b7177a80000919050565b6135b682116120eb5750680ee86442fcd06c0000919050565b613a9882116121045750681043561a8829300000919050565b613f7a821161211d575068119e47f21381f40000919050565b61445c821161213657506812f939c99edab80000919050565b61493e821161214f57506814542ba12a337c0000919050565b614e20821161216857506815af1d78b58c400000919050565b6153fc8211612181575068170a0f5040e5040000919050565b6157e4821161219a57506818650127cc3dc80000919050565b615cc682116121b357506819bff2ff57968c0000919050565b50681b1ae4d6e2ef500000919050565b60fb546001600160a01b031633146121ed5760405162461bcd60e51b8152600401610ab3906154b2565b610197546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561223257600080fd5b505afa158015612246573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226a91906150d9565b6101975460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016113c8565b6122ad33836133d2565b6122c95760405162461bcd60e51b8152600401610ab3906154e7565b610c8e848484846139c6565b600081815261016660209081526040808320815160608082018452825460ff161515825283516101e08101948590529095949193918401916001840190600f908288855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411612319575050509284525050506002919091015460ff1660209182015261018f54825191830151604051630f42d9ad60e11b81529394506001600160a01b0390911692631e85b35a9261239892889260040161556b565b60006040518083038186803b1580156123b057600080fd5b505afa1580156123c4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123ec9190810190615062565b9392505050565b600054610100900460ff168061240c575060005460ff16155b6124285760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff1615801561244a576000805461ffff19166101011790555b6124976040518060400160405280600a81526020016954726f6c6c2047616d6560b01b8152506040518060400160405280600981526020016854524f4c4c47414d4560b81b8152506139f9565b61249f613a80565b6124a7613b03565b6124af613b6a565b6124b7613bc9565b6124c18484613c30565b7ff86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da61019355655af3107a40006101945561019780546001600160a01b0385166001600160a01b031990911617905561012c6101985561019180546001600160a81b0319167315064de4a9eb4d5498796ab870b52a0af84a95481790556113886101635561254c6132bc565b61018d80546001600160a01b03199081166001600160a01b038a81169190911790925561018e8054821689841617905561018f8054821688841617905561019080549091169184169190911790556040805180820190915260ff80825260208201526125bd90610168906002614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d961012082015261261f9061016990600a614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d96101208201526126819061016a90600a614b7f565b5060408051608081018252603b8152606f602082015260919181019190915260c560608201526126b69061016b906004614b7f565b506040805160c08101825260228152603b602082015260769181019190915260a4606082015260c5608082015260de60a08201526126f99061016c906006614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d961012082015261275b9061016d90600a614b7f565b5060408051608081018252603b8152606f602082015260919181019190915260c560608201526127909061016e906004614b7f565b506040805180820190915260018152600060208201526127b59061017a906002614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e0820152600161010082015260006101208201526128179061017b90600a614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e0820152600161010082015260006101208201526128799061017c90600a614b7f565b50604080516080810182526003815260026020820152600191810191909152600060608201526128ae9061017d906004614b7f565b506040805160c08101825260058152600460208201526003918101919091526002606082015260016080820152600060a08201526128f19061017e906006614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e0820152600161010082015260006101208201526129539061017f90600a614b7f565b506040805160808101825260038152600260208201526001918101919091526000606082015261298890610180906004614b7f565b506040805161010081018252602080825281018290526060918101829052608091810182905260a091810182905260c091810182905260f49181019190915260ff60e08201526129dd9061016f906008614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d9610120820152612a3f9061017090600a614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d9610120820152612aa19061017190600a614b7f565b5060408051606081018252602781526083602082015260d491810191909152612acf90610172906003614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d9610120820152612b319061017390600a614b7f565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d9610120820152612b939061017490600a614b7f565b5060408051608081018252603381526066602082015260999181019190915260cc6060820152612bc890610175906004614b7f565b50604080516020810190915260ff8152612be790610176906001614b7f565b50604080516101008101825260078152600660208201526005918101919091526004606082015260036080820152600260a0820152600160c0820152600060e0820152612c3990610181906008614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e082015260016101008201526000610120820152612c9b9061018290600a614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e082015260016101008201526000610120820152612cfd9061018390600a614b7f565b50604080516060810182526002815260016020820152600091810191909152612d2b90610184906003614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e082015260016101008201526000610120820152612d8d9061018590600a614b7f565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e082015260016101008201526000610120820152612def9061018690600a614b7f565b5060408051608081018252600381526002602082015260019181019190915260006060820152612e2490610187906004614b7f565b50604080516020810190915260008152612e4390610188906001614b7f565b508015612e56576000805461ff00191690555b50505050505050565b6060612e6a82611520565b67ffffffffffffffff811115612e8257612e826157ed565b604051908082528060200260200182016040528015612eab578160200160208202803683370190505b50905060005b612eba83611520565b811015612efa57612ecb8382610fd9565b828281518110612edd57612edd6157d7565b602090810291909101015280612ef281615744565b915050612eb1565b50919050565b60fb546001600160a01b03163314612f2a5760405162461bcd60e51b8152600401610ab3906154b2565b6001600160a01b038116612f8f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ab3565b610f8181613674565b60fb546001600160a01b03163314612fc25760405162461bcd60e51b8152600401610ab3906154b2565b61019780546001600160a01b0319166001600160a01b0392909216919091179055565b61019454610160546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a082319060240160206040518083038186803b15801561302f57600080fd5b505afa158015613043573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061306791906150d9565b10156130855760405162461bcd60e51b8152600401610ab390615419565b6130956101935461019454613795565b905090565b6000326130a8600143615686565b6101965460405160609390931b6bffffffffffffffffffffffff191660208401529040603483015242605483015260748201849052609482015260b40160408051601f19818403018152919052805160209091012092915050565b61310b614b56565b61311482613cd5565b90506101676000613132836000015184602001518560400151613f87565b815260200190815260200160002054600014156131d2576000838152610166602090815260409091208251815460ff191690151517815590820151829190613180906001830190600f614c20565b50604091820151600291909101805460ff191660ff90921691909117905581516020830151918301518592610167926000926131bc9290613f87565b8152602081019190915260400160002055610cb9565b6123ec836131df8461309a565b613103565b610ae082826040518060200160405280600081525061402e565b60006001600160e01b031982166380ac58cd60e01b148061322f57506001600160e01b03198216635b5e139f60e01b145b80610cb957506301ffc9a760e01b6001600160e01b0319831614610cb9565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906132838261141a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61012d5460ff16156133035760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ab3565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586133393390565b6040516001600160a01b03909116815260200160405180910390a1565b61012d5460ff166133a05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ab3565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613339565b6000818152609960205260408120546001600160a01b031661344b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ab3565b60006134568361141a565b9050806001600160a01b0316846001600160a01b031614806134915750836001600160a01b031661348684610d51565b6001600160a01b0316145b806134c157506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166134dc8261141a565b6001600160a01b0316146135445760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610ab3565b6001600160a01b0382166135a65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ab3565b6135b1838383614061565b6135bc60008261324e565b6001600160a01b0383166000908152609a602052604081208054600192906135e5908490615686565b90915550506001600160a01b0382166000908152609a60205260408120805460019290613613908490615607565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61019681905560008281526101996020526040902080546001600160a01b031615610ef75760006136fa826001015461309a565b905061370a826001015482613103565b5081546000906137249083906001600160a01b0316614119565b90506137348184600101546141ea565b5050505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610c8e908590614338565b610160546101615461015f546040516000936001600160a01b0390811693634000aea09391169186916137d691899190602001918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161380393929190615308565b602060405180830381600087803b15801561381d57600080fd5b505af1158015613831573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138559190614f87565b5061015f546000848152610162602081815260408084205481518084018a90528083019690965230606087015260808087018290528251808803909101815260a09096019091528451948201949094209287905252906138b6906001615607565b600085815261016260205260409020556134c18482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b816001600160a01b0316836001600160a01b031614156139595760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ab3565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6139d18484846134c9565b6139dd8484848461440a565b610c8e5760405162461bcd60e51b8152600401610ab390615386565b600054610100900460ff1680613a12575060005460ff16155b613a2e5760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613a50576000805461ffff19166101011790555b613a58614514565b613a60614514565b613a6a838361457e565b8015610ef7576000805461ff0019169055505050565b600054610100900460ff1680613a99575060005460ff16155b613ab55760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613ad7576000805461ffff19166101011790555b613adf614514565b613ae7614514565b613aef614514565b8015610f81576000805461ff001916905550565b600054610100900460ff1680613b1c575060005460ff16155b613b385760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613b5a576000805461ffff19166101011790555b613b62614514565b613aef614613565b600054610100900460ff1680613b83575060005460ff16155b613b9f5760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613bc1576000805461ffff19166101011790555b613aef614673565b600054610100900460ff1680613be2575060005460ff16155b613bfe5760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613c20576000805461ffff19166101011790555b613c28614514565b613aef6146e2565b600054610100900460ff1680613c49575060005460ff16155b613c655760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613c87576000805461ffff19166101011790555b61016180546001600160a01b038086166001600160a01b031992831617909255610160805492851692909116919091179055600061015f558015610ef7576000805461ff0019169055505050565b613cdd614b56565b613cec600a61ffff841661575f565b1515808252600090613cff576007613d02565b60005b825160109490941c9390915015613e4b57613d2b61ffff8416613d2683600061561f565b614758565b602083015160ff91909116905260109290921c91613d5261ffff8416613d2683600161561f565b60208381015160ff9290921691015260109290921c91613d7b61ffff8416613d2683600261561f565b602083015160ff9190911660409091015260109290921c91613da661ffff8416613d2683600361561f565b602083015160ff9190911660609091015260109290921c91613dd161ffff8416613d2683600461561f565b602083015160ff9190911660809091015260109290921c91613dfc61ffff8416613d2683600561561f565b602083015160ff9190911660a09091015260109290921c91613e2761ffff8416613d2683600661561f565b602083015160ff9190911660c0909101526000604083015260109290921c91612efa565b613e5e61ffff8416613d2683600061561f565b602083015160ff9190911660e09091015260109290921c91613e8961ffff8416613d2683600161561f565b602083015160ff919091166101009091015260109290921c91613eb561ffff8416613d2683600261561f565b602083015160ff919091166101209091015260109290921c91613ee161ffff8416613d2683600361561f565b602083015160ff919091166101409091015260109290921c91613f0d61ffff8416613d2683600461561f565b602083015160ff919091166101609091015260109290921c91613f3961ffff8416613d2683600561561f565b602083015160ff919091166101809091015260109290921c91613f6561ffff8416613d2683600661561f565b60208301805160ff9283166101a0918201529051015116604083015250919050565b60008315613fe55782516020808501516040808701516060880151608089015160a08a015160c08b01519451613fc698600198909796918c9101615208565b604051602081830303815290604052613fde9061569d565b90506123ec565b60e08301516101008401516101208501516101408601516101608701516101808801516101a0890151604051613fc6976000979096909590949093909290918b90602001615155565b61403883836141ea565b614045600084848461440a565b610ef75760405162461bcd60e51b8152600401610ab390615386565b6001600160a01b0383166140bc576140b78160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b6140df565b816001600160a01b0316836001600160a01b0316146140df576140df8382614837565b6001600160a01b0382166140f657610ef7816148d4565b826001600160a01b0316826001600160a01b031614610ef757610ef78282614983565b610163546101645460009161ffff9091161115806141445750614141600a60f585901c61575f565b15155b15614150575080610cb9565b61018c54604051633065c98160e21b8152609085901c60048201526000916001600160a01b03169063c19726049060240160206040518083038186803b15801561419957600080fd5b505afa1580156141ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d19190614d02565b90506001600160a01b0381166123ec5782915050610cb9565b6001600160a01b0382166142405760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ab3565b6000818152609960205260409020546001600160a01b0316156142a55760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ab3565b6142b160008383614061565b6001600160a01b0382166000908152609a602052604081208054600192906142da908490615607565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061438d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166149c79092919063ffffffff16565b805190915015610ef757808060200190518101906143ab9190614f87565b610ef75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ab3565b60006001600160a01b0384163b1561450c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061444e9033908990889088906004016152cb565b602060405180830381600087803b15801561446857600080fd5b505af1925050508015614498575060408051601f3d908101601f1916820190925261449591810190614ffc565b60015b6144f2573d8080156144c6576040519150601f19603f3d011682016040523d82523d6000602084013e6144cb565b606091505b5080516144ea5760405162461bcd60e51b8152600401610ab390615386565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506134c1565b5060016134c1565b600054610100900460ff168061452d575060005460ff16155b6145495760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015613aef576000805461ffff19166101011790558015610f81576000805461ff001916905550565b600054610100900460ff1680614597575060005460ff16155b6145b35760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff161580156145d5576000805461ffff19166101011790555b82516145e8906097906020860190614ad2565b5081516145fc906098906020850190614ad2565b508015610ef7576000805461ff0019169055505050565b600054610100900460ff168061462c575060005460ff16155b6146485760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff1615801561466a576000805461ffff19166101011790555b613aef33613674565b600054610100900460ff168061468c575060005460ff16155b6146a85760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff161580156146ca576000805461ffff19166101011790555b600180558015610f81576000805461ff001916905550565b600054610100900460ff16806146fb575060005460ff16155b6147175760405162461bcd60e51b8152600401610ab390615464565b600054610100900460ff16158015614739576000805461ffff19166101011790555b61012d805460ff191690558015610f81576000805461ff001916905550565b6000806101688360ff1660128110614772576147726157d7565b015461477e9085615773565b90506101688360ff1660128110614797576147976157d7565b018160ff16815481106147ac576147ac6157d7565b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c90911610156147e2579050610cb9565b61017a8360ff16601281106147f9576147f96157d7565b018160ff168154811061480e5761480e6157d7565b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6000600161484484611520565b61484e9190615686565b600083815260ca60205260409020549091508082146148a1576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb546000906148e690600190615686565b600083815260cc602052604081205460cb805493945090928490811061490e5761490e6157d7565b906000526020600020015490508060cb838154811061492f5761492f6157d7565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480614967576149676157c1565b6001900381819060005260206000200160009055905550505050565b600061498e83611520565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b60606134c1848460008585843b614a205760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ab3565b600080866001600160a01b03168587604051614a3c91906152af565b60006040518083038185875af1925050503d8060008114614a79576040519150601f19603f3d011682016040523d82523d6000602084013e614a7e565b606091505b5091509150614a8e828286614a99565b979650505050505050565b60608315614aa85750816123ec565b825115614ab85782518084602001fd5b8160405162461bcd60e51b8152600401610ab39190615373565b828054614ade906156ed565b90600052602060002090601f016020900481019282614b005760008555614b46565b82601f10614b1957805160ff1916838001178555614b46565b82800160010185558215614b46579182015b82811115614b46578251825591602001919060010190614b2b565b50614b52929150614c73565b5090565b6040518060600160405280600015158152602001614b72614c88565b8152600060209091015290565b82805482825590600052602060002090601f01602090048101928215614b465791602002820160005b83821115614be657835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302614ba8565b8015614c135782816101000a81549060ff0219169055600101602081600001049283019260010302614be6565b5050614b52929150614c73565b600183019183908215614b4657916020028201600083821115614be657835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302614ba8565b5b80821115614b525760008155600101614c74565b604051806101e00160405280600f906020820280368337509192915050565b6000614cba614cb5846155b9565b615588565b9050828152838383011115614cce57600080fd5b828260208301376000602084830101529392505050565b600060208284031215614cf757600080fd5b81356123ec81615803565b600060208284031215614d1457600080fd5b81516123ec81615803565b60008060408385031215614d3257600080fd5b8235614d3d81615803565b91506020830135614d4d81615803565b809150509250929050565b60008060008060008060c08789031215614d7157600080fd5b8635614d7c81615803565b95506020870135614d8c81615803565b94506040870135614d9c81615803565b93506060870135614dac81615803565b92506080870135614dbc81615803565b915060a0870135614dcc81615803565b809150509295509295509295565b600080600060608486031215614def57600080fd5b8335614dfa81615803565b92506020840135614e0a81615803565b929592945050506040919091013590565b60008060008060808587031215614e3157600080fd5b8435614e3c81615803565b93506020850135614e4c81615803565b925060408501359150606085013567ffffffffffffffff811115614e6f57600080fd5b8501601f81018713614e8057600080fd5b614e8f87823560208401614ca7565b91505092959194509250565b60008060408385031215614eae57600080fd5b8235614eb981615803565b91506020830135614d4d81615818565b60008060408385031215614edc57600080fd5b8235614ee781615803565b946020939093013593505050565b60008060208385031215614f0857600080fd5b823567ffffffffffffffff80821115614f2057600080fd5b818501915085601f830112614f3457600080fd5b813581811115614f4357600080fd5b8660208260051b8501011115614f5857600080fd5b60209290920196919550909350505050565b600060208284031215614f7c57600080fd5b81356123ec81615818565b600060208284031215614f9957600080fd5b81516123ec81615818565b600060208284031215614fb657600080fd5b5035919050565b60008060408385031215614fd057600080fd5b50508035926020909101359150565b600060208284031215614ff157600080fd5b81356123ec81615826565b60006020828403121561500e57600080fd5b81516123ec81615826565b60006020828403121561502b57600080fd5b813567ffffffffffffffff81111561504257600080fd5b8201601f8101841361505357600080fd5b6134c184823560208401614ca7565b60006020828403121561507457600080fd5b815167ffffffffffffffff81111561508b57600080fd5b8201601f8101841361509c57600080fd5b80516150aa614cb5826155b9565b8181528560208385010111156150bf57600080fd5b6150d08260208301602086016156c1565b95945050505050565b6000602082840312156150eb57600080fd5b5051919050565b8060005b600f811015610c8e57815160ff168452602093840193909101906001016150f6565b600081518084526151308160208601602086016156c1565b601f01601f19169290920160200192915050565b60f81b6001600160f81b0319169052565b89151560f81b81526000600360fc1b8060018401528060028401528060038401528060048401528060058401528060068401528060078401525061519c600883018b615144565b6151a9600983018a615144565b6151b6600a830189615144565b6151c3600b830188615144565b6151d0600c830187615144565b6151dd600d830186615144565b6151ea600e830185615144565b6151f7600f830184615144565b506010019998505050505050505050565b89151560f81b8152600060ff60f81b808b60f81b166001840152808a60f81b166002840152808960f81b166003840152808860f81b166004840152506152516005830187615144565b61525e6006830186615144565b61526b6007830185615144565b600360fc1b6008830152615293615286808080806009880181565b600360fc1b815260010190565b61529d8185615144565b6001019b9a5050505050505050505050565b600082516152c18184602087016156c1565b9190910192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906152fe90830184615118565b9695505050505050565b60018060a01b03841681528260208201526060604082015260006150d06060830184615118565b6020808252825182820181905260009190848201906040850190845b818110156153675783518352928401929184019160010161534b565b50909695505050505050565b6020815260006123ec6020830184615118565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526021908201527f436f6e74726163747320617265206e6f7420616c6c6f77656420626967206d616040820152603760f91b606082015260800190565b6020808252602b908201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060408201526a1dda5d1a0819985d58d95d60aa1b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b815115158152602080830151610220830191615556908401826150f2565b5060ff60408401511661020083015292915050565b838152821515602082015261022081016134c160408301846150f2565b604051601f8201601f1916810167ffffffffffffffff811182821017156155b1576155b16157ed565b604052919050565b600067ffffffffffffffff8211156155d3576155d36157ed565b50601f01601f191660200190565b600061ffff8083168185168083038211156155fe576155fe615795565b01949350505050565b6000821982111561561a5761561a615795565b500190565b600060ff821660ff84168060ff0382111561563c5761563c615795565b019392505050565b600081600019048311821515161561565e5761565e615795565b500290565b600061ffff8381169083168181101561567e5761567e615795565b039392505050565b60008282101561569857615698615795565b500390565b80516020808301519190811015612efa5760001960209190910360031b1b16919050565b60005b838110156156dc5781810151838201526020016156c4565b83811115610c8e5750506000910152565b600181811c9082168061570157607f821691505b60208210811415612efa57634e487b7160e01b600052602260045260246000fd5b600061ffff8083168181141561573a5761573a615795565b6001019392505050565b600060001982141561575857615758615795565b5060010190565b60008261576e5761576e6157ab565b500690565b600060ff831680615786576157866157ab565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610f8157600080fd5b8015158114610f8157600080fd5b6001600160e01b031981168114610f8157600080fdfea2646970667358221220c44dcce1218cac6c2d2cdabcdb60bdcb9405d7bff8aa2ab408d657e4f99bfbf264736f6c63430008070033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.