ETH Price: $3,360.06 (+0.37%)

Token

CryptOrchids (ORCHD)
 

Overview

Max Total Supply

420 ORCHD

Holders

124

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
tankbottoms.eth
Balance
1 ORCHD
0x5d95baebb8412ad827287240a5c281e3bb30d27e
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
CryptOrchidERC721

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 26 : CryptOrchidERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.6 <0.9.0;

import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/presets/ERC721PresetMinterPauserAutoId.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../Libraries/CurrentTime.sol";

contract CryptOrchidERC721 is ERC721PresetMinterPauserAutoId, Ownable, VRFConsumerBase, CurrentTime {
    using SafeMathChainlink for uint256;
    using Strings for string;
    using Counters for Counters.Counter;

    struct CryptOrchid {
        string species;
        uint256 plantedAt;
        uint256 waterLevel;
    }
    mapping(uint256 => CryptOrchid) public cryptorchids;

    enum Stage {Unsold, Seed, Flower, Dead}

    bool internal saleStarted = false;
    bool internal growingStarted = false;

    uint256 public constant MAX_CRYPTORCHIDS = 10000;
    uint256 public constant GROWTH_CYCLE = 604800; // 7 days
    uint256 public constant WATERING_WINDOW = 10800; // 3 hours
    uint256 internal constant MAX_TIMESTAMP = 2**256 - 1;
    string internal constant GRANUM_IPFS = "QmWd1mn7DuGyx9ByfNeqCsgdSUsJZ1cragitgaygsqDvEm";

    uint16[10] private limits = [0, 3074, 6074, 8074, 9074, 9574, 9824, 9924, 9974, 9999];
    string[10] private genum = [
        "shenzhenica orchidaceae",
        "phalaenopsis micholitzii",
        "guarianthe aurantiaca",
        "vanda coerulea",
        "cypripedium calceolus",
        "paphiopedilum vietnamense",
        "miltonia kayasimae",
        "platanthera azorica",
        "dendrophylax lindenii",
        "paphiopedilum rothschildianum"
    ];

    string[10] private speciesIPFSConstant = [
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/shenzhenica-orchidaceae.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/phalaenopsis-micholitzii.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/guarianthe-aurantiaca.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/vanda-coerulea.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/cypripedium-calceolus.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-vietnamense.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/miltonia-kayasimae.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/platanthera-azorica.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/dendrophylax-lindenii.json",
        "QmV7nsQgHNvwyRxbbhP59iH3grqSfq3g7joSPaS1JGRmJa/paphiopedilum-rothschildianum.json"
    ];

    string[10] private deadSpeciesIPFSConstant = [
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/shenzhenica-orchidaceae.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/phalaenopsis-micholitzii.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/guarianthe-aurantiaca.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/vanda-coerulea.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/cypripedium-calceolus.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-vietnamense.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/miltonia-kayasimae.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/platanthera-azorica.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/dendrophylax-lindenii.json",
        "QmU8MNznT6FD1v5XdnSeA6cEYqxpj7MgkECpot3aCERerX/paphiopedilum-rothschildianum.json"
    ];

    Counters.Counter private _tokenIds;

    bytes32 internal keyHash;
    uint256 internal vrfFee;
    uint256 public randomResult;
    address public VRFCoordinator;
    address public LinkToken;

    event RequestedRandomness(bytes32 requestId);
    event Planted(uint256 tokenId, string latinSpecies, uint256 timestamp, address tokenOwner);
    event Watered(uint256 tokenId, uint256 waterLevel);
    event Killed(uint256 tokenId);

    mapping(bytes32 => uint256) public requestToToken;
    mapping(bytes32 => string) private speciesIPFS;
    mapping(bytes32 => string) private deadSpeciesIPFS;

    constructor(
        address _VRFCoordinator,
        address _LinkToken,
        bytes32 _keyhash
    )
        public
        payable
        VRFConsumerBase(_VRFCoordinator, _LinkToken)
        ERC721PresetMinterPauserAutoId("CryptOrchids", "ORCHD", "ipfs://")
    {
        VRFCoordinator = _VRFCoordinator;
        LinkToken = _LinkToken;
        keyHash = _keyhash;
        vrfFee = 2000000000000000000; // 2 LINK

        for (uint256 index = 0; index < genum.length; index++) {
            speciesIPFS[keccak256(abi.encode(genum[index]))] = speciesIPFSConstant[index];
            deadSpeciesIPFS[keccak256(abi.encode(genum[index]))] = deadSpeciesIPFSConstant[index];
        }
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        (string memory species, , , ) = getTokenMetadata(tokenId);

        if (growthStage(tokenId) == Stage.Seed) {
            return string(abi.encodePacked(baseURI(), GRANUM_IPFS));
        }

        if (growthStage(tokenId) == Stage.Flower) {
            return string(abi.encodePacked(baseURI(), speciesIPFS[keccak256(abi.encode(species))]));
        }

        return string(abi.encodePacked(baseURI(), deadSpeciesIPFS[keccak256(abi.encode(species))]));
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        require(address(0) == to || alive(tokenId), "Dead CryptOrchids cannot be transferred");
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function currentPrice() public view returns (uint256 price) {
        uint256 currentSupply = totalSupply();
        if (currentSupply >= 9900) {
            return 1000000000000000000; // 9900+: 1.00 ETH
        } else if (currentSupply >= 9500) {
            return 640000000000000000; // 9500-9500:  0.64 ETH
        } else if (currentSupply >= 7500) {
            return 320000000000000000; // 7500-9500:  0.32 ETH
        } else if (currentSupply >= 3500) {
            return 160000000000000000; // 3500-7500:  0.16 ETH
        } else if (currentSupply >= 1500) {
            return 80000000000000000; // 1500-3500:  0.08 ETH
        } else if (currentSupply >= 500) {
            return 60000000000000000; // 500-1500:   0.06 ETH
        } else {
            return 40000000000000000; // 0 - 500     0.04 ETH
        }
    }

    function startSale() public onlyOwner {
        saleStarted = true;
    }

    function startGrowing() public onlyOwner {
        growingStarted = true;
    }

    /**
     * @dev Withdraw ether from this contract (Callable by owner only)
     */
    function withdraw() public onlyOwner {
        uint256 balance = address(this).balance;
        msg.sender.transfer(balance);
    }

    receive() external payable {}

    function webMint(uint256 units) public payable {
        require(saleStarted, "The Nursery is closed");
        require(units <= MAX_CRYPTORCHIDS - totalSupply(), "Not enough bulbs left");
        require(totalSupply() < MAX_CRYPTORCHIDS, "Sale has already ended");
        require(units > 0 && units <= 20, "You can plant minimum 1, maximum 20 CryptOrchids");
        require(SafeMathChainlink.add(totalSupply(), units) <= MAX_CRYPTORCHIDS, "Exceeds MAX_CRYPTORCHIDS");
        require(msg.value >= SafeMathChainlink.mul(currentPrice(), units), "Ether value sent is below the price");

        for (uint256 i = 0; i < units; i++) {
            _tokenIds.increment();
            uint256 newItemId = _tokenIds.current();
            cryptorchids[newItemId] = CryptOrchid({species: "granum", plantedAt: MAX_TIMESTAMP, waterLevel: 0});
            _safeMint(msg.sender, newItemId);
        }
    }

    function germinate(uint256 tokenId, uint256 userProvidedSeed) public {
        require(growingStarted, "Germination starts 2021-04-12T16:00:00Z");
        require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can germinate a CryptOrchid.");
        _requestRandom(tokenId, userProvidedSeed);
    }

    function _requestRandom(uint256 tokenId, uint256 userProvidedSeed) internal returns (bytes32 requestId) {
        require(LINK.balanceOf(address(this)) >= vrfFee, "Not enough LINK - germination unavailable");
        requestId = requestRandomness(keyHash, vrfFee, userProvidedSeed);
        requestToToken[requestId] = tokenId;
        emit RequestedRandomness(requestId);
    }

    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        uint256 tokenId = requestToToken[requestId];
        CryptOrchid storage orchid = cryptorchids[tokenId];
        string memory species = pickSpecies(SafeMathChainlink.mod(randomness, 10000));
        orchid.species = species;
        orchid.plantedAt = currentTime();
        address tokenOwner = ownerOf(tokenId);
        emit Planted(tokenId, species, currentTime(), tokenOwner);
    }

    function alive(uint256 tokenId) public view returns (bool) {
        return growthStage(tokenId) != Stage.Dead;
    }

    function flowering(uint256 tokenId) public view returns (bool) {
        return growthStage(tokenId) == Stage.Flower;
    }

    function growthStage(uint256 tokenId) public view returns (Stage) {
        CryptOrchid memory orchid = cryptorchids[tokenId];
        if (orchid.plantedAt == 0) return Stage.Unsold;
        if (orchid.plantedAt == MAX_TIMESTAMP) return Stage.Seed;
        uint256 currentWaterLevel = orchid.waterLevel;
        uint256 elapsed = currentTime() - orchid.plantedAt;
        uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);
        uint256 modulo = SafeMathChainlink.mod(elapsed, GROWTH_CYCLE);

        if (currentWaterLevel == fullCycles) {
            return Stage.Flower;
        }

        if (SafeMathChainlink.add(currentWaterLevel, 1) == fullCycles && modulo < WATERING_WINDOW) {
            return Stage.Flower;
        }

        return Stage.Dead;
    }

    function water(uint256 tokenId) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can water a CryptOrchid.");

        if (!alive(tokenId)) {
            emit Killed(tokenId);
            return;
        }

        CryptOrchid storage orchid = cryptorchids[tokenId];

        uint256 wateringLevel = orchid.waterLevel;
        uint256 elapsed = currentTime() - orchid.plantedAt;
        uint256 fullCycles = SafeMathChainlink.div(uint256(elapsed), GROWTH_CYCLE);

        if (wateringLevel > fullCycles) {
            emit Killed(tokenId);
            return;
        }

        uint256 newWaterLevel = SafeMathChainlink.add(wateringLevel, 1);
        orchid.waterLevel = newWaterLevel;

        emit Watered(tokenId, newWaterLevel);
    }

    function compost(uint256 tokenId) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "Only the Owner can compost a CryptOrchid.");

        burn(tokenId);
    }

    function getTokenMetadata(uint256 tokenId)
        public
        view
        returns (
            string memory,
            uint256,
            uint256,
            Stage
        )
    {
        return (
            cryptorchids[tokenId].species,
            cryptorchids[tokenId].plantedAt,
            cryptorchids[tokenId].waterLevel,
            growthStage(tokenId)
        );
    }

    function heartbeat(uint256 tokenId) public {
        if (growthStage(tokenId) == Stage.Dead) {
            emit Killed(tokenId);
        }
    }

    /**
     * @notice Pick species for random number index
     * @param randomIndex uint256
     * @return species string
     */
    function pickSpecies(uint256 randomIndex) private view returns (string memory) {
        for (uint256 i = 0; i < 10; i++) {
            if (randomIndex <= limits[i]) {
                return genum[i];
            }
        }
    }
}

File 2 of 26 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "./vendor/SafeMathChainlink.sol";

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {

  using SafeMathChainlink for uint256;

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

  /**
   * @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
   * @param _seed seed mixed into the input of the VRF.
   *
   * @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, uint256 _seed)
    internal returns (bytes32 requestId)
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));
    // 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, _seed, 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].add(1);
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

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

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

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

File 3 of 26 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 4 of 26 : ERC721PresetMinterPauserAutoId.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../access/AccessControl.sol";
import "../utils/Context.sol";
import "../utils/Counters.sol";
import "../token/ERC721/ERC721.sol";
import "../token/ERC721/ERC721Burnable.sol";
import "../token/ERC721/ERC721Pausable.sol";

/**
 * @dev {ERC721} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a minter role that allows for token minting (creation)
 *  - a pauser role that allows to stop all token transfers
 *  - token ID and URI autogeneration
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 */
contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnable, ERC721Pausable {
    using Counters for Counters.Counter;

    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    Counters.Counter private _tokenIdTracker;

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
     * account that deploys the contract.
     *
     * Token URIs will be autogenerated based on `baseURI` and their token IDs.
     * See {ERC721-tokenURI}.
     */
    constructor(string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());

        _setBaseURI(baseURI);
    }

    /**
     * @dev Creates a new token for `to`. Its token ID will be automatically
     * assigned (and available on the emitted {IERC721-Transfer} event), and the token
     * URI autogenerated based on the base URI passed at construction.
     *
     * See {ERC721-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to) public virtual {
        require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint");

        // We cannot just use balanceOf to create the new tokenId because tokens
        // can be burned (destroyed), so we need a separate counter.
        _mint(to, _tokenIdTracker.current());
        _tokenIdTracker.increment();
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC721Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause");
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC721Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause");
        _unpause();
    }

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

File 5 of 26 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../math/SafeMath.sol";

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

File 6 of 26 : CurrentTime.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.6 <0.9.0;

contract CurrentTime {
    function currentTime() internal view virtual returns (uint256) {
        return block.timestamp;
    }
}

File 7 of 26 : SafeMathChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathChainlink {
  /**
    * @dev Returns the addition of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `+` operator.
    *
    * Requirements:
    * - Addition cannot overflow.
    */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
    * @dev Returns the subtraction of two unsigned integers, reverting on
    * overflow (when the result is negative).
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    * - Subtraction cannot overflow.
    */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint256 c = a - b;

    return c;
  }

  /**
    * @dev Returns the multiplication of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `*` operator.
    *
    * Requirements:
    * - Multiplication cannot overflow.
    */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
    * @dev Returns the integer division of two unsigned integers. Reverts on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator. Note: this function uses a
    * `revert` opcode (which leaves remaining gas untouched) while Solidity
    * uses an invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * Reverts when dividing by zero.
    *
    * Counterpart to Solidity's `%` operator. This function uses a `revert`
    * opcode (which leaves remaining gas untouched) while Solidity uses an
    * invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

File 8 of 26 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.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 9 of 26 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

contract VRFRequestIDBase {

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

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

File 10 of 26 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 11 of 26 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 12 of 26 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC721.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./IERC721Receiver.sol";
import "../../introspection/ERC165.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
import "../../utils/EnumerableSet.sol";
import "../../utils/EnumerableMap.sol";
import "../../utils/Strings.sol";

/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using SafeMath for uint256;
    using Address for address;
    using EnumerableSet for EnumerableSet.UintSet;
    using EnumerableMap for EnumerableMap.UintToAddressMap;
    using Strings for uint256;

    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
    bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;

    // Mapping from holder address to their (enumerable) set of owned tokens
    mapping (address => EnumerableSet.UintSet) private _holderTokens;

    // Enumerable mapping from token ids to their owners
    EnumerableMap.UintToAddressMap private _tokenOwners;

    // 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;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

    // Base URI
    string private _baseURI;

    /*
     *     bytes4(keccak256('balanceOf(address)')) == 0x70a08231
     *     bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
     *     bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
     *     bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
     *     bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
     *
     *     => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
     *        0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
     */
    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;

    /*
     *     bytes4(keccak256('name()')) == 0x06fdde03
     *     bytes4(keccak256('symbol()')) == 0x95d89b41
     *     bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
     *
     *     => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
     */
    bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;

    /*
     *     bytes4(keccak256('totalSupply()')) == 0x18160ddd
     *     bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
     *     bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
     *
     *     => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
     */
    bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;

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

        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
        _registerInterface(_INTERFACE_ID_ERC721_METADATA);
        _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

    /**
     * @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 _holderTokens[owner].length();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
    }

    /**
     * @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 _tokenURI = _tokenURIs[tokenId];
        string memory base = baseURI();

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

    /**
    * @dev Returns the base URI set via {_setBaseURI}. This will be
    * automatically added as a prefix in {tokenURI} to each token's URI, or
    * to the token ID if no specific URI is set for that token ID.
    */
    function baseURI() public view virtual returns (string memory) {
        return _baseURI;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        return _holderTokens[owner].at(index);
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
        return _tokenOwners.length();
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        (uint256 tokenId, ) = _tokenOwners.at(index);
        return tokenId;
    }

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     d*
     * - `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);

        _holderTokens[to].add(tokenId);

        _tokenOwners.set(tokenId, to);

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

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

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

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

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

        _holderTokens[owner].remove(tokenId);

        _tokenOwners.remove(tokenId);

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

        _holderTokens[from].remove(tokenId);
        _holderTokens[to].add(tokenId);

        _tokenOwners.set(tokenId, to);

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @dev Internal function to set the base URI for all token IDs. It is
     * automatically added as a prefix to the value returned in {tokenURI},
     * or to the token ID if {tokenURI} is empty.
     */
    function _setBaseURI(string memory baseURI_) internal virtual {
        _baseURI = baseURI_;
    }

    /**
     * @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()) {
            return true;
        }
        bytes memory returndata = to.functionCall(abi.encodeWithSelector(
            IERC721Receiver(to).onERC721Received.selector,
            _msgSender(),
            from,
            tokenId,
            _data
        ), "ERC721: transfer to non ERC721Receiver implementer");
        bytes4 retval = abi.decode(returndata, (bytes4));
        return (retval == _ERC721_RECEIVED);
    }

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

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

File 13 of 26 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 14 of 26 : ERC721Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./ERC721.sol";
import "../../utils/Pausable.sol";

/**
 * @dev ERC721 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC721Pausable is ERC721, Pausable {
    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        require(!paused(), "ERC721Pausable: token transfer while paused");
    }
}

File 15 of 26 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 EnumerableSet {
    // 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;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            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] = toDeleteIndex + 1; // All indexes are 1-based

            // 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) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // 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);
    }

    // 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))));
    }


    // 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));
    }
}

File 16 of 26 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 17 of 26 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

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

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 19 of 26 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

import "./IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {

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

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

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

File 20 of 26 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

import "./IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 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 21 of 26 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

File 22 of 26 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

File 23 of 26 : EnumerableMap.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing an enumerable variant of Solidity's
 * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
 * type.
 *
 * Maps have the following properties:
 *
 * - Entries are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Entries are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableMap for EnumerableMap.UintToAddressMap;
 *
 *     // Declare a set state variable
 *     EnumerableMap.UintToAddressMap private myMap;
 * }
 * ```
 *
 * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
 * supported.
 */
library EnumerableMap {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Map type with
    // bytes32 keys and values.
    // The Map implementation uses private functions, and user-facing
    // implementations (such as Uint256ToAddressMap) are just wrappers around
    // the underlying Map.
    // This means that we can only create new EnumerableMaps for types that fit
    // in bytes32.

    struct MapEntry {
        bytes32 _key;
        bytes32 _value;
    }

    struct Map {
        // Storage of map keys and values
        MapEntry[] _entries;

        // Position of the entry defined by a key in the `entries` array, plus 1
        // because index 0 means a key is not in the map.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
        // We read and store the key's index to prevent multiple reads from the same storage slot
        uint256 keyIndex = map._indexes[key];

        if (keyIndex == 0) { // Equivalent to !contains(map, key)
            map._entries.push(MapEntry({ _key: key, _value: value }));
            // The entry is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            map._indexes[key] = map._entries.length;
            return true;
        } else {
            map._entries[keyIndex - 1]._value = value;
            return false;
        }
    }

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

        if (keyIndex != 0) { // Equivalent to contains(map, key)
            // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one
            // in the array, and then remove the last entry (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = keyIndex - 1;
            uint256 lastIndex = map._entries.length - 1;

            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            MapEntry storage lastEntry = map._entries[lastIndex];

            // Move the last entry to the index where the entry to delete is
            map._entries[toDeleteIndex] = lastEntry;
            // Update the index for the moved entry
            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved entry was stored
            map._entries.pop();

            // Delete the index for the deleted slot
            delete map._indexes[key];

            return true;
        } else {
            return false;
        }
    }

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

    /**
     * @dev Returns the number of key-value pairs in the map. O(1).
     */
    function _length(Map storage map) private view returns (uint256) {
        return map._entries.length;
    }

   /**
    * @dev Returns the key-value pair stored at position `index` in the map. O(1).
    *
    * Note that there are no guarantees on the ordering of entries inside the
    * array, and it may change when more entries are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
        require(map._entries.length > index, "EnumerableMap: index out of bounds");

        MapEntry storage entry = map._entries[index];
        return (entry._key, entry._value);
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     */
    function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {
        uint256 keyIndex = map._indexes[key];
        if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)
        return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function _get(Map storage map, bytes32 key) private view returns (bytes32) {
        uint256 keyIndex = map._indexes[key];
        require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key)
        return map._entries[keyIndex - 1]._value; // All indexes are 1-based
    }

    /**
     * @dev Same as {_get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {_tryGet}.
     */
    function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
        uint256 keyIndex = map._indexes[key];
        require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)
        return map._entries[keyIndex - 1]._value; // All indexes are 1-based
    }

    // UintToAddressMap

    struct UintToAddressMap {
        Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
        return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
    }

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

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

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

   /**
    * @dev Returns the element 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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
        (bytes32 key, bytes32 value) = _at(map._inner, index);
        return (uint256(key), address(uint160(uint256(value))));
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     *
     * _Available since v3.4._
     */
    function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
        (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));
        return (success, address(uint160(uint256(value))));
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
        return address(uint160(uint256(_get(map._inner, bytes32(key)))));
    }

    /**
     * @dev Same as {get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryGet}.
     */
    function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
        return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));
    }
}

File 24 of 26 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    /**
     * @dev Converts a `uint256` to its ASCII `string` 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);
        uint256 index = digits - 1;
        temp = value;
        while (temp != 0) {
            buffer[index--] = bytes1(uint8(48 + temp % 10));
            temp /= 10;
        }
        return string(buffer);
    }
}

File 25 of 26 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

File 26 of 26 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./Context.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _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());
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_VRFCoordinator","type":"address"},{"internalType":"address","name":"_LinkToken","type":"address"},{"internalType":"bytes32","name":"_keyhash","type":"bytes32"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Killed","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":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"latinSpecies","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenOwner","type":"address"}],"name":"Planted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestedRandomness","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"waterLevel","type":"uint256"}],"name":"Watered","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GROWTH_CYCLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LinkToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_CRYPTORCHIDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VRFCoordinator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WATERING_WINDOW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"alive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"compost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cryptorchids","outputs":[{"internalType":"string","name":"species","type":"string"},{"internalType":"uint256","name":"plantedAt","type":"uint256"},{"internalType":"uint256","name":"waterLevel","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"flowering","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"userProvidedSeed","type":"uint256"}],"name":"germinate","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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenMetadata","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"enum CryptOrchidERC721.Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"growthStage","outputs":[{"internalType":"enum CryptOrchidERC721.Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"heartbeat","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestToToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":[],"name":"startGrowing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"water","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"units","type":"uint256"}],"name":"webMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6010805461ffff19169055610200604052600060c0908152610c0260e0526117ba61010052611f8a610120526123726101405261256661016052612660610180526126c46101a0526126f66101c05261270f6101e0526200006590601190600a62000ba8565b506040805161018081018252601761014082019081527f7368656e7a68656e696361206f72636869646163656165000000000000000000610160830152815281518083018352601881527f7068616c61656e6f70736973206d6963686f6c69747a69690000000000000000602082810191909152808301919091528251808401845260158082527f6775617269616e74686520617572616e74696163610000000000000000000000828401528385019190915283518085018552600e81526d76616e646120636f6572756c656160901b818401526060840152835180850185528181527f637970726970656469756d2063616c63656f6c7573000000000000000000000081840152608084015283518085018552601981527f70617068696f706564696c756d20766965746e616d656e7365000000000000008184015260a0840152835180850185526012808252716d696c746f6e6961206b61796173696d616560701b8285015260c085019190915284518086018652601381527f706c6174616e746865726120617a6f72696361000000000000000000000000008185015260e0850152845180860186529182527f64656e64726f7068796c6178206c696e64656e69690000000000000000000000828401526101008401919091528351808501909452601d84527f70617068696f706564696c756d20726f7468736368696c6469616e756d000000918401919091526101208201929092526200028d9190600a62000c45565b50604080516101c08101909152604b61014082018181528291620059d861016084013981526020016040518060800160405280604c81526020016200586e604c9139815260200160405180608001604052806049815260200162005afc60499139815260200160405180608001604052806042815260200162005a69604291398152602001604051806080016040528060498152602001620058256049913981526020016040518060800160405280604d815260200162005942604d9139815260200160405180608001604052806046815260200162005a2360469139815260200160405180608001604052806047815260200162005c7260479139815260200160405180608001604052806049815260200162005b926049913981526020016040518060800160405280605181526020016200578d605191399052620003d990601c90600a62000c45565b50604080516101c08101909152604b6101408201818152829162005c2761016084013981526020016040518060800160405280604c815260200162005bdb604c913981526020016040518060800160405280604981526020016200598f604991398152602001604051806080016040528060428152602001620058ba604291398152602001604051806080016040528060498152602001620056fb6049913981526020016040518060800160405280604d815260200162005b45604d91398152602001604051806080016040528060468152602001620058fc604691398152602001604051806080016040528060478152602001620057de6047913981526020016040518060800160405280604981526020016200574460499139815260200160405180608001604052806051815260200162005aab6051913990526200052590602690600a62000c45565b5060405162005cb938038062005cb9833981810160405260608110156200054b57600080fd5b50805160208083015160409384015184518086018652600c81526b43727970744f72636869647360a01b8185015285518087018752600581526413d490d21160da1b8186015286518088019097526007875266697066733a2f2f60c81b948701949094529394919390928592859291908282620005d86301ffc9a760e01b6001600160e01b03620009d216565b8151620005ed90600790602085019062000c98565b5080516200060390600890602084019062000c98565b506200061f6380ac58cd60e01b6001600160e01b03620009d216565b6200063a635b5e139f60e01b6001600160e01b03620009d216565b6200065563780e9d6360e01b6001600160e01b03620009d216565b5050600b805460ff191690556200068960006200067a6001600160e01b0362000a5a16565b6001600160e01b0362000a5f16565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020620006c1906200067a6001600160e01b0362000a5a16565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020620006f9906200067a6001600160e01b0362000a5a16565b6200070d816001600160e01b0362000a7816565b50505060006200072262000a5a60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160601b0319606092831b811660a052911b16608052603480546001600160a01b038581166001600160a01b03199283161790925560358054928516929091169190911790556031819055671bc16d674ec8000060325560005b600a811015620009c857601c81600a8110620007e557fe5b0160376000601284600a8110620007f857fe5b60408051602080820190815292909301805460026001821615610100026000190190911604918401829052928291606090910190849080156200087f5780601f1062000853576101008083540402835291602001916200087f565b820191906000526020600020905b8154815290600101906020018083116200086157829003601f168201915b5050925050506040516020818303038152906040528051906020012081526020019081526020016000209080546001816001161561010002031660029004620008ca92919062000d19565b50602681600a8110620008d957fe5b0160386000601284600a8110620008ec57fe5b6040805160208082019081529290930180546002600182161561010002600019019091160491840182905292829160609091019084908015620009735780601f10620009475761010080835404028352916020019162000973565b820191906000526020600020905b8154815290600101906020018083116200095557829003601f168201915b5050925050506040516020818303038152906040528051906020012081526020019081526020016000209080546001816001161561010002031660029004620009be92919062000d19565b50600101620007cd565b5050505062000e45565b6001600160e01b0319808216141562000a32576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600160208190526040909120805460ff19169091179055565b335b90565b62000a7482826001600160e01b0362000a8d16565b5050565b805162000a7490600a90602084019062000c98565b60008281526020818152604090912062000ab29183906200360362000b0f821b17901c565b1562000a745762000acb6001600160e01b0362000a5a16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000b2f836001600160a01b0384166001600160e01b0362000b3816565b90505b92915050565b600062000b4f83836001600160e01b0362000b9016565b62000b875750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000b32565b50600062000b32565b60009081526001919091016020526040902054151590565b60018301918390821562000c335791602002820160005b8382111562000c0157835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000bbf565b801562000c315782816101000a81549061ffff021916905560020160208160010104928301926001030262000c01565b505b5062000c4192915062000d93565b5090565b82600a810192821562000c8a579160200282015b8281111562000c8a578251805162000c7991849160209091019062000c98565b509160200191906001019062000c59565b5062000c4192915062000db5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000cdb57805160ff191683800117855562000d0b565b8280016001018555821562000d0b579182015b8281111562000d0b57825182559160200191906001019062000cee565b5062000c4192915062000ddd565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000d54578054855562000d0b565b8280016001018555821562000d0b57600052602060002091601f016020900482015b8281111562000d0b57825482559160010191906001019062000d76565b62000a5c91905b8082111562000c4157805461ffff1916815560010162000d9a565b62000a5c91905b8082111562000c4157600062000dd3828262000dfa565b5060010162000dbc565b62000a5c91905b8082111562000c41576000815560010162000de4565b50805460018160011615610100020316600290046000825580601f1062000e22575062000e42565b601f01602090049060005260206000209081019062000e42919062000ddd565b50565b60805160601c60a05160601c61488262000e79600039806119ed528061381552508061306352806137e652506148826000f3fe60806040526004361061037a5760003560e01c80636b0c004d116101d1578063a217fddf11610102578063ca15c873116100a0578063e63ab1e91161006f578063e63ab1e914610e11578063e985e9c514610e26578063f2fde38b14610e61578063ffee200c14610e9457610381565b8063ca15c87314610ce9578063cac21c8f14610d13578063d539139314610dc3578063d547741f14610dd857610381565b8063b66a0e5d116100dc578063b66a0e5d14610b89578063b7aaba2014610b9e578063b88d4fde14610bec578063c87b56dd14610cbf57610381565b8063a217fddf14610b0f578063a22cb46514610b24578063a7eec44b14610b5f57610381565b80638da5cb5b1161016f57806394985ddd1161014957806394985ddd14610a9857806395d89b4114610ac85780639981d4a114610add5780639d1b464a14610afa57610381565b80638da5cb5b14610a1a5780639010d07c14610a2f57806391d1485414610a5f57610381565b806370a08231116101ab57806370a082311461098d578063715018a6146109c05780637fd8d953146109d55780638456cb5914610a0557610381565b80636b0c004d146109395780636c0360eb1461094e5780636e029ad11461096357610381565b806336568abe116102ab5780634f8e2fdf1161024957806362ff09d61161022357806362ff09d6146108885780636352211e146108b25780636573c787146108dc5780636a6278421461090657610381565b80634f8e2fdf146107995780635c975abb146107ae57806360316801146107c357610381565b806342619f661161028557806342619f66146106ed57806342842e0e1461070257806342966c68146107455780634f6ccce71461076f57610381565b806336568abe1461068a5780633ccfd60b146106c35780633f4ba83a146106d857610381565b8063182199cd11610318578063277dec92116102f2578063277dec92146105ee5780632f2ff15d146106035780632f745c591461063c57806333b608631461067557610381565b8063182199cd1461055757806323b872dd14610581578063248a9ca3146105c457610381565b8063095ea7b311610354578063095ea7b3146104b65780631424494d146104f1578063179f0b0a1461051b57806318160ddd1461054257610381565b806301ffc9a71461038657806306fdde03146103e6578063081812fc1461047057610381565b3661038157005b600080fd5b34801561039257600080fd5b506103d2600480360360208110156103a957600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610ea9565b604080519115158252519081900360200190f35b3480156103f257600080fd5b506103fb610ee4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561043557818101518382015260200161041d565b50505050905090810190601f1680156104625780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561047c57600080fd5b5061049a6004803603602081101561049357600080fd5b5035610f7b565b604080516001600160a01b039092168252519081900360200190f35b3480156104c257600080fd5b506104ef600480360360408110156104d957600080fd5b506001600160a01b038135169060200135610fdd565b005b3480156104fd57600080fd5b506104ef6004803603602081101561051457600080fd5b50356110b8565b34801561052757600080fd5b50610530611110565b60408051918252519081900360200190f35b34801561054e57600080fd5b50610530611117565b34801561056357600080fd5b506103d26004803603602081101561057a57600080fd5b5035611128565b34801561058d57600080fd5b506104ef600480360360608110156105a457600080fd5b506001600160a01b03813581169160208101359091169060400135611147565b3480156105d057600080fd5b50610530600480360360208110156105e757600080fd5b5035611198565b3480156105fa57600080fd5b506104ef6111ad565b34801561060f57600080fd5b506104ef6004803603604081101561062657600080fd5b50803590602001356001600160a01b0316611232565b34801561064857600080fd5b506105306004803603604081101561065f57600080fd5b506001600160a01b03813516906020013561129e565b34801561068157600080fd5b5061049a6112cf565b34801561069657600080fd5b506104ef600480360360408110156106ad57600080fd5b50803590602001356001600160a01b03166112de565b3480156106cf57600080fd5b506104ef61133f565b3480156106e457600080fd5b506104ef6113e2565b3480156106f957600080fd5b50610530611453565b34801561070e57600080fd5b506104ef6004803603606081101561072557600080fd5b506001600160a01b03813581169160208101359091169060400135611459565b34801561075157600080fd5b506104ef6004803603602081101561076857600080fd5b5035611474565b34801561077b57600080fd5b506105306004803603602081101561079257600080fd5b50356114c3565b3480156107a557600080fd5b5061049a6114df565b3480156107ba57600080fd5b506103d26114ee565b3480156107cf57600080fd5b506107ed600480360360208110156107e657600080fd5b50356114f7565b604051808060200185815260200184815260200183600381111561080d57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561084a578181015183820152602001610832565b50505050905090810190601f1680156108775780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561089457600080fd5b50610530600480360360208110156108ab57600080fd5b50356115bc565b3480156108be57600080fd5b5061049a600480360360208110156108d557600080fd5b50356115ce565b3480156108e857600080fd5b506103d2600480360360208110156108ff57600080fd5b50356115fc565b34801561091257600080fd5b506104ef6004803603602081101561092957600080fd5b50356001600160a01b031661161c565b34801561094557600080fd5b506105306116a0565b34801561095a57600080fd5b506103fb6116a6565b34801561096f57600080fd5b506104ef6004803603602081101561098657600080fd5b5035611707565b34801561099957600080fd5b50610530600480360360208110156109b057600080fd5b50356001600160a01b0316611759565b3480156109cc57600080fd5b506104ef6117c1565b3480156109e157600080fd5b506104ef600480360360408110156109f857600080fd5b508035906020013561188c565b348015610a1157600080fd5b506104ef611928565b348015610a2657600080fd5b5061049a611997565b348015610a3b57600080fd5b5061049a60048036036040811015610a5257600080fd5b50803590602001356119a6565b348015610a6b57600080fd5b506103d260048036036040811015610a8257600080fd5b50803590602001356001600160a01b03166119c4565b348015610aa457600080fd5b506104ef60048036036040811015610abb57600080fd5b50803590602001356119e2565b348015610ad457600080fd5b506103fb611a69565b6104ef60048036036020811015610af357600080fd5b5035611aca565b348015610b0657600080fd5b50610530611d9e565b348015610b1b57600080fd5b50610530611e5a565b348015610b3057600080fd5b506104ef60048036036040811015610b4757600080fd5b506001600160a01b0381351690602001351515611e5f565b348015610b6b57600080fd5b506104ef60048036036020811015610b8257600080fd5b5035611f64565b348015610b9557600080fd5b506104ef6120c5565b348015610baa57600080fd5b50610bc860048036036020811015610bc157600080fd5b5035612148565b60405180826003811115610bd857fe5b60ff16815260200191505060405180910390f35b348015610bf857600080fd5b506104ef60048036036080811015610c0f57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610c4a57600080fd5b820183602082011115610c5c57600080fd5b80359060200191846001830284011164010000000083111715610c7e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506122c8945050505050565b348015610ccb57600080fd5b506103fb60048036036020811015610ce257600080fd5b5035612320565b348015610cf557600080fd5b5061053060048036036020811015610d0c57600080fd5b503561271e565b348015610d1f57600080fd5b50610d3d60048036036020811015610d3657600080fd5b5035612735565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610d86578181015183820152602001610d6e565b50505050905090810190601f168015610db35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610dcf57600080fd5b506105306127e2565b348015610de457600080fd5b506104ef60048036036040811015610dfb57600080fd5b50803590602001356001600160a01b0316612805565b348015610e1d57600080fd5b5061053061285e565b348015610e3257600080fd5b506103d260048036036040811015610e4957600080fd5b506001600160a01b0381358116916020013516612881565b348015610e6d57600080fd5b506104ef60048036036020811015610e8457600080fd5b50356001600160a01b03166128af565b348015610ea057600080fd5b506105306129d1565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f705780601f10610f4557610100808354040283529160200191610f70565b820191906000526020600020905b815481529060010190602001808311610f5357829003601f168201915b505050505090505b90565b6000610f86826129d7565b610fc15760405162461bcd60e51b815260040180806020018281038252602c81526020018061461f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610fe8826115ce565b9050806001600160a01b0316836001600160a01b0316141561103b5760405162461bcd60e51b81526004018080602001828103825260218152602001806146a46021913960400191505060405180910390fd5b806001600160a01b031661104d6129ea565b6001600160a01b0316148061106e575061106e816110696129ea565b612881565b6110a95760405162461bcd60e51b815260040180806020018281038252603881526020018061452e6038913960400191505060405180910390fd5b6110b383836129ee565b505050565b6110c96110c36129ea565b82612a69565b6111045760405162461bcd60e51b81526004018080602001828103825260298152602001806147486029913960400191505060405180910390fd5b61110d81611474565b50565b62093a8081565b60006111236003612b0d565b905090565b6000600261113583612148565b600381111561114057fe5b1492915050565b6111526110c36129ea565b61118d5760405162461bcd60e51b81526004018080602001828103825260318152602001806146ec6031913960400191505060405180910390fd5b6110b3838383612b18565b60009081526020819052604090206002015490565b6111b56129ea565b6001600160a01b03166111c6611997565b6001600160a01b031614611221576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6010805461ff001916610100179055565b600082815260208190526040902060020154611255906112506129ea565b6119c4565b6112905760405162461bcd60e51b815260040180806020018281038252602f81526020018061431e602f913960400191505060405180910390fd5b61129a8282612c76565b5050565b6001600160a01b03821660009081526002602052604081206112c6908363ffffffff612ce516565b90505b92915050565b6034546001600160a01b031681565b6112e66129ea565b6001600160a01b0316816001600160a01b0316146113355760405162461bcd60e51b815260040180806020018281038252602f81526020018061481e602f913960400191505060405180910390fd5b61129a8282612cf1565b6113476129ea565b6001600160a01b0316611358611997565b6001600160a01b0316146113b3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f1935050505015801561129a573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902061140e906112506129ea565b6114495760405162461bcd60e51b81526004018080602001828103825260408152602001806147de6040913960400191505060405180910390fd5b611451612d60565b565b60335481565b6110b3838383604051806020016040528060008152506122c8565b61147f6110c36129ea565b6114ba5760405162461bcd60e51b81526004018080602001828103825260308152602001806147ae6030913960400191505060405180910390fd5b61110d81612e09565b6000806114d760038463ffffffff612ee216565b509392505050565b6035546001600160a01b031681565b600b5460ff1690565b6000818152600f6020526040812060018101546002820154606093928392839261152088612148565b8354604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281529186918301828280156115a65780601f1061157b576101008083540402835291602001916115a6565b820191906000526020600020905b81548152906001019060200180831161158957829003601f168201915b5050505050935093509350935093509193509193565b60366020526000908152604090205481565b60006112c982604051806060016040528060298152602001614590602991396003919063ffffffff612efe16565b6000600361160983612148565b600381111561161457fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020611648906112506129ea565b6116835760405162461bcd60e51b815260040180806020018281038252603d815260200180614771603d913960400191505060405180910390fd5b61169681611691600c612f15565b612f19565b61110d600c613053565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f705780601f10610f4557610100808354040283529160200191610f70565b600361171282612148565b600381111561171d57fe5b141561110d576040805182815290517ff4a991ad9e7f9711696f7bd41529beb4c470d75788573535d4ca3f0857c79ce89181900360200190a150565b60006001600160a01b0382166117a05760405162461bcd60e51b815260040180806020018281038252602a815260200180614566602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206112c990612b0d565b6117c96129ea565b6001600160a01b03166117da611997565b6001600160a01b031614611835576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d805473ffffffffffffffffffffffffffffffffffffffff19169055565b601054610100900460ff166118d25760405162461bcd60e51b81526004018080602001828103825260278152602001806143fc6027913960400191505060405180910390fd5b6118e36118dd6129ea565b83612a69565b61191e5760405162461bcd60e51b815260040180806020018281038252602b81526020018061471d602b913960400191505060405180910390fd5b6110b3828261305c565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611954906112506129ea565b61198f5760405162461bcd60e51b815260040180806020018281038252603e815260200180614423603e913960400191505060405180910390fd5b61145161319d565b600d546001600160a01b031690565b60008281526020819052604081206112c6908363ffffffff612ce516565b60008281526020819052604081206112c6908363ffffffff61322d16565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a5f576040805162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015290519081900360640190fd5b61129a8282613242565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f705780601f10610f4557610100808354040283529160200191610f70565b60105460ff16611b21576040805162461bcd60e51b815260206004820152601560248201527f546865204e75727365727920697320636c6f7365640000000000000000000000604482015290519081900360640190fd5b611b29611117565b61271003811115611b81576040805162461bcd60e51b815260206004820152601560248201527f4e6f7420656e6f7567682062756c6273206c6566740000000000000000000000604482015290519081900360640190fd5b612710611b8c611117565b10611bde576040805162461bcd60e51b815260206004820152601660248201527f53616c652068617320616c726561647920656e64656400000000000000000000604482015290519081900360640190fd5b600081118015611bef575060148111155b611c2a5760405162461bcd60e51b81526004018080602001828103825260308152602001806146746030913960400191505060405180910390fd5b612710611c3e611c38611117565b83613377565b1115611c91576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611ca2611c9c611d9e565b826133d1565b341015611ce05760405162461bcd60e51b81526004018080602001828103825260238152602001806145b96023913960400191505060405180910390fd5b60005b8181101561129a57611cf56030613053565b6000611d016030612f15565b6040805160a0810182526006606082019081527f6772616e756d0000000000000000000000000000000000000000000000000000608083015281526000196020808301919091526000828401819052848152600f8252929092208151805194955091939092611d749284929101906141db565b5060208201516001820155604090910151600290910155611d95338261342a565b50600101611ce3565b600080611da9611117565b90506126ac8110611dc557670de0b6b3a7640000915050610f78565b61251c8110611ddf576708e1bc9bf0400000915050610f78565b611d4c8110611df957670470de4df8200000915050610f78565b610dac8110611e13576702386f26fc100000915050610f78565b6105dc8110611e2d5767011c37937e080000915050610f78565b6101f48110611e465766d529ae9e860000915050610f78565b668e1bc9bf040000915050610f78565b5090565b600081565b611e676129ea565b6001600160a01b0316826001600160a01b03161415611ecd576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611eda6129ea565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611f1e6129ea565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611f6f6110c36129ea565b611faa5760405162461bcd60e51b81526004018080602001828103825260278152602001806144ab6027913960400191505060405180910390fd5b611fb3816115fc565b611fef576040805182815290517ff4a991ad9e7f9711696f7bd41529beb4c470d75788573535d4ca3f0857c79ce89181900360200190a161110d565b6000818152600f602052604081206002810154600182015491929091612013613444565b03905060006120258262093a80613448565b90508083111561206b576040805186815290517ff4a991ad9e7f9711696f7bd41529beb4c470d75788573535d4ca3f0857c79ce89181900360200190a15050505061110d565b6000612078846001613377565b60028601819055604080518881526020810183905281519293507f674d81537534435d24d5bc9f92955722ba22b136d98346a01ad4777f48b5581c929081900390910190a1505050505050565b6120cd6129ea565b6001600160a01b03166120de611997565b6001600160a01b031614612139576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6010805460ff19166001179055565b6000612152614255565b6000838152600f60209081526040918290208251815460026001821615610100026000190190911604601f810184900490930281016080908101909452606081018381529093919284928491908401828280156121f05780601f106121c5576101008083540402835291602001916121f0565b820191906000526020600020905b8154815290600101906020018083116121d357829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415612226576000915050610edf565b6000198160200151141561223e576001915050610edf565b60408101516020820151600090612253613444565b03905060006122658262093a80613448565b905060006122768362093a806134b2565b90508184141561228e57600295505050505050610edf565b8161229a856001613377565b1480156122a85750612a3081105b156122bb57600295505050505050610edf565b5060039695505050505050565b6122d36118dd6129ea565b61230e5760405162461bcd60e51b81526004018080602001828103825260318152602001806146ec6031913960400191505060405180910390fd5b61231a84848484613517565b50505050565b60608061232c836114f7565b509192506001915061233b9050565b61234484612148565b600381111561234f57fe5b141561242d5761235d6116a6565b6040518060600160405280602e81526020016143ce602e91396040516020018083805190602001908083835b602083106123a85780518252601f199092019160209182019101612389565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106123f05780518252601f1990920191602091820191016123d1565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610edf565b600261243884612148565b600381111561244357fe5b14156125b4576124516116a6565b60376000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561249657818101518382015260200161247e565b50505050905090810190601f1680156124c35780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b6020831061251e5780518252601f1990920191602091820191016124ff565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156125975780601f10612575576101008083540402835291820191612597565b820191906000526020600020905b815481529060010190602001808311612583575b505092505050604051602081830303815290604052915050610edf565b6125bc6116a6565b60386000836040516020018080602001828103825283818151815260200191508051906020019080838360005b838110156126015781810151838201526020016125e9565b50505050905090810190601f16801561262e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106126895780518252601f19909201916020918201910161266a565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156127025780601f106126e0576101008083540402835291820191612702565b820191906000526020600020905b8154815290600101906020018083116126ee575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206112c990612b0d565b600f6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156127cc5780601f106127a1576101008083540402835291602001916127cc565b820191906000526020600020905b8154815290600101906020018083116127af57829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b600082815260208190526040902060020154612823906112506129ea565b6113355760405162461bcd60e51b81526004018080602001828103825260308152602001806144fe6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6128b76129ea565b6001600160a01b03166128c8611997565b6001600160a01b031614612923576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166129685760405162461bcd60e51b81526004018080602001828103825260268152602001806143a86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b612a3081565b60006112c960038363ffffffff61356916565b3390565b6000818152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190612a30826115ce565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612a74826129d7565b612aaf5760405162461bcd60e51b815260040180806020018281038252602c8152602001806144d2602c913960400191505060405180910390fd5b6000612aba836115ce565b9050806001600160a01b0316846001600160a01b03161480612af55750836001600160a01b0316612aea84610f7b565b6001600160a01b0316145b80612b055750612b058185612881565b949350505050565b60006112c982612f15565b826001600160a01b0316612b2b826115ce565b6001600160a01b031614612b705760405162461bcd60e51b815260040180806020018281038252602981526020018061464b6029913960400191505060405180910390fd5b6001600160a01b038216612bb55760405162461bcd60e51b81526004018080602001828103825260248152602001806144616024913960400191505060405180910390fd5b612bc0838383613575565b612bcb6000826129ee565b6001600160a01b0383166000908152600260205260409020612bf3908263ffffffff6135d516565b506001600160a01b0382166000908152600260205260409020612c1c908263ffffffff6135e116565b50612c2f6003828463ffffffff6135ed16565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612c94908263ffffffff61360316565b1561129a57612ca16129ea565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006112c68383613618565b6000828152602081905260409020612d0f908263ffffffff61367c16565b1561129a57612d1c6129ea565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b612d686114ee565b612db9576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612dec6129ea565b604080516001600160a01b039092168252519081900360200190a1565b6000612e14826115ce565b9050612e2281600084613575565b612e2d6000836129ee565b6000828152600960205260409020546002600019610100600184161502019091160415612e6b576000828152600960205260408120612e6b91614276565b6001600160a01b0381166000908152600260205260409020612e93908363ffffffff6135d516565b50612ea560038363ffffffff61369116565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ef1868661369d565b9097909650945050505050565b6000612f0b848484613718565b90505b9392505050565b5490565b6001600160a01b038216612f74576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612f7d816129d7565b15612fcf576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612fdb60008383613575565b6001600160a01b0382166000908152600260205260409020613003908263ffffffff6135e116565b506130166003828463ffffffff6135ed16565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b60006032547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156130d757600080fd5b505afa1580156130eb573d6000803e3d6000fd5b505050506040513d602081101561310157600080fd5b505110156131405760405162461bcd60e51b815260040180806020018281038252602981526020018061437f6029913960400191505060405180910390fd5b61314f603154603254846137e2565b600081815260366020908152604091829020869055815183815291519293507fe5f5b44d72d4143c278eb745c4acc0695c4a5bc616be5beecf46abe29661780e92918290030190a192915050565b6131a56114ee565b156131f7576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612dec6129ea565b60006112c6836001600160a01b0384166139a4565b600082815260366020908152604080832054808452600f9092529091206060613275613270856127106134b2565b6139bc565b805190915061328a90839060208401906141db565b50613293613444565b600183015560006132a3846115ce565b90507f7313be463d71a79047d01fb641b7aaf895b37a35b44b91ed31ae512266e80f2884836132d0613444565b846040518085815260200180602001848152602001836001600160a01b03166001600160a01b03168152602001828103825285818151815260200191508051906020019080838360005b8381101561333257818101518382015260200161331a565b50505050905090810190601f16801561335f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1505050505050565b6000828201838110156112c6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826133e0575060006112c9565b828202828482816133ed57fe5b04146112c65760405162461bcd60e51b81526004018080602001828103825260218152602001806145fe6021913960400191505060405180910390fd5b61129a828260405180602001604052806000815250613aa8565b4290565b600080821161349e576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816134a957fe5b04949350505050565b600081613506576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b81838161350f57fe5b069392505050565b613522848484612b18565b61352e84848484613afa565b61231a5760405162461bcd60e51b815260040180806020018281038252603281526020018061434d6032913960400191505060405180910390fd5b60006112c683836139a4565b6001600160a01b038216158061358f575061358f816115fc565b6135ca5760405162461bcd60e51b81526004018080602001828103825260278152602001806146c56027913960400191505060405180910390fd5b6110b3838383613cbc565b60006112c68383613cc7565b60006112c68383613d8d565b6000612f0b84846001600160a01b038516613dd7565b60006112c6836001600160a01b038416613d8d565b8154600090821061365a5760405162461bcd60e51b81526004018080602001828103825260228152602001806142d16022913960400191505060405180910390fd5b82600001828154811061366957fe5b9060005260206000200154905092915050565b60006112c6836001600160a01b038416613cc7565b60006112c68383613e6e565b8154600090819083106136e15760405162461bcd60e51b81526004018080602001828103825260228152602001806145dc6022913960400191505060405180910390fd5b60008460000184815481106136f257fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816137b35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613778578181015183820152602001613760565b50505050905090810190601f1680156137a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106137c657fe5b9060005260206000209060020201600101549150509392505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000085878660405160200180838152602001828152602001925050506040516020818303038152906040526040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156138c75781810151838201526020016138af565b50505050905090810190601f1680156138f45780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561391557600080fd5b505af1158015613929573d6000803e3d6000fd5b505050506040513d602081101561393f57600080fd5b50506000848152600e602052604081205461395f90869085903090613f42565b6000868152600e602052604090205490915061398290600163ffffffff61337716565b6000868152600e602052604090205561399b8582613f89565b95945050505050565b60009081526001919091016020526040902054151590565b606060005b600a811015613aa257601181600a81106139d757fe5b601091828204019190066002029054906101000a900461ffff1661ffff168311613a9a57601281600a8110613a0857fe5b01805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015613a8d5780601f10613a6257610100808354040283529160200191613a8d565b820191906000526020600020905b815481529060010190602001808311613a7057829003601f168201915b5050505050915050610edf565b6001016139c1565b50919050565b613ab28383612f19565b613abf6000848484613afa565b6110b35760405162461bcd60e51b815260040180806020018281038252603281526020018061434d6032913960400191505060405180910390fd5b6000613b0e846001600160a01b0316613fb5565b613b1a57506001612b05565b6060613c6a630a85bd0160e11b613b2f6129ea565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613ba8578181015183820152602001613b90565b50505050905090810190601f168015613bd55780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180606001604052806032815260200161434d603291396001600160a01b038816919063ffffffff613fbb16565b90506000818060200190516020811015613c8357600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b6110b3838383613fca565b60008181526001830160205260408120548015613d835783546000198083019190810190600090879083908110613cfa57fe5b9060005260206000200154905080876000018481548110613d1757fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613d4757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506112c9565b60009150506112c9565b6000613d9983836139a4565b613dcf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556112c9565b5060006112c9565b600082815260018401602052604081205480613e3c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612f0e565b82856000016001830381548110613e4f57fe5b9060005260206000209060020201600101819055506000915050612f0e565b60008181526001830160205260408120548015613d835783546000198083019190810190600090879083908110613ea157fe5b9060005260206000209060020201905080876000018481548110613ec157fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080613f0057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506112c99350505050565b60408051602080820196909652808201949094526001600160a01b039290921660608401526080808401919091528151808403909101815260a09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b3b151590565b6060612f0b8484600085614019565b613fd58383836110b3565b613fdd6114ee565b156110b35760405162461bcd60e51b815260040180806020018281038252602b8152602001806142f3602b913960400191505060405180910390fd5b60608247101561405a5760405162461bcd60e51b81526004018080602001828103825260268152602001806144856026913960400191505060405180910390fd5b61406385613fb5565b6140b4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106140f35780518252601f1990920191602091820191016140d4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614155576040519150601f19603f3d011682016040523d82523d6000602084013e61415a565b606091505b509150915061416a828286614175565b979650505050505050565b60608315614184575081612f0e565b8251156141945782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315613778578181015183820152602001613760565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061421c57805160ff1916838001178555614249565b82800160010185558215614249579182015b8281111561424957825182559160200191906001019061422e565b50611e569291506142b6565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f1061429c575061110d565b601f01602090049060005260206000209081019061110d91905b610f7891905b80821115611e5657600081556001016142bc56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724e6f7420656e6f756768204c494e4b202d206765726d696e6174696f6e20756e617661696c61626c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4f6e6c7920746865204f776e65722063616e20636f6d706f737420612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220af129c17f1e0c56d9a3759a97aa81fab23fc2c23763be7aee2248a77997155c764736f6c63430006060033516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f706c6174616e74686572612d617a6f726963612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f637970726970656469756d2d63616c63656f6c75732e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f6775617269616e7468652d617572616e74696163612e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6d696c746f6e69612d6b61796173696d61652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f76616e64612d636f6572756c65612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d726f7468736368696c6469616e756d2e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f6775617269616e7468652d617572616e74696163612e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f70617068696f706564696c756d2d766965746e616d656e73652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f64656e64726f7068796c61782d6c696e64656e69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7068616c61656e6f707369732d6d6963686f6c69747a69692e6a736f6e516d55384d4e7a6e5436464431763558646e536541366345597178706a374d676b4543706f7433614345526572582f7368656e7a68656e6963612d6f726368696461636561652e6a736f6e516d56376e735167484e76777952786262685035396948336772715366713367376a6f53506153314a47526d4a612f706c6174616e74686572612d617a6f726963612e6a736f6e000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

Deployed Bytecode

0x60806040526004361061037a5760003560e01c80636b0c004d116101d1578063a217fddf11610102578063ca15c873116100a0578063e63ab1e91161006f578063e63ab1e914610e11578063e985e9c514610e26578063f2fde38b14610e61578063ffee200c14610e9457610381565b8063ca15c87314610ce9578063cac21c8f14610d13578063d539139314610dc3578063d547741f14610dd857610381565b8063b66a0e5d116100dc578063b66a0e5d14610b89578063b7aaba2014610b9e578063b88d4fde14610bec578063c87b56dd14610cbf57610381565b8063a217fddf14610b0f578063a22cb46514610b24578063a7eec44b14610b5f57610381565b80638da5cb5b1161016f57806394985ddd1161014957806394985ddd14610a9857806395d89b4114610ac85780639981d4a114610add5780639d1b464a14610afa57610381565b80638da5cb5b14610a1a5780639010d07c14610a2f57806391d1485414610a5f57610381565b806370a08231116101ab57806370a082311461098d578063715018a6146109c05780637fd8d953146109d55780638456cb5914610a0557610381565b80636b0c004d146109395780636c0360eb1461094e5780636e029ad11461096357610381565b806336568abe116102ab5780634f8e2fdf1161024957806362ff09d61161022357806362ff09d6146108885780636352211e146108b25780636573c787146108dc5780636a6278421461090657610381565b80634f8e2fdf146107995780635c975abb146107ae57806360316801146107c357610381565b806342619f661161028557806342619f66146106ed57806342842e0e1461070257806342966c68146107455780634f6ccce71461076f57610381565b806336568abe1461068a5780633ccfd60b146106c35780633f4ba83a146106d857610381565b8063182199cd11610318578063277dec92116102f2578063277dec92146105ee5780632f2ff15d146106035780632f745c591461063c57806333b608631461067557610381565b8063182199cd1461055757806323b872dd14610581578063248a9ca3146105c457610381565b8063095ea7b311610354578063095ea7b3146104b65780631424494d146104f1578063179f0b0a1461051b57806318160ddd1461054257610381565b806301ffc9a71461038657806306fdde03146103e6578063081812fc1461047057610381565b3661038157005b600080fd5b34801561039257600080fd5b506103d2600480360360208110156103a957600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610ea9565b604080519115158252519081900360200190f35b3480156103f257600080fd5b506103fb610ee4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561043557818101518382015260200161041d565b50505050905090810190601f1680156104625780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561047c57600080fd5b5061049a6004803603602081101561049357600080fd5b5035610f7b565b604080516001600160a01b039092168252519081900360200190f35b3480156104c257600080fd5b506104ef600480360360408110156104d957600080fd5b506001600160a01b038135169060200135610fdd565b005b3480156104fd57600080fd5b506104ef6004803603602081101561051457600080fd5b50356110b8565b34801561052757600080fd5b50610530611110565b60408051918252519081900360200190f35b34801561054e57600080fd5b50610530611117565b34801561056357600080fd5b506103d26004803603602081101561057a57600080fd5b5035611128565b34801561058d57600080fd5b506104ef600480360360608110156105a457600080fd5b506001600160a01b03813581169160208101359091169060400135611147565b3480156105d057600080fd5b50610530600480360360208110156105e757600080fd5b5035611198565b3480156105fa57600080fd5b506104ef6111ad565b34801561060f57600080fd5b506104ef6004803603604081101561062657600080fd5b50803590602001356001600160a01b0316611232565b34801561064857600080fd5b506105306004803603604081101561065f57600080fd5b506001600160a01b03813516906020013561129e565b34801561068157600080fd5b5061049a6112cf565b34801561069657600080fd5b506104ef600480360360408110156106ad57600080fd5b50803590602001356001600160a01b03166112de565b3480156106cf57600080fd5b506104ef61133f565b3480156106e457600080fd5b506104ef6113e2565b3480156106f957600080fd5b50610530611453565b34801561070e57600080fd5b506104ef6004803603606081101561072557600080fd5b506001600160a01b03813581169160208101359091169060400135611459565b34801561075157600080fd5b506104ef6004803603602081101561076857600080fd5b5035611474565b34801561077b57600080fd5b506105306004803603602081101561079257600080fd5b50356114c3565b3480156107a557600080fd5b5061049a6114df565b3480156107ba57600080fd5b506103d26114ee565b3480156107cf57600080fd5b506107ed600480360360208110156107e657600080fd5b50356114f7565b604051808060200185815260200184815260200183600381111561080d57fe5b60ff168152602001828103825286818151815260200191508051906020019080838360005b8381101561084a578181015183820152602001610832565b50505050905090810190601f1680156108775780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561089457600080fd5b50610530600480360360208110156108ab57600080fd5b50356115bc565b3480156108be57600080fd5b5061049a600480360360208110156108d557600080fd5b50356115ce565b3480156108e857600080fd5b506103d2600480360360208110156108ff57600080fd5b50356115fc565b34801561091257600080fd5b506104ef6004803603602081101561092957600080fd5b50356001600160a01b031661161c565b34801561094557600080fd5b506105306116a0565b34801561095a57600080fd5b506103fb6116a6565b34801561096f57600080fd5b506104ef6004803603602081101561098657600080fd5b5035611707565b34801561099957600080fd5b50610530600480360360208110156109b057600080fd5b50356001600160a01b0316611759565b3480156109cc57600080fd5b506104ef6117c1565b3480156109e157600080fd5b506104ef600480360360408110156109f857600080fd5b508035906020013561188c565b348015610a1157600080fd5b506104ef611928565b348015610a2657600080fd5b5061049a611997565b348015610a3b57600080fd5b5061049a60048036036040811015610a5257600080fd5b50803590602001356119a6565b348015610a6b57600080fd5b506103d260048036036040811015610a8257600080fd5b50803590602001356001600160a01b03166119c4565b348015610aa457600080fd5b506104ef60048036036040811015610abb57600080fd5b50803590602001356119e2565b348015610ad457600080fd5b506103fb611a69565b6104ef60048036036020811015610af357600080fd5b5035611aca565b348015610b0657600080fd5b50610530611d9e565b348015610b1b57600080fd5b50610530611e5a565b348015610b3057600080fd5b506104ef60048036036040811015610b4757600080fd5b506001600160a01b0381351690602001351515611e5f565b348015610b6b57600080fd5b506104ef60048036036020811015610b8257600080fd5b5035611f64565b348015610b9557600080fd5b506104ef6120c5565b348015610baa57600080fd5b50610bc860048036036020811015610bc157600080fd5b5035612148565b60405180826003811115610bd857fe5b60ff16815260200191505060405180910390f35b348015610bf857600080fd5b506104ef60048036036080811015610c0f57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610c4a57600080fd5b820183602082011115610c5c57600080fd5b80359060200191846001830284011164010000000083111715610c7e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506122c8945050505050565b348015610ccb57600080fd5b506103fb60048036036020811015610ce257600080fd5b5035612320565b348015610cf557600080fd5b5061053060048036036020811015610d0c57600080fd5b503561271e565b348015610d1f57600080fd5b50610d3d60048036036020811015610d3657600080fd5b5035612735565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610d86578181015183820152602001610d6e565b50505050905090810190601f168015610db35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b348015610dcf57600080fd5b506105306127e2565b348015610de457600080fd5b506104ef60048036036040811015610dfb57600080fd5b50803590602001356001600160a01b0316612805565b348015610e1d57600080fd5b5061053061285e565b348015610e3257600080fd5b506103d260048036036040811015610e4957600080fd5b506001600160a01b0381358116916020013516612881565b348015610e6d57600080fd5b506104ef60048036036020811015610e8457600080fd5b50356001600160a01b03166128af565b348015610ea057600080fd5b506105306129d1565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526001602052604090205460ff165b919050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f705780601f10610f4557610100808354040283529160200191610f70565b820191906000526020600020905b815481529060010190602001808311610f5357829003601f168201915b505050505090505b90565b6000610f86826129d7565b610fc15760405162461bcd60e51b815260040180806020018281038252602c81526020018061461f602c913960400191505060405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610fe8826115ce565b9050806001600160a01b0316836001600160a01b0316141561103b5760405162461bcd60e51b81526004018080602001828103825260218152602001806146a46021913960400191505060405180910390fd5b806001600160a01b031661104d6129ea565b6001600160a01b0316148061106e575061106e816110696129ea565b612881565b6110a95760405162461bcd60e51b815260040180806020018281038252603881526020018061452e6038913960400191505060405180910390fd5b6110b383836129ee565b505050565b6110c96110c36129ea565b82612a69565b6111045760405162461bcd60e51b81526004018080602001828103825260298152602001806147486029913960400191505060405180910390fd5b61110d81611474565b50565b62093a8081565b60006111236003612b0d565b905090565b6000600261113583612148565b600381111561114057fe5b1492915050565b6111526110c36129ea565b61118d5760405162461bcd60e51b81526004018080602001828103825260318152602001806146ec6031913960400191505060405180910390fd5b6110b3838383612b18565b60009081526020819052604090206002015490565b6111b56129ea565b6001600160a01b03166111c6611997565b6001600160a01b031614611221576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6010805461ff001916610100179055565b600082815260208190526040902060020154611255906112506129ea565b6119c4565b6112905760405162461bcd60e51b815260040180806020018281038252602f81526020018061431e602f913960400191505060405180910390fd5b61129a8282612c76565b5050565b6001600160a01b03821660009081526002602052604081206112c6908363ffffffff612ce516565b90505b92915050565b6034546001600160a01b031681565b6112e66129ea565b6001600160a01b0316816001600160a01b0316146113355760405162461bcd60e51b815260040180806020018281038252602f81526020018061481e602f913960400191505060405180910390fd5b61129a8282612cf1565b6113476129ea565b6001600160a01b0316611358611997565b6001600160a01b0316146113b3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6040514790339082156108fc029083906000818181858888f1935050505015801561129a573d6000803e3d6000fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902061140e906112506129ea565b6114495760405162461bcd60e51b81526004018080602001828103825260408152602001806147de6040913960400191505060405180910390fd5b611451612d60565b565b60335481565b6110b3838383604051806020016040528060008152506122c8565b61147f6110c36129ea565b6114ba5760405162461bcd60e51b81526004018080602001828103825260308152602001806147ae6030913960400191505060405180910390fd5b61110d81612e09565b6000806114d760038463ffffffff612ee216565b509392505050565b6035546001600160a01b031681565b600b5460ff1690565b6000818152600f6020526040812060018101546002820154606093928392839261152088612148565b8354604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281529186918301828280156115a65780601f1061157b576101008083540402835291602001916115a6565b820191906000526020600020905b81548152906001019060200180831161158957829003601f168201915b5050505050935093509350935093509193509193565b60366020526000908152604090205481565b60006112c982604051806060016040528060298152602001614590602991396003919063ffffffff612efe16565b6000600361160983612148565b600381111561161457fe5b141592915050565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020611648906112506129ea565b6116835760405162461bcd60e51b815260040180806020018281038252603d815260200180614771603d913960400191505060405180910390fd5b61169681611691600c612f15565b612f19565b61110d600c613053565b61271081565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f705780601f10610f4557610100808354040283529160200191610f70565b600361171282612148565b600381111561171d57fe5b141561110d576040805182815290517ff4a991ad9e7f9711696f7bd41529beb4c470d75788573535d4ca3f0857c79ce89181900360200190a150565b60006001600160a01b0382166117a05760405162461bcd60e51b815260040180806020018281038252602a815260200180614566602a913960400191505060405180910390fd5b6001600160a01b03821660009081526002602052604090206112c990612b0d565b6117c96129ea565b6001600160a01b03166117da611997565b6001600160a01b031614611835576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d805473ffffffffffffffffffffffffffffffffffffffff19169055565b601054610100900460ff166118d25760405162461bcd60e51b81526004018080602001828103825260278152602001806143fc6027913960400191505060405180910390fd5b6118e36118dd6129ea565b83612a69565b61191e5760405162461bcd60e51b815260040180806020018281038252602b81526020018061471d602b913960400191505060405180910390fd5b6110b3828261305c565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611954906112506129ea565b61198f5760405162461bcd60e51b815260040180806020018281038252603e815260200180614423603e913960400191505060405180910390fd5b61145161319d565b600d546001600160a01b031690565b60008281526020819052604081206112c6908363ffffffff612ce516565b60008281526020819052604081206112c6908363ffffffff61322d16565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614611a5f576040805162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015290519081900360640190fd5b61129a8282613242565b60088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f705780601f10610f4557610100808354040283529160200191610f70565b60105460ff16611b21576040805162461bcd60e51b815260206004820152601560248201527f546865204e75727365727920697320636c6f7365640000000000000000000000604482015290519081900360640190fd5b611b29611117565b61271003811115611b81576040805162461bcd60e51b815260206004820152601560248201527f4e6f7420656e6f7567682062756c6273206c6566740000000000000000000000604482015290519081900360640190fd5b612710611b8c611117565b10611bde576040805162461bcd60e51b815260206004820152601660248201527f53616c652068617320616c726561647920656e64656400000000000000000000604482015290519081900360640190fd5b600081118015611bef575060148111155b611c2a5760405162461bcd60e51b81526004018080602001828103825260308152602001806146746030913960400191505060405180910390fd5b612710611c3e611c38611117565b83613377565b1115611c91576040805162461bcd60e51b815260206004820152601860248201527f45786365656473204d41585f43525950544f5243484944530000000000000000604482015290519081900360640190fd5b611ca2611c9c611d9e565b826133d1565b341015611ce05760405162461bcd60e51b81526004018080602001828103825260238152602001806145b96023913960400191505060405180910390fd5b60005b8181101561129a57611cf56030613053565b6000611d016030612f15565b6040805160a0810182526006606082019081527f6772616e756d0000000000000000000000000000000000000000000000000000608083015281526000196020808301919091526000828401819052848152600f8252929092208151805194955091939092611d749284929101906141db565b5060208201516001820155604090910151600290910155611d95338261342a565b50600101611ce3565b600080611da9611117565b90506126ac8110611dc557670de0b6b3a7640000915050610f78565b61251c8110611ddf576708e1bc9bf0400000915050610f78565b611d4c8110611df957670470de4df8200000915050610f78565b610dac8110611e13576702386f26fc100000915050610f78565b6105dc8110611e2d5767011c37937e080000915050610f78565b6101f48110611e465766d529ae9e860000915050610f78565b668e1bc9bf040000915050610f78565b5090565b600081565b611e676129ea565b6001600160a01b0316826001600160a01b03161415611ecd576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060066000611eda6129ea565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611f1e6129ea565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b611f6f6110c36129ea565b611faa5760405162461bcd60e51b81526004018080602001828103825260278152602001806144ab6027913960400191505060405180910390fd5b611fb3816115fc565b611fef576040805182815290517ff4a991ad9e7f9711696f7bd41529beb4c470d75788573535d4ca3f0857c79ce89181900360200190a161110d565b6000818152600f602052604081206002810154600182015491929091612013613444565b03905060006120258262093a80613448565b90508083111561206b576040805186815290517ff4a991ad9e7f9711696f7bd41529beb4c470d75788573535d4ca3f0857c79ce89181900360200190a15050505061110d565b6000612078846001613377565b60028601819055604080518881526020810183905281519293507f674d81537534435d24d5bc9f92955722ba22b136d98346a01ad4777f48b5581c929081900390910190a1505050505050565b6120cd6129ea565b6001600160a01b03166120de611997565b6001600160a01b031614612139576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6010805460ff19166001179055565b6000612152614255565b6000838152600f60209081526040918290208251815460026001821615610100026000190190911604601f810184900490930281016080908101909452606081018381529093919284928491908401828280156121f05780601f106121c5576101008083540402835291602001916121f0565b820191906000526020600020905b8154815290600101906020018083116121d357829003601f168201915b50505050508152602001600182015481526020016002820154815250509050806020015160001415612226576000915050610edf565b6000198160200151141561223e576001915050610edf565b60408101516020820151600090612253613444565b03905060006122658262093a80613448565b905060006122768362093a806134b2565b90508184141561228e57600295505050505050610edf565b8161229a856001613377565b1480156122a85750612a3081105b156122bb57600295505050505050610edf565b5060039695505050505050565b6122d36118dd6129ea565b61230e5760405162461bcd60e51b81526004018080602001828103825260318152602001806146ec6031913960400191505060405180910390fd5b61231a84848484613517565b50505050565b60608061232c836114f7565b509192506001915061233b9050565b61234484612148565b600381111561234f57fe5b141561242d5761235d6116a6565b6040518060600160405280602e81526020016143ce602e91396040516020018083805190602001908083835b602083106123a85780518252601f199092019160209182019101612389565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106123f05780518252601f1990920191602091820191016123d1565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610edf565b600261243884612148565b600381111561244357fe5b14156125b4576124516116a6565b60376000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561249657818101518382015260200161247e565b50505050905090810190601f1680156124c35780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b6020831061251e5780518252601f1990920191602091820191016124ff565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156125975780601f10612575576101008083540402835291820191612597565b820191906000526020600020905b815481529060010190602001808311612583575b505092505050604051602081830303815290604052915050610edf565b6125bc6116a6565b60386000836040516020018080602001828103825283818151815260200191508051906020019080838360005b838110156126015781810151838201526020016125e9565b50505050905090810190601f16801561262e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000206040516020018083805190602001908083835b602083106126895780518252601f19909201916020918201910161266a565b6001836020036101000a038019825116818451168082178552505050505050905001828054600181600116156101000203166002900480156127025780601f106126e0576101008083540402835291820191612702565b820191906000526020600020905b8154815290600101906020018083116126ee575b505060408051601f198184030181529190529695505050505050565b60008181526020819052604081206112c990612b0d565b600f6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156127cc5780601f106127a1576101008083540402835291602001916127cc565b820191906000526020600020905b8154815290600101906020018083116127af57829003601f168201915b5050505050908060010154908060020154905083565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b600082815260208190526040902060020154612823906112506129ea565b6113355760405162461bcd60e51b81526004018080602001828103825260308152602001806144fe6030913960400191505060405180910390fd5b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6128b76129ea565b6001600160a01b03166128c8611997565b6001600160a01b031614612923576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166129685760405162461bcd60e51b81526004018080602001828103825260268152602001806143a86026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b612a3081565b60006112c960038363ffffffff61356916565b3390565b6000818152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190612a30826115ce565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612a74826129d7565b612aaf5760405162461bcd60e51b815260040180806020018281038252602c8152602001806144d2602c913960400191505060405180910390fd5b6000612aba836115ce565b9050806001600160a01b0316846001600160a01b03161480612af55750836001600160a01b0316612aea84610f7b565b6001600160a01b0316145b80612b055750612b058185612881565b949350505050565b60006112c982612f15565b826001600160a01b0316612b2b826115ce565b6001600160a01b031614612b705760405162461bcd60e51b815260040180806020018281038252602981526020018061464b6029913960400191505060405180910390fd5b6001600160a01b038216612bb55760405162461bcd60e51b81526004018080602001828103825260248152602001806144616024913960400191505060405180910390fd5b612bc0838383613575565b612bcb6000826129ee565b6001600160a01b0383166000908152600260205260409020612bf3908263ffffffff6135d516565b506001600160a01b0382166000908152600260205260409020612c1c908263ffffffff6135e116565b50612c2f6003828463ffffffff6135ed16565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000828152602081905260409020612c94908263ffffffff61360316565b1561129a57612ca16129ea565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006112c68383613618565b6000828152602081905260409020612d0f908263ffffffff61367c16565b1561129a57612d1c6129ea565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b612d686114ee565b612db9576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612dec6129ea565b604080516001600160a01b039092168252519081900360200190a1565b6000612e14826115ce565b9050612e2281600084613575565b612e2d6000836129ee565b6000828152600960205260409020546002600019610100600184161502019091160415612e6b576000828152600960205260408120612e6b91614276565b6001600160a01b0381166000908152600260205260409020612e93908363ffffffff6135d516565b50612ea560038363ffffffff61369116565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080612ef1868661369d565b9097909650945050505050565b6000612f0b848484613718565b90505b9392505050565b5490565b6001600160a01b038216612f74576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612f7d816129d7565b15612fcf576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612fdb60008383613575565b6001600160a01b0382166000908152600260205260409020613003908263ffffffff6135e116565b506130166003828463ffffffff6135ed16565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80546001019055565b60006032547f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156130d757600080fd5b505afa1580156130eb573d6000803e3d6000fd5b505050506040513d602081101561310157600080fd5b505110156131405760405162461bcd60e51b815260040180806020018281038252602981526020018061437f6029913960400191505060405180910390fd5b61314f603154603254846137e2565b600081815260366020908152604091829020869055815183815291519293507fe5f5b44d72d4143c278eb745c4acc0695c4a5bc616be5beecf46abe29661780e92918290030190a192915050565b6131a56114ee565b156131f7576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612dec6129ea565b60006112c6836001600160a01b0384166139a4565b600082815260366020908152604080832054808452600f9092529091206060613275613270856127106134b2565b6139bc565b805190915061328a90839060208401906141db565b50613293613444565b600183015560006132a3846115ce565b90507f7313be463d71a79047d01fb641b7aaf895b37a35b44b91ed31ae512266e80f2884836132d0613444565b846040518085815260200180602001848152602001836001600160a01b03166001600160a01b03168152602001828103825285818151815260200191508051906020019080838360005b8381101561333257818101518382015260200161331a565b50505050905090810190601f16801561335f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1505050505050565b6000828201838110156112c6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826133e0575060006112c9565b828202828482816133ed57fe5b04146112c65760405162461bcd60e51b81526004018080602001828103825260218152602001806145fe6021913960400191505060405180910390fd5b61129a828260405180602001604052806000815250613aa8565b4290565b600080821161349e576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816134a957fe5b04949350505050565b600081613506576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b81838161350f57fe5b069392505050565b613522848484612b18565b61352e84848484613afa565b61231a5760405162461bcd60e51b815260040180806020018281038252603281526020018061434d6032913960400191505060405180910390fd5b60006112c683836139a4565b6001600160a01b038216158061358f575061358f816115fc565b6135ca5760405162461bcd60e51b81526004018080602001828103825260278152602001806146c56027913960400191505060405180910390fd5b6110b3838383613cbc565b60006112c68383613cc7565b60006112c68383613d8d565b6000612f0b84846001600160a01b038516613dd7565b60006112c6836001600160a01b038416613d8d565b8154600090821061365a5760405162461bcd60e51b81526004018080602001828103825260228152602001806142d16022913960400191505060405180910390fd5b82600001828154811061366957fe5b9060005260206000200154905092915050565b60006112c6836001600160a01b038416613cc7565b60006112c68383613e6e565b8154600090819083106136e15760405162461bcd60e51b81526004018080602001828103825260228152602001806145dc6022913960400191505060405180910390fd5b60008460000184815481106136f257fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816137b35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613778578181015183820152602001613760565b50505050905090810190601f1680156137a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106137c657fe5b9060005260206000209060020201600101549150509392505050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795285878660405160200180838152602001828152602001925050506040516020818303038152906040526040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156138c75781810151838201526020016138af565b50505050905090810190601f1680156138f45780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561391557600080fd5b505af1158015613929573d6000803e3d6000fd5b505050506040513d602081101561393f57600080fd5b50506000848152600e602052604081205461395f90869085903090613f42565b6000868152600e602052604090205490915061398290600163ffffffff61337716565b6000868152600e602052604090205561399b8582613f89565b95945050505050565b60009081526001919091016020526040902054151590565b606060005b600a811015613aa257601181600a81106139d757fe5b601091828204019190066002029054906101000a900461ffff1661ffff168311613a9a57601281600a8110613a0857fe5b01805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015613a8d5780601f10613a6257610100808354040283529160200191613a8d565b820191906000526020600020905b815481529060010190602001808311613a7057829003601f168201915b5050505050915050610edf565b6001016139c1565b50919050565b613ab28383612f19565b613abf6000848484613afa565b6110b35760405162461bcd60e51b815260040180806020018281038252603281526020018061434d6032913960400191505060405180910390fd5b6000613b0e846001600160a01b0316613fb5565b613b1a57506001612b05565b6060613c6a630a85bd0160e11b613b2f6129ea565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613ba8578181015183820152602001613b90565b50505050905090810190601f168015613bd55780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180606001604052806032815260200161434d603291396001600160a01b038816919063ffffffff613fbb16565b90506000818060200190516020811015613c8357600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b6110b3838383613fca565b60008181526001830160205260408120548015613d835783546000198083019190810190600090879083908110613cfa57fe5b9060005260206000200154905080876000018481548110613d1757fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613d4757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506112c9565b60009150506112c9565b6000613d9983836139a4565b613dcf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556112c9565b5060006112c9565b600082815260018401602052604081205480613e3c575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612f0e565b82856000016001830381548110613e4f57fe5b9060005260206000209060020201600101819055506000915050612f0e565b60008181526001830160205260408120548015613d835783546000198083019190810190600090879083908110613ea157fe5b9060005260206000209060020201905080876000018481548110613ec157fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080613f0057fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506112c99350505050565b60408051602080820196909652808201949094526001600160a01b039290921660608401526080808401919091528151808403909101815260a09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b3b151590565b6060612f0b8484600085614019565b613fd58383836110b3565b613fdd6114ee565b156110b35760405162461bcd60e51b815260040180806020018281038252602b8152602001806142f3602b913960400191505060405180910390fd5b60608247101561405a5760405162461bcd60e51b81526004018080602001828103825260268152602001806144856026913960400191505060405180910390fd5b61406385613fb5565b6140b4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106140f35780518252601f1990920191602091820191016140d4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614155576040519150601f19603f3d011682016040523d82523d6000602084013e61415a565b606091505b509150915061416a828286614175565b979650505050505050565b60608315614184575081612f0e565b8251156141945782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315613778578181015183820152602001613760565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061421c57805160ff1916838001178555614249565b82800160010185558215614249579182015b8281111561424957825182559160200191906001019061422e565b50611e569291506142b6565b60405180606001604052806060815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f1061429c575061110d565b601f01602090049060005260206000209081019061110d91905b610f7891905b80821115611e5657600081556001016142bc56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732315061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724e6f7420656e6f756768204c494e4b202d206765726d696e6174696f6e20756e617661696c61626c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373516d5764316d6e374475477978394279664e6571437367645355734a5a316372616769746761796773714476456d4765726d696e6174696f6e2073746172747320323032312d30342d31325431363a30303a30305a4552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f2070617573654552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c7920746865204f776e65722063616e20776174657220612043727970744f72636869642e4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e45746865722076616c75652073656e742069732062656c6f7720746865207072696365456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e596f752063616e20706c616e74206d696e696d756d20312c206d6178696d756d2032302043727970744f7263686964734552433732313a20617070726f76616c20746f2063757272656e74206f776e6572446561642043727970744f7263686964732063616e6e6f74206265207472616e736665727265644552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644f6e6c7920746865204f776e65722063616e206765726d696e61746520612043727970744f72636869642e4f6e6c7920746865204f776e65722063616e20636f6d706f737420612043727970744f72636869642e4552433732315072657365744d696e7465725061757365724175746f49643a206d7573742068617665206d696e74657220726f6c6520746f206d696e744552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732315072657365744d696e7465725061757365724175746f49643a206d75737420686176652070617573657220726f6c6520746f20756e7061757365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220af129c17f1e0c56d9a3759a97aa81fab23fc2c23763be7aee2248a77997155c764736f6c63430006060033

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

000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

-----Decoded View---------------
Arg [0] : _VRFCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [1] : _LinkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [2] : _keyhash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

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


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

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