ETH Price: $3,400.54 (+4.22%)

Token

FCF IRL BENEFITS (IRL BNFTS)
 

Overview

Max Total Supply

131 IRL BNFTS

Holders

39

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 IRL BNFTS
0x3cfde19ae6541509cd51e3e9949b4debb5a93ed7
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:
Benefit

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 19 : Benefit.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ERC721Enumerable.sol";
import "./openzeppelin/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.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";

/**
 * @title Fanchise Benefit NFT
 */
contract Benefit is VRFConsumerBaseV2, ERC721Enumerable, ERC2981, Ownable {
    using ECDSA for bytes32;

    uint256 constant UINT256_MAX = 2**256 - 1;

    // Events
    event BenefitClaimed(uint256 indexed benefitId, uint256 indexed nonce, uint256 tokenId);
    event RaffleComplete(uint256 indexed raffleId, uint256 raffleWinner);

    // Base URI
    string private _baseURI;

    // Mapping from nonce value to bool documenting whether the given nonce was already used, used to guard against replay attacks
    mapping(uint256 => bool) private _nonceUsed;

    // Used to lock owner configuration functions
    bool private _locked;

    // The address of the server that signs all buy transactions; see docs on the buy function for more info
    address public _signerAddress;

    // A record of the winner of a particular raffle (identified by a benefitId)
    mapping(uint256 => uint256) _raffleWinners;

    // A record of the number of participants in a given raffle
    mapping(uint256 => uint256) _raffleParticipants;

    // A record of the the chainlink request per raffle
    mapping(uint256 => uint256) _raffleRequests;

    // Chainlink configuration
    VRFCoordinatorV2Interface COORDINATOR;
    LinkTokenInterface LINKTOKEN;
    uint64 chainlinkSubscriptionId;
    bytes32 chainlinkKeyHash;

    constructor(
        string memory baseURI,
        string memory name,
        string memory symbol,
        address owner,
        address signer,
        address royaltiesReceiver,
        uint96 royaltiesFeeNumerator,
        address vrfCoordinator,
        address linkToken,
        uint64 subscriptionId,
        bytes32 keyHash
    ) ERC721(name, symbol) VRFConsumerBaseV2(vrfCoordinator) {
        _baseURI = baseURI;
        _signerAddress = signer;
        _setDefaultRoyalty(royaltiesReceiver, royaltiesFeeNumerator);
        transferOwnership(owner);

        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        LINKTOKEN = LinkTokenInterface(linkToken);
        chainlinkSubscriptionId = subscriptionId;
        chainlinkKeyHash = keyHash;
    }

    /**
     * Modifiers
     */

    modifier unlocked() {
        require(!_locked, "Contract locked");
        _;
    }

    /**
     * Public Transactions
     */

    /**
     * @notice Claim a benefit based on the holding of a Ballerz NFT.
     * @param nonce The nonce of this transaction; must be unique to protect against replay attacks.
     * @param sig The server's signature over all inputs: benefitId, nonce, this.address, msg.sender, msg.value
     */
    function claim(
        uint256 benefitId,
        uint256 nonce,
        bytes memory sig
    ) external payable {
        require(!_nonceUsed[nonce], "Nonce already used");

        require(_checkSig(nonce, msg.sender, msg.value, sig), "Invalid signature");

        _claim(nonce);

        emit BenefitClaimed(benefitId, nonce, latestTokenId());
    }

    /**
     * Public View Functions
     */

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "Token does not exist.");
        return string(abi.encodePacked(_baseURI, Strings.toString(tokenId)));
    }

    function totalSupply() public view virtual override returns (uint256) {
        return _owners.length;
    }

    function latestTokenId() public view returns (uint256) {
        return totalSupply() - 1;
    }

    function getRaffleWinner(uint256 raffleId) public view returns (uint256) {
        return _raffleWinners[raffleId];
    }

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

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

    /**
     * Internal Functions
     */

    function _claim(uint256 nonce) internal {
        assert(!_nonceUsed[nonce]);

        _nonceUsed[nonce] = true;

        _safeMint(msg.sender);
    }

    function _setNumParticipants(uint256 raffleId, uint256 numParticipants) internal {
        require(raffleId > 0, "Invalid raffleId");
        require(_raffleParticipants[raffleId] == 0, "Raffle already begun");
        require(numParticipants > 0, "Raffle must have at least one participant");

        _raffleParticipants[raffleId] = numParticipants;
    }

    function _completeRaffle(uint256 raffleId, uint256 randomNumber) internal {
        require(raffleId > 0, "Invalid raffleId");
        require(_raffleWinners[raffleId] == 0, "Raffle already complete");

        uint256 numParticipants = _raffleParticipants[raffleId];
        uint256 raffleWinner = randomNumber % numParticipants;

        _raffleWinners[raffleId] = raffleWinner;

        emit RaffleComplete(raffleId, raffleWinner);
    }

    /**
     * @dev Added nonce and contract address in sig to guard against replay attacks
     */
    function _checkSig(
        uint256 nonce,
        address user,
        uint256 price,
        bytes memory sig
    ) internal view returns (bool) {
        bytes32 hash = keccak256(
            abi.encodePacked(
                "\x19Ethereum Signed Message:\n32",
                keccak256(abi.encode(nonce, address(this), user, price))
            )
        );
        return _signerAddress == hash.recover(sig);
    }

    /**
     * Owner Functions
     */

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

    function changeSigner(address signerAddress) public onlyOwner unlocked {
        _signerAddress = signerAddress;
    }

    function lockContract() public onlyOwner {
        _locked = true;
    }

    function withdraw(uint256 amount, address payable to) public onlyOwner {
        require(amount <= address(this).balance, "Cannot withdraw more than current balance");
        to.transfer(amount);
    }

    uint32 constant numWords = 1;
    uint16 constant requestConfirmations = 3;
    uint32 constant callbackGasLimit = 250000;

    function chooseRaffleWinner(uint256 raffleId, uint256 numParticipants) public onlyOwner unlocked {
        _setNumParticipants(raffleId, numParticipants);

        require(chainlinkSubscriptionId > 0, "Chainlink subscriptionId not set");

        // Will revert if subscription is not set and funded.
        uint256 requestId = COORDINATOR.requestRandomWords(
            chainlinkKeyHash,
            chainlinkSubscriptionId,
            requestConfirmations,
            callbackGasLimit,
            numWords
        );

        _raffleRequests[requestId] = raffleId;
    }

    function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
        uint256 raffleId = _raffleRequests[requestId];
        _completeRaffle(raffleId, randomWords[0]);
    }

    /**
     * @dev External onlyOwner version of {ERC2981-_setDefaultRoyalty}.
     */
    function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    /**
     * @dev External onlyOwner version of {ERC2981-_deleteDefaultRoyalty}.
     */
    function deleteDefaultRoyalty() external onlyOwner {
        _deleteDefaultRoyalty();
    }

    /**
     * @dev External onlyOwner version of {ERC2981-_setTokenRoyalty}.
     */
    function setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) external onlyOwner {
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    /**
     * @dev External onlyOwner version of {ERC2981-_resetTokenRoyalty}.
     */
    function resetTokenRoyalty(uint256 tokenId) external onlyOwner {
        _resetTokenRoyalty(tokenId);
    }

    /**
     * @dev Update chainlink subscriptionId
     */
    function setChainlinkSubscriptionId(uint64 subscriptionId) external onlyOwner {
        chainlinkSubscriptionId = subscriptionId;
    }

    /**
     * @dev Update chainlink subscriptionId
     */
    function setChainlinkKeyHash(bytes32 keyHash) external onlyOwner {
        chainlinkKeyHash = keyHash;
    }
}

File 2 of 19 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/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 but rips out the core of the gas-wasting processing that comes from OpenZeppelin.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    /**
     * @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-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _owners.length;
    }

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

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

        uint count;
        for(uint i; i < _owners.length; i++){
            if(owner == _owners[i]){
                if(count == index) return i;
                else count++;
            }
        }

        revert("ERC721Enumerable: owner index out of bounds");
    }
}

File 3 of 19 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 4 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 5 of 19 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            // solhint-disable-next-line no-inline-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
        } else if (signature.length == 64) {
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            // solhint-disable-next-line no-inline-assembly
            assembly {
                let vs := mload(add(signature, 0x40))
                r := mload(add(signature, 0x20))
                s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
                v := add(shr(255, vs), 27)
            }
        } else {
            revert("ECDSA: invalid signature length");
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 6 of 19 : 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 7 of 19 : 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 8 of 19 : 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 9 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./Address.sol";

abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    string private _name;
    string private _symbol;

    // Mapping from token ID to owner address
    address[] internal _owners;

    mapping(uint256 => address) private _tokenApprovals;
    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");

        uint256 count;
        for (uint256 i; i < _owners.length; ++i) {
            if (owner == _owners[i]) ++count;
        }
        return count;
    }

    /**
     * @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 {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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return tokenId < _owners.length && _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) internal virtual {
        _safeMint(to, "");
    }

    /**
     * @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, bytes memory _data) internal virtual {
        uint256 tokenId = _mint(to);
        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) internal virtual returns (uint256) {
        require(to != address(0), "ERC721: mint to the zero address");

        uint256 tokenId = _owners.length;

        _owners.push(to);

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

        return 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);

        // Clear approvals
        _approve(address(0), tokenId);
        _owners[tokenId] = address(0);

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

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

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

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

File 10 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 tokenId);

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

File 11 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 12 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

File 14 of 19 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 15 of 19 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 16 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT

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 17 of 19 : Address.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

library Address {
    function isContract(address account) internal view returns (bool) {
        uint size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}

File 18 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/introspection/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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"royaltiesReceiver","type":"address"},{"internalType":"uint96","name":"royaltiesFeeNumerator","type":"uint96"},{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"address","name":"linkToken","type":"address"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"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":"benefitId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BenefitClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"raffleWinner","type":"uint256"}],"name":"RaffleComplete","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":"_signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address","name":"signerAddress","type":"address"}],"name":"changeSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"raffleId","type":"uint256"},{"internalType":"uint256","name":"numParticipants","type":"uint256"}],"name":"chooseRaffleWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"benefitId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"raffleId","type":"uint256"}],"name":"getRaffleWinner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"name":"setChainlinkKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"}],"name":"setChainlinkSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","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":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b506040516200400d3803806200400d833981016040819052620000349162000542565b6001600160a01b03841660805289518a908a906200005a90600090602085019062000382565b5080516200007090600190602084019062000382565b5050506000620000856200016b60201b60201c565b600780546001600160a01b0319166001600160a01b0383169081179091556040519192509060009060008051602062003fed833981519152908290a3508a51620000d79060089060208e019062000382565b50600a8054610100600160a81b0319166101006001600160a01b038a16021790556200010486866200016f565b6200010f8862000274565b600e80546001600160a01b039586166001600160a01b0319909116179055600f80546001600160401b03909316600160a01b026001600160e01b031990931693909416929092171790915560105550620006ae95505050505050565b3390565b6127106001600160601b0382161115620001e35760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b0382166200023b5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001da565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600555565b6007546001600160a01b03163314620002d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620001da565b6001600160a01b038116620003375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620001da565b6007546040516001600160a01b0380841692169060008051602062003fed83398151915290600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b828054620003909062000671565b90600052602060002090601f016020900481019282620003b45760008555620003ff565b82601f10620003cf57805160ff1916838001178555620003ff565b82800160010185558215620003ff579182015b82811115620003ff578251825591602001919060010190620003e2565b506200040d92915062000411565b5090565b5b808211156200040d576000815560010162000412565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200045057600080fd5b81516001600160401b03808211156200046d576200046d62000428565b604051601f8301601f19908116603f0116810190828211818310171562000498576200049862000428565b81604052838152602092508683858801011115620004b557600080fd5b600091505b83821015620004d95785820183015181830184015290820190620004ba565b83821115620004eb5760008385830101525b9695505050505050565b80516001600160a01b03811681146200050d57600080fd5b919050565b80516001600160601b03811681146200050d57600080fd5b80516001600160401b03811681146200050d57600080fd5b60008060008060008060008060008060006101608c8e0312156200056557600080fd5b8b516001600160401b038111156200057c57600080fd5b6200058a8e828f016200043e565b60208e0151909c5090506001600160401b03811115620005a957600080fd5b620005b78e828f016200043e565b60408e0151909b5090506001600160401b03811115620005d657600080fd5b620005e48e828f016200043e565b995050620005f560608d01620004f5565b97506200060560808d01620004f5565b96506200061560a08d01620004f5565b95506200062560c08d0162000512565b94506200063560e08d01620004f5565b9350620006466101008d01620004f5565b9250620006576101208d016200052a565b91506101408c015190509295989b509295989b9093969950565b600181811c908216806200068657607f821691505b60208210811415620006a857634e487b7160e01b600052602260045260246000fd5b50919050565b60805161391c620006d160003960008181610b4e0152610ba9015261391c6000f3fe60806040526004361061024e5760003560e01c80636352211e11610138578063a22cb465116100b0578063bea1422c1161007f578063c87b56dd11610064578063c87b56dd1461068e578063e985e9c5146106ae578063f2fde38b146106f757600080fd5b8063bea1422c14610649578063c1df65381461066957600080fd5b8063a22cb465146105d4578063aa1b103f146105f4578063aad2b72314610609578063b88d4fde1461062957600080fd5b8063753868e3116101075780638c0e8349116100ec5780638c0e83491461058c5780638da5cb5b146105a157806395d89b41146105bf57600080fd5b8063753868e3146105575780638a616bc01461056c57600080fd5b80636352211e146104e2578063692ad3531461050257806370a0823114610522578063715018a61461054257600080fd5b80632a55205a116101cb5780634f6ccce71161019a5780635944c7531161017f5780635944c753146104825780635eddd157146104a257806362617c9a146104b557600080fd5b80634f6ccce71461044257806355f804b31461046257600080fd5b80632a55205a146103a35780632f745c59146103e257806340b275cf1461040257806342842e0e1461042257600080fd5b8063081812fc1161022257806318160ddd1161020757806318160ddd146103445780631fe543e31461036357806323b872dd1461038357600080fd5b8063081812fc146102ec578063095ea7b31461032457600080fd5b8062f714ce1461025357806301ffc9a71461027557806304634d8d146102aa57806306fdde03146102ca575b600080fd5b34801561025f57600080fd5b5061027361026e366004612ff6565b610717565b005b34801561028157600080fd5b50610295610290366004613054565b610827565b60405190151581526020015b60405180910390f35b3480156102b657600080fd5b506102736102c5366004613099565b610883565b3480156102d657600080fd5b506102df6108eb565b6040516102a19190613144565b3480156102f857600080fd5b5061030c610307366004613157565b61097d565b6040516001600160a01b0390911681526020016102a1565b34801561033057600080fd5b5061027361033f366004613170565b610a16565b34801561035057600080fd5b506002545b6040519081526020016102a1565b34801561036f57600080fd5b5061027361037e36600461321a565b610b43565b34801561038f57600080fd5b5061027361039e3660046132cc565b610be0565b3480156103af57600080fd5b506103c36103be36600461330d565b610c67565b604080516001600160a01b0390931683526020830191909152016102a1565b3480156103ee57600080fd5b506103556103fd366004613170565b610d44565b34801561040e57600080fd5b5061027361041d366004613157565b610ea3565b34801561042e57600080fd5b5061027361043d3660046132cc565b610f02565b34801561044e57600080fd5b5061035561045d366004613157565b610f1d565b34801561046e57600080fd5b5061027361047d3660046133a5565b610f9b565b34801561048e57600080fd5b5061027361049d3660046133ee565b61105b565b6102736104b036600461344c565b6110c0565b3480156104c157600080fd5b506103556104d0366004613157565b6000908152600b602052604090205490565b3480156104ee57600080fd5b5061030c6104fd366004613157565b6111c1565b34801561050e57600080fd5b5061027361051d36600461349c565b611261565b34801561052e57600080fd5b5061035561053d3660046134c6565b61130e565b34801561054e57600080fd5b506102736113ef565b34801561056357600080fd5b506102736114ab565b34801561057857600080fd5b50610273610587366004613157565b611532565b34801561059857600080fd5b506103556115a0565b3480156105ad57600080fd5b506007546001600160a01b031661030c565b3480156105cb57600080fd5b506102df6115bc565b3480156105e057600080fd5b506102736105ef3660046134e3565b6115cb565b34801561060057600080fd5b506102736116ae565b34801561061557600080fd5b506102736106243660046134c6565b611714565b34801561063557600080fd5b50610273610644366004613516565b611800565b34801561065557600080fd5b5061027361066436600461330d565b61188e565b34801561067557600080fd5b50600a5461030c9061010090046001600160a01b031681565b34801561069a57600080fd5b506102df6106a9366004613157565b611aa9565b3480156106ba57600080fd5b506102956106c9366004613582565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b34801561070357600080fd5b506102736107123660046134c6565b611b32565b6007546001600160a01b031633146107765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b478211156107ec5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f74207769746864726177206d6f7265207468616e2063757272656e60448201527f742062616c616e63650000000000000000000000000000000000000000000000606482015260840161076d565b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610822573d6000803e3d6000fd5b505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061087d575061087d82611c7c565b92915050565b6007546001600160a01b031633146108dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6108e78282611cd2565b5050565b6060600080546108fa906135b0565b80601f0160208091040260200160405190810160405280929190818152602001828054610926906135b0565b80156109735780601f1061094857610100808354040283529160200191610973565b820191906000526020600020905b81548152906001019060200180831161095657829003601f168201915b5050505050905090565b600061098882611dfd565b6109fa5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161076d565b506000908152600360205260409020546001600160a01b031690565b6000610a21826111c1565b9050806001600160a01b0316836001600160a01b03161415610aab5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161076d565b336001600160a01b0382161480610ac75750610ac781336106c9565b610b395760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161076d565b6108228383611e47565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bd6576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016602482015260440161076d565b6108e78282611ecd565b610bea3382611f01565b610c5c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161076d565b610822838383611ffc565b60008281526006602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291610d085750604080518082019091526005546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090610d2c906bffffffffffffffffffffffff1687613633565b610d36919061369f565b915196919550909350505050565b6000610d4f8361130e565b8210610dc35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161076d565b6000805b600254811015610e345760028181548110610de457610de46136b3565b6000918252602090912001546001600160a01b0386811691161415610e225783821415610e1457915061087d9050565b81610e1e816136e2565b9250505b80610e2c816136e2565b915050610dc7565b5060405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161076d565b6007546001600160a01b03163314610efd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b601055565b61082283838360405180602001604052806000815250611800565b6002546000908210610f975760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161076d565b5090565b6007546001600160a01b03163314610ff55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a5460ff16156110485760405162461bcd60e51b815260206004820152600f60248201527f436f6e7472616374206c6f636b65640000000000000000000000000000000000604482015260640161076d565b80516108e7906008906020840190612f51565b6007546001600160a01b031633146110b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b610822838383612197565b60008281526009602052604090205460ff161561111f5760405162461bcd60e51b815260206004820152601260248201527f4e6f6e636520616c726561647920757365640000000000000000000000000000604482015260640161076d565b61112b823334846122d3565b6111775760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161076d565b61118082612385565b81837f814aa8bfa0d05261c5e195b65e6d8ef869024e3e9f5ebe6062060b3fa6f4716a6111ab6115a0565b60405190815260200160405180910390a3505050565b600080600283815481106111d7576111d76136b3565b6000918252602090912001546001600160a01b031690508061087d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161076d565b6007546001600160a01b031633146112bb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600f805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60006001600160a01b03821661138c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161076d565b6000805b6002548110156113e857600281815481106113ad576113ad6136b3565b6000918252602090912001546001600160a01b03858116911614156113d8576113d5826136e2565b91505b6113e1816136e2565b9050611390565b5092915050565b6007546001600160a01b031633146114495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6007546001600160a01b031633146115055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6007546001600160a01b0316331461158c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600090815260066020526040812055565b50565b600060016115ad60025490565b6115b7919061371b565b905090565b6060600180546108fa906135b0565b6001600160a01b0382163314156116245760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161076d565b3360008181526004602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6007546001600160a01b031633146117085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6117126000600555565b565b6007546001600160a01b0316331461176e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a5460ff16156117c15760405162461bcd60e51b815260206004820152600f60248201527f436f6e7472616374206c6f636b65640000000000000000000000000000000000604482015260640161076d565b600a80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b61180a3383611f01565b61187c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161076d565b611888848484846123e4565b50505050565b6007546001600160a01b031633146118e85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a5460ff161561193b5760405162461bcd60e51b815260206004820152600f60248201527f436f6e7472616374206c6f636b65640000000000000000000000000000000000604482015260640161076d565b611945828261246d565b600f5474010000000000000000000000000000000000000000900467ffffffffffffffff166119b65760405162461bcd60e51b815260206004820181905260248201527f436861696e6c696e6b20737562736372697074696f6e4964206e6f7420736574604482015260640161076d565b600e54601054600f546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925274010000000000000000000000000000000000000000900467ffffffffffffffff166024820152600360448201526203d0906064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611a5b57600080fd5b505af1158015611a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a939190613732565b6000908152600d60205260409020929092555050565b6060611ab482611dfd565b611b005760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20646f6573206e6f742065786973742e0000000000000000000000604482015260640161076d565b6008611b0b836125a1565b604051602001611b1c929190613767565b6040516020818303038152906040529050919050565b6007546001600160a01b03163314611b8c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6001600160a01b038116611c085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161076d565b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061087d575061087d826126d3565b6127106bffffffffffffffffffffffff82161115611d585760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c65507269636500000000000000000000000000000000000000000000606482015260840161076d565b6001600160a01b038216611dae5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640161076d565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600555565b6002546000908210801561087d575060006001600160a01b031660028381548110611e2a57611e2a6136b3565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190611e94826111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000828152600d6020526040812054825190916108229183918591611ef457611ef46136b3565b6020026020010151612729565b6000611f0c82611dfd565b611f7e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161076d565b6000611f89836111c1565b9050806001600160a01b0316846001600160a01b03161480611fc45750836001600160a01b0316611fb98461097d565b6001600160a01b0316145b80611ff457506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661200f826111c1565b6001600160a01b03161461208b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161076d565b6001600160a01b0382166121065760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161076d565b612111600082611e47565b8160028281548110612125576121256136b3565b6000918252602082200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6127106bffffffffffffffffffffffff8216111561221d5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c65507269636500000000000000000000000000000000000000000000606482015260840161076d565b6001600160a01b0382166122735760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d65746572730000000000604482015260640161076d565b6040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff9283166020808301918252600096875260069052919094209351905190911674010000000000000000000000000000000000000000029116179055565b60408051602080820187905230828401526001600160a01b038616606083015260808083018690528351808403909101815260a0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c084015260dc808401919091528351808403909101815260fc90920190925280519101206000906123648184612845565b600a5461010090046001600160a01b03908116911614915050949350505050565b60008181526009602052604090205460ff16156123a4576123a461383c565b600081815260096020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561159d33612914565b6123ef848484611ffc565b6123fb8484848461292d565b6118885760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161076d565b600082116124bd5760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420726166666c65496400000000000000000000000000000000604482015260640161076d565b6000828152600c6020526040902054156125195760405162461bcd60e51b815260206004820152601460248201527f526166666c6520616c726561647920626567756e000000000000000000000000604482015260640161076d565b6000811161258f5760405162461bcd60e51b815260206004820152602960248201527f526166666c65206d7573742068617665206174206c65617374206f6e6520706160448201527f727469636970616e740000000000000000000000000000000000000000000000606482015260840161076d565b6000918252600c602052604090912055565b6060816125e157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561260b57806125f5816136e2565b91506126049050600a8361369f565b91506125e5565b60008167ffffffffffffffff8111156126265761262661319c565b6040519080825280601f01601f191660200182016040528015612650576020820181803683370190505b5090505b8415611ff45761266560018361371b565b9150612672600a8661386b565b61267d90603061387f565b60f81b818381518110612692576126926136b3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506126cc600a8661369f565b9450612654565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000148061087d575061087d82612af5565b600082116127795760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420726166666c65496400000000000000000000000000000000604482015260640161076d565b6000828152600b6020526040902054156127d55760405162461bcd60e51b815260206004820152601760248201527f526166666c6520616c726561647920636f6d706c657465000000000000000000604482015260640161076d565b6000828152600c6020526040812054906127ef828461386b565b6000858152600b6020526040908190208290555190915084907fd2ca611ce5ab54f171e553a4de9ada79c636580328abd390f6e26eb12866d330906128379084815260200190565b60405180910390a250505050565b60008060008084516041141561286f5750505060208201516040830151606084015160001a6128fe565b8451604014156128b65750505060408201516020830151907f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169060ff1c601b016128fe565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161076d565b61290a86828585612bd8565b9695505050505050565b61159d8160405180602001604052806000815250612dd5565b60006001600160a01b0384163b15612aed576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061298a903390899088908890600401613897565b602060405180830381600087803b1580156129a457600080fd5b505af19250505080156129f2575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526129ef918101906138c9565b60015b612aa2573d808015612a20576040519150601f19603f3d011682016040523d82523d6000602084013e612a25565b606091505b508051612a9a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161076d565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611ff4565b506001611ff4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480612b8857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461087d565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115612c705760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161076d565b8360ff16601b1480612c8557508360ff16601c145b612cf75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161076d565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015612d4b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b038116612dcc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161076d565b95945050505050565b6000612de083612e61565b9050612def600084838561292d565b6108225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161076d565b60006001600160a01b038216612eb95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161076d565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038616908117909155604051919283927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a492915050565b828054612f5d906135b0565b90600052602060002090601f016020900481019282612f7f5760008555612fc5565b82601f10612f9857805160ff1916838001178555612fc5565b82800160010185558215612fc5579182015b82811115612fc5578251825591602001919060010190612faa565b50610f979291505b80821115610f975760008155600101612fcd565b6001600160a01b038116811461159d57600080fd5b6000806040838503121561300957600080fd5b82359150602083013561301b81612fe1565b809150509250929050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461159d57600080fd5b60006020828403121561306657600080fd5b813561307181613026565b9392505050565b80356bffffffffffffffffffffffff8116811461309457600080fd5b919050565b600080604083850312156130ac57600080fd5b82356130b781612fe1565b91506130c560208401613078565b90509250929050565b60005b838110156130e95781810151838201526020016130d1565b838111156118885750506000910152565b600081518084526131128160208601602086016130ce565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061307160208301846130fa565b60006020828403121561316957600080fd5b5035919050565b6000806040838503121561318357600080fd5b823561318e81612fe1565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156132125761321261319c565b604052919050565b6000806040838503121561322d57600080fd5b8235915060208084013567ffffffffffffffff8082111561324d57600080fd5b818601915086601f83011261326157600080fd5b8135818111156132735761327361319c565b8060051b91506132848483016131cb565b818152918301840191848101908984111561329e57600080fd5b938501935b838510156132bc578435825293850193908501906132a3565b8096505050505050509250929050565b6000806000606084860312156132e157600080fd5b83356132ec81612fe1565b925060208401356132fc81612fe1565b929592945050506040919091013590565b6000806040838503121561332057600080fd5b50508035926020909101359150565b600067ffffffffffffffff8311156133495761334961319c565b61337a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116016131cb565b905082815283838301111561338e57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156133b757600080fd5b813567ffffffffffffffff8111156133ce57600080fd5b8201601f810184136133df57600080fd5b611ff48482356020840161332f565b60008060006060848603121561340357600080fd5b83359250602084013561341581612fe1565b915061342360408501613078565b90509250925092565b600082601f83011261343d57600080fd5b6130718383356020850161332f565b60008060006060848603121561346157600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561348657600080fd5b6134928682870161342c565b9150509250925092565b6000602082840312156134ae57600080fd5b813567ffffffffffffffff8116811461307157600080fd5b6000602082840312156134d857600080fd5b813561307181612fe1565b600080604083850312156134f657600080fd5b823561350181612fe1565b91506020830135801515811461301b57600080fd5b6000806000806080858703121561352c57600080fd5b843561353781612fe1565b9350602085013561354781612fe1565b925060408501359150606085013567ffffffffffffffff81111561356a57600080fd5b6135768782880161342c565b91505092959194509250565b6000806040838503121561359557600080fd5b82356135a081612fe1565b9150602083013561301b81612fe1565b600181811c908216806135c457607f821691505b602082108114156135fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561366b5761366b613604565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826136ae576136ae613670565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561371457613714613604565b5060010190565b60008282101561372d5761372d613604565b500390565b60006020828403121561374457600080fd5b5051919050565b6000815161375d8185602086016130ce565b9290920192915050565b600080845481600182811c91508083168061378357607f831692505b60208084108214156137bc577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156137d057600181146137ff5761382c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168952848901965061382c565b60008b81526020902060005b868110156138245781548b82015290850190830161380b565b505084890196505b505050505050612dcc818561374b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60008261387a5761387a613670565b500690565b6000821982111561389257613892613604565b500190565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261290a60808301846130fa565b6000602082840312156138db57600080fd5b81516130718161302656fea26469706673582212205929e6d0291f93c4a2ca5bf5f51bf05392d210643336b2d6070be1085eb700f264736f6c634300080900338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000016d2a9516e8ce2c3b99f6f002b643bb9d2ce8b4c0000000000000000000000000ab094221e13a4c781b908f0916c0ba0538b02b300000000000000000000000016d2a9516e8ce2c3b99f6f002b643bb9d2ce8b4c00000000000000000000000000000000000000000000000000000000000002ee000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000000000000000000050ff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f7777772e6663662e696f2f6e66742f6170692f76312f6e66742f62656e65666974732f6d657461646174612f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000104643462049524c2042454e454649545300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000949524c20424e4654530000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061024e5760003560e01c80636352211e11610138578063a22cb465116100b0578063bea1422c1161007f578063c87b56dd11610064578063c87b56dd1461068e578063e985e9c5146106ae578063f2fde38b146106f757600080fd5b8063bea1422c14610649578063c1df65381461066957600080fd5b8063a22cb465146105d4578063aa1b103f146105f4578063aad2b72314610609578063b88d4fde1461062957600080fd5b8063753868e3116101075780638c0e8349116100ec5780638c0e83491461058c5780638da5cb5b146105a157806395d89b41146105bf57600080fd5b8063753868e3146105575780638a616bc01461056c57600080fd5b80636352211e146104e2578063692ad3531461050257806370a0823114610522578063715018a61461054257600080fd5b80632a55205a116101cb5780634f6ccce71161019a5780635944c7531161017f5780635944c753146104825780635eddd157146104a257806362617c9a146104b557600080fd5b80634f6ccce71461044257806355f804b31461046257600080fd5b80632a55205a146103a35780632f745c59146103e257806340b275cf1461040257806342842e0e1461042257600080fd5b8063081812fc1161022257806318160ddd1161020757806318160ddd146103445780631fe543e31461036357806323b872dd1461038357600080fd5b8063081812fc146102ec578063095ea7b31461032457600080fd5b8062f714ce1461025357806301ffc9a71461027557806304634d8d146102aa57806306fdde03146102ca575b600080fd5b34801561025f57600080fd5b5061027361026e366004612ff6565b610717565b005b34801561028157600080fd5b50610295610290366004613054565b610827565b60405190151581526020015b60405180910390f35b3480156102b657600080fd5b506102736102c5366004613099565b610883565b3480156102d657600080fd5b506102df6108eb565b6040516102a19190613144565b3480156102f857600080fd5b5061030c610307366004613157565b61097d565b6040516001600160a01b0390911681526020016102a1565b34801561033057600080fd5b5061027361033f366004613170565b610a16565b34801561035057600080fd5b506002545b6040519081526020016102a1565b34801561036f57600080fd5b5061027361037e36600461321a565b610b43565b34801561038f57600080fd5b5061027361039e3660046132cc565b610be0565b3480156103af57600080fd5b506103c36103be36600461330d565b610c67565b604080516001600160a01b0390931683526020830191909152016102a1565b3480156103ee57600080fd5b506103556103fd366004613170565b610d44565b34801561040e57600080fd5b5061027361041d366004613157565b610ea3565b34801561042e57600080fd5b5061027361043d3660046132cc565b610f02565b34801561044e57600080fd5b5061035561045d366004613157565b610f1d565b34801561046e57600080fd5b5061027361047d3660046133a5565b610f9b565b34801561048e57600080fd5b5061027361049d3660046133ee565b61105b565b6102736104b036600461344c565b6110c0565b3480156104c157600080fd5b506103556104d0366004613157565b6000908152600b602052604090205490565b3480156104ee57600080fd5b5061030c6104fd366004613157565b6111c1565b34801561050e57600080fd5b5061027361051d36600461349c565b611261565b34801561052e57600080fd5b5061035561053d3660046134c6565b61130e565b34801561054e57600080fd5b506102736113ef565b34801561056357600080fd5b506102736114ab565b34801561057857600080fd5b50610273610587366004613157565b611532565b34801561059857600080fd5b506103556115a0565b3480156105ad57600080fd5b506007546001600160a01b031661030c565b3480156105cb57600080fd5b506102df6115bc565b3480156105e057600080fd5b506102736105ef3660046134e3565b6115cb565b34801561060057600080fd5b506102736116ae565b34801561061557600080fd5b506102736106243660046134c6565b611714565b34801561063557600080fd5b50610273610644366004613516565b611800565b34801561065557600080fd5b5061027361066436600461330d565b61188e565b34801561067557600080fd5b50600a5461030c9061010090046001600160a01b031681565b34801561069a57600080fd5b506102df6106a9366004613157565b611aa9565b3480156106ba57600080fd5b506102956106c9366004613582565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b34801561070357600080fd5b506102736107123660046134c6565b611b32565b6007546001600160a01b031633146107765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b478211156107ec5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f74207769746864726177206d6f7265207468616e2063757272656e60448201527f742062616c616e63650000000000000000000000000000000000000000000000606482015260840161076d565b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610822573d6000803e3d6000fd5b505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061087d575061087d82611c7c565b92915050565b6007546001600160a01b031633146108dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6108e78282611cd2565b5050565b6060600080546108fa906135b0565b80601f0160208091040260200160405190810160405280929190818152602001828054610926906135b0565b80156109735780601f1061094857610100808354040283529160200191610973565b820191906000526020600020905b81548152906001019060200180831161095657829003601f168201915b5050505050905090565b600061098882611dfd565b6109fa5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161076d565b506000908152600360205260409020546001600160a01b031690565b6000610a21826111c1565b9050806001600160a01b0316836001600160a01b03161415610aab5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161076d565b336001600160a01b0382161480610ac75750610ac781336106c9565b610b395760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161076d565b6108228383611e47565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610bd6576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916602482015260440161076d565b6108e78282611ecd565b610bea3382611f01565b610c5c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161076d565b610822838383611ffc565b60008281526006602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291610d085750604080518082019091526005546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090610d2c906bffffffffffffffffffffffff1687613633565b610d36919061369f565b915196919550909350505050565b6000610d4f8361130e565b8210610dc35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161076d565b6000805b600254811015610e345760028181548110610de457610de46136b3565b6000918252602090912001546001600160a01b0386811691161415610e225783821415610e1457915061087d9050565b81610e1e816136e2565b9250505b80610e2c816136e2565b915050610dc7565b5060405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161076d565b6007546001600160a01b03163314610efd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b601055565b61082283838360405180602001604052806000815250611800565b6002546000908210610f975760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161076d565b5090565b6007546001600160a01b03163314610ff55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a5460ff16156110485760405162461bcd60e51b815260206004820152600f60248201527f436f6e7472616374206c6f636b65640000000000000000000000000000000000604482015260640161076d565b80516108e7906008906020840190612f51565b6007546001600160a01b031633146110b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b610822838383612197565b60008281526009602052604090205460ff161561111f5760405162461bcd60e51b815260206004820152601260248201527f4e6f6e636520616c726561647920757365640000000000000000000000000000604482015260640161076d565b61112b823334846122d3565b6111775760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161076d565b61118082612385565b81837f814aa8bfa0d05261c5e195b65e6d8ef869024e3e9f5ebe6062060b3fa6f4716a6111ab6115a0565b60405190815260200160405180910390a3505050565b600080600283815481106111d7576111d76136b3565b6000918252602090912001546001600160a01b031690508061087d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161076d565b6007546001600160a01b031633146112bb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600f805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60006001600160a01b03821661138c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161076d565b6000805b6002548110156113e857600281815481106113ad576113ad6136b3565b6000918252602090912001546001600160a01b03858116911614156113d8576113d5826136e2565b91505b6113e1816136e2565b9050611390565b5092915050565b6007546001600160a01b031633146114495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6007546001600160a01b031633146115055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6007546001600160a01b0316331461158c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600090815260066020526040812055565b50565b600060016115ad60025490565b6115b7919061371b565b905090565b6060600180546108fa906135b0565b6001600160a01b0382163314156116245760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161076d565b3360008181526004602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6007546001600160a01b031633146117085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6117126000600555565b565b6007546001600160a01b0316331461176e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a5460ff16156117c15760405162461bcd60e51b815260206004820152600f60248201527f436f6e7472616374206c6f636b65640000000000000000000000000000000000604482015260640161076d565b600a80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b61180a3383611f01565b61187c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161076d565b611888848484846123e4565b50505050565b6007546001600160a01b031633146118e85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b600a5460ff161561193b5760405162461bcd60e51b815260206004820152600f60248201527f436f6e7472616374206c6f636b65640000000000000000000000000000000000604482015260640161076d565b611945828261246d565b600f5474010000000000000000000000000000000000000000900467ffffffffffffffff166119b65760405162461bcd60e51b815260206004820181905260248201527f436861696e6c696e6b20737562736372697074696f6e4964206e6f7420736574604482015260640161076d565b600e54601054600f546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925274010000000000000000000000000000000000000000900467ffffffffffffffff166024820152600360448201526203d0906064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611a5b57600080fd5b505af1158015611a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a939190613732565b6000908152600d60205260409020929092555050565b6060611ab482611dfd565b611b005760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20646f6573206e6f742065786973742e0000000000000000000000604482015260640161076d565b6008611b0b836125a1565b604051602001611b1c929190613767565b6040516020818303038152906040529050919050565b6007546001600160a01b03163314611b8c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161076d565b6001600160a01b038116611c085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161076d565b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061087d575061087d826126d3565b6127106bffffffffffffffffffffffff82161115611d585760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c65507269636500000000000000000000000000000000000000000000606482015260840161076d565b6001600160a01b038216611dae5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640161076d565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600555565b6002546000908210801561087d575060006001600160a01b031660028381548110611e2a57611e2a6136b3565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190611e94826111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000828152600d6020526040812054825190916108229183918591611ef457611ef46136b3565b6020026020010151612729565b6000611f0c82611dfd565b611f7e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161076d565b6000611f89836111c1565b9050806001600160a01b0316846001600160a01b03161480611fc45750836001600160a01b0316611fb98461097d565b6001600160a01b0316145b80611ff457506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661200f826111c1565b6001600160a01b03161461208b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161076d565b6001600160a01b0382166121065760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161076d565b612111600082611e47565b8160028281548110612125576121256136b3565b6000918252602082200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6127106bffffffffffffffffffffffff8216111561221d5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c65507269636500000000000000000000000000000000000000000000606482015260840161076d565b6001600160a01b0382166122735760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d65746572730000000000604482015260640161076d565b6040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff9283166020808301918252600096875260069052919094209351905190911674010000000000000000000000000000000000000000029116179055565b60408051602080820187905230828401526001600160a01b038616606083015260808083018690528351808403909101815260a0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c084015260dc808401919091528351808403909101815260fc90920190925280519101206000906123648184612845565b600a5461010090046001600160a01b03908116911614915050949350505050565b60008181526009602052604090205460ff16156123a4576123a461383c565b600081815260096020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561159d33612914565b6123ef848484611ffc565b6123fb8484848461292d565b6118885760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161076d565b600082116124bd5760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420726166666c65496400000000000000000000000000000000604482015260640161076d565b6000828152600c6020526040902054156125195760405162461bcd60e51b815260206004820152601460248201527f526166666c6520616c726561647920626567756e000000000000000000000000604482015260640161076d565b6000811161258f5760405162461bcd60e51b815260206004820152602960248201527f526166666c65206d7573742068617665206174206c65617374206f6e6520706160448201527f727469636970616e740000000000000000000000000000000000000000000000606482015260840161076d565b6000918252600c602052604090912055565b6060816125e157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561260b57806125f5816136e2565b91506126049050600a8361369f565b91506125e5565b60008167ffffffffffffffff8111156126265761262661319c565b6040519080825280601f01601f191660200182016040528015612650576020820181803683370190505b5090505b8415611ff45761266560018361371b565b9150612672600a8661386b565b61267d90603061387f565b60f81b818381518110612692576126926136b3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506126cc600a8661369f565b9450612654565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000148061087d575061087d82612af5565b600082116127795760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420726166666c65496400000000000000000000000000000000604482015260640161076d565b6000828152600b6020526040902054156127d55760405162461bcd60e51b815260206004820152601760248201527f526166666c6520616c726561647920636f6d706c657465000000000000000000604482015260640161076d565b6000828152600c6020526040812054906127ef828461386b565b6000858152600b6020526040908190208290555190915084907fd2ca611ce5ab54f171e553a4de9ada79c636580328abd390f6e26eb12866d330906128379084815260200190565b60405180910390a250505050565b60008060008084516041141561286f5750505060208201516040830151606084015160001a6128fe565b8451604014156128b65750505060408201516020830151907f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169060ff1c601b016128fe565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161076d565b61290a86828585612bd8565b9695505050505050565b61159d8160405180602001604052806000815250612dd5565b60006001600160a01b0384163b15612aed576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061298a903390899088908890600401613897565b602060405180830381600087803b1580156129a457600080fd5b505af19250505080156129f2575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526129ef918101906138c9565b60015b612aa2573d808015612a20576040519150601f19603f3d011682016040523d82523d6000602084013e612a25565b606091505b508051612a9a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161076d565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611ff4565b506001611ff4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480612b8857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461087d565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115612c705760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161076d565b8360ff16601b1480612c8557508360ff16601c145b612cf75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161076d565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015612d4b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b038116612dcc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161076d565b95945050505050565b6000612de083612e61565b9050612def600084838561292d565b6108225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161076d565b60006001600160a01b038216612eb95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161076d565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038616908117909155604051919283927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a492915050565b828054612f5d906135b0565b90600052602060002090601f016020900481019282612f7f5760008555612fc5565b82601f10612f9857805160ff1916838001178555612fc5565b82800160010185558215612fc5579182015b82811115612fc5578251825591602001919060010190612faa565b50610f979291505b80821115610f975760008155600101612fcd565b6001600160a01b038116811461159d57600080fd5b6000806040838503121561300957600080fd5b82359150602083013561301b81612fe1565b809150509250929050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461159d57600080fd5b60006020828403121561306657600080fd5b813561307181613026565b9392505050565b80356bffffffffffffffffffffffff8116811461309457600080fd5b919050565b600080604083850312156130ac57600080fd5b82356130b781612fe1565b91506130c560208401613078565b90509250929050565b60005b838110156130e95781810151838201526020016130d1565b838111156118885750506000910152565b600081518084526131128160208601602086016130ce565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061307160208301846130fa565b60006020828403121561316957600080fd5b5035919050565b6000806040838503121561318357600080fd5b823561318e81612fe1565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156132125761321261319c565b604052919050565b6000806040838503121561322d57600080fd5b8235915060208084013567ffffffffffffffff8082111561324d57600080fd5b818601915086601f83011261326157600080fd5b8135818111156132735761327361319c565b8060051b91506132848483016131cb565b818152918301840191848101908984111561329e57600080fd5b938501935b838510156132bc578435825293850193908501906132a3565b8096505050505050509250929050565b6000806000606084860312156132e157600080fd5b83356132ec81612fe1565b925060208401356132fc81612fe1565b929592945050506040919091013590565b6000806040838503121561332057600080fd5b50508035926020909101359150565b600067ffffffffffffffff8311156133495761334961319c565b61337a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116016131cb565b905082815283838301111561338e57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156133b757600080fd5b813567ffffffffffffffff8111156133ce57600080fd5b8201601f810184136133df57600080fd5b611ff48482356020840161332f565b60008060006060848603121561340357600080fd5b83359250602084013561341581612fe1565b915061342360408501613078565b90509250925092565b600082601f83011261343d57600080fd5b6130718383356020850161332f565b60008060006060848603121561346157600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561348657600080fd5b6134928682870161342c565b9150509250925092565b6000602082840312156134ae57600080fd5b813567ffffffffffffffff8116811461307157600080fd5b6000602082840312156134d857600080fd5b813561307181612fe1565b600080604083850312156134f657600080fd5b823561350181612fe1565b91506020830135801515811461301b57600080fd5b6000806000806080858703121561352c57600080fd5b843561353781612fe1565b9350602085013561354781612fe1565b925060408501359150606085013567ffffffffffffffff81111561356a57600080fd5b6135768782880161342c565b91505092959194509250565b6000806040838503121561359557600080fd5b82356135a081612fe1565b9150602083013561301b81612fe1565b600181811c908216806135c457607f821691505b602082108114156135fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561366b5761366b613604565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826136ae576136ae613670565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561371457613714613604565b5060010190565b60008282101561372d5761372d613604565b500390565b60006020828403121561374457600080fd5b5051919050565b6000815161375d8185602086016130ce565b9290920192915050565b600080845481600182811c91508083168061378357607f831692505b60208084108214156137bc577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156137d057600181146137ff5761382c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168952848901965061382c565b60008b81526020902060005b868110156138245781548b82015290850190830161380b565b505084890196505b505050505050612dcc818561374b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60008261387a5761387a613670565b500690565b6000821982111561389257613892613604565b500190565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261290a60808301846130fa565b6000602082840312156138db57600080fd5b81516130718161302656fea26469706673582212205929e6d0291f93c4a2ca5bf5f51bf05392d210643336b2d6070be1085eb700f264736f6c63430008090033

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

000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000016d2a9516e8ce2c3b99f6f002b643bb9d2ce8b4c0000000000000000000000000ab094221e13a4c781b908f0916c0ba0538b02b300000000000000000000000016d2a9516e8ce2c3b99f6f002b643bb9d2ce8b4c00000000000000000000000000000000000000000000000000000000000002ee000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000000000000000000050ff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f7777772e6663662e696f2f6e66742f6170692f76312f6e66742f62656e65666974732f6d657461646174612f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000104643462049524c2042454e454649545300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000949524c20424e4654530000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : baseURI (string): https://www.fcf.io/nft/api/v1/nft/benefits/metadata/
Arg [1] : name (string): FCF IRL BENEFITS
Arg [2] : symbol (string): IRL BNFTS
Arg [3] : owner (address): 0x16d2A9516e8cE2c3B99F6F002b643bB9d2Ce8B4c
Arg [4] : signer (address): 0x0AB094221E13a4C781B908f0916c0Ba0538B02B3
Arg [5] : royaltiesReceiver (address): 0x16d2A9516e8cE2c3B99F6F002b643bB9d2Ce8B4c
Arg [6] : royaltiesFeeNumerator (uint96): 750
Arg [7] : vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [8] : linkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [9] : subscriptionId (uint64): 80
Arg [10] : keyHash (bytes32): 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [3] : 00000000000000000000000016d2a9516e8ce2c3b99f6f002b643bb9d2ce8b4c
Arg [4] : 0000000000000000000000000ab094221e13a4c781b908f0916c0ba0538b02b3
Arg [5] : 00000000000000000000000016d2a9516e8ce2c3b99f6f002b643bb9d2ce8b4c
Arg [6] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [7] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [8] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000050
Arg [10] : ff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [12] : 68747470733a2f2f7777772e6663662e696f2f6e66742f6170692f76312f6e66
Arg [13] : 742f62656e65666974732f6d657461646174612f000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [15] : 4643462049524c2042454e454649545300000000000000000000000000000000
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [17] : 49524c20424e4654530000000000000000000000000000000000000000000000


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.