ETH Price: $3,414.38 (+2.97%)

Token

Space Noodles (SNOODLE)
 

Overview

Max Total Supply

896 SNOODLE

Holders

460

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
SpaceNoodles

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion
File 1 of 23 : SpaceNoodles.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "./ERC2981.sol";

contract SpaceNoodles is ERC721Enumerable, IERC721Receiver, VRFConsumerBaseV2, ReentrancyGuard, AccessControl, Ownable, ERC2981 {
    IERC721                   public immutable NOODLES;
    VRFCoordinatorV2Interface public immutable COORDINATOR;
    LinkTokenInterface        public immutable LINKTOKEN;

    bytes32 public constant SUPPORT_ROLE = keccak256("SUPPORT");
    bytes32 public constant RANK_WRITER_ROLE = keccak256("RANK_WRITER");

    uint64  public s_subscriptionId;
    bytes32 public s_keyHash;
    uint32  public s_callbackGasLimit = 2500000;
    uint16  public s_requestConfirmations = 3;

    function setSubscriptionId(uint64 _subscriptionId) external onlyRole(SUPPORT_ROLE) {
        s_subscriptionId = _subscriptionId;
    }

    function setKeyHash(bytes32 _keyHash) external onlyRole(SUPPORT_ROLE) {
        s_keyHash = _keyHash;
    }

    function setCallbackGasLimit(uint32 _callbackGasLimit) external onlyRole(SUPPORT_ROLE) {
        s_callbackGasLimit = _callbackGasLimit;
    }

    function setRequestConfirmations(uint16 _requestConfirmations) external onlyRole(SUPPORT_ROLE) {
        s_requestConfirmations = _requestConfirmations;
    }

    constructor(
        address _noodles,
        address _vrfCoordinator,
        address _link,
        bytes32 _keyHash,
        uint64 _subscriptionId
    ) ERC721("Space Noodles", "SNOODLE") VRFConsumerBaseV2(_vrfCoordinator) {
        NOODLES = IERC721(_noodles);
        COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator);
        LINKTOKEN = LinkTokenInterface(_link);

        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(SUPPORT_ROLE, msg.sender);

        s_subscriptionId = _subscriptionId;
        s_keyHash = _keyHash;
    }

    string private baseURI;

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

    function setBaseURI(string memory _uri) external onlyRole(SUPPORT_ROLE) {
        baseURI = _uri;
    }

    uint8[] public DICE_ROLL = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,7,7,8];
    uint256 public constant BITS_PER_TRAIT = 8;
    uint256 public constant NUM_TRAITS = 5;
    uint256 public constant VRF_WORD_SIZE = 256;
    uint256 public constant BITS_PER_SEED = BITS_PER_TRAIT * NUM_TRAITS;
    uint256 public constant SEEDS_PER_WORD = VRF_WORD_SIZE / BITS_PER_SEED;
    uint256 public constant SEED_MASK = (1 << BITS_PER_SEED) - 1;

    struct Stats {
        uint8 rank;

        uint8 calories;
        uint8 MSG;
        uint8 spice;
        uint8 noodity;
        uint8 slurp;
    }

    event ChangedStats(
        uint256 indexed _tokenId
    );

    event ProcessBatch(
        uint256 _requestId
    );

    mapping(uint256 => Stats)     public tokenStats;
    mapping(uint256 => uint256[]) public batches; // Each batch has an array of token IDs
    mapping(uint256 => uint256)   public vrfRequestIdToBatchId;
    uint256 public batchCount;
    uint256 public minBatchSize = 15;
    uint256 public maxBatchSize = 30;
    bool public launchingActive;
    bool public dockingActive;

    function setMinBatchSize(uint256 _minBatchSize) external onlyRole(SUPPORT_ROLE) {
        minBatchSize = _minBatchSize;
        if (minBatchSize > maxBatchSize) {
            maxBatchSize = minBatchSize;
        }
    }

    function setMaxBatchSize(uint256 _maxBatchSize) external onlyRole(SUPPORT_ROLE) {
        maxBatchSize = _maxBatchSize;
        if (minBatchSize > maxBatchSize) {
            minBatchSize = maxBatchSize;
        }
    }

    function setLaunchingActive(bool _launchingActive) external onlyRole(SUPPORT_ROLE) {
        launchingActive = _launchingActive;
    }

    function setDockingActive(bool _dockingActive) external onlyRole(SUPPORT_ROLE) {
        dockingActive = _dockingActive;
    }

    function _createSpaceShip(address to, uint256 tokenId) internal {
        batches[batchCount].push(tokenId);

        _safeMint(to, tokenId);
    }

    function onERC721Received(address, address from, uint256 tokenId, bytes memory data) public virtual override nonReentrant returns (bytes4) {
        if (msg.sender == address(NOODLES)) {
            require(launchingActive, "Launching not active.");

            if (!_exists(tokenId)) {
                _createSpaceShip(from, tokenId);
                if ((data.length == 0 && batches[batchCount].length >= minBatchSize) ||
                    batches[batchCount].length >= maxBatchSize) {
                    _processBatch();
                }
            } else {
                _safeTransfer(address(this), from, tokenId, "");
            }
        } else if (msg.sender == address(this)) {
            require(dockingActive, "Docking not active.");
            NOODLES.safeTransferFrom(address(this), from, tokenId);
        } else {
            revert("Noodles and Space Noodles only.");
        }

        return this.onERC721Received.selector;
    }

    function launchMany(uint[] calldata tokenIds) external {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            NOODLES.safeTransferFrom(msg.sender, address(this), tokenIds[i], "skip"); // skip batch check in onERC721Received
        }

        if (batches[batchCount].length >= minBatchSize) {
            _processBatch();
        }
    }

    function dockMany(uint[] calldata tokenIds) external {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            safeTransferFrom(msg.sender, address(this), tokenIds[i]);
        }
    }

    function rescueNoodle(address to, uint256 tokenId) external onlyRole(SUPPORT_ROLE) {
        if (!_exists(tokenId) || ownerOf(tokenId) == address(this)) {
            // Noodle stuck in this contract
            NOODLES.safeTransferFrom(address(this), to, tokenId);
        } else if (ownerOf(tokenId) == address(NOODLES)) {
            // Space Noodle stuck in Noodles contract
            _safeTransfer(address(NOODLES), to, tokenId, "");
        } else {
            revert("Only allowed in rescue scenarios.");
        }
    }

    function _ceil(uint256 a, uint256 m) internal pure returns (uint256) {
        return (a + m - 1) / m;
    }

    function _processBatch() internal returns (uint256) {
        uint32 numWords = uint32(_ceil(batches[batchCount].length, SEEDS_PER_WORD));
        uint256 requestId = COORDINATOR.requestRandomWords(s_keyHash,
                                                           s_subscriptionId,
                                                           s_requestConfirmations,
                                                           s_callbackGasLimit,
                                                           numWords);

        vrfRequestIdToBatchId[requestId] = batchCount;
        batchCount++;

        emit ProcessBatch(requestId);

        return requestId;
    }

    function flushBatch() external nonReentrant onlyRole(SUPPORT_ROLE) returns (uint256) {
        return _processBatch();
    }

    function retryBatch(uint256 batchId) public onlyRole(SUPPORT_ROLE) returns (uint256) {
        uint256 batchSize = batches[batchId].length;

        for (uint256 i; i < batchSize; i++) {
            require(tokenStats[batches[batchId][i]].rank == 0, "Stats have already been set.");
        }

        uint32 numWords = uint32(_ceil(batches[batchId].length, SEEDS_PER_WORD));
        uint256 requestId = COORDINATOR.requestRandomWords(s_keyHash,
                                                           s_subscriptionId,
                                                           s_requestConfirmations,
                                                           s_callbackGasLimit,
                                                           numWords);

        vrfRequestIdToBatchId[requestId] = batchId;
        return requestId;
    }

    function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
        uint256 batchId = vrfRequestIdToBatchId[requestId];
        uint256 batchSize = batches[batchId].length;

        for (uint256 i; i < batchSize; i++) {
            uint256 j = i / SEEDS_PER_WORD;
            uint256 seed = randomWords[j] & SEED_MASK;
            uint256 tokenId = batches[batchId][i];
            tokenStats[tokenId] = _computeStats(seed);
            emit ChangedStats(tokenId);
            randomWords[j] >>= BITS_PER_SEED;
        }
    }

    function _computeStats(uint256 seed) internal view returns (Stats memory) {
        return Stats({
            rank: 1,
            calories: DICE_ROLL[uint8(seed)],
            MSG: DICE_ROLL[uint8(seed >> BITS_PER_TRAIT)],
            spice: DICE_ROLL[uint8(seed >> (BITS_PER_TRAIT * 2))],
            noodity: DICE_ROLL[uint8(seed >> (BITS_PER_TRAIT * 3))],
            slurp: DICE_ROLL[uint8(seed >> (BITS_PER_TRAIT * 4))]
        });
    }

    function setRank(uint256 tokenId, uint8 _rank) external onlyRole(RANK_WRITER_ROLE) {
        require(_exists(tokenId), "Token does not exist.");

        tokenStats[tokenId].rank = _rank;
        emit ChangedStats(tokenId);
    }

    function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
        (bool success, ) = msg.sender.call{value: address(this).balance}("");
        require(success, "Withdrawal failed.");
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC721Enumerable, ERC2981) returns (bool) {
        return AccessControl.supportsInterface(interfaceId)
            || ERC721Enumerable.supportsInterface(interfaceId)
            || ERC2981.supportsInterface(interfaceId);
    }

    // EIP-2981

    /**
     *  @dev Set the royalties information.
     *  @param recipient Recipient address of the royalties
     *  @param value     Percentage points (10000 = 100%, 250 = 2.5%, 0 = 0%)
     */
    function setRoyalties(address recipient, uint256 value) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(recipient != address(0), "Zero address.");
        _setRoyalties(recipient, value);
    }
}

File 2 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 5 of 23 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

    constructor() {
        _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;
    }
}

File 6 of 23 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

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

        _revokeRole(role, account);
    }

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

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 9 of 23 : 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;
}

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

/** ****************************************************************************
 * @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).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    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 11 of 23 : ERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/interfaces/IERC2981.sol";

/**
 * @dev This implements EIP-2981 for ERC721 or ERC1155 contracts.
 */
abstract contract ERC2981 is IERC2981 {
    struct Royalty {
        address recipient; // Recipient address of the royalties
        uint24  points;    // Percentage points (10000 = 100%, 250 = 2.5%, 0 = 0%)
    }

    Royalty private _royalty;

    /**
     *  @dev Set the royalties information.
     *  @param recipient Recipient address of the royalties
     *  @param value     Percentage points (10000 = 100%, 250 = 2.5%, 0 = 0%)
     */
    function _setRoyalties(address recipient, uint256 value) internal {
        require(value <= 10000, "ERC2981: Royalty value too high.");
        _royalty = Royalty(recipient, uint24(value));
    }

    function getRoyaltyRecipient() external view returns (address) {
        Royalty memory royalty = _royalty;

        return royalty.recipient;
    }

    function getRoyaltyPoints() external view returns (uint24) {
        Royalty memory royalty = _royalty;

        return royalty.points;
    }

    /// @inheritdoc IERC2981
    function royaltyInfo(uint256, uint256 value) external view override returns (address receiver, uint256 royaltyAmount) {
        Royalty memory royalty = _royalty;
        receiver = royalty.recipient;
        royaltyAmount = (value * royalty.points) / 10000;

        return (receiver, royaltyAmount);
    }

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

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

File 22 of 23 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_noodles","type":"address"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_link","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"_tokenId","type":"uint256"}],"name":"ChangedStats","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"ProcessBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BITS_PER_SEED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BITS_PER_TRAIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COORDINATOR","outputs":[{"internalType":"contract VRFCoordinatorV2Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"DICE_ROLL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LINKTOKEN","outputs":[{"internalType":"contract LinkTokenInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NOODLES","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_TRAITS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RANK_WRITER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEEDS_PER_WORD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEED_MASK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPORT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VRF_WORD_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"batches","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"dockMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dockingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flushBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoyaltyPoints","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoyaltyRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"launchMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"launchingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rescueNoodle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchId","type":"uint256"}],"name":"retryBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_callbackGasLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_requestConfirmations","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_subscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_callbackGasLimit","type":"uint32"}],"name":"setCallbackGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_dockingActive","type":"bool"}],"name":"setDockingActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"name":"setKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_launchingActive","type":"bool"}],"name":"setLaunchingActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxBatchSize","type":"uint256"}],"name":"setMaxBatchSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBatchSize","type":"uint256"}],"name":"setMinBatchSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"_rank","type":"uint8"}],"name":"setRank","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_requestConfirmations","type":"uint16"}],"name":"setRequestConfirmations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_subscriptionId","type":"uint64"}],"name":"setSubscriptionId","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":"","type":"uint256"}],"name":"tokenStats","outputs":[{"internalType":"uint8","name":"rank","type":"uint8"},{"internalType":"uint8","name":"calories","type":"uint8"},{"internalType":"uint8","name":"MSG","type":"uint8"},{"internalType":"uint8","name":"spice","type":"uint8"},{"internalType":"uint8","name":"noodity","type":"uint8"},{"internalType":"uint8","name":"slurp","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vrfRequestIdToBatchId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6010805465ffffffffffff19166403002625a017905561210060405260016101008181526101208290526101408290526101608290526101808290526101a08290526101c08290526101e08290526102008290526102208290526102408290526102608290526102808290526102a08290526102c08290526102e08290526103008290526103208290526103408290526103608290526103808290526103a08290526103c08290526103e08290526104008290526104208290526104408290526104608290526104808290526104a08290526104c08290526104e08290526105008290526105208290526105408290526105608290526105808290526105a08290526105c08290526105e08290526106008290526106208290526106408290526106608290526106808290526106a08290526106c08290526106e08290526107008290526107208290526107408290526107608290526107808290526107a08290526107c08290526107e08290526108008290526108208290526108408290526108608290526108808290526108a08290526108c08290526108e08290526109008290526109208290526109408290526109608290526109808290526109a08290526109c08290526109e0829052610a00829052610a20829052610a40829052610a60829052610a80829052610aa0829052610ac0829052610ae0829052610b00829052610b20829052610b40829052610b60829052610b80829052610ba0829052610bc0829052610be0829052610c00829052610c20829052610c40829052610c60829052610c80829052610ca0829052610cc0829052610ce0829052610d00829052610d20829052610d40829052610d60829052610d80829052610da0829052610dc0829052610de0829052610e00829052610e20829052610e40829052610e60829052610e80829052610ea0829052610ec0829052610ee0829052610f00829052610f20829052610f40829052610f60829052610f80829052610fa0829052610fc0829052610fe08290526110008290526110208290526110408290526110608290526110808290526110a08290526110c08290526110e08290526111009190915260026111208190526111408190526111608190526111808190526111a08190526111c08190526111e08190526112008190526112208190526112408190526112608190526112808190526112a08190526112c08190526112e08190526113008190526113208190526113408190526113608190526113808190526113a08190526113c08190526113e08190526114008190526114208190526114408190526114608190526114808190526114a08190526114c08190526114e08190526115008190526115208190526115408190526115608190526115808190526115a08190526115c08190526115e08190526116008190526116208190526116408190526116608190526116808190526116a08190526116c08190526116e08190526117008190526117208190526117408190526117608190526117808190526117a08190526117c08190526117e08190526118008190526118208190526118408190526118608190526118808190526118a08190526118c08190526118e08190526119005260036119208190526119408190526119608190526119808190526119a08190526119c08190526119e0819052611a00819052611a20819052611a40819052611a60819052611a80819052611aa0819052611ac0819052611ae0819052611b00819052611b20819052611b40819052611b60819052611b80819052611ba0819052611bc0819052611be0819052611c00819052611c20819052611c40819052611c60819052611c80819052611ca0819052611cc0819052611ce0819052611d00526004611d20819052611d40819052611d60819052611d80819052611da0819052611dc0819052611de0819052611e00819052611e20819052611e40819052611e60819052611e80819052611ea0819052611ec0819052611ee0819052611f00526005611f20819052611f40819052611f60819052611f80819052611fa0819052611fc0819052611fe08190526120005260066120208190526120408190526120608190526120805260076120a08190526120c05260086120e0526200062d90601290806200088b565b50600f601755601e6018553480156200064557600080fd5b5060405162005258380380620052588339810160408190526200066891620009e9565b604080518082018252600d81526c5370616365204e6f6f646c657360981b602080830191825283518085019094526007845266534e4f4f444c4560c81b908401528151879391620006bd916000919062000938565b508051620006d390600190602084019062000938565b50505060601b6001600160601b0319166080526001600a55620006fd620006f73390565b62000785565b6001600160601b0319606086811b821660a05285811b821660c05284901b1660e0526200072c600033620007d7565b620007587fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b33620007d7565b600e80546001600160401b0319166001600160401b0392909216919091179055600f555062000a9d915050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620007e38282620007e7565b5050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff16620007e3576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620008473390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805482825590600052602060002090601f01602090048101928215620009265791602002820160005b83821115620008f557835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302620008b5565b8015620009245782816101000a81549060ff0219169055600101602081600001049283019260010302620008f5565b505b5062000934929150620009b5565b5090565b828054620009469062000a60565b90600052602060002090601f0160209004810192826200096a576000855562000926565b82601f106200098557805160ff191683800117855562000926565b8280016001018555821562000926579182015b828111156200092657825182559160200191906001019062000998565b5b80821115620009345760008155600101620009b6565b80516001600160a01b0381168114620009e457600080fd5b919050565b600080600080600060a0868803121562000a0257600080fd5b62000a0d86620009cc565b945062000a1d60208701620009cc565b935062000a2d60408701620009cc565b6060870151608088015191945092506001600160401b038116811462000a5257600080fd5b809150509295509295909350565b600181811c9082168062000a7557607f821691505b6020821081141562000a9757634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160601c60c05160601c60e05160601c61473662000b22600039600061073401526000818161068e01528181611f1f01526127360152600081816105e001528181610ec00152818161107101528181611671015281816116d40152818161171901526117ca01526000818161115401526111af01526147366000f3fe608060405234801561001057600080fd5b506004361061048d5760003560e01c806374991fe61161026b578063a64550a111610150578063d547741f116100c8578063e985e9c511610097578063ea7b4f771161007c578063ea7b4f7714610b6e578063f2fde38b14610b81578063f88ea2c914610b9457600080fd5b8063e985e9c514610b1f578063e988974914610b5b57600080fd5b8063d547741f14610a6a578063d9ec50f014610a7d578063daf48a3214610a85578063e926ca9514610a8d57600080fd5b8063b39911101161011f578063c387156111610104578063c387156114610a25578063c5b4e93714610a32578063c87b56dd14610a5757600080fd5b8063b3991110146109ca578063b88d4fde14610a1257600080fd5b8063a64550a114610962578063aa2e09e114610989578063addbb3c9146109ae578063b18df006146109b757600080fd5b806395d89b41116101e3578063992a844d116101b2578063a217fddf11610197578063a217fddf14610934578063a22cb4651461093c578063a4eb718c1461094f57600080fd5b8063992a844d1461090e578063a0f88bb71461092157600080fd5b806395d89b411461089a57806395edc18c146108a257806396c9fcd6146108e857806398544710146108fb57600080fd5b80638ac000211161023a5780638da5cb5b1161021f5780638da5cb5b1461082957806391d148541461083a57806394b059ab1461087357600080fd5b80638ac00021146107e95780638c7ea24b1461081657600080fd5b806374991fe6146107bd5780637ab0d0b9146107c55780637eeb1c67146107cd5780638824f5a7146107d657600080fd5b806336568abe1161039157806349a46612116103095780635d47964b116102d85780636b7ce550116102bd5780636b7ce5501461078f57806370a08231146107a2578063715018a6146107b557600080fd5b80635d47964b146107695780636352211e1461077c57600080fd5b806349a46612146107095780634f6ccce71461071c57806355380dfb1461072f57806355f804b31461075657600080fd5b80634502780e11610360578063454836ad11610345578063454836ad146106e55780634599630e146106ed57806345bb327b1461070057600080fd5b80634502780e146106cb5780634516e1e9146106d357600080fd5b806336568abe146106765780633b2bcbf1146106895780633ccfd60b146106b057806342842e0e146106b857600080fd5b80631fe543e3116104245780632913daa0116103f35780632b26a6bf116103d85780632b26a6bf1461063d5780632f2ff15d146106505780632f745c591461066357600080fd5b80632913daa0146106025780632a55205a1461060b57600080fd5b80631fe543e31461059257806323b872dd146105a5578063248a9ca3146105b857806327810e30146105db57600080fd5b8063095ea7b311610460578063095ea7b3146105115780630af40b7f14610526578063150b7a021461054657806318160ddd1461058a57600080fd5b806301ffc9a71461049257806306f13056146104ba57806306fdde03146104d1578063081812fc146104e6575b600080fd5b6104a56104a03660046140ee565b610bbd565b60405190151581526020015b60405180910390f35b6104c360165481565b6040519081526020016104b1565b6104d9610bec565b6040516104b19190614427565b6104f96104f43660046140b2565b610c7e565b6040516001600160a01b0390911681526020016104b1565b61052461051f366004613ff8565b610d29565b005b6104c36105343660046140b2565b60156020526000908152604090205481565b610559610554366004613f52565b610e5b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016104b1565b6008546104c3565b6105246105a03660046141ae565b611149565b6105246105b3366004613f16565b6111ea565b6104c36105c63660046140b2565b6000908152600b602052604090206001015490565b6104f97f000000000000000000000000000000000000000000000000000000000000000081565b6104c360185481565b61061e610619366004614267565b611271565b604080516001600160a01b0390931683526020830191909152016104b1565b61052461064b3660046140b2565b6112d7565b61052461065e3660046140cb565b61131b565b6104c3610671366004613ff8565b611341565b6105246106843660046140cb565b6113e9565b6104f97f000000000000000000000000000000000000000000000000000000000000000081565b610524611471565b6105246106c6366004613f16565b611515565b6104c3611530565b6019546104a590610100900460ff1681565b6104c3600581565b6105246106fb366004613ff8565b6115c8565b6104c3600f5481565b610524610717366004614022565b6117bd565b6104c361072a3660046140b2565b6118ff565b6104f97f000000000000000000000000000000000000000000000000000000000000000081565b610524610764366004614128565b6119a3565b6104c3610777366004614267565b6119e1565b6104f961078a3660046140b2565b611a12565b61052461079d366004614022565b611a9d565b6104c36107b0366004613ec8565b611add565b610524611b77565b6104c3611bdd565b6104c3600881565b6104c360175481565b6105246107e4366004614171565b611bf8565b600e546107fd9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016104b1565b610524610824366004613ff8565b611c61565b600c546001600160a01b03166104f9565b6104a56108483660046140cb565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6104c37fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b81565b6104d9611ccd565b60408051808201909152600d546001600160a01b0381168083527401000000000000000000000000000000000000000090910462ffffff166020909201919091526104f9565b6105246108f6366004614097565b611cdc565b6105246109093660046140b2565b611d1b565b61052461091c3660046140b2565b611d4c565b6104c361092f3660046140b2565b611d90565b6104c3600081565b61052461094a366004613fce565b611fc0565b61052461095d3660046142bf565b611fcb565b6104c37fbf41b66e0b91d3bfcb3f5f0b3202de2fafe3878571e8c06289cfe757dcbc598081565b61099c6109973660046140b2565b61202e565b60405160ff90911681526020016104b1565b6104c361010081565b6105246109c5366004614289565b612062565b604080518082018252600d546001600160a01b038116825274010000000000000000000000000000000000000000900462ffffff1660209182018190529151918252016104b1565b610524610a20366004613f52565b612138565b6019546104a59060ff1681565b601054610a429063ffffffff1681565b60405163ffffffff90911681526020016104b1565b6104d9610a653660046140b2565b6121c6565b610524610a783660046140cb565b6122af565b6104c36122d5565b6104c36122e1565b610ae3610a9b3660046140b2565b60136020526000908152604090205460ff8082169161010081048216916201000082048116916301000000810482169164010000000082048116916501000000000090041686565b6040805160ff978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c0016104b1565b6104a5610b2d366004613ee3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610524610b69366004614097565b6122fd565b610524610b7c3660046142e5565b612360565b610524610b8f366004613ec8565b6123c7565b601054610baa90640100000000900461ffff1681565b60405161ffff90911681526020016104b1565b6000610bc8826124a9565b80610bd75750610bd7826124fb565b80610be65750610be682612551565b92915050565b606060008054610bfb9061454c565b80601f0160208091040260200160405190810160405280929190818152602001828054610c279061454c565b8015610c745780601f10610c4957610100808354040283529160200191610c74565b820191906000526020600020905b815481529060010190602001808311610c5757829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d0d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610d3482611a12565b9050806001600160a01b0316836001600160a01b03161415610dbe5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610d04565b336001600160a01b0382161480610dda5750610dda8133610b2d565b610e4c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d04565b610e5683836125e9565b505050565b60006002600a541415610eb05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d04565b6002600a55336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610fcd5760195460ff16610f385760405162461bcd60e51b815260206004820152601560248201527f4c61756e6368696e67206e6f74206163746976652e00000000000000000000006044820152606401610d04565b6000838152600260205260409020546001600160a01b0316610fb257610f5e848461266f565b8151158015610f80575060175460165460009081526014602052604090205410155b80610f9e575060185460165460009081526014602052604090205410155b15610fad57610fab61269d565b505b61111a565b610fad3085856040518060200160405280600081525061281a565b333014156110d257601954610100900460ff1661102c5760405162461bcd60e51b815260206004820152601360248201527f446f636b696e67206e6f74206163746976652e000000000000000000000000006044820152606401610d04565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038581166024830152604482018590527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b1580156110b557600080fd5b505af11580156110c9573d6000803e3d6000fd5b5050505061111a565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f6f646c657320616e64205370616365204e6f6f646c6573206f6e6c792e006044820152606401610d04565b507f150b7a02000000000000000000000000000000000000000000000000000000006001600a55949350505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111dc576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610d04565b6111e682826128a3565b5050565b6111f43382612b0c565b6112665760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d04565b610e56838383612c14565b60408051808201909152600d546001600160a01b0381168083527401000000000000000000000000000000000000000090910462ffffff16602083018190529091600091612710906112c39086614497565b6112cd9190614483565b9150509250929050565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6113028133612e04565b60188290556017548210156111e6576018546017555050565b6000828152600b60205260409020600101546113378133612e04565b610e568383612e84565b600061134c83611add565b82106113c05760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610d04565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b03811633146114675760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610d04565b6111e68282612f26565b600061147d8133612e04565b604051600090339047908381818185875af1925050503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806111e65760405162461bcd60e51b815260206004820152601260248201527f5769746864726177616c206661696c65642e00000000000000000000000000006044820152606401610d04565b610e5683838360405180602001604052806000815250612138565b60006002600a5414156115855760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d04565b6002600a557fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6115b58133612e04565b6115bd61269d565b9150506001600a5590565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6115f38133612e04565b6000828152600260205260409020546001600160a01b0316158061162757503061161c83611a12565b6001600160a01b0316145b156116d2576040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038481166024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b1580156116b557600080fd5b505af11580156116c9573d6000803e3d6000fd5b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661170583611a12565b6001600160a01b0316141561174f57610e567f000000000000000000000000000000000000000000000000000000000000000084846040518060200160405280600081525061281a565b60405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920616c6c6f77656420696e20726573637565207363656e6172696f7360448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610d04565b60005b818110156118dc577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b88d4fde333086868681811061180b5761180b614674565b60405160e087901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b0395861660048083019190915294909516602486015260200291909101356044840152506080606483015260848201527f736b69700000000000000000000000000000000000000000000000000000000060a482015260c401600060405180830381600087803b1580156118b157600080fd5b505af11580156118c5573d6000803e3d6000fd5b5050505080806118d49061459a565b9150506117c0565b50601754601654600090815260146020526040902054106111e657610e5661269d565b600061190a60085490565b821061197e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610d04565b6008828154811061199157611991614674565b90600052602060002001549050919050565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6119ce8133612e04565b8151610e56906011906020850190613dab565b601460205281600052604060002081815481106119fd57600080fd5b90600052602060002001600091509150505481565b6000818152600260205260408120546001600160a01b031680610be65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610d04565b60005b81811015610e5657611acb3330858585818110611abf57611abf614674565b90506020020135611515565b80611ad58161459a565b915050611aa0565b60006001600160a01b038216611b5b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610d04565b506001600160a01b031660009081526003602052604090205490565b600c546001600160a01b03163314611bd15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d04565b611bdb6000612fa9565b565b611be960056008614497565b611bf590610100614483565b81565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611c238133612e04565b506010805461ffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff909216919091179055565b6000611c6d8133612e04565b6001600160a01b038316611cc35760405162461bcd60e51b815260206004820152600d60248201527f5a65726f20616464726573732e000000000000000000000000000000000000006044820152606401610d04565b610e568383613013565b606060018054610bfb9061454c565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611d078133612e04565b506019805460ff1916911515919091179055565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611d468133612e04565b50600f55565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611d778133612e04565b60178290556018548211156111e6576017546018555050565b60007fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611dbd8133612e04565b600083815260146020526040812054905b81811015611e795760008581526014602052604081208054601392919084908110611dfb57611dfb614674565b6000918252602080832090910154835282019290925260400190205460ff1615611e675760405162461bcd60e51b815260206004820152601c60248201527f5374617473206861766520616c7265616479206265656e207365742e000000006044820152606401610d04565b80611e718161459a565b915050611dce565b50600084815260146020526040812054611eaa90611e9960056008614497565b611ea590610100614483565b6130d8565b600f54600e546010546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019390935267ffffffffffffffff9091166024830152640100000000810461ffff16604483015263ffffffff9081166064830152821660848201529091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611f6b57600080fd5b505af1158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa39190614195565b600081815260156020526040902087905594505050505b50919050565b6111e63383836130fb565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611ff68133612e04565b50601080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff92909216919091179055565b6012818154811061203e57600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b7fbf41b66e0b91d3bfcb3f5f0b3202de2fafe3878571e8c06289cfe757dcbc598061208d8133612e04565b6000838152600260205260409020546001600160a01b03166120f15760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20646f6573206e6f742065786973742e00000000000000000000006044820152606401610d04565b600083815260136020526040808220805460ff191660ff86161790555184917f3063a7f4045ac90e6c1e1c0a1cd8a4d8208488f1f3a05359bf9e5eb5e045ff3f91a2505050565b6121423383612b0c565b6121b45760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d04565b6121c08484848461281a565b50505050565b6000818152600260205260409020546060906001600160a01b03166122535760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d04565b600061225d6131ca565b9050600081511161227d57604051806020016040528060008152506122a8565b80612287846131d9565b60405160200161229892919061433b565b6040516020818303038152906040525b9392505050565b6000828152600b60205260409020600101546122cb8133612e04565b610e568383612f26565b611bf560056008614497565b60016122ef60056008614497565b6001901b611bf591906144d4565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6123288133612e04565b5060198054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b61238b8133612e04565b50600e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b600c546001600160a01b031633146124215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d04565b6001600160a01b03811661249d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610d04565b6124a681612fa9565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610be65750610be6825b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610be65750610be68261330b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610be657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a7000000000000000000000000000000000000000000000000000000001492915050565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155819061263682611a12565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6016546000908152601460209081526040822080546001810182559083529120018190556111e682826133ee565b60165460009081526014602052604081205481906126c190611e9960056008614497565b600f54600e546010546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019390935267ffffffffffffffff9091166024830152640100000000810461ffff16604483015263ffffffff9081166064830152821660848201529091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a401602060405180830381600087803b15801561278257600080fd5b505af1158015612796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ba9190614195565b601680546000838152601560205260408120829055929350916127dc8361459a565b90915550506040518181527fe6f78ab407fb8229aa50d7101f29db0e3e07a39e43275bf0f0575b266df9c0cf9060200160405180910390a192915050565b612825848484612c14565b61283184848484613408565b6121c05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d04565b600082815260156020908152604080832054808452601490925282205490915b81811015612b055760006128d960056008614497565b6128e590610100614483565b6128ef9083614483565b90506000600161290160056008614497565b6001901b61290f91906144d4565b86838151811061292157612921614674565b6020026020010151169050600060146000878152602001908152602001600020848154811061295257612952614674565b90600052602060002001549050612968826135b5565b60008281526013602090815260408083208451815493860151868401516060880151608089015160a09099015160ff90811665010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff9a8216640100000000029a909a167fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff9282166301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff9483166201000002949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff958316610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909a169290961691909117979097179290921692909217919091171692909217939093179055905182917f3063a7f4045ac90e6c1e1c0a1cd8a4d8208488f1f3a05359bf9e5eb5e045ff3f91a2612aca60056008614497565b878481518110612adc57612adc614674565b60200260200101818151901c915081815250505050508080612afd9061459a565b9150506128c3565b5050505050565b6000818152600260205260408120546001600160a01b0316612b965760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610d04565b6000612ba183611a12565b9050806001600160a01b0316846001600160a01b03161480612bdc5750836001600160a01b0316612bd184610c7e565b6001600160a01b0316145b80612c0c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612c2782611a12565b6001600160a01b031614612ca35760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610d04565b6001600160a01b038216612d1e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610d04565b612d2983838361374b565b612d346000826125e9565b6001600160a01b0383166000908152600360205260408120805460019290612d5d9084906144d4565b90915550506001600160a01b0382166000908152600360205260408120805460019290612d8b90849061446b565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166111e657612e42816001600160a01b03166014613803565b612e4d836020613803565b604051602001612e5e92919061436a565b60408051601f198184030181529082905262461bcd60e51b8252610d0491600401614427565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166111e6576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612ee23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff16156111e6576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127108111156130655760405162461bcd60e51b815260206004820181905260248201527f455243323938313a20526f79616c74792076616c756520746f6f20686967682e6044820152606401610d04565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600d8054740100000000000000000000000000000000000000009093027fffffffffffffffffff0000000000000000000000000000000000000000000000909316909117919091179055565b60008160016130e7828661446b565b6130f191906144d4565b6122a89190614483565b816001600160a01b0316836001600160a01b0316141561315d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d04565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606060118054610bfb9061454c565b60608161321957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613243578061322d8161459a565b915061323c9050600a83614483565b915061321d565b60008167ffffffffffffffff81111561325e5761325e6146a3565b6040519080825280601f01601f191660200182016040528015613288576020820181803683370190505b5090505b8415612c0c5761329d6001836144d4565b91506132aa600a866145d3565b6132b590603061446b565b60f81b8183815181106132ca576132ca614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613304600a86614483565b945061328c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061339e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610be657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610be6565b6111e6828260405180602001604052806000815250613a2c565b60006001600160a01b0384163b156135aa576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a02906134659033908990889088906004016143eb565b602060405180830381600087803b15801561347f57600080fd5b505af19250505080156134af575060408051601f3d908101601f191682019092526134ac9181019061410b565b60015b61355f573d8080156134dd576040519150601f19603f3d011682016040523d82523d6000602084013e6134e2565b606091505b5080516135575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d04565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612c0c565b506001949350505050565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526040518060c00160405280600160ff16815260200160128460ff168154811061361257613612614674565b90600052602060002090602091828204019190069054906101000a900460ff1660ff1681526020016012600885901c60ff168154811061365457613654614674565b6000918252602091829020828204015460ff601f9092166101000a900416825201601261368360086002614497565b85901c60ff168154811061369957613699614674565b6000918252602091829020828204015460ff601f9092166101000a90041682520160126136c860086003614497565b85901c60ff16815481106136de576136de614674565b6000918252602091829020828204015460ff601f9092166101000a900416825201601261370d60086004614497565b85901c60ff168154811061372357613723614674565b60009182526020918290209181049091015460ff601f9092166101000a900416905292915050565b6001600160a01b0383166137a6576137a181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6137c9565b816001600160a01b0316836001600160a01b0316146137c9576137c98382613ab5565b6001600160a01b0382166137e057610e5681613b52565b826001600160a01b0316826001600160a01b031614610e5657610e568282613c01565b60606000613812836002614497565b61381d90600261446b565b67ffffffffffffffff811115613835576138356146a3565b6040519080825280601f01601f19166020018201604052801561385f576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061389657613896614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106138f9576138f9614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613935846002614497565b61394090600161446b565b90505b60018111156139dd577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061398157613981614674565b1a60f81b82828151811061399757613997614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936139d681614517565b9050613943565b5083156122a85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d04565b613a368383613c45565b613a436000848484613408565b610e565760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d04565b60006001613ac284611add565b613acc91906144d4565b600083815260076020526040902054909150808214613b1f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613b64906001906144d4565b60008381526009602052604081205460088054939450909284908110613b8c57613b8c614674565b906000526020600020015490508060088381548110613bad57613bad614674565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613be557613be5614645565b6001900381819060005260206000200160009055905550505050565b6000613c0c83611add565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216613c9b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d04565b6000818152600260205260409020546001600160a01b031615613d005760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d04565b613d0c6000838361374b565b6001600160a01b0382166000908152600360205260408120805460019290613d3590849061446b565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613db79061454c565b90600052602060002090601f016020900481019282613dd95760008555613e1f565b82601f10613df257805160ff1916838001178555613e1f565b82800160010185558215613e1f579182015b82811115613e1f578251825591602001919060010190613e04565b50613e2b929150613e2f565b5090565b5b80821115613e2b5760008155600101613e30565b600067ffffffffffffffff831115613e5e57613e5e6146a3565b613e716020601f19601f8601160161443a565b9050828152838383011115613e8557600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114613eb357600080fd5b919050565b80358015158114613eb357600080fd5b600060208284031215613eda57600080fd5b6122a882613e9c565b60008060408385031215613ef657600080fd5b613eff83613e9c565b9150613f0d60208401613e9c565b90509250929050565b600080600060608486031215613f2b57600080fd5b613f3484613e9c565b9250613f4260208501613e9c565b9150604084013590509250925092565b60008060008060808587031215613f6857600080fd5b613f7185613e9c565b9350613f7f60208601613e9c565b925060408501359150606085013567ffffffffffffffff811115613fa257600080fd5b8501601f81018713613fb357600080fd5b613fc287823560208401613e44565b91505092959194509250565b60008060408385031215613fe157600080fd5b613fea83613e9c565b9150613f0d60208401613eb8565b6000806040838503121561400b57600080fd5b61401483613e9c565b946020939093013593505050565b6000806020838503121561403557600080fd5b823567ffffffffffffffff8082111561404d57600080fd5b818501915085601f83011261406157600080fd5b81358181111561407057600080fd5b8660208260051b850101111561408557600080fd5b60209290920196919550909350505050565b6000602082840312156140a957600080fd5b6122a882613eb8565b6000602082840312156140c457600080fd5b5035919050565b600080604083850312156140de57600080fd5b82359150613f0d60208401613e9c565b60006020828403121561410057600080fd5b81356122a8816146d2565b60006020828403121561411d57600080fd5b81516122a8816146d2565b60006020828403121561413a57600080fd5b813567ffffffffffffffff81111561415157600080fd5b8201601f8101841361416257600080fd5b612c0c84823560208401613e44565b60006020828403121561418357600080fd5b813561ffff811681146122a857600080fd5b6000602082840312156141a757600080fd5b5051919050565b600080604083850312156141c157600080fd5b8235915060208084013567ffffffffffffffff808211156141e157600080fd5b818601915086601f8301126141f557600080fd5b813581811115614207576142076146a3565b8060051b915061421884830161443a565b8181528481019084860184860187018b101561423357600080fd5b600095505b83861015614256578035835260019590950194918601918601614238565b508096505050505050509250929050565b6000806040838503121561427a57600080fd5b50508035926020909101359150565b6000806040838503121561429c57600080fd5b82359150602083013560ff811681146142b457600080fd5b809150509250929050565b6000602082840312156142d157600080fd5b813563ffffffff811681146122a857600080fd5b6000602082840312156142f757600080fd5b813567ffffffffffffffff811681146122a857600080fd5b600081518084526143278160208601602086016144eb565b601f01601f19169290920160200192915050565b6000835161434d8184602088016144eb565b8351908301906143618183602088016144eb565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516143a28160178501602088016144eb565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516143df8160288401602088016144eb565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261441d608083018461430f565b9695505050505050565b6020815260006122a8602083018461430f565b604051601f8201601f1916810167ffffffffffffffff81118282101715614463576144636146a3565b604052919050565b6000821982111561447e5761447e6145e7565b500190565b60008261449257614492614616565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156144cf576144cf6145e7565b500290565b6000828210156144e6576144e66145e7565b500390565b60005b838110156145065781810151838201526020016144ee565b838111156121c05750506000910152565b600081614526576145266145e7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c9082168061456057607f821691505b60208210811415611fba577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156145cc576145cc6145e7565b5060010190565b6000826145e2576145e2614616565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffff00000000000000000000000000000000000000000000000000000000811681146124a657600080fdfea2646970667358221220d3c80a8b8c5911c30d9d8b8b167e4904a40e71dcedd257ed301a33e7a4eb699364736f6c63430008070033000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c82000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef000000000000000000000000000000000000000000000000000000000000006c

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061048d5760003560e01c806374991fe61161026b578063a64550a111610150578063d547741f116100c8578063e985e9c511610097578063ea7b4f771161007c578063ea7b4f7714610b6e578063f2fde38b14610b81578063f88ea2c914610b9457600080fd5b8063e985e9c514610b1f578063e988974914610b5b57600080fd5b8063d547741f14610a6a578063d9ec50f014610a7d578063daf48a3214610a85578063e926ca9514610a8d57600080fd5b8063b39911101161011f578063c387156111610104578063c387156114610a25578063c5b4e93714610a32578063c87b56dd14610a5757600080fd5b8063b3991110146109ca578063b88d4fde14610a1257600080fd5b8063a64550a114610962578063aa2e09e114610989578063addbb3c9146109ae578063b18df006146109b757600080fd5b806395d89b41116101e3578063992a844d116101b2578063a217fddf11610197578063a217fddf14610934578063a22cb4651461093c578063a4eb718c1461094f57600080fd5b8063992a844d1461090e578063a0f88bb71461092157600080fd5b806395d89b411461089a57806395edc18c146108a257806396c9fcd6146108e857806398544710146108fb57600080fd5b80638ac000211161023a5780638da5cb5b1161021f5780638da5cb5b1461082957806391d148541461083a57806394b059ab1461087357600080fd5b80638ac00021146107e95780638c7ea24b1461081657600080fd5b806374991fe6146107bd5780637ab0d0b9146107c55780637eeb1c67146107cd5780638824f5a7146107d657600080fd5b806336568abe1161039157806349a46612116103095780635d47964b116102d85780636b7ce550116102bd5780636b7ce5501461078f57806370a08231146107a2578063715018a6146107b557600080fd5b80635d47964b146107695780636352211e1461077c57600080fd5b806349a46612146107095780634f6ccce71461071c57806355380dfb1461072f57806355f804b31461075657600080fd5b80634502780e11610360578063454836ad11610345578063454836ad146106e55780634599630e146106ed57806345bb327b1461070057600080fd5b80634502780e146106cb5780634516e1e9146106d357600080fd5b806336568abe146106765780633b2bcbf1146106895780633ccfd60b146106b057806342842e0e146106b857600080fd5b80631fe543e3116104245780632913daa0116103f35780632b26a6bf116103d85780632b26a6bf1461063d5780632f2ff15d146106505780632f745c591461066357600080fd5b80632913daa0146106025780632a55205a1461060b57600080fd5b80631fe543e31461059257806323b872dd146105a5578063248a9ca3146105b857806327810e30146105db57600080fd5b8063095ea7b311610460578063095ea7b3146105115780630af40b7f14610526578063150b7a021461054657806318160ddd1461058a57600080fd5b806301ffc9a71461049257806306f13056146104ba57806306fdde03146104d1578063081812fc146104e6575b600080fd5b6104a56104a03660046140ee565b610bbd565b60405190151581526020015b60405180910390f35b6104c360165481565b6040519081526020016104b1565b6104d9610bec565b6040516104b19190614427565b6104f96104f43660046140b2565b610c7e565b6040516001600160a01b0390911681526020016104b1565b61052461051f366004613ff8565b610d29565b005b6104c36105343660046140b2565b60156020526000908152604090205481565b610559610554366004613f52565b610e5b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016104b1565b6008546104c3565b6105246105a03660046141ae565b611149565b6105246105b3366004613f16565b6111ea565b6104c36105c63660046140b2565b6000908152600b602052604090206001015490565b6104f97f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c8281565b6104c360185481565b61061e610619366004614267565b611271565b604080516001600160a01b0390931683526020830191909152016104b1565b61052461064b3660046140b2565b6112d7565b61052461065e3660046140cb565b61131b565b6104c3610671366004613ff8565b611341565b6105246106843660046140cb565b6113e9565b6104f97f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990981565b610524611471565b6105246106c6366004613f16565b611515565b6104c3611530565b6019546104a590610100900460ff1681565b6104c3600581565b6105246106fb366004613ff8565b6115c8565b6104c3600f5481565b610524610717366004614022565b6117bd565b6104c361072a3660046140b2565b6118ff565b6104f97f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca81565b610524610764366004614128565b6119a3565b6104c3610777366004614267565b6119e1565b6104f961078a3660046140b2565b611a12565b61052461079d366004614022565b611a9d565b6104c36107b0366004613ec8565b611add565b610524611b77565b6104c3611bdd565b6104c3600881565b6104c360175481565b6105246107e4366004614171565b611bf8565b600e546107fd9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016104b1565b610524610824366004613ff8565b611c61565b600c546001600160a01b03166104f9565b6104a56108483660046140cb565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6104c37fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b81565b6104d9611ccd565b60408051808201909152600d546001600160a01b0381168083527401000000000000000000000000000000000000000090910462ffffff166020909201919091526104f9565b6105246108f6366004614097565b611cdc565b6105246109093660046140b2565b611d1b565b61052461091c3660046140b2565b611d4c565b6104c361092f3660046140b2565b611d90565b6104c3600081565b61052461094a366004613fce565b611fc0565b61052461095d3660046142bf565b611fcb565b6104c37fbf41b66e0b91d3bfcb3f5f0b3202de2fafe3878571e8c06289cfe757dcbc598081565b61099c6109973660046140b2565b61202e565b60405160ff90911681526020016104b1565b6104c361010081565b6105246109c5366004614289565b612062565b604080518082018252600d546001600160a01b038116825274010000000000000000000000000000000000000000900462ffffff1660209182018190529151918252016104b1565b610524610a20366004613f52565b612138565b6019546104a59060ff1681565b601054610a429063ffffffff1681565b60405163ffffffff90911681526020016104b1565b6104d9610a653660046140b2565b6121c6565b610524610a783660046140cb565b6122af565b6104c36122d5565b6104c36122e1565b610ae3610a9b3660046140b2565b60136020526000908152604090205460ff8082169161010081048216916201000082048116916301000000810482169164010000000082048116916501000000000090041686565b6040805160ff978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c0016104b1565b6104a5610b2d366004613ee3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610524610b69366004614097565b6122fd565b610524610b7c3660046142e5565b612360565b610524610b8f366004613ec8565b6123c7565b601054610baa90640100000000900461ffff1681565b60405161ffff90911681526020016104b1565b6000610bc8826124a9565b80610bd75750610bd7826124fb565b80610be65750610be682612551565b92915050565b606060008054610bfb9061454c565b80601f0160208091040260200160405190810160405280929190818152602001828054610c279061454c565b8015610c745780601f10610c4957610100808354040283529160200191610c74565b820191906000526020600020905b815481529060010190602001808311610c5757829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d0d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610d3482611a12565b9050806001600160a01b0316836001600160a01b03161415610dbe5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610d04565b336001600160a01b0382161480610dda5750610dda8133610b2d565b610e4c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d04565b610e5683836125e9565b505050565b60006002600a541415610eb05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d04565b6002600a55336001600160a01b037f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c82161415610fcd5760195460ff16610f385760405162461bcd60e51b815260206004820152601560248201527f4c61756e6368696e67206e6f74206163746976652e00000000000000000000006044820152606401610d04565b6000838152600260205260409020546001600160a01b0316610fb257610f5e848461266f565b8151158015610f80575060175460165460009081526014602052604090205410155b80610f9e575060185460165460009081526014602052604090205410155b15610fad57610fab61269d565b505b61111a565b610fad3085856040518060200160405280600081525061281a565b333014156110d257601954610100900460ff1661102c5760405162461bcd60e51b815260206004820152601360248201527f446f636b696e67206e6f74206163746976652e000000000000000000000000006044820152606401610d04565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038581166024830152604482018590527f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c8216906342842e0e90606401600060405180830381600087803b1580156110b557600080fd5b505af11580156110c9573d6000803e3d6000fd5b5050505061111a565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f6f646c657320616e64205370616365204e6f6f646c6573206f6e6c792e006044820152606401610d04565b507f150b7a02000000000000000000000000000000000000000000000000000000006001600a55949350505050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146111dc576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610d04565b6111e682826128a3565b5050565b6111f43382612b0c565b6112665760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d04565b610e56838383612c14565b60408051808201909152600d546001600160a01b0381168083527401000000000000000000000000000000000000000090910462ffffff16602083018190529091600091612710906112c39086614497565b6112cd9190614483565b9150509250929050565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6113028133612e04565b60188290556017548210156111e6576018546017555050565b6000828152600b60205260409020600101546113378133612e04565b610e568383612e84565b600061134c83611add565b82106113c05760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610d04565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b03811633146114675760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610d04565b6111e68282612f26565b600061147d8133612e04565b604051600090339047908381818185875af1925050503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806111e65760405162461bcd60e51b815260206004820152601260248201527f5769746864726177616c206661696c65642e00000000000000000000000000006044820152606401610d04565b610e5683838360405180602001604052806000815250612138565b60006002600a5414156115855760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d04565b6002600a557fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6115b58133612e04565b6115bd61269d565b9150506001600a5590565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6115f38133612e04565b6000828152600260205260409020546001600160a01b0316158061162757503061161c83611a12565b6001600160a01b0316145b156116d2576040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038481166024830152604482018490527f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c8216906342842e0e90606401600060405180830381600087803b1580156116b557600080fd5b505af11580156116c9573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c826001600160a01b031661170583611a12565b6001600160a01b0316141561174f57610e567f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c8284846040518060200160405280600081525061281a565b60405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920616c6c6f77656420696e20726573637565207363656e6172696f7360448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610d04565b60005b818110156118dc577f000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c826001600160a01b031663b88d4fde333086868681811061180b5761180b614674565b60405160e087901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b0395861660048083019190915294909516602486015260200291909101356044840152506080606483015260848201527f736b69700000000000000000000000000000000000000000000000000000000060a482015260c401600060405180830381600087803b1580156118b157600080fd5b505af11580156118c5573d6000803e3d6000fd5b5050505080806118d49061459a565b9150506117c0565b50601754601654600090815260146020526040902054106111e657610e5661269d565b600061190a60085490565b821061197e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610d04565b6008828154811061199157611991614674565b90600052602060002001549050919050565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6119ce8133612e04565b8151610e56906011906020850190613dab565b601460205281600052604060002081815481106119fd57600080fd5b90600052602060002001600091509150505481565b6000818152600260205260408120546001600160a01b031680610be65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610d04565b60005b81811015610e5657611acb3330858585818110611abf57611abf614674565b90506020020135611515565b80611ad58161459a565b915050611aa0565b60006001600160a01b038216611b5b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610d04565b506001600160a01b031660009081526003602052604090205490565b600c546001600160a01b03163314611bd15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d04565b611bdb6000612fa9565b565b611be960056008614497565b611bf590610100614483565b81565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611c238133612e04565b506010805461ffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff909216919091179055565b6000611c6d8133612e04565b6001600160a01b038316611cc35760405162461bcd60e51b815260206004820152600d60248201527f5a65726f20616464726573732e000000000000000000000000000000000000006044820152606401610d04565b610e568383613013565b606060018054610bfb9061454c565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611d078133612e04565b506019805460ff1916911515919091179055565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611d468133612e04565b50600f55565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611d778133612e04565b60178290556018548211156111e6576017546018555050565b60007fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611dbd8133612e04565b600083815260146020526040812054905b81811015611e795760008581526014602052604081208054601392919084908110611dfb57611dfb614674565b6000918252602080832090910154835282019290925260400190205460ff1615611e675760405162461bcd60e51b815260206004820152601c60248201527f5374617473206861766520616c7265616479206265656e207365742e000000006044820152606401610d04565b80611e718161459a565b915050611dce565b50600084815260146020526040812054611eaa90611e9960056008614497565b611ea590610100614483565b6130d8565b600f54600e546010546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019390935267ffffffffffffffff9091166024830152640100000000810461ffff16604483015263ffffffff9081166064830152821660848201529091506000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611f6b57600080fd5b505af1158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa39190614195565b600081815260156020526040902087905594505050505b50919050565b6111e63383836130fb565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b611ff68133612e04565b50601080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff92909216919091179055565b6012818154811061203e57600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b7fbf41b66e0b91d3bfcb3f5f0b3202de2fafe3878571e8c06289cfe757dcbc598061208d8133612e04565b6000838152600260205260409020546001600160a01b03166120f15760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20646f6573206e6f742065786973742e00000000000000000000006044820152606401610d04565b600083815260136020526040808220805460ff191660ff86161790555184917f3063a7f4045ac90e6c1e1c0a1cd8a4d8208488f1f3a05359bf9e5eb5e045ff3f91a2505050565b6121423383612b0c565b6121b45760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610d04565b6121c08484848461281a565b50505050565b6000818152600260205260409020546060906001600160a01b03166122535760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d04565b600061225d6131ca565b9050600081511161227d57604051806020016040528060008152506122a8565b80612287846131d9565b60405160200161229892919061433b565b6040516020818303038152906040525b9392505050565b6000828152600b60205260409020600101546122cb8133612e04565b610e568383612f26565b611bf560056008614497565b60016122ef60056008614497565b6001901b611bf591906144d4565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6123288133612e04565b5060198054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b61238b8133612e04565b50600e80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b600c546001600160a01b031633146124215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d04565b6001600160a01b03811661249d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610d04565b6124a681612fa9565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610be65750610be6825b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610be65750610be68261330b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610be657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a7000000000000000000000000000000000000000000000000000000001492915050565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155819061263682611a12565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6016546000908152601460209081526040822080546001810182559083529120018190556111e682826133ee565b60165460009081526014602052604081205481906126c190611e9960056008614497565b600f54600e546010546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019390935267ffffffffffffffff9091166024830152640100000000810461ffff16604483015263ffffffff9081166064830152821660848201529091506000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a401602060405180830381600087803b15801561278257600080fd5b505af1158015612796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ba9190614195565b601680546000838152601560205260408120829055929350916127dc8361459a565b90915550506040518181527fe6f78ab407fb8229aa50d7101f29db0e3e07a39e43275bf0f0575b266df9c0cf9060200160405180910390a192915050565b612825848484612c14565b61283184848484613408565b6121c05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d04565b600082815260156020908152604080832054808452601490925282205490915b81811015612b055760006128d960056008614497565b6128e590610100614483565b6128ef9083614483565b90506000600161290160056008614497565b6001901b61290f91906144d4565b86838151811061292157612921614674565b6020026020010151169050600060146000878152602001908152602001600020848154811061295257612952614674565b90600052602060002001549050612968826135b5565b60008281526013602090815260408083208451815493860151868401516060880151608089015160a09099015160ff90811665010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff9a8216640100000000029a909a167fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff9282166301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff9483166201000002949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff958316610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909a169290961691909117979097179290921692909217919091171692909217939093179055905182917f3063a7f4045ac90e6c1e1c0a1cd8a4d8208488f1f3a05359bf9e5eb5e045ff3f91a2612aca60056008614497565b878481518110612adc57612adc614674565b60200260200101818151901c915081815250505050508080612afd9061459a565b9150506128c3565b5050505050565b6000818152600260205260408120546001600160a01b0316612b965760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610d04565b6000612ba183611a12565b9050806001600160a01b0316846001600160a01b03161480612bdc5750836001600160a01b0316612bd184610c7e565b6001600160a01b0316145b80612c0c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612c2782611a12565b6001600160a01b031614612ca35760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610d04565b6001600160a01b038216612d1e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610d04565b612d2983838361374b565b612d346000826125e9565b6001600160a01b0383166000908152600360205260408120805460019290612d5d9084906144d4565b90915550506001600160a01b0382166000908152600360205260408120805460019290612d8b90849061446b565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166111e657612e42816001600160a01b03166014613803565b612e4d836020613803565b604051602001612e5e92919061436a565b60408051601f198184030181529082905262461bcd60e51b8252610d0491600401614427565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166111e6576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612ee23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff16156111e6576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127108111156130655760405162461bcd60e51b815260206004820181905260248201527f455243323938313a20526f79616c74792076616c756520746f6f20686967682e6044820152606401610d04565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600d8054740100000000000000000000000000000000000000009093027fffffffffffffffffff0000000000000000000000000000000000000000000000909316909117919091179055565b60008160016130e7828661446b565b6130f191906144d4565b6122a89190614483565b816001600160a01b0316836001600160a01b0316141561315d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d04565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606060118054610bfb9061454c565b60608161321957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613243578061322d8161459a565b915061323c9050600a83614483565b915061321d565b60008167ffffffffffffffff81111561325e5761325e6146a3565b6040519080825280601f01601f191660200182016040528015613288576020820181803683370190505b5090505b8415612c0c5761329d6001836144d4565b91506132aa600a866145d3565b6132b590603061446b565b60f81b8183815181106132ca576132ca614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613304600a86614483565b945061328c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061339e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610be657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610be6565b6111e6828260405180602001604052806000815250613a2c565b60006001600160a01b0384163b156135aa576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a02906134659033908990889088906004016143eb565b602060405180830381600087803b15801561347f57600080fd5b505af19250505080156134af575060408051601f3d908101601f191682019092526134ac9181019061410b565b60015b61355f573d8080156134dd576040519150601f19603f3d011682016040523d82523d6000602084013e6134e2565b606091505b5080516135575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d04565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612c0c565b506001949350505050565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526040518060c00160405280600160ff16815260200160128460ff168154811061361257613612614674565b90600052602060002090602091828204019190069054906101000a900460ff1660ff1681526020016012600885901c60ff168154811061365457613654614674565b6000918252602091829020828204015460ff601f9092166101000a900416825201601261368360086002614497565b85901c60ff168154811061369957613699614674565b6000918252602091829020828204015460ff601f9092166101000a90041682520160126136c860086003614497565b85901c60ff16815481106136de576136de614674565b6000918252602091829020828204015460ff601f9092166101000a900416825201601261370d60086004614497565b85901c60ff168154811061372357613723614674565b60009182526020918290209181049091015460ff601f9092166101000a900416905292915050565b6001600160a01b0383166137a6576137a181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6137c9565b816001600160a01b0316836001600160a01b0316146137c9576137c98382613ab5565b6001600160a01b0382166137e057610e5681613b52565b826001600160a01b0316826001600160a01b031614610e5657610e568282613c01565b60606000613812836002614497565b61381d90600261446b565b67ffffffffffffffff811115613835576138356146a3565b6040519080825280601f01601f19166020018201604052801561385f576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061389657613896614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106138f9576138f9614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613935846002614497565b61394090600161446b565b90505b60018111156139dd577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061398157613981614674565b1a60f81b82828151811061399757613997614674565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936139d681614517565b9050613943565b5083156122a85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d04565b613a368383613c45565b613a436000848484613408565b610e565760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d04565b60006001613ac284611add565b613acc91906144d4565b600083815260076020526040902054909150808214613b1f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613b64906001906144d4565b60008381526009602052604081205460088054939450909284908110613b8c57613b8c614674565b906000526020600020015490508060088381548110613bad57613bad614674565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613be557613be5614645565b6001900381819060005260206000200160009055905550505050565b6000613c0c83611add565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216613c9b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d04565b6000818152600260205260409020546001600160a01b031615613d005760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d04565b613d0c6000838361374b565b6001600160a01b0382166000908152600360205260408120805460019290613d3590849061446b565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613db79061454c565b90600052602060002090601f016020900481019282613dd95760008555613e1f565b82601f10613df257805160ff1916838001178555613e1f565b82800160010185558215613e1f579182015b82811115613e1f578251825591602001919060010190613e04565b50613e2b929150613e2f565b5090565b5b80821115613e2b5760008155600101613e30565b600067ffffffffffffffff831115613e5e57613e5e6146a3565b613e716020601f19601f8601160161443a565b9050828152838383011115613e8557600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114613eb357600080fd5b919050565b80358015158114613eb357600080fd5b600060208284031215613eda57600080fd5b6122a882613e9c565b60008060408385031215613ef657600080fd5b613eff83613e9c565b9150613f0d60208401613e9c565b90509250929050565b600080600060608486031215613f2b57600080fd5b613f3484613e9c565b9250613f4260208501613e9c565b9150604084013590509250925092565b60008060008060808587031215613f6857600080fd5b613f7185613e9c565b9350613f7f60208601613e9c565b925060408501359150606085013567ffffffffffffffff811115613fa257600080fd5b8501601f81018713613fb357600080fd5b613fc287823560208401613e44565b91505092959194509250565b60008060408385031215613fe157600080fd5b613fea83613e9c565b9150613f0d60208401613eb8565b6000806040838503121561400b57600080fd5b61401483613e9c565b946020939093013593505050565b6000806020838503121561403557600080fd5b823567ffffffffffffffff8082111561404d57600080fd5b818501915085601f83011261406157600080fd5b81358181111561407057600080fd5b8660208260051b850101111561408557600080fd5b60209290920196919550909350505050565b6000602082840312156140a957600080fd5b6122a882613eb8565b6000602082840312156140c457600080fd5b5035919050565b600080604083850312156140de57600080fd5b82359150613f0d60208401613e9c565b60006020828403121561410057600080fd5b81356122a8816146d2565b60006020828403121561411d57600080fd5b81516122a8816146d2565b60006020828403121561413a57600080fd5b813567ffffffffffffffff81111561415157600080fd5b8201601f8101841361416257600080fd5b612c0c84823560208401613e44565b60006020828403121561418357600080fd5b813561ffff811681146122a857600080fd5b6000602082840312156141a757600080fd5b5051919050565b600080604083850312156141c157600080fd5b8235915060208084013567ffffffffffffffff808211156141e157600080fd5b818601915086601f8301126141f557600080fd5b813581811115614207576142076146a3565b8060051b915061421884830161443a565b8181528481019084860184860187018b101561423357600080fd5b600095505b83861015614256578035835260019590950194918601918601614238565b508096505050505050509250929050565b6000806040838503121561427a57600080fd5b50508035926020909101359150565b6000806040838503121561429c57600080fd5b82359150602083013560ff811681146142b457600080fd5b809150509250929050565b6000602082840312156142d157600080fd5b813563ffffffff811681146122a857600080fd5b6000602082840312156142f757600080fd5b813567ffffffffffffffff811681146122a857600080fd5b600081518084526143278160208601602086016144eb565b601f01601f19169290920160200192915050565b6000835161434d8184602088016144eb565b8351908301906143618183602088016144eb565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516143a28160178501602088016144eb565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516143df8160288401602088016144eb565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261441d608083018461430f565b9695505050505050565b6020815260006122a8602083018461430f565b604051601f8201601f1916810167ffffffffffffffff81118282101715614463576144636146a3565b604052919050565b6000821982111561447e5761447e6145e7565b500190565b60008261449257614492614616565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156144cf576144cf6145e7565b500290565b6000828210156144e6576144e66145e7565b500390565b60005b838110156145065781810151838201526020016144ee565b838111156121c05750506000910152565b600081614526576145266145e7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c9082168061456057607f821691505b60208210811415611fba577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156145cc576145cc6145e7565b5060010190565b6000826145e2576145e2614616565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffff00000000000000000000000000000000000000000000000000000000811681146124a657600080fdfea2646970667358221220d3c80a8b8c5911c30d9d8b8b167e4904a40e71dcedd257ed301a33e7a4eb699364736f6c63430008070033

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

000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c82000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef000000000000000000000000000000000000000000000000000000000000006c

-----Decoded View---------------
Arg [0] : _noodles (address): 0xDCc2A6f7cF14B5d2fc0f2731FAF0a37b914a0C82
Arg [1] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [2] : _link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [3] : _keyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [4] : _subscriptionId (uint64): 108

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000dcc2a6f7cf14b5d2fc0f2731faf0a37b914a0c82
Arg [1] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [2] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [3] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [4] : 000000000000000000000000000000000000000000000000000000000000006c


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

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