ETH Price: $3,391.50 (-1.46%)
Gas: 2 Gwei

Contract

0xf869018c81EaD1903710717D7154b56672805D62
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040153739062022-08-19 22:27:29679 days ago1660948049IN
 Create: GribbleNFT
0 ETH0.0818053321.46197261

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GribbleNFT

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 18 : GribbleNFT.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "./VRFConsumerBaseV2Upgradeable.sol";

contract GribbleNFT is
    ERC721EnumerableUpgradeable,
    OwnableUpgradeable,
    ReentrancyGuardUpgradeable,
    VRFConsumerBaseV2Upgradeable
{
    using StringsUpgradeable for string;
    using SafeMathUpgradeable for uint256;
    using SafeMathUpgradeable for uint64;

    // Core Data Structures that will never change
    // WARNING: You must not reorder any data nor initialize it via assignment
    struct Gribble {
        uint256 geneSeed;
        uint256 bornAt;
        uint256 generation;
    }

    Gribble[] public gribbles;

    // Max Token Supply
    uint256 public maxMintSupply;
    uint256 public maxClaimSupply;

    // Used Token Supply
    uint256 public currentMintSupply;
    uint256 public currentClaimSupply;

    // Metadata URI
    string public baseTokenURI;

    // Raw Mint Price
    uint256 public rawMintPrice;

    // Contract Flags
    bool public isClaimOpen;
    bool public isAllowListOpen;
    bool public isFCFSMintOpen;

    uint256 private constant MAX_INT = type(uint256).max;

    // Chainlink Systems
    // Chainlink subscription ID.
    uint64 private s_subscriptionId;
    // Chainlink Coordinator
    // solhint-disable var-name-mixedcase
    VRFCoordinatorV2Interface private COORDINATOR;
    // Chainlink Gas Lane
    bytes32 private s_keyHash;
    // Chainlink Gas Limit
    uint32 private callbackGasLimit;
    // Chainlink Confirmations Needed
    uint16 private requestConfirmations;
    // map a request ID to a tokenID
    mapping(uint256 => uint256) private s_geneRequests;

    // Genesis Holder mapping from ID to amount remaining to mint
    mapping(address => uint256) private _genesisHolders;
    // Play to Mint and Partner Access
    mapping(address => uint256) private _play2MintAllowlist;
    // Events
    event GenomeRolled(uint256 indexed requestId, uint256 indexed gribbleId);
    event GenomeLanded(uint256 indexed requestId, uint256 indexed result);
    event Mint(address indexed user, bool indexed isClaimMint, uint256 amount);

    // initialize is the replacement for a constructor
    function initialize(
        string memory name,
        string memory symbol,
        string memory default_uri,
        uint64 subscriptionId,
        address vrfCoordinator,
        bytes32 vrfKeyhash
    ) public initializer {
        // Global statics are here instead of in contract due to needing to keep datastructure uninitialized
        //address vrfCoordinator = 0xb3dCcb4Cf7a26f6cf6B120Cf5A73875B7BBc655B;

        // With no Constructors, parents must be manually initialized
        __ReentrancyGuard_init();
        __ERC721Enumerable_init();
        __ERC721_init(name, symbol);
        __Ownable_init();
        __VRFConsumerBaseV2_init(vrfCoordinator);
        // Set the API
        setBaseURI(default_uri);
        // Setup Chainlink
        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        s_keyHash = vrfKeyhash;
        s_subscriptionId = subscriptionId;
        callbackGasLimit = 40000;
        requestConfirmations = 3;
        rawMintPrice = 0.03 ether;
        maxMintSupply = 10000;
        maxClaimSupply = 10000;
    }

    // Token URI overrides
    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    // Contract Ops Section
    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseTokenURI = _newBaseURI;
    }

    function setMaxMintSupply(uint256 _supply) public onlyOwner {
        maxMintSupply = _supply;
    }

    function setMaxClaimSupply(uint256 _supply) public onlyOwner {
        maxClaimSupply = _supply;
    }

    function setClaimMints(bool _status) public onlyOwner {
        isClaimOpen = _status;
    }

    function setAllowlistMints(bool _status) public onlyOwner {
        isAllowListOpen = _status;
    }

    function setFCFSMints(bool _status) public onlyOwner {
        isFCFSMintOpen = _status;
    }

    // Chainlink variables

    function setKeyhash(bytes32 _keyhash) public onlyOwner {
        s_keyHash = _keyhash;
    }

    function setVrfCoordinator(address _coordinator) public onlyOwner {
        COORDINATOR = VRFCoordinatorV2Interface(_coordinator);
    }

    function setCallbackGasLimit(uint32 _gaslimit) public onlyOwner {
        callbackGasLimit = _gaslimit;
    }

    function setRequestConfirmations(uint16 _requestConfirmations)
        public
        onlyOwner
    {
        requestConfirmations = _requestConfirmations;
    }

    // Genetics Section
    function _rollGenetics(uint256 _gribbleId)
        private
        returns (uint256 requestId)
    {
        require(
            gribbles[_gribbleId].geneSeed == 0 ||
                gribbles[_gribbleId].geneSeed == MAX_INT,
            "Already rolled"
        );
        require(_gribbleId <= totalSupply(), "Can't roll yet");
        uint32 numWords = 1;
        // Will revert if subscription is not set and funded.
        requestId = COORDINATOR.requestRandomWords(
            s_keyHash,
            s_subscriptionId,
            requestConfirmations,
            callbackGasLimit,
            numWords
        );

        s_geneRequests[requestId] = _gribbleId;
        // Need a sentinal value to check if someone is rolling that is non zero
        gribbles[_gribbleId].geneSeed = MAX_INT;
        emit GenomeRolled(requestId, _gribbleId);
    }

    function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWord)
        internal
        override
    {
        // Got our randomness
        // Find which gribble we are talking about
        uint256 gribbleId = s_geneRequests[_requestId];

        uint256 finalSeed = _randomWord[0];

        // Ensure non-reuse of sentinal
        finalSeed = _randomWord[0] % MAX_INT.sub(1);
        // assign the transformed value to the address in the geneSeed
        // It should never be 0 nor MAX_INT

        gribbles[gribbleId].geneSeed = finalSeed.add(1);

        // emitting event to signal that Gene landed
        emit GenomeLanded(_requestId, gribbles[gribbleId].geneSeed);
    }

    function gribbleGeneSeed(uint256 _gribbleId) public view returns (uint256) {
        require(gribbles[_gribbleId].geneSeed != 0, "No seed");
        require(
            gribbles[_gribbleId].geneSeed != MAX_INT,
            "In progress"
        );
        return gribbles[_gribbleId].geneSeed;
    }

    // Allowlist/Claimlist Section

    // add amounts to Holder Lists
    function addToClaimlist(address[] calldata _addresses, uint256[] calldata _values)
        external
        onlyOwner
    {
        require(_addresses.length == _values.length);
        for (uint256 i = 0; i < _addresses.length; i++) {
            _genesisHolders[_addresses[i]] += _values[i];
        }
    }

    function addToPlay2Mint(address[] calldata _addresses, uint256[] calldata _values)
        external
        onlyOwner
    {
        for (uint256 i = 0; i < _addresses.length; i++) {
            require(_addresses[i] != address(0), "Bad address");
            _play2MintAllowlist[_addresses[i]] += _values[i];
        }
    }

    // Mint Section

    // Claim mints for Breaker Holders
    function claimMint(uint256 _numberOfTokens) public nonReentrant {
        claimListOpen();
        // Claim Amount Checks
        require(_numberOfTokens > 0 && _numberOfTokens < 21, "1 to 20 only");

        // Check max supply
        require(hasClaimSupply(_numberOfTokens), "Max supply");

        // Check Claim Size and List
        require(_numberOfTokens <= _genesisHolders[msg.sender], "Claim less");

        _genesisHolders[msg.sender] -= _numberOfTokens;
        currentClaimSupply += _numberOfTokens;
        for (uint256 i = 0; i < _numberOfTokens; i++) {
            _generateGribble(msg.sender);
        }
        
        emit Mint(msg.sender, true, _numberOfTokens);
    }

    // Genesis Mint a number of NFTs
    function genesisMint(uint256 _numberOfTokens) public payable nonReentrant {
        publicMintOpen();
        // Mint Amount Checks
        require(_numberOfTokens > 0 && _numberOfTokens < 21, "1 to 20 only");

        // Check max supply
        require(hasMintSupply(_numberOfTokens), "Max supply");

        // Money Checks
        require(rawMintPrice.mul(_numberOfTokens) <= msg.value, "ETH too low");

        // Play2Mint Checks
        if (!isFCFSMintOpen) {
            require(
                _numberOfTokens <= _play2MintAllowlist[msg.sender],
                "Bad mint amount"
            );
            // If they are on the allow list, use up their slots
            _play2MintAllowlist[msg.sender] -= _numberOfTokens;
        }

        currentMintSupply += _numberOfTokens;

        // All clear let's mint
        for (uint256 i = 0; i < _numberOfTokens; i++) {
            _generateGribble(msg.sender);
        }

        emit Mint(msg.sender, false, _numberOfTokens);
    }

    // Private NFT Generator
    function _generateGribble(address _owner) private {
        // Create a gribble with a 0 seed and a timestamp
        Gribble memory gribble = Gribble(0, block.timestamp,0);
        gribbles.push(gribble);

        // Get next token id
        uint256 gribbleId = totalSupply();

        _safeMint(_owner, gribbleId);
        _rollGenetics(gribbleId);
    }

    // Modifiers
    // Set to functions to lower code size
    function claimListOpen() private view {
        require(isClaimOpen, "Claims closed");
    }

    function publicMintOpen() private view {
        require(isAllowListOpen || isFCFSMintOpen, "Mints closed");
    }

    function hasAnySupply(uint256 _numberOfTokens) public view returns (bool) {
        uint256 gribbleSupply = totalSupply();
        return gribbleSupply.add(_numberOfTokens) <= maxMintSupply.add(maxClaimSupply);
    }

    function hasClaimSupply(uint256 _numberOfTokens) public view returns (bool) {
        return currentClaimSupply.add(_numberOfTokens) <= maxClaimSupply;
    }
    function hasMintSupply(uint256 _numberOfTokens) public view returns (bool) {
        return currentMintSupply.add(_numberOfTokens) <= maxMintSupply;
    }

    // Views
    function canAllowlistMint(uint256 _amount)
        public
        view
        returns (bool allowed)
    {
        if (
            _amount > 0 &&
            hasMintSupply(_amount) &&
            _amount <= _play2MintAllowlist[msg.sender]
        ) {
            allowed = true;
        }
    }

    function canClaimListMint(uint256 _amount)
        public
        view
        returns (bool allowed)
    {
        if (
            _amount > 0 &&
            hasClaimSupply(_amount) &&
            _amount <= _genesisHolders[msg.sender]
        ) {
            allowed = true;
        }
    }

    // From wallet to number of mints
    function getAllowlistMintsRemaining(address _address)
        public
        view
        returns (uint256)
    {
        return _play2MintAllowlist[_address];
    }

    function getClaimlistMintsRemaining(address _address)
        public
        view
        returns (uint256)
    {
        return _genesisHolders[_address];
    }

    // Web3 Economics
    // TODO: Decide on if we want a treasury withdrawal address
    function withdrawAll() public onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0, "Empty");
        payable(msg.sender).transfer(balance);
    }

}

File 2 of 18 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

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

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

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

    uint256 private _status;

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

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

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

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

        _;

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 3 of 18 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 18 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 5 of 18 : SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMathUpgradeable {
    /**
     * @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) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

    /**
     * @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) {
        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) {
        return a * b;
    }

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    function __ERC721Enumerable_init() internal onlyInitializing {
    }

    function __ERC721Enumerable_init_unchained() internal onlyInitializing {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[46] private __gap;
}

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

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

File 8 of 18 : VRFConsumerBaseV2Upgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

abstract contract VRFConsumerBaseV2Upgradeable is Initializable {
    error OnlyCoordinatorCanFulfill(address have, address want);
    address private vrfCoordinator;

    /**
     * @param vrfCoordinator_ address of VRFCoordinator contract
     */
    // solhint-disable func-name-mixedcase
    function __VRFConsumerBaseV2_init(address vrfCoordinator_)
        internal
        onlyInitializing
    {
        __VRFConsumerBaseV2_unchained(vrfCoordinator_);
    }

    // solhint-disable func-name-mixedcase
    function __VRFConsumerBaseV2_unchained(address vrfCoordinator_)
        internal
        onlyInitializing
    {
        vrfCoordinator = vrfCoordinator_;
    }

    /**
     * @notice fulfillRandomness handles the VRF response. Your contract must
     * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
     * @notice principles to keep in mind when implementing your fulfillRandomness
     * @notice method.
     *
     * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
     * @dev signature, and will call it once it has verified the proof
     * @dev associated with the randomness. (It is triggered via a call to
     * @dev rawFulfillRandomness, below.)
     *
     * @param requestId The Id initially returned by requestRandomness
     * @param randomWords the VRF output expanded to the requested number of words
     */
    function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords)
        internal
        virtual;

    // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
    // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
    // the origin of the call
    function rawFulfillRandomWords(
        uint256 requestId,
        uint256[] memory randomWords
    ) external {
        if (msg.sender != vrfCoordinator) {
            revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
        }
        fulfillRandomWords(requestId, randomWords);
    }
}

File 9 of 18 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 10 of 18 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

File 11 of 18 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 12 of 18 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721_init_unchained(name_, symbol_);
    }

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

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

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

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

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

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token 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: caller is not token owner nor approved");
        _safeTransfer(from, to, tokenId, data);
    }

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

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

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

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

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

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

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

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

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

        _afterTokenTransfer(address(0), to, tokenId);
    }

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

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

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

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

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

        _afterTokenTransfer(owner, address(0), tokenId);
    }

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[44] private __gap;
}

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

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

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

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

    /**
     * @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 14 of 18 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * 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;

    /**
     * @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 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 15 of 18 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"result","type":"uint256"}],"name":"GenomeLanded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"gribbleId","type":"uint256"}],"name":"GenomeRolled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"bool","name":"isClaimMint","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"addToClaimlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"addToPlay2Mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"canAllowlistMint","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"canClaimListMint","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"claimMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentClaimSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"genesisMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getAllowlistMintsRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getClaimlistMintsRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gribbleId","type":"uint256"}],"name":"gribbleGeneSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gribbles","outputs":[{"internalType":"uint256","name":"geneSeed","type":"uint256"},{"internalType":"uint256","name":"bornAt","type":"uint256"},{"internalType":"uint256","name":"generation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"hasAnySupply","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"hasClaimSupply","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"hasMintSupply","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"default_uri","type":"string"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"vrfKeyhash","type":"bytes32"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAllowListOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isClaimOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFCFSMintOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxClaimSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rawMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setAllowlistMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_gaslimit","type":"uint32"}],"name":"setCallbackGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setClaimMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setFCFSMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyhash","type":"bytes32"}],"name":"setKeyhash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setMaxClaimSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setMaxMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_requestConfirmations","type":"uint16"}],"name":"setRequestConfirmations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_coordinator","type":"address"}],"name":"setVrfCoordinator","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":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50614452806100206000396000f3fe6080604052600436106103555760003560e01c8063853828b6116101bb578063baf20eef116100f7578063d547cfb711610095578063e84cc3b31161006f578063e84cc3b3146109f1578063e985e9c514610a08578063f2fde38b14610a5e578063fb5d96c314610a7e57600080fd5b8063d547cfb71461099c578063dafb6637146109b1578063e20da9fa146109d157600080fd5b8063c285e107116100d1578063c285e10714610925578063c87b56dd1461093c578063c8c011c71461095c578063d0e47cd01461097c57600080fd5b8063baf20eef146108d7578063bd34103c146108f7578063be98a05f1461090e57600080fd5b80639de986ab11610164578063a4eb718c1161013e578063a4eb718c14610857578063a7ffb4af14610877578063adcc7d0f14610897578063b88d4fde146108b757600080fd5b80639de986ab146107d3578063a22cb46514610817578063a2656cff1461083757600080fd5b80638da5cb5b116101955780638da5cb5b14610773578063909accd11461079e57806395d89b41146107be57600080fd5b8063853828b61461071e5780638824f5a7146107335780638c424f091461075357600080fd5b8063313490211161029557806355f804b3116102335780636352211e1161020d5780636352211e146106a957806370a08231146106c9578063715018a6146106e95780637389fbb7146106fe57600080fd5b806355f804b3146106485780635aa7db9b146106685780636309b7731461068957600080fd5b80633f2ea3ef1161026f5780633f2ea3ef146105d157806342842e0e146105f15780634a8c4034146106115780634f6ccce71461062857600080fd5b80633134902114610571578063352f99f3146105915780633b067cd2146105b157600080fd5b8063154aa4231161030257806323b872dd116102dc57806323b872dd146104d257806324fd2652146104f2578063292281571461050d5780632f745c591461055157600080fd5b8063154aa4231461047357806318160ddd146104935780631fe543e3146104b257600080fd5b80630913b048116103335780630913b048146103f6578063095ea7b3146104315780630c1561161461045357600080fd5b806301ffc9a71461035a57806306fdde031461038f578063081812fc146103b1575b600080fd5b34801561036657600080fd5b5061037a610375366004613b9b565b610a91565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610aed565b6040516103869190613c2e565b3480156103bd57600080fd5b506103d16103cc366004613c41565b610b7f565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610386565b34801561040257600080fd5b50610416610411366004613c41565b610bb3565b60408051938452602084019290925290820152606001610386565b34801561043d57600080fd5b5061045161044c366004613c7e565b610be7565b005b34801561045f57600080fd5b5061045161046e366004613cb8565b610d45565b34801561047f57600080fd5b5061045161048e366004613cb8565b610d7f565b34801561049f57600080fd5b506099545b604051908152602001610386565b3480156104be57600080fd5b506104516104cd366004613d51565b610dbf565b3480156104de57600080fd5b506104516104ed366004613e03565b610e42565b3480156104fe57600080fd5b506101355461037a9060ff1681565b34801561051957600080fd5b506104a4610528366004613e3f565b73ffffffffffffffffffffffffffffffffffffffff166000908152610139602052604090205490565b34801561055d57600080fd5b506104a461056c366004613c7e565b610ec9565b34801561057d57600080fd5b5061037a61058c366004613c41565b610f7e565b34801561059d57600080fd5b506104516105ac366004613cb8565b610fa2565b3480156105bd57600080fd5b5061037a6105cc366004613c41565b610fe3565b3480156105dd57600080fd5b5061037a6105ec366004613c41565b61101d565b3480156105fd57600080fd5b5061045161060c366004613e03565b611039565b34801561061d57600080fd5b506104a46101345481565b34801561063457600080fd5b506104a4610643366004613c41565b611054565b34801561065457600080fd5b50610451610663366004613ef0565b6110f8565b34801561067457600080fd5b506101355461037a9062010000900460ff1681565b34801561069557600080fd5b506104516106a4366004613c41565b611114565b3480156106b557600080fd5b506103d16106c4366004613c41565b611122565b3480156106d557600080fd5b506104a46106e4366004613e3f565b611194565b3480156106f557600080fd5b50610451611248565b34801561070a57600080fd5b50610451610719366004613c41565b61125c565b34801561072a57600080fd5b5061045161126a565b34801561073f57600080fd5b5061045161074e366004613f25565b6112ed565b34801561075f57600080fd5b5061045161076e366004613e3f565b611333565b34801561077f57600080fd5b5060c95473ffffffffffffffffffffffffffffffffffffffff166103d1565b3480156107aa57600080fd5b506101355461037a90610100900460ff1681565b3480156107ca57600080fd5b506103a4611392565b3480156107df57600080fd5b506104a46107ee366004613e3f565b73ffffffffffffffffffffffffffffffffffffffff16600090815261013a602052604090205490565b34801561082357600080fd5b50610451610832366004613f49565b6113a1565b34801561084357600080fd5b50610451610852366004613fc8565b6113ac565b34801561086357600080fd5b50610451610872366004614034565b6114f9565b34801561088357600080fd5b50610451610892366004613c41565b611539565b3480156108a357600080fd5b506104a46108b2366004613c41565b611547565b3480156108c357600080fd5b506104516108d236600461405a565b611681565b3480156108e357600080fd5b506104516108f2366004613c41565b61170f565b34801561090357600080fd5b506104a46101325481565b34801561091a57600080fd5b506104a46101305481565b34801561093157600080fd5b506104a461012f5481565b34801561094857600080fd5b506103a4610957366004613c41565b611928565b34801561096857600080fd5b50610451610977366004613fc8565b61198f565b34801561098857600080fd5b5061037a610997366004613c41565b611a54565b3480156109a857600080fd5b506103a4611a93565b3480156109bd57600080fd5b506104516109cc3660046140d6565b611b22565b3480156109dd57600080fd5b5061037a6109ec366004613c41565b611d9e565b3480156109fd57600080fd5b506104a46101315481565b348015610a1457600080fd5b5061037a610a23366004614190565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b348015610a6a57600080fd5b50610451610a79366004613e3f565b611dd9565b610451610a8c366004613c41565b611e76565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610ae75750610ae7826120f1565b92915050565b606060658054610afc906141ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b28906141ba565b8015610b755780601f10610b4a57610100808354040283529160200191610b75565b820191906000526020600020905b815481529060010190602001808311610b5857829003601f168201915b5050505050905090565b6000610b8a826121d4565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b61012e8181548110610bc457600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6000610bf282611122565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c9b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610cc45750610cc48133610a23565b610d365760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610c92565b610d408383612245565b505050565b610d4d6122e5565b61013580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b610d876122e5565b6101358054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b61012d5473ffffffffffffffffffffffffffffffffffffffff163314610e345761012d546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610c92565b610e3e828261234c565b5050565b610e4c338261245c565b610ebe5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610c92565b610d4083838361251c565b6000610ed483611194565b8210610f485760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c92565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152609760209081526040808320938352929052205490565b600061012f54610f9a836101315461275a90919063ffffffff16565b111592915050565b610faa6122e5565b610135805491151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909216919091179055565b600080610fef60995490565b905061100a6101305461012f5461275a90919063ffffffff16565b611014828561275a565b11159392505050565b600061013054610f9a836101325461275a90919063ffffffff16565b610d4083838360405180602001604052806000815250611681565b600061105f60995490565b82106110d35760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c92565b609982815481106110e6576110e661420e565b90600052602060002001549050919050565b6111006122e5565b8051610e3e90610133906020840190613ad4565b61111c6122e5565b61013655565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610ae75760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c92565b600073ffffffffffffffffffffffffffffffffffffffff821661121f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610c92565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b6112506122e5565b61125a6000612766565b565b6112646122e5565b61012f55565b6112726122e5565b47806112c05760405162461bcd60e51b815260206004820152600560248201527f456d7074790000000000000000000000000000000000000000000000000000006044820152606401610c92565b604051339082156108fc029083906000818181858888f19350505050158015610e3e573d6000803e3d6000fd5b6112f56122e5565b610137805461ffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff909216919091179055565b61133b6122e5565b610135805473ffffffffffffffffffffffffffffffffffffffff9092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055565b606060668054610afc906141ba565b610e3e3383836127dd565b6113b46122e5565b60005b838110156114f25760008585838181106113d3576113d361420e565b90506020020160208101906113e89190613e3f565b73ffffffffffffffffffffffffffffffffffffffff16141561144c5760405162461bcd60e51b815260206004820152600b60248201527f42616420616464726573730000000000000000000000000000000000000000006044820152606401610c92565b82828281811061145e5761145e61420e565b9050602002013561013a600087878581811061147c5761147c61420e565b90506020020160208101906114919190613e3f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114da919061426c565b909155508190506114ea81614284565b9150506113b7565b5050505050565b6115016122e5565b61013780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff92909216919091179055565b6115416122e5565b61013055565b600061012e828154811061155d5761155d61420e565b906000526020600020906003020160000154600014156115bf5760405162461bcd60e51b815260206004820152600760248201527f4e6f2073656564000000000000000000000000000000000000000000000000006044820152606401610c92565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012e83815481106115f4576115f461420e565b90600052602060002090600302016000015414156116545760405162461bcd60e51b815260206004820152600b60248201527f496e2070726f67726573730000000000000000000000000000000000000000006044820152606401610c92565b61012e82815481106116685761166861420e565b9060005260206000209060030201600001549050919050565b61168b338361245c565b6116fd5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610c92565b611709848484846128f1565b50505050565b600260fb5414156117625760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c92565b600260fb5561176f61297a565b60008111801561177f5750601581105b6117cb5760405162461bcd60e51b815260206004820152600c60248201527f3120746f203230206f6e6c7900000000000000000000000000000000000000006044820152606401610c92565b6117d48161101d565b6118205760405162461bcd60e51b815260206004820152600a60248201527f4d617820737570706c79000000000000000000000000000000000000000000006044820152606401610c92565b33600090815261013960205260409020548111156118805760405162461bcd60e51b815260206004820152600a60248201527f436c61696d206c657373000000000000000000000000000000000000000000006044820152606401610c92565b3360009081526101396020526040812080548392906118a09084906142bd565b925050819055508061013260008282546118ba919061426c565b90915550600090505b818110156118e6576118d4336129cd565b806118de81614284565b9150506118c3565b5060405181815260019033907f47ecb241f51c091251ef190f29108b9dc91d2ff717fe6c7e416d6891288d5241906020015b60405180910390a350600160fb55565b6060611933826121d4565b600061193d612a89565b9050600081511161195d5760405180602001604052806000815250611988565b8061196784612a99565b6040516020016119789291906142d4565b6040516020818303038152906040525b9392505050565b6119976122e5565b8281146119a357600080fd5b60005b838110156114f2578282828181106119c0576119c061420e565b9050602002013561013960008787858181106119de576119de61420e565b90506020020160208101906119f39190613e3f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a3c919061426c565b90915550819050611a4c81614284565b9150506119a6565b60008082118015611a695750611a6982610f7e565b8015611a85575033600090815261013a60205260409020548211155b15611a8e575060015b919050565b6101338054611aa1906141ba565b80601f0160208091040260200160405190810160405280929190818152602001828054611acd906141ba565b8015611b1a5780601f10611aef57610100808354040283529160200191611b1a565b820191906000526020600020905b815481529060010190602001808311611afd57829003601f168201915b505050505081565b600054610100900460ff1615808015611b425750600054600160ff909116105b80611b5c5750303b158015611b5c575060005460ff166001145b611bce5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c92565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611c2c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611c34612bcb565b611c3c612c50565b611c468787612ccd565b611c4e612d54565b611c5783612dd9565b611c60856110f8565b61013580546101368490557fff00000000000000000000000000000000000000000000000000000000ffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8616027fffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffff1617630100000067ffffffffffffffff87160217905561013780547fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000016640300009c40179055666a94d74f4300006101345561271061012f819055610130558015611d9557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60008082118015611db35750611db38261101d565b8015611a85575033600090815261013960205260409020548211611a8e57506001919050565b611de16122e5565b73ffffffffffffffffffffffffffffffffffffffff8116611e6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c92565b611e7381612766565b50565b600260fb541415611ec95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c92565b600260fb55611ed6612e5f565b600081118015611ee65750601581105b611f325760405162461bcd60e51b815260206004820152600c60248201527f3120746f203230206f6e6c7900000000000000000000000000000000000000006044820152606401610c92565b611f3b81610f7e565b611f875760405162461bcd60e51b815260206004820152600a60248201527f4d617820737570706c79000000000000000000000000000000000000000000006044820152606401610c92565b610134543490611f979083612ecb565b1115611fe55760405162461bcd60e51b815260206004820152600b60248201527f45544820746f6f206c6f770000000000000000000000000000000000000000006044820152606401610c92565b6101355462010000900460ff1661207c5733600090815261013a60205260409020548111156120565760405162461bcd60e51b815260206004820152600f60248201527f426164206d696e7420616d6f756e7400000000000000000000000000000000006044820152606401610c92565b33600090815261013a6020526040812080548392906120769084906142bd565b90915550505b80610131600082825461208f919061426c565b90915550600090505b818110156120bb576120a9336129cd565b806120b381614284565b915050612098565b5060405181815260009033907f47ecb241f51c091251ef190f29108b9dc91d2ff717fe6c7e416d6891288d524190602001611918565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061218457507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610ae757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610ae7565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff16611e735760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c92565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416908117909155819061229f82611122565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60c95473ffffffffffffffffffffffffffffffffffffffff16331461125a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c92565b600082815261013860205260408120548251909190839082906123715761237161420e565b602002602001015190506123af60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612ed790919063ffffffff16565b836000815181106123c2576123c261420e565b60200260200101516123d49190614332565b90506123e181600161275a565b61012e83815481106123f5576123f561420e565b600091825260209091206003909102015561012e80548390811061241b5761241b61420e565b60009182526020822060039091020154604051909186917feceefc211a893e2b4c0de7b52e718d98910586bb0697e98c394ac1a3335a1b3b9190a350505050565b60008061246883611122565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806124d6575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b8061251457508373ffffffffffffffffffffffffffffffffffffffff166124fc84610b7f565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff1661253c82611122565b73ffffffffffffffffffffffffffffffffffffffff16146125c55760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610c92565b73ffffffffffffffffffffffffffffffffffffffff821661264d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c92565b612658838383612ee3565b612663600082612245565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906126999084906142bd565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906126d490849061426c565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611988828461426c565b60c9805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128595760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c92565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6128fc84848461251c565b61290884848484612fe9565b6117095760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c92565b6101355460ff1661125a5760405162461bcd60e51b815260206004820152600d60248201527f436c61696d7320636c6f736564000000000000000000000000000000000000006044820152606401610c92565b604080516060810182526000808252426020830190815292820181815261012e8054600181018255925282517fbdaadd9f750d0166045bf387a364eadd28ba243e04512a47282aa5147a68e37f60039093029283015592517fbdaadd9f750d0166045bf387a364eadd28ba243e04512a47282aa5147a68e38082015591517fbdaadd9f750d0166045bf387a364eadd28ba243e04512a47282aa5147a68e38190920191909155609954612a8083826131ce565b611709816131e8565b60606101338054610afc906141ba565b606081612ad957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612b035780612aed81614284565b9150612afc9050600a83614346565b9150612add565b60008167ffffffffffffffff811115612b1e57612b1e613cd3565b6040519080825280601f01601f191660200182016040528015612b48576020820181803683370190505b5090505b841561251457612b5d6001836142bd565b9150612b6a600a86614332565b612b7590603061426c565b60f81b818381518110612b8a57612b8a61420e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612bc4600a86614346565b9450612b4c565b600054610100900460ff16612c485760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61125a613487565b600054610100900460ff1661125a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b600054610100900460ff16612d4a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b610e3e828261350b565b600054610100900460ff16612dd15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61125a6135af565b600054610100900460ff16612e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b611e7381613635565b61013554610100900460ff1680612e7f57506101355462010000900460ff165b61125a5760405162461bcd60e51b815260206004820152600c60248201527f4d696e747320636c6f73656400000000000000000000000000000000000000006044820152606401610c92565b6000611988828461435a565b600061198882846142bd565b73ffffffffffffffffffffffffffffffffffffffff8316612f4b57612f4681609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612f88565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612f8857612f8883826136fa565b73ffffffffffffffffffffffffffffffffffffffff8216612fac57610d40816137b1565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610d4057610d408282613860565b600073ffffffffffffffffffffffffffffffffffffffff84163b156131c3576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613060903390899088908890600401614397565b602060405180830381600087803b15801561307a57600080fd5b505af19250505080156130c8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526130c5918101906143e0565b60015b613178573d8080156130f6576040519150601f19603f3d011682016040523d82523d6000602084013e6130fb565b606091505b5080516131705760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c92565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612514565b506001949350505050565b610e3e8282604051806020016040528060008152506138b1565b600061012e82815481106131fe576131fe61420e565b9060005260206000209060030201600001546000148061326257507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012e838154811061324e5761324e61420e565b906000526020600020906003020160000154145b6132ae5760405162461bcd60e51b815260206004820152600e60248201527f416c726561647920726f6c6c65640000000000000000000000000000000000006044820152606401610c92565b6099548211156133005760405162461bcd60e51b815260206004820152600e60248201527f43616e277420726f6c6c207965740000000000000000000000000000000000006044820152606401610c92565b6101355461013654610137546040517f5d3b1d3000000000000000000000000000000000000000000000000000000000815260048101929092526301000000830467ffffffffffffffff166024830152640100000000810461ffff16604483015263ffffffff166064820152600160848201819052916b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690635d3b1d309060a401602060405180830381600087803b1580156133bf57600080fd5b505af11580156133d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f791906143fd565b60008181526101386020526040902084905561012e80549193507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91859081106134435761344361420e565b60009182526020822060039091020191909155604051849184917fd59c3e35f53b9c94052f83d22176d9ea31dc3ad817da1a8ea8156b4b12c7c4ca9190a350919050565b600054610100900460ff166135045760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b600160fb55565b600054610100900460ff166135885760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b815161359b906065906020850190613ad4565b508051610d40906066906020840190613ad4565b600054610100900460ff1661362c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61125a33612766565b600054610100900460ff166136b25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61012d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000600161370784611194565b61371191906142bd565b6000838152609860205260409020549091508082146137715773ffffffffffffffffffffffffffffffffffffffff841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b50600091825260986020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352609781528383209183525290812055565b6099546000906137c3906001906142bd565b6000838152609a6020526040812054609980549394509092849081106137eb576137eb61420e565b90600052602060002001549050806099838154811061380c5761380c61420e565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061384457613844614416565b6001900381819060005260206000200160009055905550505050565b600061386b83611194565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6138bb838361393a565b6138c86000848484612fe9565b610d405760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c92565b73ffffffffffffffffffffffffffffffffffffffff821661399d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c92565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613a0f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c92565b613a1b60008383612ee3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290613a5190849061426c565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613ae0906141ba565b90600052602060002090601f016020900481019282613b025760008555613b48565b82601f10613b1b57805160ff1916838001178555613b48565b82800160010185558215613b48579182015b82811115613b48578251825591602001919060010190613b2d565b50613b54929150613b58565b5090565b5b80821115613b545760008155600101613b59565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611e7357600080fd5b600060208284031215613bad57600080fd5b813561198881613b6d565b60005b83811015613bd3578181015183820152602001613bbb565b838111156117095750506000910152565b60008151808452613bfc816020860160208601613bb8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006119886020830184613be4565b600060208284031215613c5357600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a8e57600080fd5b60008060408385031215613c9157600080fd5b613c9a83613c5a565b946020939093013593505050565b80358015158114611a8e57600080fd5b600060208284031215613cca57600080fd5b61198882613ca8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613d4957613d49613cd3565b604052919050565b60008060408385031215613d6457600080fd5b8235915060208084013567ffffffffffffffff80821115613d8457600080fd5b818601915086601f830112613d9857600080fd5b813581811115613daa57613daa613cd3565b8060051b9150613dbb848301613d02565b8181529183018401918481019089841115613dd557600080fd5b938501935b83851015613df357843582529385019390850190613dda565b8096505050505050509250929050565b600080600060608486031215613e1857600080fd5b613e2184613c5a565b9250613e2f60208501613c5a565b9150604084013590509250925092565b600060208284031215613e5157600080fd5b61198882613c5a565b600067ffffffffffffffff831115613e7457613e74613cd3565b613ea560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613d02565b9050828152838383011115613eb957600080fd5b828260208301376000602084830101529392505050565b600082601f830112613ee157600080fd5b61198883833560208501613e5a565b600060208284031215613f0257600080fd5b813567ffffffffffffffff811115613f1957600080fd5b61251484828501613ed0565b600060208284031215613f3757600080fd5b813561ffff8116811461198857600080fd5b60008060408385031215613f5c57600080fd5b613f6583613c5a565b9150613f7360208401613ca8565b90509250929050565b60008083601f840112613f8e57600080fd5b50813567ffffffffffffffff811115613fa657600080fd5b6020830191508360208260051b8501011115613fc157600080fd5b9250929050565b60008060008060408587031215613fde57600080fd5b843567ffffffffffffffff80821115613ff657600080fd5b61400288838901613f7c565b9096509450602087013591508082111561401b57600080fd5b5061402887828801613f7c565b95989497509550505050565b60006020828403121561404657600080fd5b813563ffffffff8116811461198857600080fd5b6000806000806080858703121561407057600080fd5b61407985613c5a565b935061408760208601613c5a565b925060408501359150606085013567ffffffffffffffff8111156140aa57600080fd5b8501601f810187136140bb57600080fd5b6140ca87823560208401613e5a565b91505092959194509250565b60008060008060008060c087890312156140ef57600080fd5b863567ffffffffffffffff8082111561410757600080fd5b6141138a838b01613ed0565b9750602089013591508082111561412957600080fd5b6141358a838b01613ed0565b9650604089013591508082111561414b57600080fd5b6141578a838b01613ed0565b955060608901359150808216821461416e57600080fd5b50925061417d60808801613c5a565b915060a087013590509295509295509295565b600080604083850312156141a357600080fd5b6141ac83613c5a565b9150613f7360208401613c5a565b600181811c908216806141ce57607f821691505b60208210811415614208577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561427f5761427f61423d565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156142b6576142b661423d565b5060010190565b6000828210156142cf576142cf61423d565b500390565b600083516142e6818460208801613bb8565b8351908301906142fa818360208801613bb8565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261434157614341614303565b500690565b60008261435557614355614303565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156143925761439261423d565b500290565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526143d66080830184613be4565b9695505050505050565b6000602082840312156143f257600080fd5b815161198881613b6d565b60006020828403121561440f57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000809000a

Deployed Bytecode

0x6080604052600436106103555760003560e01c8063853828b6116101bb578063baf20eef116100f7578063d547cfb711610095578063e84cc3b31161006f578063e84cc3b3146109f1578063e985e9c514610a08578063f2fde38b14610a5e578063fb5d96c314610a7e57600080fd5b8063d547cfb71461099c578063dafb6637146109b1578063e20da9fa146109d157600080fd5b8063c285e107116100d1578063c285e10714610925578063c87b56dd1461093c578063c8c011c71461095c578063d0e47cd01461097c57600080fd5b8063baf20eef146108d7578063bd34103c146108f7578063be98a05f1461090e57600080fd5b80639de986ab11610164578063a4eb718c1161013e578063a4eb718c14610857578063a7ffb4af14610877578063adcc7d0f14610897578063b88d4fde146108b757600080fd5b80639de986ab146107d3578063a22cb46514610817578063a2656cff1461083757600080fd5b80638da5cb5b116101955780638da5cb5b14610773578063909accd11461079e57806395d89b41146107be57600080fd5b8063853828b61461071e5780638824f5a7146107335780638c424f091461075357600080fd5b8063313490211161029557806355f804b3116102335780636352211e1161020d5780636352211e146106a957806370a08231146106c9578063715018a6146106e95780637389fbb7146106fe57600080fd5b806355f804b3146106485780635aa7db9b146106685780636309b7731461068957600080fd5b80633f2ea3ef1161026f5780633f2ea3ef146105d157806342842e0e146105f15780634a8c4034146106115780634f6ccce71461062857600080fd5b80633134902114610571578063352f99f3146105915780633b067cd2146105b157600080fd5b8063154aa4231161030257806323b872dd116102dc57806323b872dd146104d257806324fd2652146104f2578063292281571461050d5780632f745c591461055157600080fd5b8063154aa4231461047357806318160ddd146104935780631fe543e3146104b257600080fd5b80630913b048116103335780630913b048146103f6578063095ea7b3146104315780630c1561161461045357600080fd5b806301ffc9a71461035a57806306fdde031461038f578063081812fc146103b1575b600080fd5b34801561036657600080fd5b5061037a610375366004613b9b565b610a91565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610aed565b6040516103869190613c2e565b3480156103bd57600080fd5b506103d16103cc366004613c41565b610b7f565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610386565b34801561040257600080fd5b50610416610411366004613c41565b610bb3565b60408051938452602084019290925290820152606001610386565b34801561043d57600080fd5b5061045161044c366004613c7e565b610be7565b005b34801561045f57600080fd5b5061045161046e366004613cb8565b610d45565b34801561047f57600080fd5b5061045161048e366004613cb8565b610d7f565b34801561049f57600080fd5b506099545b604051908152602001610386565b3480156104be57600080fd5b506104516104cd366004613d51565b610dbf565b3480156104de57600080fd5b506104516104ed366004613e03565b610e42565b3480156104fe57600080fd5b506101355461037a9060ff1681565b34801561051957600080fd5b506104a4610528366004613e3f565b73ffffffffffffffffffffffffffffffffffffffff166000908152610139602052604090205490565b34801561055d57600080fd5b506104a461056c366004613c7e565b610ec9565b34801561057d57600080fd5b5061037a61058c366004613c41565b610f7e565b34801561059d57600080fd5b506104516105ac366004613cb8565b610fa2565b3480156105bd57600080fd5b5061037a6105cc366004613c41565b610fe3565b3480156105dd57600080fd5b5061037a6105ec366004613c41565b61101d565b3480156105fd57600080fd5b5061045161060c366004613e03565b611039565b34801561061d57600080fd5b506104a46101345481565b34801561063457600080fd5b506104a4610643366004613c41565b611054565b34801561065457600080fd5b50610451610663366004613ef0565b6110f8565b34801561067457600080fd5b506101355461037a9062010000900460ff1681565b34801561069557600080fd5b506104516106a4366004613c41565b611114565b3480156106b557600080fd5b506103d16106c4366004613c41565b611122565b3480156106d557600080fd5b506104a46106e4366004613e3f565b611194565b3480156106f557600080fd5b50610451611248565b34801561070a57600080fd5b50610451610719366004613c41565b61125c565b34801561072a57600080fd5b5061045161126a565b34801561073f57600080fd5b5061045161074e366004613f25565b6112ed565b34801561075f57600080fd5b5061045161076e366004613e3f565b611333565b34801561077f57600080fd5b5060c95473ffffffffffffffffffffffffffffffffffffffff166103d1565b3480156107aa57600080fd5b506101355461037a90610100900460ff1681565b3480156107ca57600080fd5b506103a4611392565b3480156107df57600080fd5b506104a46107ee366004613e3f565b73ffffffffffffffffffffffffffffffffffffffff16600090815261013a602052604090205490565b34801561082357600080fd5b50610451610832366004613f49565b6113a1565b34801561084357600080fd5b50610451610852366004613fc8565b6113ac565b34801561086357600080fd5b50610451610872366004614034565b6114f9565b34801561088357600080fd5b50610451610892366004613c41565b611539565b3480156108a357600080fd5b506104a46108b2366004613c41565b611547565b3480156108c357600080fd5b506104516108d236600461405a565b611681565b3480156108e357600080fd5b506104516108f2366004613c41565b61170f565b34801561090357600080fd5b506104a46101325481565b34801561091a57600080fd5b506104a46101305481565b34801561093157600080fd5b506104a461012f5481565b34801561094857600080fd5b506103a4610957366004613c41565b611928565b34801561096857600080fd5b50610451610977366004613fc8565b61198f565b34801561098857600080fd5b5061037a610997366004613c41565b611a54565b3480156109a857600080fd5b506103a4611a93565b3480156109bd57600080fd5b506104516109cc3660046140d6565b611b22565b3480156109dd57600080fd5b5061037a6109ec366004613c41565b611d9e565b3480156109fd57600080fd5b506104a46101315481565b348015610a1457600080fd5b5061037a610a23366004614190565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b348015610a6a57600080fd5b50610451610a79366004613e3f565b611dd9565b610451610a8c366004613c41565b611e76565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610ae75750610ae7826120f1565b92915050565b606060658054610afc906141ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610b28906141ba565b8015610b755780601f10610b4a57610100808354040283529160200191610b75565b820191906000526020600020905b815481529060010190602001808311610b5857829003601f168201915b5050505050905090565b6000610b8a826121d4565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b61012e8181548110610bc457600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6000610bf282611122565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c9b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610cc45750610cc48133610a23565b610d365760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610c92565b610d408383612245565b505050565b610d4d6122e5565b61013580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b610d876122e5565b6101358054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b61012d5473ffffffffffffffffffffffffffffffffffffffff163314610e345761012d546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610c92565b610e3e828261234c565b5050565b610e4c338261245c565b610ebe5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610c92565b610d4083838361251c565b6000610ed483611194565b8210610f485760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c92565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152609760209081526040808320938352929052205490565b600061012f54610f9a836101315461275a90919063ffffffff16565b111592915050565b610faa6122e5565b610135805491151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909216919091179055565b600080610fef60995490565b905061100a6101305461012f5461275a90919063ffffffff16565b611014828561275a565b11159392505050565b600061013054610f9a836101325461275a90919063ffffffff16565b610d4083838360405180602001604052806000815250611681565b600061105f60995490565b82106110d35760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c92565b609982815481106110e6576110e661420e565b90600052602060002001549050919050565b6111006122e5565b8051610e3e90610133906020840190613ad4565b61111c6122e5565b61013655565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610ae75760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c92565b600073ffffffffffffffffffffffffffffffffffffffff821661121f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610c92565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b6112506122e5565b61125a6000612766565b565b6112646122e5565b61012f55565b6112726122e5565b47806112c05760405162461bcd60e51b815260206004820152600560248201527f456d7074790000000000000000000000000000000000000000000000000000006044820152606401610c92565b604051339082156108fc029083906000818181858888f19350505050158015610e3e573d6000803e3d6000fd5b6112f56122e5565b610137805461ffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff909216919091179055565b61133b6122e5565b610135805473ffffffffffffffffffffffffffffffffffffffff9092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055565b606060668054610afc906141ba565b610e3e3383836127dd565b6113b46122e5565b60005b838110156114f25760008585838181106113d3576113d361420e565b90506020020160208101906113e89190613e3f565b73ffffffffffffffffffffffffffffffffffffffff16141561144c5760405162461bcd60e51b815260206004820152600b60248201527f42616420616464726573730000000000000000000000000000000000000000006044820152606401610c92565b82828281811061145e5761145e61420e565b9050602002013561013a600087878581811061147c5761147c61420e565b90506020020160208101906114919190613e3f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114da919061426c565b909155508190506114ea81614284565b9150506113b7565b5050505050565b6115016122e5565b61013780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff92909216919091179055565b6115416122e5565b61013055565b600061012e828154811061155d5761155d61420e565b906000526020600020906003020160000154600014156115bf5760405162461bcd60e51b815260206004820152600760248201527f4e6f2073656564000000000000000000000000000000000000000000000000006044820152606401610c92565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012e83815481106115f4576115f461420e565b90600052602060002090600302016000015414156116545760405162461bcd60e51b815260206004820152600b60248201527f496e2070726f67726573730000000000000000000000000000000000000000006044820152606401610c92565b61012e82815481106116685761166861420e565b9060005260206000209060030201600001549050919050565b61168b338361245c565b6116fd5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610c92565b611709848484846128f1565b50505050565b600260fb5414156117625760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c92565b600260fb5561176f61297a565b60008111801561177f5750601581105b6117cb5760405162461bcd60e51b815260206004820152600c60248201527f3120746f203230206f6e6c7900000000000000000000000000000000000000006044820152606401610c92565b6117d48161101d565b6118205760405162461bcd60e51b815260206004820152600a60248201527f4d617820737570706c79000000000000000000000000000000000000000000006044820152606401610c92565b33600090815261013960205260409020548111156118805760405162461bcd60e51b815260206004820152600a60248201527f436c61696d206c657373000000000000000000000000000000000000000000006044820152606401610c92565b3360009081526101396020526040812080548392906118a09084906142bd565b925050819055508061013260008282546118ba919061426c565b90915550600090505b818110156118e6576118d4336129cd565b806118de81614284565b9150506118c3565b5060405181815260019033907f47ecb241f51c091251ef190f29108b9dc91d2ff717fe6c7e416d6891288d5241906020015b60405180910390a350600160fb55565b6060611933826121d4565b600061193d612a89565b9050600081511161195d5760405180602001604052806000815250611988565b8061196784612a99565b6040516020016119789291906142d4565b6040516020818303038152906040525b9392505050565b6119976122e5565b8281146119a357600080fd5b60005b838110156114f2578282828181106119c0576119c061420e565b9050602002013561013960008787858181106119de576119de61420e565b90506020020160208101906119f39190613e3f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a3c919061426c565b90915550819050611a4c81614284565b9150506119a6565b60008082118015611a695750611a6982610f7e565b8015611a85575033600090815261013a60205260409020548211155b15611a8e575060015b919050565b6101338054611aa1906141ba565b80601f0160208091040260200160405190810160405280929190818152602001828054611acd906141ba565b8015611b1a5780601f10611aef57610100808354040283529160200191611b1a565b820191906000526020600020905b815481529060010190602001808311611afd57829003601f168201915b505050505081565b600054610100900460ff1615808015611b425750600054600160ff909116105b80611b5c5750303b158015611b5c575060005460ff166001145b611bce5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c92565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611c2c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611c34612bcb565b611c3c612c50565b611c468787612ccd565b611c4e612d54565b611c5783612dd9565b611c60856110f8565b61013580546101368490557fff00000000000000000000000000000000000000000000000000000000ffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8616027fffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffff1617630100000067ffffffffffffffff87160217905561013780547fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000016640300009c40179055666a94d74f4300006101345561271061012f819055610130558015611d9557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60008082118015611db35750611db38261101d565b8015611a85575033600090815261013960205260409020548211611a8e57506001919050565b611de16122e5565b73ffffffffffffffffffffffffffffffffffffffff8116611e6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c92565b611e7381612766565b50565b600260fb541415611ec95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c92565b600260fb55611ed6612e5f565b600081118015611ee65750601581105b611f325760405162461bcd60e51b815260206004820152600c60248201527f3120746f203230206f6e6c7900000000000000000000000000000000000000006044820152606401610c92565b611f3b81610f7e565b611f875760405162461bcd60e51b815260206004820152600a60248201527f4d617820737570706c79000000000000000000000000000000000000000000006044820152606401610c92565b610134543490611f979083612ecb565b1115611fe55760405162461bcd60e51b815260206004820152600b60248201527f45544820746f6f206c6f770000000000000000000000000000000000000000006044820152606401610c92565b6101355462010000900460ff1661207c5733600090815261013a60205260409020548111156120565760405162461bcd60e51b815260206004820152600f60248201527f426164206d696e7420616d6f756e7400000000000000000000000000000000006044820152606401610c92565b33600090815261013a6020526040812080548392906120769084906142bd565b90915550505b80610131600082825461208f919061426c565b90915550600090505b818110156120bb576120a9336129cd565b806120b381614284565b915050612098565b5060405181815260009033907f47ecb241f51c091251ef190f29108b9dc91d2ff717fe6c7e416d6891288d524190602001611918565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061218457507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610ae757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610ae7565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff16611e735760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c92565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416908117909155819061229f82611122565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60c95473ffffffffffffffffffffffffffffffffffffffff16331461125a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c92565b600082815261013860205260408120548251909190839082906123715761237161420e565b602002602001015190506123af60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612ed790919063ffffffff16565b836000815181106123c2576123c261420e565b60200260200101516123d49190614332565b90506123e181600161275a565b61012e83815481106123f5576123f561420e565b600091825260209091206003909102015561012e80548390811061241b5761241b61420e565b60009182526020822060039091020154604051909186917feceefc211a893e2b4c0de7b52e718d98910586bb0697e98c394ac1a3335a1b3b9190a350505050565b60008061246883611122565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806124d6575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b8061251457508373ffffffffffffffffffffffffffffffffffffffff166124fc84610b7f565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff1661253c82611122565b73ffffffffffffffffffffffffffffffffffffffff16146125c55760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610c92565b73ffffffffffffffffffffffffffffffffffffffff821661264d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c92565b612658838383612ee3565b612663600082612245565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906126999084906142bd565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906126d490849061426c565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611988828461426c565b60c9805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128595760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c92565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6128fc84848461251c565b61290884848484612fe9565b6117095760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c92565b6101355460ff1661125a5760405162461bcd60e51b815260206004820152600d60248201527f436c61696d7320636c6f736564000000000000000000000000000000000000006044820152606401610c92565b604080516060810182526000808252426020830190815292820181815261012e8054600181018255925282517fbdaadd9f750d0166045bf387a364eadd28ba243e04512a47282aa5147a68e37f60039093029283015592517fbdaadd9f750d0166045bf387a364eadd28ba243e04512a47282aa5147a68e38082015591517fbdaadd9f750d0166045bf387a364eadd28ba243e04512a47282aa5147a68e38190920191909155609954612a8083826131ce565b611709816131e8565b60606101338054610afc906141ba565b606081612ad957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612b035780612aed81614284565b9150612afc9050600a83614346565b9150612add565b60008167ffffffffffffffff811115612b1e57612b1e613cd3565b6040519080825280601f01601f191660200182016040528015612b48576020820181803683370190505b5090505b841561251457612b5d6001836142bd565b9150612b6a600a86614332565b612b7590603061426c565b60f81b818381518110612b8a57612b8a61420e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612bc4600a86614346565b9450612b4c565b600054610100900460ff16612c485760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61125a613487565b600054610100900460ff1661125a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b600054610100900460ff16612d4a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b610e3e828261350b565b600054610100900460ff16612dd15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61125a6135af565b600054610100900460ff16612e565760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b611e7381613635565b61013554610100900460ff1680612e7f57506101355462010000900460ff165b61125a5760405162461bcd60e51b815260206004820152600c60248201527f4d696e747320636c6f73656400000000000000000000000000000000000000006044820152606401610c92565b6000611988828461435a565b600061198882846142bd565b73ffffffffffffffffffffffffffffffffffffffff8316612f4b57612f4681609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612f88565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612f8857612f8883826136fa565b73ffffffffffffffffffffffffffffffffffffffff8216612fac57610d40816137b1565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610d4057610d408282613860565b600073ffffffffffffffffffffffffffffffffffffffff84163b156131c3576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613060903390899088908890600401614397565b602060405180830381600087803b15801561307a57600080fd5b505af19250505080156130c8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526130c5918101906143e0565b60015b613178573d8080156130f6576040519150601f19603f3d011682016040523d82523d6000602084013e6130fb565b606091505b5080516131705760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c92565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612514565b506001949350505050565b610e3e8282604051806020016040528060008152506138b1565b600061012e82815481106131fe576131fe61420e565b9060005260206000209060030201600001546000148061326257507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012e838154811061324e5761324e61420e565b906000526020600020906003020160000154145b6132ae5760405162461bcd60e51b815260206004820152600e60248201527f416c726561647920726f6c6c65640000000000000000000000000000000000006044820152606401610c92565b6099548211156133005760405162461bcd60e51b815260206004820152600e60248201527f43616e277420726f6c6c207965740000000000000000000000000000000000006044820152606401610c92565b6101355461013654610137546040517f5d3b1d3000000000000000000000000000000000000000000000000000000000815260048101929092526301000000830467ffffffffffffffff166024830152640100000000810461ffff16604483015263ffffffff166064820152600160848201819052916b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690635d3b1d309060a401602060405180830381600087803b1580156133bf57600080fd5b505af11580156133d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f791906143fd565b60008181526101386020526040902084905561012e80549193507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91859081106134435761344361420e565b60009182526020822060039091020191909155604051849184917fd59c3e35f53b9c94052f83d22176d9ea31dc3ad817da1a8ea8156b4b12c7c4ca9190a350919050565b600054610100900460ff166135045760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b600160fb55565b600054610100900460ff166135885760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b815161359b906065906020850190613ad4565b508051610d40906066906020840190613ad4565b600054610100900460ff1661362c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61125a33612766565b600054610100900460ff166136b25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c92565b61012d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000600161370784611194565b61371191906142bd565b6000838152609860205260409020549091508082146137715773ffffffffffffffffffffffffffffffffffffffff841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b50600091825260986020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352609781528383209183525290812055565b6099546000906137c3906001906142bd565b6000838152609a6020526040812054609980549394509092849081106137eb576137eb61420e565b90600052602060002001549050806099838154811061380c5761380c61420e565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061384457613844614416565b6001900381819060005260206000200160009055905550505050565b600061386b83611194565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6138bb838361393a565b6138c86000848484612fe9565b610d405760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c92565b73ffffffffffffffffffffffffffffffffffffffff821661399d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c92565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613a0f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c92565b613a1b60008383612ee3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290613a5190849061426c565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613ae0906141ba565b90600052602060002090601f016020900481019282613b025760008555613b48565b82601f10613b1b57805160ff1916838001178555613b48565b82800160010185558215613b48579182015b82811115613b48578251825591602001919060010190613b2d565b50613b54929150613b58565b5090565b5b80821115613b545760008155600101613b59565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611e7357600080fd5b600060208284031215613bad57600080fd5b813561198881613b6d565b60005b83811015613bd3578181015183820152602001613bbb565b838111156117095750506000910152565b60008151808452613bfc816020860160208601613bb8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006119886020830184613be4565b600060208284031215613c5357600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a8e57600080fd5b60008060408385031215613c9157600080fd5b613c9a83613c5a565b946020939093013593505050565b80358015158114611a8e57600080fd5b600060208284031215613cca57600080fd5b61198882613ca8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613d4957613d49613cd3565b604052919050565b60008060408385031215613d6457600080fd5b8235915060208084013567ffffffffffffffff80821115613d8457600080fd5b818601915086601f830112613d9857600080fd5b813581811115613daa57613daa613cd3565b8060051b9150613dbb848301613d02565b8181529183018401918481019089841115613dd557600080fd5b938501935b83851015613df357843582529385019390850190613dda565b8096505050505050509250929050565b600080600060608486031215613e1857600080fd5b613e2184613c5a565b9250613e2f60208501613c5a565b9150604084013590509250925092565b600060208284031215613e5157600080fd5b61198882613c5a565b600067ffffffffffffffff831115613e7457613e74613cd3565b613ea560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613d02565b9050828152838383011115613eb957600080fd5b828260208301376000602084830101529392505050565b600082601f830112613ee157600080fd5b61198883833560208501613e5a565b600060208284031215613f0257600080fd5b813567ffffffffffffffff811115613f1957600080fd5b61251484828501613ed0565b600060208284031215613f3757600080fd5b813561ffff8116811461198857600080fd5b60008060408385031215613f5c57600080fd5b613f6583613c5a565b9150613f7360208401613ca8565b90509250929050565b60008083601f840112613f8e57600080fd5b50813567ffffffffffffffff811115613fa657600080fd5b6020830191508360208260051b8501011115613fc157600080fd5b9250929050565b60008060008060408587031215613fde57600080fd5b843567ffffffffffffffff80821115613ff657600080fd5b61400288838901613f7c565b9096509450602087013591508082111561401b57600080fd5b5061402887828801613f7c565b95989497509550505050565b60006020828403121561404657600080fd5b813563ffffffff8116811461198857600080fd5b6000806000806080858703121561407057600080fd5b61407985613c5a565b935061408760208601613c5a565b925060408501359150606085013567ffffffffffffffff8111156140aa57600080fd5b8501601f810187136140bb57600080fd5b6140ca87823560208401613e5a565b91505092959194509250565b60008060008060008060c087890312156140ef57600080fd5b863567ffffffffffffffff8082111561410757600080fd5b6141138a838b01613ed0565b9750602089013591508082111561412957600080fd5b6141358a838b01613ed0565b9650604089013591508082111561414b57600080fd5b6141578a838b01613ed0565b955060608901359150808216821461416e57600080fd5b50925061417d60808801613c5a565b915060a087013590509295509295509295565b600080604083850312156141a357600080fd5b6141ac83613c5a565b9150613f7360208401613c5a565b600181811c908216806141ce57607f821691505b60208210811415614208577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561427f5761427f61423d565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156142b6576142b661423d565b5060010190565b6000828210156142cf576142cf61423d565b500390565b600083516142e6818460208801613bb8565b8351908301906142fa818360208801613bb8565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261434157614341614303565b500690565b60008261435557614355614303565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156143925761439261423d565b500290565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526143d66080830184613be4565b9695505050505050565b6000602082840312156143f257600080fd5b815161198881613b6d565b60006020828403121561440f57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000809000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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