ETH Price: $3,371.53 (-8.10%)

Token

Jay Pegs Auto Mart (JPAM)
 

Overview

Max Total Supply

7,040 JPAM

Holders

1,472

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 JPAM
0x879d15d6c06404e798cac7ff74e2fedb562ea1b5
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The World's #1 2007 Kia Sedona Superstore.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
KiaSedona

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : KiaSedona.sol
pragma solidity 0.8.7;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract KiaSedona is VRFConsumerBase, ERC721Enumerable, Ownable {
    using Strings for uint256;

    address public constant LINK_TOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
    address public constant VRF_COORDINATOR = 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952;
    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
    uint256 public constant LOT_SIZE = 500;
    uint256 public constant MAX_SUPPLY = 10000;
    address public immutable dona;
    uint8 public immutable donaDecimals;
    uint256 public immutable startBlock;

    string public tempURI;
    bytes32 public keyHash;
    uint256 public fee;

    event RoofSlap(uint256 indexed tokenId, address indexed slapper);
    event LotURISet(uint256 lotId, string uri);

    struct Lot {
        uint256 randomness;
        string uri;
    }

    mapping(uint256 => Lot) public lotData;
    // requestId => lotId
    mapping(bytes32 => uint256) public randomnessRequests;
    // tokenId => slap count
    mapping(uint256 => uint256) public slapCounter;

    constructor(address _donaToken, string memory _tempURI, uint256 _startBlock)
        VRFConsumerBase(VRF_COORDINATOR, LINK_TOKEN)
        ERC721("Jay Pegs Auto Mart", "JPAM")
    {
        dona = _donaToken;
        tempURI = _tempURI;
        startBlock = _startBlock;
        donaDecimals = ERC20(_donaToken).decimals();
        keyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
        fee = 2 * 10**ERC20(LINK_TOKEN).decimals();
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        uint256 lotId = tokenId / LOT_SIZE;
        Lot storage lot = lotData[lotId];
        uint256 randomness = lot.randomness;
        string memory baseURI = lot.uri;
        if (randomness == 0 || bytes(baseURI).length == 0) return tempURI;

        return string(abi.encodePacked(baseURI, uriId(tokenId, randomness).toString()));
    }

    function roofSlap(uint256 tokenId) external {
        slapCounter[tokenId] += 1;
        emit RoofSlap(tokenId, msg.sender);
    }

    function mint(uint256 quantity) external {
        require(block.number >= startBlock, "Not started");
        require(quantity > 0, "Cannot mint 0");
        require(
            ERC20(dona).transferFrom(
                msg.sender,
                BURN_ADDRESS,
                quantity * 10**donaDecimals
            ),
            "cannot burn DONA"
        );

        uint256 tokenId = totalSupply();
        for(uint256 i = 0; i < quantity; i++) {
            _safeMint(msg.sender, tokenId + i);
        }
        // should never happen since there's only 10k DONA but better safe than sorry
        require(totalSupply() <= MAX_SUPPLY, "Max supply already minted");
    }

    function uriId(uint256 tokenId, uint256 randomness) public pure returns (uint256) {
        uint256 lotId = tokenId / LOT_SIZE;

        uint256 lotMin = lotId * LOT_SIZE;
        uint256 lotMax = lotMin + LOT_SIZE - 1;
        uint256 randomNumber = randomness % LOT_SIZE;
        uint256 randomizedTokenId = tokenId + randomNumber;
        if (randomizedTokenId > lotMax) {
            randomizedTokenId -= LOT_SIZE;
        }
        return randomizedTokenId;
    }

    function getRandomNumber(uint256 lotId) internal returns (bytes32 requestId) {
        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
        requestId = requestRandomness(keyHash, fee);
        randomnessRequests[requestId] = lotId;
    }

    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        uint256 lotId = randomnessRequests[requestId];
        Lot storage lot = lotData[lotId];
        lot.randomness = randomness;
    }

    // Admin functions

    function setLotURI(uint256 lotId, string memory uri) external onlyOwner returns (bytes32 requestId) {
        if (lotId > 0) {
            require(bytes(lotData[lotId - 1].uri).length > 0, "Previous lot not set");
        }

        Lot storage lot = lotData[lotId];
        lot.uri = uri;
        emit LotURISet(lotId, uri);

        if (lot.randomness == 0) return getRandomNumber(lotId);
    }

    function setLinkFee(uint256 newFee) external onlyOwner {
        fee = newFee;
    }

    function withdrawLink() external onlyOwner {
        LINK.transfer(owner(), LINK.balanceOf(address(this)));
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 3 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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 19 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

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

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

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 constant private USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(
    bytes32 _keyHash,
    uint256 _fee
  )
    internal
    returns (
      bytes32 requestId
    )
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed  = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 6 of 19 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

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

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

File 7 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) {
        return msg.data;
    }
}

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

contract VRFRequestIDBase {

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

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        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 _owners[tokenId] != address(0);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(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;
        }
    }

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

File 11 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 12 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 13 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 14 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 15 of 19 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 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 : 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 18 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_donaToken","type":"address"},{"internalType":"string","name":"_tempURI","type":"string"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lotId","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"LotURISet","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":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"slapper","type":"address"}],"name":"RoofSlap","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":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LINK_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOT_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VRF_COORDINATOR","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":[],"name":"dona","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"donaDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lotData","outputs":[{"internalType":"uint256","name":"randomness","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"randomnessRequests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"roofSlap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lotId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setLotURI","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"slapCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"tempURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"uriId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101206040523480156200001257600080fd5b50604051620031f6380380620031f68339810160408190526200003591620003a2565b604080518082018252601281527112985e48141959dcc8105d5d1bc813585c9d60721b6020808301918252835180850190945260048452634a50414d60e01b908401527ff0d54349addcf704f77ae15b96510dea15cb795200000000000000000000000060a0527f514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000006080528151919291620000d391600191620002fc565b508051620000e9906002906020840190620002fc565b5050506200010662000100620002a660201b60201c565b620002aa565b6001600160601b0319606084901b1660c05281516200012d90600c906020850190620002fc565b50806101008181525050826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200017157600080fd5b505afa15801562000186573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ac9190620004ab565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001660e0527faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445600d556040805163313ce56760e01b8152905173514910771af9ca656af840dff83e8264ecf986ca9163313ce567916004808301926020929190829003018186803b1580156200024457600080fd5b505afa15801562000259573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200027f9190620004ab565b6200028c90600a62000520565b62000299906002620005e1565b600e55506200066c915050565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200030a9062000603565b90600052602060002090601f0160209004810192826200032e576000855562000379565b82601f106200034957805160ff191683800117855562000379565b8280016001018555821562000379579182015b82811115620003795782518255916020019190600101906200035c565b50620003879291506200038b565b5090565b5b808211156200038757600081556001016200038c565b600080600060608486031215620003b857600080fd5b83516001600160a01b0381168114620003d057600080fd5b602085810151919450906001600160401b0380821115620003f057600080fd5b818701915087601f8301126200040557600080fd5b8151818111156200041a576200041a62000656565b604051601f8201601f19908116603f0116810190838211818310171562000445576200044562000656565b816040528281528a868487010111156200045e57600080fd5b600093505b8284101562000482578484018601518185018701529285019262000463565b82841115620004945760008684830101525b809750505050505050604084015190509250925092565b600060208284031215620004be57600080fd5b815160ff81168114620004d057600080fd5b9392505050565b600181815b8085111562000518578160001904821115620004fc57620004fc62000640565b808516156200050a57918102915b93841c9390800290620004dc565b509250929050565b6000620004d060ff8416836000826200053c57506001620005db565b816200054b57506000620005db565b81600181146200056457600281146200056f576200058f565b6001915050620005db565b60ff84111562000583576200058362000640565b50506001821b620005db565b5060208310610133831016604e8410600b8410161715620005b4575081810a620005db565b620005c08383620004d7565b8060001904821115620005d757620005d762000640565b0290505b92915050565b6000816000190483118215151615620005fe57620005fe62000640565b500290565b600181811c908216806200061857607f821691505b602082108114156200063a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c60c05160601c60e05160f81c61010051612b08620006ee600039600081816103710152610f8b015260008181610514015261105f0152600081816104ed0152611031015260008181610eea0152611d7e015260008181610d8801528181610ddc015281816119f60152611d4f0152612b086000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c806370a082311161013b578063b88d4fde116100b8578063ddca3f431161007c578063ddca3f4314610548578063e985e9c514610551578063eedac3a61461058d578063f2fde38b146105a8578063fccc2813146105bb57600080fd5b8063b88d4fde146104af578063c87b56dd146104c2578063cd8ff657146104d5578063d3356aa9146104e8578063d6ec34e21461050f57600080fd5b806394985ddd116100ff57806394985ddd1461044d57806395d89b4114610460578063a0712d6814610468578063a22cb4651461047b578063b07c3cd31461048e57600080fd5b806370a0823114610410578063715018a6146104235780637fee67a21461042b5780638da5cb5b146104345780638dc654a21461044557600080fd5b80633331a187116101c95780635e619b781161018d5780635e619b78146103ae57806361728f39146103ce5780636352211e146103d75780636b6aabd5146103ea5780636e6bfd20146103fd57600080fd5b80633331a1871461033957806342842e0e1461035957806348cd4cb11461036c5780634ca7f429146103935780634f6ccce71461039b57600080fd5b8063159343c911610210578063159343c9146102e557806318160ddd146102f857806323b872dd1461030a5780632f745c591461031d57806332cb6b0c1461033057600080fd5b806301ffc9a71461024d57806305f6a9241461027557806306fdde03146102a8578063081812fc146102bd578063095ea7b3146102d0575b600080fd5b61026061025b3660046125e0565b6105c4565b60405190151581526020015b60405180910390f35b61029073f0d54349addcf704f77ae15b96510dea15cb795281565b6040516001600160a01b03909116815260200161026c565b6102b06105ef565b60405161026c9190612756565b6102906102cb3660046125a5565b610681565b6102e36102de36600461255e565b61071b565b005b6102e36102f33660046125a5565b610831565b6009545b60405190815260200161026c565b6102e361031836600461246f565b610885565b6102fc61032b36600461255e565b6108b6565b6102fc61271081565b6102fc6103473660046125a5565b60116020526000908152604090205481565b6102e361036736600461246f565b61094c565b6102fc7f000000000000000000000000000000000000000000000000000000000000000081565b6102b0610967565b6102fc6103a93660046125a5565b6109f5565b6102fc6103bc3660046125a5565b60106020526000908152604090205481565b6102fc600d5481565b6102906103e53660046125a5565b610a88565b6102fc6103f83660046125be565b610aff565b6102fc61040b366004612633565b610b7c565b6102fc61041e36600461241a565b610c9f565b6102e3610d26565b6102fc6101f481565b600b546001600160a01b0316610290565b6102e3610d5c565b6102e361045b3660046125be565b610edf565b6102b0610f7a565b6102e36104763660046125a5565b610f89565b6102e3610489366004612527565b6111ed565b6104a161049c3660046125a5565b6112b2565b60405161026c929190612841565b6102e36104bd3660046124ab565b611357565b6102b06104d03660046125a5565b61138f565b6102e36104e33660046125a5565b6115ab565b6102907f000000000000000000000000000000000000000000000000000000000000000081565b6105367f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff909116815260200161026c565b6102fc600e5481565b61026061055f36600461243c565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61029073514910771af9ca656af840dff83e8264ecf986ca81565b6102e36105b636600461241a565b6115da565b61029061dead81565b60006001600160e01b0319821663780e9d6360e01b14806105e957506105e982611672565b92915050565b6060600180546105fe906129d6565b80601f016020809104026020016040519081016040528092919081815260200182805461062a906129d6565b80156106775780601f1061064c57610100808354040283529160200191610677565b820191906000526020600020905b81548152906001019060200180831161065a57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166106ff5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061072682610a88565b9050806001600160a01b0316836001600160a01b031614156107945760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106f6565b336001600160a01b03821614806107b057506107b0813361055f565b6108225760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106f6565b61082c83836116c2565b505050565b600081815260116020526040812080546001929061085090849061285a565b9091555050604051339082907f0b941e2c5ad798ef6390df36c43a856e8dcc6f1a85b03f65abf947927870ae9790600090a350565b61088f3382611730565b6108ab5760405162461bcd60e51b81526004016106f6906127f0565b61082c838383611827565b60006108c183610c9f565b82106109235760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106f6565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b61082c83838360405180602001604052806000815250611357565b600c8054610974906129d6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a0906129d6565b80156109ed5780601f106109c2576101008083540402835291602001916109ed565b820191906000526020600020905b8154815290600101906020018083116109d057829003601f168201915b505050505081565b6000610a0060095490565b8210610a635760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106f6565b60098281548110610a7657610a76612a82565b90600052602060002001549050919050565b6000818152600360205260408120546001600160a01b0316806105e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106f6565b600080610b0e6101f485612872565b90506000610b1e6101f483612974565b905060006001610b306101f48461285a565b610b3a9190612993565b90506000610b4a6101f487612a2c565b90506000610b58828961285a565b905082811115610b7157610b6e6101f482612993565b90505b979650505050505050565b600b546000906001600160a01b03163314610ba95760405162461bcd60e51b81526004016106f6906127bb565b8215610c21576000600f81610bbf600187612993565b81526020019081526020016000206001018054610bdb906129d6565b905011610c215760405162461bcd60e51b8152602060048201526014602482015273141c995d9a5bdd5cc81b1bdd081b9bdd081cd95d60621b60448201526064016106f6565b6000838152600f6020908152604090912083519091610c479160018401918601906122ef565b507f8ff2e72193a24409ffb6d865c0718d121e61a04cc13999622a5018cf5cfb866f8484604051610c79929190612841565b60405180910390a18054610c9857610c90846119d2565b9150506105e9565b5092915050565b60006001600160a01b038216610d0a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106f6565b506001600160a01b031660009081526004602052604090205490565b600b546001600160a01b03163314610d505760405162461bcd60e51b81526004016106f6906127bb565b610d5a6000611af6565b565b600b546001600160a01b03163314610d865760405162461bcd60e51b81526004016106f6906127bb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb610dc7600b546001600160a01b031690565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610e2657600080fd5b505afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e919061261a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015610ea457600080fd5b505af1158015610eb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edc9190612588565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f575760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016106f6565b6000918252601060209081526040808420548452600f90915290912055565b5050565b6060600280546105fe906129d6565b7f0000000000000000000000000000000000000000000000000000000000000000431015610fe75760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b60448201526064016106f6565b600081116110275760405162461bcd60e51b815260206004820152600d60248201526c043616e6e6f74206d696e74203609c1b60448201526064016106f6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166323b872dd3361dead6110857f0000000000000000000000000000000000000000000000000000000000000000600a6128c9565b61108f9086612974565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b1580156110de57600080fd5b505af11580156110f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111169190612588565b6111555760405162461bcd60e51b815260206004820152601060248201526f63616e6e6f74206275726e20444f4e4160801b60448201526064016106f6565b600061116060095490565b905060005b82811015611192576111803361117b838561285a565b611b48565b8061118a81612a11565b915050611165565b5061271061119f60095490565b1115610f765760405162461bcd60e51b815260206004820152601960248201527f4d617820737570706c7920616c7265616479206d696e7465640000000000000060448201526064016106f6565b6001600160a01b0382163314156112465760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106f6565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600f60205260009081526040902080546001820180549192916112d4906129d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611300906129d6565b801561134d5780601f106113225761010080835404028352916020019161134d565b820191906000526020600020905b81548152906001019060200180831161133057829003601f168201915b5050505050905082565b6113613383611730565b61137d5760405162461bcd60e51b81526004016106f6906127f0565b61138984848484611b62565b50505050565b6000818152600360205260409020546060906001600160a01b031661140e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016106f6565b600061141c6101f484612872565b6000818152600f602052604081208054600182018054949550919390929190611444906129d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611470906129d6565b80156114bd5780601f10611492576101008083540402835291602001916114bd565b820191906000526020600020905b8154815290600101906020018083116114a057829003601f168201915b5050505050905081600014806114d257508051155b1561156d57600c80546114e4906129d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611510906129d6565b801561155d5780601f106115325761010080835404028352916020019161155d565b820191906000526020600020905b81548152906001019060200180831161154057829003601f168201915b5050505050945050505050919050565b8061158061157b8885610aff565b611b95565b6040516020016115919291906126ba565b604051602081830303815290604052945050505050919050565b600b546001600160a01b031633146115d55760405162461bcd60e51b81526004016106f6906127bb565b600e55565b600b546001600160a01b031633146116045760405162461bcd60e51b81526004016106f6906127bb565b6001600160a01b0381166116695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f6565b610edc81611af6565b60006001600160e01b031982166380ac58cd60e01b14806116a357506001600160e01b03198216635b5e139f60e01b145b806105e957506301ffc9a760e01b6001600160e01b03198316146105e9565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116f782610a88565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b03166117a95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f6565b60006117b483610a88565b9050806001600160a01b0316846001600160a01b031614806117ef5750836001600160a01b03166117e484610681565b6001600160a01b0316145b8061181f57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661183a82610a88565b6001600160a01b0316146118a25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016106f6565b6001600160a01b0382166119045760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106f6565b61190f838383611c93565b61191a6000826116c2565b6001600160a01b0383166000908152600460205260408120805460019290611943908490612993565b90915550506001600160a01b038216600090815260046020526040812080546001929061197190849061285a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600e546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b158015611a3857600080fd5b505afa158015611a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a70919061261a565b1015611ad25760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b60648201526084016106f6565b611ae0600d54600e54611d4b565b6000818152601060205260409020929092555090565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610f76828260405180602001604052806000815250611ed1565b611b6d848484611827565b611b7984848484611f04565b6113895760405162461bcd60e51b81526004016106f690612769565b606081611bb95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611be35780611bcd81612a11565b9150611bdc9050600a83612872565b9150611bbd565b60008167ffffffffffffffff811115611bfe57611bfe612a98565b6040519080825280601f01601f191660200182016040528015611c28576020820181803683370190505b5090505b841561181f57611c3d600183612993565b9150611c4a600a86612a2c565b611c5590603061285a565b60f81b818381518110611c6a57611c6a612a82565b60200101906001600160f81b031916908160001a905350611c8c600a86612872565b9450611c2c565b6001600160a01b038316611cee57611ce981600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b611d11565b816001600160a01b0316836001600160a01b031614611d1157611d118382612011565b6001600160a01b038216611d285761082c816120ae565b826001600160a01b0316826001600160a01b03161461082c5761082c828261215d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611dbb929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611de893929190612726565b602060405180830381600087803b158015611e0257600080fd5b505af1158015611e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3a9190612588565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152611e9490600161285a565b600085815260208181526040918290209290925580518083018790528082018490528151808203830181526060909101909152805191012061181f565b611edb83836121a1565b611ee86000848484611f04565b61082c5760405162461bcd60e51b81526004016106f690612769565b60006001600160a01b0384163b1561200657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f489033908990889088906004016126e9565b602060405180830381600087803b158015611f6257600080fd5b505af1925050508015611f92575060408051601f3d908101601f19168201909252611f8f918101906125fd565b60015b611fec573d808015611fc0576040519150601f19603f3d011682016040523d82523d6000602084013e611fc5565b606091505b508051611fe45760405162461bcd60e51b81526004016106f690612769565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061181f565b506001949350505050565b6000600161201e84610c9f565b6120289190612993565b60008381526008602052604090205490915080821461207b576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906120c090600190612993565b6000838152600a6020526040812054600980549394509092849081106120e8576120e8612a82565b90600052602060002001549050806009838154811061210957612109612a82565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061214157612141612a6c565b6001900381819060005260206000200160009055905550505050565b600061216883610c9f565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b0382166121f75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106f6565b6000818152600360205260409020546001600160a01b03161561225c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106f6565b61226860008383611c93565b6001600160a01b038216600090815260046020526040812080546001929061229190849061285a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546122fb906129d6565b90600052602060002090601f01602090048101928261231d5760008555612363565b82601f1061233657805160ff1916838001178555612363565b82800160010185558215612363579182015b82811115612363578251825591602001919060010190612348565b5061236f929150612373565b5090565b5b8082111561236f5760008155600101612374565b600067ffffffffffffffff808411156123a3576123a3612a98565b604051601f8501601f19908116603f011681019082821181831017156123cb576123cb612a98565b816040528093508581528686860111156123e457600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461241557600080fd5b919050565b60006020828403121561242c57600080fd5b612435826123fe565b9392505050565b6000806040838503121561244f57600080fd5b612458836123fe565b9150612466602084016123fe565b90509250929050565b60008060006060848603121561248457600080fd5b61248d846123fe565b925061249b602085016123fe565b9150604084013590509250925092565b600080600080608085870312156124c157600080fd5b6124ca856123fe565b93506124d8602086016123fe565b925060408501359150606085013567ffffffffffffffff8111156124fb57600080fd5b8501601f8101871361250c57600080fd5b61251b87823560208401612388565b91505092959194509250565b6000806040838503121561253a57600080fd5b612543836123fe565b9150602083013561255381612aae565b809150509250929050565b6000806040838503121561257157600080fd5b61257a836123fe565b946020939093013593505050565b60006020828403121561259a57600080fd5b815161243581612aae565b6000602082840312156125b757600080fd5b5035919050565b600080604083850312156125d157600080fd5b50508035926020909101359150565b6000602082840312156125f257600080fd5b813561243581612abc565b60006020828403121561260f57600080fd5b815161243581612abc565b60006020828403121561262c57600080fd5b5051919050565b6000806040838503121561264657600080fd5b82359150602083013567ffffffffffffffff81111561266457600080fd5b8301601f8101851361267557600080fd5b61268485823560208401612388565b9150509250929050565b600081518084526126a68160208601602086016129aa565b601f01601f19169290920160200192915050565b600083516126cc8184602088016129aa565b8351908301906126e08183602088016129aa565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061271c9083018461268e565b9695505050505050565b60018060a01b038416815282602082015260606040820152600061274d606083018461268e565b95945050505050565b602081526000612435602083018461268e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b82815260406020820152600061181f604083018461268e565b6000821982111561286d5761286d612a40565b500190565b60008261288157612881612a56565b500490565b600181815b808511156128c15781600019048211156128a7576128a7612a40565b808516156128b457918102915b93841c939080029061288b565b509250929050565b600061243560ff8416836000826128e2575060016105e9565b816128ef575060006105e9565b8160018114612905576002811461290f5761292b565b60019150506105e9565b60ff84111561292057612920612a40565b50506001821b6105e9565b5060208310610133831016604e8410600b841016171561294e575081810a6105e9565b6129588383612886565b806000190482111561296c5761296c612a40565b029392505050565b600081600019048311821515161561298e5761298e612a40565b500290565b6000828210156129a5576129a5612a40565b500390565b60005b838110156129c55781810151838201526020016129ad565b838111156113895750506000910152565b600181811c908216806129ea57607f821691505b60208210811415612a0b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612a2557612a25612a40565b5060010190565b600082612a3b57612a3b612a56565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610edc57600080fd5b6001600160e01b031981168114610edc57600080fdfea2646970667358221220c221fe47b3724d42b7a06403ea60eb5b6d23ef652d8c096860367b9eb75ea82d64736f6c63430008070033000000000000000000000000058bc8ef040bd3971418e36aa88b64899378ccf400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000ca81ad0000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d53586e754e59725167563163764e6863464b4438784d57506a58517847764b3171684362596167335063315a0000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102485760003560e01c806370a082311161013b578063b88d4fde116100b8578063ddca3f431161007c578063ddca3f4314610548578063e985e9c514610551578063eedac3a61461058d578063f2fde38b146105a8578063fccc2813146105bb57600080fd5b8063b88d4fde146104af578063c87b56dd146104c2578063cd8ff657146104d5578063d3356aa9146104e8578063d6ec34e21461050f57600080fd5b806394985ddd116100ff57806394985ddd1461044d57806395d89b4114610460578063a0712d6814610468578063a22cb4651461047b578063b07c3cd31461048e57600080fd5b806370a0823114610410578063715018a6146104235780637fee67a21461042b5780638da5cb5b146104345780638dc654a21461044557600080fd5b80633331a187116101c95780635e619b781161018d5780635e619b78146103ae57806361728f39146103ce5780636352211e146103d75780636b6aabd5146103ea5780636e6bfd20146103fd57600080fd5b80633331a1871461033957806342842e0e1461035957806348cd4cb11461036c5780634ca7f429146103935780634f6ccce71461039b57600080fd5b8063159343c911610210578063159343c9146102e557806318160ddd146102f857806323b872dd1461030a5780632f745c591461031d57806332cb6b0c1461033057600080fd5b806301ffc9a71461024d57806305f6a9241461027557806306fdde03146102a8578063081812fc146102bd578063095ea7b3146102d0575b600080fd5b61026061025b3660046125e0565b6105c4565b60405190151581526020015b60405180910390f35b61029073f0d54349addcf704f77ae15b96510dea15cb795281565b6040516001600160a01b03909116815260200161026c565b6102b06105ef565b60405161026c9190612756565b6102906102cb3660046125a5565b610681565b6102e36102de36600461255e565b61071b565b005b6102e36102f33660046125a5565b610831565b6009545b60405190815260200161026c565b6102e361031836600461246f565b610885565b6102fc61032b36600461255e565b6108b6565b6102fc61271081565b6102fc6103473660046125a5565b60116020526000908152604090205481565b6102e361036736600461246f565b61094c565b6102fc7f0000000000000000000000000000000000000000000000000000000000ca81ad81565b6102b0610967565b6102fc6103a93660046125a5565b6109f5565b6102fc6103bc3660046125a5565b60106020526000908152604090205481565b6102fc600d5481565b6102906103e53660046125a5565b610a88565b6102fc6103f83660046125be565b610aff565b6102fc61040b366004612633565b610b7c565b6102fc61041e36600461241a565b610c9f565b6102e3610d26565b6102fc6101f481565b600b546001600160a01b0316610290565b6102e3610d5c565b6102e361045b3660046125be565b610edf565b6102b0610f7a565b6102e36104763660046125a5565b610f89565b6102e3610489366004612527565b6111ed565b6104a161049c3660046125a5565b6112b2565b60405161026c929190612841565b6102e36104bd3660046124ab565b611357565b6102b06104d03660046125a5565b61138f565b6102e36104e33660046125a5565b6115ab565b6102907f000000000000000000000000058bc8ef040bd3971418e36aa88b64899378ccf481565b6105367f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff909116815260200161026c565b6102fc600e5481565b61026061055f36600461243c565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61029073514910771af9ca656af840dff83e8264ecf986ca81565b6102e36105b636600461241a565b6115da565b61029061dead81565b60006001600160e01b0319821663780e9d6360e01b14806105e957506105e982611672565b92915050565b6060600180546105fe906129d6565b80601f016020809104026020016040519081016040528092919081815260200182805461062a906129d6565b80156106775780601f1061064c57610100808354040283529160200191610677565b820191906000526020600020905b81548152906001019060200180831161065a57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166106ff5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061072682610a88565b9050806001600160a01b0316836001600160a01b031614156107945760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106f6565b336001600160a01b03821614806107b057506107b0813361055f565b6108225760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106f6565b61082c83836116c2565b505050565b600081815260116020526040812080546001929061085090849061285a565b9091555050604051339082907f0b941e2c5ad798ef6390df36c43a856e8dcc6f1a85b03f65abf947927870ae9790600090a350565b61088f3382611730565b6108ab5760405162461bcd60e51b81526004016106f6906127f0565b61082c838383611827565b60006108c183610c9f565b82106109235760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106f6565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b61082c83838360405180602001604052806000815250611357565b600c8054610974906129d6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a0906129d6565b80156109ed5780601f106109c2576101008083540402835291602001916109ed565b820191906000526020600020905b8154815290600101906020018083116109d057829003601f168201915b505050505081565b6000610a0060095490565b8210610a635760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106f6565b60098281548110610a7657610a76612a82565b90600052602060002001549050919050565b6000818152600360205260408120546001600160a01b0316806105e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106f6565b600080610b0e6101f485612872565b90506000610b1e6101f483612974565b905060006001610b306101f48461285a565b610b3a9190612993565b90506000610b4a6101f487612a2c565b90506000610b58828961285a565b905082811115610b7157610b6e6101f482612993565b90505b979650505050505050565b600b546000906001600160a01b03163314610ba95760405162461bcd60e51b81526004016106f6906127bb565b8215610c21576000600f81610bbf600187612993565b81526020019081526020016000206001018054610bdb906129d6565b905011610c215760405162461bcd60e51b8152602060048201526014602482015273141c995d9a5bdd5cc81b1bdd081b9bdd081cd95d60621b60448201526064016106f6565b6000838152600f6020908152604090912083519091610c479160018401918601906122ef565b507f8ff2e72193a24409ffb6d865c0718d121e61a04cc13999622a5018cf5cfb866f8484604051610c79929190612841565b60405180910390a18054610c9857610c90846119d2565b9150506105e9565b5092915050565b60006001600160a01b038216610d0a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106f6565b506001600160a01b031660009081526004602052604090205490565b600b546001600160a01b03163314610d505760405162461bcd60e51b81526004016106f6906127bb565b610d5a6000611af6565b565b600b546001600160a01b03163314610d865760405162461bcd60e51b81526004016106f6906127bb565b7f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b031663a9059cbb610dc7600b546001600160a01b031690565b6040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b158015610e2657600080fd5b505afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e919061261a565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015610ea457600080fd5b505af1158015610eb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edc9190612588565b50565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614610f575760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016106f6565b6000918252601060209081526040808420548452600f90915290912055565b5050565b6060600280546105fe906129d6565b7f0000000000000000000000000000000000000000000000000000000000ca81ad431015610fe75760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b60448201526064016106f6565b600081116110275760405162461bcd60e51b815260206004820152600d60248201526c043616e6e6f74206d696e74203609c1b60448201526064016106f6565b6001600160a01b037f000000000000000000000000058bc8ef040bd3971418e36aa88b64899378ccf4166323b872dd3361dead6110857f0000000000000000000000000000000000000000000000000000000000000012600a6128c9565b61108f9086612974565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b1580156110de57600080fd5b505af11580156110f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111169190612588565b6111555760405162461bcd60e51b815260206004820152601060248201526f63616e6e6f74206275726e20444f4e4160801b60448201526064016106f6565b600061116060095490565b905060005b82811015611192576111803361117b838561285a565b611b48565b8061118a81612a11565b915050611165565b5061271061119f60095490565b1115610f765760405162461bcd60e51b815260206004820152601960248201527f4d617820737570706c7920616c7265616479206d696e7465640000000000000060448201526064016106f6565b6001600160a01b0382163314156112465760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106f6565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600f60205260009081526040902080546001820180549192916112d4906129d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611300906129d6565b801561134d5780601f106113225761010080835404028352916020019161134d565b820191906000526020600020905b81548152906001019060200180831161133057829003601f168201915b5050505050905082565b6113613383611730565b61137d5760405162461bcd60e51b81526004016106f6906127f0565b61138984848484611b62565b50505050565b6000818152600360205260409020546060906001600160a01b031661140e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016106f6565b600061141c6101f484612872565b6000818152600f602052604081208054600182018054949550919390929190611444906129d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611470906129d6565b80156114bd5780601f10611492576101008083540402835291602001916114bd565b820191906000526020600020905b8154815290600101906020018083116114a057829003601f168201915b5050505050905081600014806114d257508051155b1561156d57600c80546114e4906129d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611510906129d6565b801561155d5780601f106115325761010080835404028352916020019161155d565b820191906000526020600020905b81548152906001019060200180831161154057829003601f168201915b5050505050945050505050919050565b8061158061157b8885610aff565b611b95565b6040516020016115919291906126ba565b604051602081830303815290604052945050505050919050565b600b546001600160a01b031633146115d55760405162461bcd60e51b81526004016106f6906127bb565b600e55565b600b546001600160a01b031633146116045760405162461bcd60e51b81526004016106f6906127bb565b6001600160a01b0381166116695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f6565b610edc81611af6565b60006001600160e01b031982166380ac58cd60e01b14806116a357506001600160e01b03198216635b5e139f60e01b145b806105e957506301ffc9a760e01b6001600160e01b03198316146105e9565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116f782610a88565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b03166117a95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f6565b60006117b483610a88565b9050806001600160a01b0316846001600160a01b031614806117ef5750836001600160a01b03166117e484610681565b6001600160a01b0316145b8061181f57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661183a82610a88565b6001600160a01b0316146118a25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016106f6565b6001600160a01b0382166119045760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106f6565b61190f838383611c93565b61191a6000826116c2565b6001600160a01b0383166000908152600460205260408120805460019290611943908490612993565b90915550506001600160a01b038216600090815260046020526040812080546001929061197190849061285a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600e546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a082319060240160206040518083038186803b158015611a3857600080fd5b505afa158015611a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a70919061261a565b1015611ad25760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b60648201526084016106f6565b611ae0600d54600e54611d4b565b6000818152601060205260409020929092555090565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610f76828260405180602001604052806000815250611ed1565b611b6d848484611827565b611b7984848484611f04565b6113895760405162461bcd60e51b81526004016106f690612769565b606081611bb95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611be35780611bcd81612a11565b9150611bdc9050600a83612872565b9150611bbd565b60008167ffffffffffffffff811115611bfe57611bfe612a98565b6040519080825280601f01601f191660200182016040528015611c28576020820181803683370190505b5090505b841561181f57611c3d600183612993565b9150611c4a600a86612a2c565b611c5590603061285a565b60f81b818381518110611c6a57611c6a612a82565b60200101906001600160f81b031916908160001a905350611c8c600a86612872565b9450611c2c565b6001600160a01b038316611cee57611ce981600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b611d11565b816001600160a01b0316836001600160a01b031614611d1157611d118382612011565b6001600160a01b038216611d285761082c816120ae565b826001600160a01b0316826001600160a01b03161461082c5761082c828261215d565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001611dbb929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611de893929190612726565b602060405180830381600087803b158015611e0257600080fd5b505af1158015611e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3a9190612588565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152611e9490600161285a565b600085815260208181526040918290209290925580518083018790528082018490528151808203830181526060909101909152805191012061181f565b611edb83836121a1565b611ee86000848484611f04565b61082c5760405162461bcd60e51b81526004016106f690612769565b60006001600160a01b0384163b1561200657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f489033908990889088906004016126e9565b602060405180830381600087803b158015611f6257600080fd5b505af1925050508015611f92575060408051601f3d908101601f19168201909252611f8f918101906125fd565b60015b611fec573d808015611fc0576040519150601f19603f3d011682016040523d82523d6000602084013e611fc5565b606091505b508051611fe45760405162461bcd60e51b81526004016106f690612769565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061181f565b506001949350505050565b6000600161201e84610c9f565b6120289190612993565b60008381526008602052604090205490915080821461207b576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906120c090600190612993565b6000838152600a6020526040812054600980549394509092849081106120e8576120e8612a82565b90600052602060002001549050806009838154811061210957612109612a82565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061214157612141612a6c565b6001900381819060005260206000200160009055905550505050565b600061216883610c9f565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b0382166121f75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106f6565b6000818152600360205260409020546001600160a01b03161561225c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106f6565b61226860008383611c93565b6001600160a01b038216600090815260046020526040812080546001929061229190849061285a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546122fb906129d6565b90600052602060002090601f01602090048101928261231d5760008555612363565b82601f1061233657805160ff1916838001178555612363565b82800160010185558215612363579182015b82811115612363578251825591602001919060010190612348565b5061236f929150612373565b5090565b5b8082111561236f5760008155600101612374565b600067ffffffffffffffff808411156123a3576123a3612a98565b604051601f8501601f19908116603f011681019082821181831017156123cb576123cb612a98565b816040528093508581528686860111156123e457600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461241557600080fd5b919050565b60006020828403121561242c57600080fd5b612435826123fe565b9392505050565b6000806040838503121561244f57600080fd5b612458836123fe565b9150612466602084016123fe565b90509250929050565b60008060006060848603121561248457600080fd5b61248d846123fe565b925061249b602085016123fe565b9150604084013590509250925092565b600080600080608085870312156124c157600080fd5b6124ca856123fe565b93506124d8602086016123fe565b925060408501359150606085013567ffffffffffffffff8111156124fb57600080fd5b8501601f8101871361250c57600080fd5b61251b87823560208401612388565b91505092959194509250565b6000806040838503121561253a57600080fd5b612543836123fe565b9150602083013561255381612aae565b809150509250929050565b6000806040838503121561257157600080fd5b61257a836123fe565b946020939093013593505050565b60006020828403121561259a57600080fd5b815161243581612aae565b6000602082840312156125b757600080fd5b5035919050565b600080604083850312156125d157600080fd5b50508035926020909101359150565b6000602082840312156125f257600080fd5b813561243581612abc565b60006020828403121561260f57600080fd5b815161243581612abc565b60006020828403121561262c57600080fd5b5051919050565b6000806040838503121561264657600080fd5b82359150602083013567ffffffffffffffff81111561266457600080fd5b8301601f8101851361267557600080fd5b61268485823560208401612388565b9150509250929050565b600081518084526126a68160208601602086016129aa565b601f01601f19169290920160200192915050565b600083516126cc8184602088016129aa565b8351908301906126e08183602088016129aa565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061271c9083018461268e565b9695505050505050565b60018060a01b038416815282602082015260606040820152600061274d606083018461268e565b95945050505050565b602081526000612435602083018461268e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b82815260406020820152600061181f604083018461268e565b6000821982111561286d5761286d612a40565b500190565b60008261288157612881612a56565b500490565b600181815b808511156128c15781600019048211156128a7576128a7612a40565b808516156128b457918102915b93841c939080029061288b565b509250929050565b600061243560ff8416836000826128e2575060016105e9565b816128ef575060006105e9565b8160018114612905576002811461290f5761292b565b60019150506105e9565b60ff84111561292057612920612a40565b50506001821b6105e9565b5060208310610133831016604e8410600b841016171561294e575081810a6105e9565b6129588383612886565b806000190482111561296c5761296c612a40565b029392505050565b600081600019048311821515161561298e5761298e612a40565b500290565b6000828210156129a5576129a5612a40565b500390565b60005b838110156129c55781810151838201526020016129ad565b838111156113895750506000910152565b600181811c908216806129ea57607f821691505b60208210811415612a0b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612a2557612a25612a40565b5060010190565b600082612a3b57612a3b612a56565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610edc57600080fd5b6001600160e01b031981168114610edc57600080fdfea2646970667358221220c221fe47b3724d42b7a06403ea60eb5b6d23ef652d8c096860367b9eb75ea82d64736f6c63430008070033

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

000000000000000000000000058bc8ef040bd3971418e36aa88b64899378ccf400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000ca81ad0000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d53586e754e59725167563163764e6863464b4438784d57506a58517847764b3171684362596167335063315a0000000000000000000000

-----Decoded View---------------
Arg [0] : _donaToken (address): 0x058bC8Ef040bD3971418E36aA88b64899378CcF4
Arg [1] : _tempURI (string): ipfs://QmSXnuNYrQgV1cvNhcFKD8xMWPjXQxGvK1qhCbYag3Pc1Z
Arg [2] : _startBlock (uint256): 13271469

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000058bc8ef040bd3971418e36aa88b64899378ccf4
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 0000000000000000000000000000000000000000000000000000000000ca81ad
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [4] : 697066733a2f2f516d53586e754e59725167563163764e6863464b4438784d57
Arg [5] : 506a58517847764b3171684362596167335063315a0000000000000000000000


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.