ETH Price: $3,112.57 (-1.80%)

Komorebi No Sekai (KNS)
 

Overview

TokenID

1311

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Komorebi is a collaborative experience where token holders participate in the creation of the story.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
KomorebiNoSekai

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 18 : KomorebiNoSekai.sol
// SPDX-License-Identifier: Apache-2.0
// 人類の反撃はこれからだ。
// jinrui no hangeki wa kore kara da.

// Source code heavily inspired from deployed contract instance of Azuki collection
// https://etherscan.io/address/0xed5af388653567af2f388e6224dc7c4b3241c544#code
// The source code in the github does not have some important features.
// This is why we used directly the code from the deployed version.
pragma solidity >=0.8.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

import "./ERC721A.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";

/// @title KomorebiNoSekai NFT collection
/// @author 0xmanga-eth
contract KomorebiNoSekai is Ownable, ERC721A, ReentrancyGuard, VRFConsumerBase {
    using SafeMath for uint256;

    uint256 public immutable maxPerAddressDuringMint;
    uint256 public immutable amountForDevs;

    address public constant AZUKI_ADDRESS = 0xED5AF388653567Af2F388E6224dC7C4b3241C544;

    string constant ERROR_NOT_ENOUGH_LINK = "not enough LINK";

    // Furaribi (ふらり火, Furaribi) are the ghost of those murdered
    // in cold blood by an angry samurai.
    // They get their namesake from them wandering
    // aimlessly around the edges of lakes and rivers.
    uint8 public constant FURARIBI_SIDE = 1;

    // ナイト Naito (from english: "Knight")
    // ライト Raito (from english: "Light")
    // They fight against Furaribi spirits to protect humans.
    uint8 public constant NAITO_RAITO_SIDE = 2;

    struct SaleConfig {
        uint32 whitelistSaleStartTime;
        uint32 saleStartTime;
        uint64 mintlistPrice;
        uint64 price;
    }

    struct Gift {
        address collectionAddress;
        uint256[] ids;
    }

    // The sale configuration
    SaleConfig public saleConfig;
    // Whitelisted addresses
    mapping(address => uint8) public _allowList;
    // Whitelisted NFT collections
    address[] public _whitelistedCollections;
    // Per user assigned side
    mapping(address => uint8) private _side;

    // The winner NFT id
    uint256 public giftsWinnerTokenId;
    // The winner of the gifts
    address public giftsWinnerAddress;
    // The list of NFT gifts
    Gift[] public gifts;
    // The chainlink request id for VRF
    bytes32 selectRandomGiftWinnerRequestId;

    // Chainlink configuration
    address _vrfCoordinator;
    address _linkToken;
    bytes32 _vrfKeyHash;
    uint256 _vrfFee;

    constructor(
        uint256 maxBatchSize_,
        uint256 collectionSize_,
        uint256 amountForDevs_,
        address vrfCoordinator_,
        address linkToken_,
        bytes32 vrfKeyHash_,
        uint256 vrfFee_
    ) ERC721A("Komorebi No Sekai", "KNS", maxBatchSize_, collectionSize_) VRFConsumerBase(vrfCoordinator_, linkToken_) {
        maxPerAddressDuringMint = maxBatchSize_;
        amountForDevs = amountForDevs_;
        _vrfCoordinator = vrfCoordinator_;
        _linkToken = linkToken_;
        _vrfKeyHash = vrfKeyHash_;
        _vrfFee = vrfFee_;
    }

    /// @notice Buy a quantity of NFTs during the whitelisted sale.
    /// @dev Throws if user is not whitelisted.
    function allowlistMint() external payable callerIsUser {
        uint256 price = uint256(saleConfig.mintlistPrice);
        uint256 whitelistSaleStartTime = uint256(saleConfig.whitelistSaleStartTime);
        assignSideIfNoSide(msg.sender);
        require(getCurrentTime() >= whitelistSaleStartTime, "allowlist sale has not begun yet");
        require(price != 0, "allowlist sale has not begun yet");
        require(isWhitelisted(msg.sender), "not eligible for allowlist mint");
        require(totalSupply() + 1 <= collectionSize, "reached max supply");
        if (_allowList[msg.sender] > 0) {
            _allowList[msg.sender]--;
        }
        _safeMint(msg.sender, 1);
        refundIfOver(price);
    }

    /// @notice Buy a quantity of NFTs during the public primary sale.
    /// @param quantity The number of items to mint.
    function saleMint(uint256 quantity) external payable callerIsUser {
        SaleConfig memory config = saleConfig;
        uint256 price = uint256(config.price);
        uint256 saleStartTime = uint256(config.saleStartTime);
        assignSideIfNoSide(msg.sender);
        require(isPublicSaleOn(price, saleStartTime), "public sale has not begun yet");
        require(totalSupply() + quantity <= collectionSize, "reached max supply");
        require(numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint, "can not mint this many");
        _safeMint(msg.sender, quantity);
        refundIfOver(price * quantity);
    }

    /// @notice Mint NFTs for dev team.
    /// @dev For marketing etc.
    function devMint(uint256 quantity) external onlyOwner {
        require(totalSupply() + quantity <= amountForDevs, "too many already minted before dev mint");
        require(quantity % maxBatchSize == 0, "can only mint a multiple of the maxBatchSize");
        uint256 numChunks = quantity / maxBatchSize;
        for (uint256 i = 0; i < numChunks; i++) {
            _safeMint(msg.sender, maxBatchSize);
        }
    }

    /// @notice Refund the difference if user sent more than the specified price.
    /// @param price The correct price.
    function refundIfOver(uint256 price) private {
        require(msg.value >= price, "Need to send more ETH.");
        if (msg.value > price) {
            payable(msg.sender).transfer(msg.value - price);
        }
    }

    /// @notice Return whether or not the public sale is live.
    /// @param priceWei The price set in WEI.
    /// @param saleStartTime The start time set.
    /// @return true if public sale is live, false otherwise.
    function isPublicSaleOn(uint256 priceWei, uint256 saleStartTime) public view returns (bool) {
        return priceWei != 0 && getCurrentTime() >= saleStartTime;
    }

    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }

    /// @notice Add addresses to allow list.
    /// @param addresses The account addresses to whitelist.
    /// @param numAllowedToMint The number of allowed NFTs to mint per address.
    function setAllowList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            _allowList[addresses[i]] = numAllowedToMint;
        }
    }

    // // metadata URI
    string private _baseTokenURI;

    /// @notice Return the current base URI.
    /// @return The current base URI.
    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    /// @notice Set the base URI for the collection.
    /// @dev Can be used to handle a reveal separately.
    /// @param baseURI The new base URI.
    function setBaseURI(string calldata baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    /// @notice Withdraw ETH from the contract.
    /// @dev Only owner can call this function.
    function withdrawMoney() external onlyOwner nonReentrant {
        (bool success, ) = msg.sender.call{ value: address(this).balance }("");
        require(success, "Transfer failed.");
    }

    /// @notice Return the number of minted NFTs for a given address.
    /// @param owner The address of the owner.
    /// @return The number of minted NFTs.
    function numberMinted(address owner) public view returns (uint256) {
        return _numberMinted(owner);
    }

    /// @notice Get ownership data.
    /// @param tokenId The token id.
    /// @return The `TokenOwnership` structure data associated to the token id.
    function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) {
        return ownershipOf(tokenId);
    }

    /// @notice Return the current time.
    /// @dev Can be extended for testing purpose.
    /// @return The current timestamp.
    function getCurrentTime() internal view virtual returns (uint256) {
        return block.timestamp;
    }

    /// @notice Set whitelist sale start time.
    /// @param whitelistSaleStartTime_ The start time as a timestamp.
    function setWhitelistSaleStartTime(uint32 whitelistSaleStartTime_) external onlyOwner {
        SaleConfig storage config = saleConfig;
        config.whitelistSaleStartTime = whitelistSaleStartTime_;
    }

    /// @notice Set public sale start time.
    /// @param saleStartTime_ The start time as a timestamp.
    function setSaleStartTime(uint32 saleStartTime_) external onlyOwner {
        SaleConfig storage config = saleConfig;
        config.saleStartTime = saleStartTime_;
    }

    /// @notice Set current price for whitelisted sale.
    /// @param mintlistPrice_ The price in WEI.
    function setMintlistPrice(uint64 mintlistPrice_) external onlyOwner {
        SaleConfig storage config = saleConfig;
        config.mintlistPrice = mintlistPrice_;
    }

    /// @notice Set current price for public sale.
    /// @param price_ The price in WEI.
    function setPrice(uint64 price_) external onlyOwner {
        SaleConfig storage config = saleConfig;
        config.price = price_;
    }

    /// @notice Return the side of `msg.sender`.
    /// @return The side.
    function getMySide() public view returns (uint8) {
        return getSide(msg.sender);
    }

    /// @notice Return the side of a specified address.
    /// @return The side.
    function getSide(address account) public view returns (uint8) {
        return _side[account];
    }

    /// @notice Return whether or not the specified address is assigned to a side.
    /// @return true if assigned, false otherwise.
    function hasSide(address account) public view returns (bool) {
        return _side[account] != 0;
    }

    /// @notice Assign a side to the specified address if not assigned yet.
    /// @param account The address to assign a side to.
    function assignSideIfNoSide(address account) internal {
        if (!hasSide(account)) {
            assignSide(account);
        }
    }

    /// @notice Assign a side to the specified address.
    /// @dev Throws if address has already a side assigned.
    /// @param account The address to assign a side to.
    function assignSide(address account) internal {
        require(!hasSide(account), "Account already assigned to a side");
        uint8 side;
        uint256 seed = uint256(getSeed());
        if (uint8(seed) % 2 == 0) {
            side = FURARIBI_SIDE;
        } else {
            side = NAITO_RAITO_SIDE;
        }
        _side[account] = side;
    }

    /// @notice Assign a side to `msg.sender`
    function assignMeASide() external {
        assignSideIfNoSide(msg.sender);
    }

    /// @notice Compute a new seed to serve for simple and non sensitive pseudo random use cases.
    /// @return The seed to use.
    function getSeed() internal view returns (bytes32) {
        return keccak256(abi.encodePacked(block.timestamp, block.basefee, gasleft(), msg.sender, totalSupply()));
    }

    /// @notice Whitelist holders of specific collection NFTs.
    /// @param collectionAddress The address of the collection.
    function whitelistHoldersOfCollection(address collectionAddress) external onlyOwner {
        _whitelistedCollections.push(collectionAddress);
    }

    /// @notice Whitelist holders of Azuki NFTs.
    function whitelistAzukiHolders() external onlyOwner {
        _whitelistedCollections.push(AZUKI_ADDRESS);
    }

    /// @notice Return whether or not the specified account is whitelisted.
    /// @param account The address to check.
    /// @return true if whitelisted, false otherwise.
    function isWhitelisted(address account) internal view returns (bool) {
        if (_allowList[account] > 0) {
            return true;
        }
        for (uint256 i = 0; i < _whitelistedCollections.length; i++) {
            IERC721 nftCollection = IERC721(_whitelistedCollections[i]);
            if (nftCollection.balanceOf(account) > 0) {
                return true;
            }
        }
        return false;
    }

    /// @notice Send NFT gifts to the selected winner.
    /// @dev Throws if the winner is not selected yet.
    function sendGiftsToWinner() external onlyIfWinnerSelected onlyOwner {
        for (uint256 i = 0; i < gifts.length; i++) {
            Gift memory gift = gifts[i];
            IERC721 collection = IERC721(gift.collectionAddress);
            uint256[] memory ids = gift.ids;
            for (uint256 j = 0; j < ids.length; j++) {
                uint256 id = ids[j];
                collection.safeTransferFrom(address(this), giftsWinnerAddress, id);
            }
        }
    }

    modifier onlyIfWinnerSelected() {
        require(giftsWinnerAddress != address(0x0), "winner must be selected");
        _;
    }

    /// @notice Select a random winner using Chainlink VRF.
    function selectRandomWinnerForGifts() external onlyOwner {
        require(giftsWinnerAddress == address(0x0), "winner already selected");
        selectRandomGiftWinnerRequestId = requestRandomness(_vrfKeyHash, _vrfFee);
    }

    /// @notice Withdraw Link
    /// @dev See chainlink documentation.
    function withdrawLink() external onlyOwner {
        IERC20 erc20 = IERC20(_linkToken);
        uint256 linkBalance = LINK.balanceOf(address(this));
        if (linkBalance > 0) {
            erc20.transfer(owner(), linkBalance);
        }
    }

    modifier requireFeeForLinkRequest() {
        require(LINK.balanceOf(address(this)) >= _vrfFee, ERROR_NOT_ENOUGH_LINK);
        _;
    }

    /// @dev See `VRFConsumerBase` documentation.
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        if (requestId == selectRandomGiftWinnerRequestId && giftsWinnerAddress == address(0x0)) {
            giftsWinnerTokenId = randomness.mod(totalSupply());
            giftsWinnerAddress = ownerOf(giftsWinnerTokenId);
        }
    }

    /// @notice Add gift to the list of gifts.
    /// @param collectionAddress Address of the NFT collection.
    /// @param ids The list of token ids.
    function addGift(address collectionAddress, uint256[] calldata ids) external {
        gifts.push(Gift(collectionAddress, ids));
    }

    /// @notice Update VRF fee.
    function updateVRFFee(uint256 fee) external onlyOwner {
        _vrfFee = fee;
    }
}

File 2 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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 3 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 6 of 18 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

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

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

File 7 of 18 : ERC721A.sol
// SPDX-License-Identifier: MIT
// Source code taken from deployed contract instance of Azuki collection
// https://etherscan.io/address/0xed5af388653567af2f388e6224dc7c4b3241c544#code
// The source code in the github does not have some important features.
// This is why we used directly the code from the deployed version.
pragma solidity 0.8.12;

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

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128.
 *
 * Does not support burning tokens to address(0).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using Address for address;
    using Strings for uint256;

    struct TokenOwnership {
        address addr;
        uint64 startTimestamp;
    }

    struct AddressData {
        uint128 balance;
        uint128 numberMinted;
    }

    uint256 private currentIndex = 0;

    uint256 internal immutable collectionSize;
    uint256 internal immutable maxBatchSize;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) private _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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
     * `maxBatchSize` refers to how much a minter can mint at a time.
     * `collectionSize_` refers to how many tokens are in the collection.
     */
    constructor(
        string memory name_,
        string memory symbol_,
        uint256 maxBatchSize_,
        uint256 collectionSize_
    ) {
        require(collectionSize_ > 0, "ERC721A: collection must have a nonzero supply");
        require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero");
        _name = name_;
        _symbol = symbol_;
        maxBatchSize = maxBatchSize_;
        collectionSize = collectionSize_;
    }

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

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This read function is O(collectionSize). If calling from a separate contract, be sure to test gas first.
     * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
        require(index < balanceOf(owner), "ERC721A: owner index out of bounds");
        uint256 numMintedSoFar = totalSupply();
        uint256 tokenIdsIdx = 0;
        address currOwnershipAddr = address(0);
        for (uint256 i = 0; i < numMintedSoFar; i++) {
            TokenOwnership memory ownership = _ownerships[i];
            if (ownership.addr != address(0)) {
                currOwnershipAddr = ownership.addr;
            }
            if (currOwnershipAddr == owner) {
                if (tokenIdsIdx == index) {
                    return i;
                }
                tokenIdsIdx++;
            }
        }
        revert("ERC721A: unable to get token of owner by index");
    }

    /**
     * @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 ||
            interfaceId == type(IERC721Enumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

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

    function _numberMinted(address owner) internal view returns (uint256) {
        require(owner != address(0), "ERC721A: number minted query for the zero address");
        return uint256(_addressData[owner].numberMinted);
    }

    function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        require(_exists(tokenId), "ERC721A: owner query for nonexistent token");

        uint256 lowestTokenToCheck;
        if (tokenId >= maxBatchSize) {
            lowestTokenToCheck = tokenId - maxBatchSize + 1;
        }

        for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
            TokenOwnership memory ownership = _ownerships[curr];
            if (ownership.addr != address(0)) {
                return ownership;
            }
        }

        revert("ERC721A: unable to determine the owner of token");
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return ownershipOf(tokenId).addr;
    }

    /**
     * @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 override {
        address owner = ERC721A.ownerOf(tokenId);
        require(to != owner, "ERC721A: approval to current owner");

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

        _approve(to, tokenId, owner);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public override {
        require(operator != _msgSender(), "ERC721A: 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 override {
        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public override {
        _transfer(from, to, tokenId);
        require(
            _checkOnERC721Received(from, to, tokenId, _data),
            "ERC721A: 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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return tokenId < currentIndex;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - there must be `quantity` tokens remaining unminted in the total collection.
     * - `to` cannot be the zero address.
     * - `quantity` cannot be larger than the max batch size.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "ERC721A: mint to the zero address");
        // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
        require(!_exists(startTokenId), "ERC721A: token already minted");
        require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high");

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        AddressData memory addressData = _addressData[to];
        _addressData[to] = AddressData(
            addressData.balance + uint128(quantity),
            addressData.numberMinted + uint128(quantity)
        );
        _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

        uint256 updatedIndex = startTokenId;

        for (uint256 i = 0; i < quantity; i++) {
            emit Transfer(address(0), to, updatedIndex);
            require(
                _checkOnERC721Received(address(0), to, updatedIndex, _data),
                "ERC721A: transfer to non ERC721Receiver implementer"
            );
            updatedIndex++;
        }

        currentIndex = updatedIndex;
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            getApproved(tokenId) == _msgSender() ||
            isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(isApprovedOrOwner, "ERC721A: transfer caller is not owner nor approved");

        require(prevOwnership.addr == from, "ERC721A: transfer from incorrect owner");
        require(to != address(0), "ERC721A: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));

        // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
        // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
        uint256 nextTokenId = tokenId + 1;
        if (_ownerships[nextTokenId].addr == address(0)) {
            if (_exists(nextTokenId)) {
                _ownerships[nextTokenId] = TokenOwnership(prevOwnership.addr, prevOwnership.startTimestamp);
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

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

    uint256 public nextOwnerToExplicitlySet = 0;

    /**
     * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
     */
    function _setOwnersExplicit(uint256 quantity) internal {
        uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
        require(quantity > 0, "quantity must be nonzero");
        uint256 endIndex = oldNextOwnerToSet + quantity - 1;
        if (endIndex > collectionSize - 1) {
            endIndex = collectionSize - 1;
        }
        // We know if the last one in the group exists, all in the group exist, due to serial ordering.
        require(_exists(endIndex), "not enough minted yet for this cleanup");
        for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
            if (_ownerships[i].addr == address(0)) {
                TokenOwnership memory ownership = ownershipOf(i);
                _ownerships[i] = TokenOwnership(ownership.addr, ownership.startTimestamp);
            }
        }
        nextOwnerToExplicitlySet = endIndex + 1;
    }

    /**
     * @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(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721A: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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`.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 8 of 18 : 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     constructor(<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 private constant 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 internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* 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 9 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 17 of 18 : 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 18 of 18 : 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));
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"maxBatchSize_","type":"uint256"},{"internalType":"uint256","name":"collectionSize_","type":"uint256"},{"internalType":"uint256","name":"amountForDevs_","type":"uint256"},{"internalType":"address","name":"vrfCoordinator_","type":"address"},{"internalType":"address","name":"linkToken_","type":"address"},{"internalType":"bytes32","name":"vrfKeyHash_","type":"bytes32"},{"internalType":"uint256","name":"vrfFee_","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AZUKI_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FURARIBI_SIDE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAITO_RAITO_SIDE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_allowList","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_whitelistedCollections","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collectionAddress","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"addGift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"amountForDevs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assignMeASide","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMySide","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOwnershipData","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"}],"internalType":"struct ERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getSide","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gifts","outputs":[{"internalType":"address","name":"collectionAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giftsWinnerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giftsWinnerTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"hasSide","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"priceWei","type":"uint256"},{"internalType":"uint256","name":"saleStartTime","type":"uint256"}],"name":"isPublicSaleOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerAddressDuringMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"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":"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":[],"name":"saleConfig","outputs":[{"internalType":"uint32","name":"whitelistSaleStartTime","type":"uint32"},{"internalType":"uint32","name":"saleStartTime","type":"uint32"},{"internalType":"uint64","name":"mintlistPrice","type":"uint64"},{"internalType":"uint64","name":"price","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"saleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"selectRandomWinnerForGifts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendGiftsToWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint8","name":"numAllowedToMint","type":"uint8"}],"name":"setAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"mintlistPrice_","type":"uint64"}],"name":"setMintlistPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"price_","type":"uint64"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"saleStartTime_","type":"uint32"}],"name":"setSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"whitelistSaleStartTime_","type":"uint32"}],"name":"setWhitelistSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"updateVRFFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistAzukiHolders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collectionAddress","type":"address"}],"name":"whitelistHoldersOfCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawMoney","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610140604052600060015560006008553480156200001c57600080fd5b5060405162004439380380620044398339810160408190526200003f916200031c565b8383604051806040016040528060118152602001704b6f6d6f72656269204e6f2053656b616960781b815250604051806040016040528060038152602001624b4e5360e81b8152508a8a620000a36200009d6200020560201b60201c565b62000209565b60008111620001105760405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20636f6c6c656374696f6e206d757374206861766520612060448201526d6e6f6e7a65726f20737570706c7960901b60648201526084015b60405180910390fd5b60008211620001725760405162461bcd60e51b815260206004820152602760248201527f455243373231413a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b606482015260840162000107565b83516200018790600290602087019062000259565b5082516200019d90600390602086019062000259565b5060a091909152608052505060016009556001600160a01b0391821660e052811660c0526101009790975261012094909452601380549387166001600160a01b03199485161790556014805492909616919092161790935560159290925550601655620003c1565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620002679062000384565b90600052602060002090601f0160209004810192826200028b5760008555620002d6565b82601f10620002a657805160ff1916838001178555620002d6565b82800160010185558215620002d6579182015b82811115620002d6578251825591602001919060010190620002b9565b50620002e4929150620002e8565b5090565b5b80821115620002e45760008155600101620002e9565b80516001600160a01b03811681146200031757600080fd5b919050565b600080600080600080600060e0888a0312156200033857600080fd5b8751965060208801519550604088015194506200035860608901620002ff565b93506200036860808901620002ff565b925060a0880151915060c0880151905092959891949750929550565b600181811c908216806200039957607f821691505b60208210811415620003bb57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516101005161012051613fe26200045760003960008181610af101526111230152600081816107520152611a86015260008181611cc10152613152015260008181611b9201526131230152600081816111cf0152818161126e015281816112a601528181612cc501528181612cef01526134d10152600081816114480152611a030152613fe26000f3fe60806040526004361061036b5760003560e01c80638295784d116101c6578063b88d4fde116100f7578063dbcad76f11610095578063f2fde38b1161006f578063f2fde38b14610abf578063fbe1aa5114610adf578063fc291da314610b13578063fe0a4a2b14610b2857600080fd5b8063dbcad76f14610a36578063dc33e68114610a56578063e985e9c514610a7657600080fd5b8063d6065935116100d1578063d6065935146109bb578063d7224ba0146109db578063d97cad6e146109f1578063dae0506114610a1157600080fd5b8063b88d4fde14610966578063c87b56dd14610986578063cceee99e146109a657600080fd5b806394985ddd1161016457806396f8340a1161013e57806396f8340a146108d6578063a22cb465146108f6578063a3fab02314610916578063ac4460021461095157600080fd5b806394985ddd1461088c57806394c4c143146108ac57806395d89b41146108c157600080fd5b80638da5cb5b116101a05780638da5cb5b146107875780638dc654a2146107a557806390aa0b0f146107ba5780639231ab2a1461083e57600080fd5b80638295784d146107205780638bc35c2f146107405780638ca887ca1461077457600080fd5b806341fbddbd116102a05780636352211e1161023e578063715018a611610218578063715018a6146106a357806372ba4902146106b857806374ed82f6146106d85780637de869091461070057600080fd5b80636352211e1461062a57806363c82ab01461064a57806370a082311461068357600080fd5b806346cf2c8b1161027a57806346cf2c8b146105a45780634f6ccce7146105ba57806355f804b3146105da5780635ccba052146105fa57600080fd5b806341fbddbd1461055c57806342842e0e1461056457806345df7cf01461058457600080fd5b8063158b10721161030d57806323b872dd116102e757806323b872dd146104dc5780632aec3ab9146104fc5780632f745c591461051c578063375a069a1461053c57600080fd5b8063158b10721461048857806318160ddd1461049d578063229c2048146104bc57600080fd5b8063081812fc11610349578063081812fc146103e9578063095ea7b3146104215780630f90fbcc1461044157806311c9c1c81461046157600080fd5b8063015952661461037057806301ffc9a71461039257806306fdde03146103c7575b600080fd5b34801561037c57600080fd5b5061039061038b36600461387a565b610b3d565b005b34801561039e57600080fd5b506103b26103ad3660046138b6565b610bb2565b60405190151581526020015b60405180910390f35b3480156103d357600080fd5b506103dc610c1f565b6040516103be919061392b565b3480156103f557600080fd5b5061040961040436600461393e565b610cb1565b6040516001600160a01b0390911681526020016103be565b34801561042d57600080fd5b5061039061043c366004613973565b610d4c565b34801561044d57600080fd5b50601054610409906001600160a01b031681565b34801561046d57600080fd5b50610476600281565b60405160ff90911681526020016103be565b34801561049457600080fd5b50610390610e64565b3480156104a957600080fd5b506001545b6040519081526020016103be565b3480156104c857600080fd5b506103906104d736600461399d565b610e6f565b3480156104e857600080fd5b506103906104f73660046139c7565b610ef9565b34801561050857600080fd5b5061039061051736600461393e565b610f04565b34801561052857600080fd5b506104ae610537366004613973565b610f51565b34801561054857600080fd5b5061039061055736600461393e565b6110d9565b6103906112dc565b34801561057057600080fd5b5061039061057f3660046139c7565b611531565b34801561059057600080fd5b5061040961059f36600461393e565b61154c565b3480156105b057600080fd5b506104ae600f5481565b3480156105c657600080fd5b506104ae6105d536600461393e565b611576565b3480156105e657600080fd5b506103906105f5366004613a03565b6115df565b34801561060657600080fd5b50610476610615366004613a75565b600c6020526000908152604090205460ff1681565b34801561063657600080fd5b5061040961064536600461393e565b611633565b34801561065657600080fd5b50610476610665366004613a75565b6001600160a01b03166000908152600e602052604090205460ff1690565b34801561068f57600080fd5b506104ae61069e366004613a75565b611645565b3480156106af57600080fd5b506103906116e8565b3480156106c457600080fd5b506103906106d3366004613a75565b61173a565b3480156106e457600080fd5b5061040973ed5af388653567af2f388e6224dc7c4b3241c54481565b34801561070c57600080fd5b5061039061071b36600461387a565b6117d4565b34801561072c57600080fd5b5061039061073b366004613adc565b611838565b34801561074c57600080fd5b506104ae7f000000000000000000000000000000000000000000000000000000000000000081565b61039061078236600461393e565b6118fa565b34801561079357600080fd5b506000546001600160a01b0316610409565b3480156107b157600080fd5b50610390611b23565b3480156107c657600080fd5b50600b546108069063ffffffff8082169164010000000081049091169067ffffffffffffffff680100000000000000008204811691600160801b90041684565b6040805163ffffffff958616815294909316602085015267ffffffffffffffff918216928401929092521660608201526080016103be565b34801561084a57600080fd5b5061085e61085936600461393e565b611c99565b6040805182516001600160a01b0316815260209283015167ffffffffffffffff1692810192909252016103be565b34801561089857600080fd5b506103906108a7366004613b39565b611cb6565b3480156108b857600080fd5b50610476600181565b3480156108cd57600080fd5b506103dc611d38565b3480156108e257600080fd5b506103906108f136600461399d565b611d47565b34801561090257600080fd5b50610390610911366004613b69565b611dc7565b34801561092257600080fd5b506103b2610931366004613a75565b6001600160a01b03166000908152600e602052604090205460ff16151590565b34801561095d57600080fd5b50610390611e8c565b34801561097257600080fd5b50610390610981366004613bb6565b611fcc565b34801561099257600080fd5b506103dc6109a136600461393e565b61204b565b3480156109b257600080fd5b50610390612126565b3480156109c757600080fd5b506104096109d636600461393e565b6121da565b3480156109e757600080fd5b506104ae60085481565b3480156109fd57600080fd5b50610390610a0c366004613c92565b612209565b348015610a1d57600080fd5b50336000908152600e602052604090205460ff16610476565b348015610a4257600080fd5b506103b2610a51366004613b39565b6122b3565b348015610a6257600080fd5b506104ae610a71366004613a75565b6122c8565b348015610a8257600080fd5b506103b2610a91366004613ce5565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610acb57600080fd5b50610390610ada366004613a75565b6122d3565b348015610aeb57600080fd5b506104ae7f000000000000000000000000000000000000000000000000000000000000000081565b348015610b1f57600080fd5b506103906123a3565b348015610b3457600080fd5b50610390612443565b6000546001600160a01b03163314610b8a5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb683398151915260448201526064015b60405180910390fd5b600b805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b60006001600160e01b031982166380ac58cd60e01b1480610be357506001600160e01b03198216635b5e139f60e01b145b80610bfe57506001600160e01b0319821663780e9d6360e01b145b80610c1957506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060028054610c2e90613d18565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90613d18565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050505050905090565b6000610cbe826001541190565b610d305760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201527f78697374656e7420746f6b656e000000000000000000000000000000000000006064820152608401610b81565b506000908152600660205260409020546001600160a01b031690565b6000610d5782611633565b9050806001600160a01b0316836001600160a01b03161415610dc65760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610b81565b336001600160a01b0382161480610de25750610de28133610a91565b610e545760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610b81565b610e5f838383612655565b505050565b610e6d336126b1565b565b6000546001600160a01b03163314610eb75760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600b805467ffffffffffffffff909216600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff909216919091179055565b610e5f8383836126da565b6000546001600160a01b03163314610f4c5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b601655565b6000610f5c83611645565b8210610fb55760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610b81565b6000610fc060015490565b905060008060005b8381101561106a576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff16918301919091521561101b57805192505b876001600160a01b0316836001600160a01b03161415611057578684141561104957509350610c1992505050565b8361105381613d69565b9450505b508061106281613d69565b915050610fc8565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201527f6f776e657220627920696e6465780000000000000000000000000000000000006064820152608401610b81565b6000546001600160a01b031633146111215760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b7f00000000000000000000000000000000000000000000000000000000000000008161114c60015490565b6111569190613d84565b11156111ca5760405162461bcd60e51b815260206004820152602760248201527f746f6f206d616e7920616c7265616479206d696e746564206265666f7265206460448201527f6576206d696e74000000000000000000000000000000000000000000000000006064820152608401610b81565b6111f47f000000000000000000000000000000000000000000000000000000000000000082613db2565b156112675760405162461bcd60e51b815260206004820152602c60248201527f63616e206f6e6c79206d696e742061206d756c7469706c65206f66207468652060448201527f6d6178426174636853697a6500000000000000000000000000000000000000006064820152608401610b81565b60006112937f000000000000000000000000000000000000000000000000000000000000000083613dc6565b905060005b81811015610e5f576112ca337f0000000000000000000000000000000000000000000000000000000000000000612a98565b806112d481613d69565b915050611298565b32331461132b5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610b81565b600b5467ffffffffffffffff680100000000000000008204169063ffffffff16611354336126b1565b804210156113a45760405162461bcd60e51b815260206004820181905260248201527f616c6c6f776c6973742073616c6520686173206e6f7420626567756e207965746044820152606401610b81565b816113f15760405162461bcd60e51b815260206004820181905260248201527f616c6c6f776c6973742073616c6520686173206e6f7420626567756e207965746044820152606401610b81565b6113fa33612ab2565b6114465760405162461bcd60e51b815260206004820152601f60248201527f6e6f7420656c696769626c6520666f7220616c6c6f776c697374206d696e74006044820152606401610b81565b7f000000000000000000000000000000000000000000000000000000000000000061147060015490565b61147b906001613d84565b11156114c95760405162461bcd60e51b815260206004820152601260248201527f72656163686564206d617820737570706c7900000000000000000000000000006044820152606401610b81565b336000908152600c602052604090205460ff161561151957336000908152600c60205260408120805460ff16916114ff83613dda565b91906101000a81548160ff021916908360ff160217905550505b611524336001612a98565b61152d82612ba2565b5050565b610e5f83838360405180602001604052806000815250611fcc565b600d818154811061155c57600080fd5b6000918252602090912001546001600160a01b0316905081565b600061158160015490565b82106115db5760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610b81565b5090565b6000546001600160a01b031633146116275760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b610e5f601783836137aa565b600061163e82612c30565b5192915050565b60006001600160a01b0382166116c35760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610b81565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b6000546001600160a01b031633146117305760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b610e6d6000612dfb565b6000546001600160a01b031633146117825760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461181c5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600b805463ffffffff191663ffffffff92909216919091179055565b6000546001600160a01b031633146118805760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b60005b828110156118f45781600c60008686858181106118a2576118a2613df7565b90506020020160208101906118b79190613a75565b6001600160a01b031681526020810191909152604001600020805460ff191660ff92909216919091179055806118ec81613d69565b915050611883565b50505050565b3233146119495760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610b81565b60408051608081018252600b5463ffffffff80821683526401000000008204166020830181905267ffffffffffffffff680100000000000000008304811694840194909452600160801b9091049092166060820181905290916119ab336126b1565b6119b582826122b3565b611a015760405162461bcd60e51b815260206004820152601d60248201527f7075626c69632073616c6520686173206e6f7420626567756e207965740000006044820152606401610b81565b7f000000000000000000000000000000000000000000000000000000000000000084611a2c60015490565b611a369190613d84565b1115611a845760405162461bcd60e51b815260206004820152601260248201527f72656163686564206d617820737570706c7900000000000000000000000000006044820152606401610b81565b7f000000000000000000000000000000000000000000000000000000000000000084611aaf336122c8565b611ab99190613d84565b1115611b075760405162461bcd60e51b815260206004820152601660248201527f63616e206e6f74206d696e742074686973206d616e79000000000000000000006044820152606401610b81565b611b113385612a98565b6118f4611b1e8584613e0d565b612ba2565b6000546001600160a01b03163314611b6b5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b6014546040516370a0823160e01b81523060048201526001600160a01b03918216916000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015611bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bff9190613e2c565b9050801561152d57816001600160a01b031663a9059cbb611c286000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015611c75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5f9190613e45565b6040805180820190915260008082526020820152610c1982612c30565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611d2e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610b81565b61152d8282612e4b565b606060038054610c2e90613d18565b6000546001600160a01b03163314611d8f5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600b805467ffffffffffffffff90921668010000000000000000026fffffffffffffffff000000000000000019909216919091179055565b6001600160a01b038216331415611e205760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610b81565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b03163314611ed45760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b60026009541415611f275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b81565b6002600955604051600090339047908381818185875af1925050503d8060008114611f6e576040519150601f19603f3d011682016040523d82523d6000602084013e611f73565b606091505b5050905080611fc45760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610b81565b506001600955565b611fd78484846126da565b611fe384848484612eaf565b6118f45760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b6064820152608401610b81565b6060612058826001541190565b6120ca5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610b81565b60006120d4612ffa565b905060008151116120f4576040518060200160405280600081525061211f565b806120fe84613009565b60405160200161210f929190613e62565b6040516020818303038152906040525b9392505050565b6000546001600160a01b0316331461216e5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b6010546001600160a01b0316156121c75760405162461bcd60e51b815260206004820152601760248201527f77696e6e657220616c72656164792073656c65637465640000000000000000006044820152606401610b81565b6121d560155460165461311f565b601255565b601181815481106121ea57600080fd5b60009182526020909120600290910201546001600160a01b0316905081565b60116040518060400160405280856001600160a01b031681526020018484808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250939094525050835460018082018655948252602091829020845160029092020180546001600160a01b0319166001600160a01b03909216919091178155838201518051949591946122ab945091850192019061382a565b505050505050565b6000821580159061211f575050421015919050565b6000610c198261329b565b6000546001600160a01b0316331461231b5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b6001600160a01b0381166123975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b81565b6123a081612dfb565b50565b6000546001600160a01b031633146123eb5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b03191673ed5af388653567af2f388e6224dc7c4b3241c544179055565b6010546001600160a01b031661249b5760405162461bcd60e51b815260206004820152601760248201527f77696e6e6572206d7573742062652073656c65637465640000000000000000006044820152606401610b81565b6000546001600160a01b031633146124e35760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b60005b6011548110156123a05760006011828154811061250557612505613df7565b6000918252602091829020604080518082018252600290930290910180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561257b57602002820191906000526020600020905b815481526020019060010190808311612567575b5050509190925250508151602083015192935091905060005b815181101561263e5760008282815181106125b1576125b1613df7565b6020908102919091010151601054604051632142170760e11b81523060048201526001600160a01b039182166024820152604481018390529192508516906342842e0e90606401600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b5050505050808061263690613d69565b915050612594565b50505050808061264d90613d69565b9150506124e6565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6001600160a01b0381166000908152600e602052604090205460ff166123a0576123a081613345565b60006126e582612c30565b80519091506000906001600160a01b0316336001600160a01b0316148061271c57503361271184610cb1565b6001600160a01b0316145b8061272e5750815161272e9033610a91565b9050806127a35760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610b81565b846001600160a01b031682600001516001600160a01b03161461282e5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f727265637460448201527f206f776e657200000000000000000000000000000000000000000000000000006064820152608401610b81565b6001600160a01b0384166128aa5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610b81565b6128ba6000848460000151612655565b6001600160a01b03851660009081526005602052604081208054600192906128ec9084906001600160801b0316613e91565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b0386166000908152600560205260408120805460019450909261293891859116613eb9565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b03808716825267ffffffffffffffff428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b031990911691909216171790556129c0846001613d84565b6000818152600460205260409020549091506001600160a01b0316612a52576129ea816001541190565b15612a525760408051808201825284516001600160a01b03908116825260208087015167ffffffffffffffff9081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46122ab565b61152d828260405180602001604052806000815250613414565b6001600160a01b0381166000908152600c602052604081205460ff1615612adb57506001919050565b60005b600d54811015612b99576000600d8281548110612afd57612afd613df7565b60009182526020822001546040516370a0823160e01b81526001600160a01b038781166004830152909116925082906370a0823190602401602060405180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b769190613e2c565b1115612b86575060019392505050565b5080612b9181613d69565b915050612ade565b50600092915050565b80341015612bf25760405162461bcd60e51b815260206004820152601660248201527f4e65656420746f2073656e64206d6f7265204554482e000000000000000000006044820152606401610b81565b803411156123a057336108fc612c088334613edb565b6040518115909202916000818181858888f1935050505015801561152d573d6000803e3d6000fd5b6040805180820190915260008082526020820152612c4f826001541190565b612cc15760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e000000000000000000000000000000000000000000006064820152608401610b81565b60007f00000000000000000000000000000000000000000000000000000000000000008310612d2257612d147f000000000000000000000000000000000000000000000000000000000000000084613edb565b612d1f906001613d84565b90505b825b818110612d8c576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff169183019190915215612d7957949350505050565b5080612d8481613ef2565b915050612d24565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201527f206f776e6572206f6620746f6b656e00000000000000000000000000000000006064820152608401610b81565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60125482148015612e6557506010546001600160a01b0316155b1561152d57612e7d612e7660015490565b829061373b565b600f819055612e8b90611633565b601080546001600160a01b0319166001600160a01b03929092169190911790555050565b60006001600160a01b0384163b15612fee57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ef3903390899088908890600401613f09565b6020604051808303816000875af1925050508015612f2e575060408051601f3d908101601f19168201909252612f2b91810190613f45565b60015b612fd4573d808015612f5c576040519150601f19603f3d011682016040523d82523d6000602084013e612f61565b606091505b508051612fcc5760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b6064820152608401610b81565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612ff2565b5060015b949350505050565b606060178054610c2e90613d18565b60608161302d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613057578061304181613d69565b91506130509050600a83613dc6565b9150613031565b60008167ffffffffffffffff81111561307257613072613ba0565b6040519080825280601f01601f19166020018201604052801561309c576020820181803683370190505b5090505b8415612ff2576130b1600183613edb565b91506130be600a86613db2565b6130c9906030613d84565b60f81b8183815181106130de576130de613df7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613118600a86613dc6565b94506130a0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f00000000000000000000000000000000000000000000000000000000000000008486600060405160200161318f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016131bc93929190613f62565b6020604051808303816000875af11580156131db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ff9190613e45565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a09091019092528151918301919091209387905291905261325b906001613d84565b6000858152600a6020526040902055612ff28482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60006001600160a01b0382166133195760405162461bcd60e51b815260206004820152603160248201527f455243373231413a206e756d626572206d696e74656420717565727920666f7260448201527f20746865207a65726f20616464726573730000000000000000000000000000006064820152608401610b81565b506001600160a01b0316600090815260056020526040902054600160801b90046001600160801b031690565b6001600160a01b0381166000908152600e602052604090205460ff16156133b95760405162461bcd60e51b815260206004820152602260248201527f4163636f756e7420616c72656164792061737369676e656420746f2061207369604482015261646560f01b6064820152608401610b81565b6000806133c4613747565b90506133d1600282613f93565b60ff166133e157600191506133e6565b600291505b506001600160a01b03919091166000908152600e60205260409020805460ff191660ff909216919091179055565b6001546001600160a01b0384166134775760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b81565b613482816001541190565b156134cf5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610b81565b7f000000000000000000000000000000000000000000000000000000000000000083111561354a5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610b81565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b90910416918101919091528151808301909252805190919081906135a6908790613eb9565b6001600160801b031681526020018583602001516135c49190613eb9565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b0297909616969096179094558451808601865291825267ffffffffffffffff4281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156137305760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46136a86000888488612eaf565b6137105760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b6064820152608401610b81565b8161371a81613d69565b925050808061372890613d69565b91505061365b565b5060018190556122ab565b600061211f8284613db2565b600042485a3361375660015490565b6040805160208101969096528501939093526060808501929092526bffffffffffffffffffffffff19911b166080830152609482015260b40160405160208183030381529060405280519060200120905090565b8280546137b690613d18565b90600052602060002090601f0160209004810192826137d8576000855561381e565b82601f106137f15782800160ff1982351617855561381e565b8280016001018555821561381e579182015b8281111561381e578235825591602001919060010190613803565b506115db929150613865565b82805482825590600052602060002090810192821561381e579160200282015b8281111561381e57825182559160200191906001019061384a565b5b808211156115db5760008155600101613866565b60006020828403121561388c57600080fd5b813563ffffffff8116811461211f57600080fd5b6001600160e01b0319811681146123a057600080fd5b6000602082840312156138c857600080fd5b813561211f816138a0565b60005b838110156138ee5781810151838201526020016138d6565b838111156118f45750506000910152565b600081518084526139178160208601602086016138d3565b601f01601f19169290920160200192915050565b60208152600061211f60208301846138ff565b60006020828403121561395057600080fd5b5035919050565b80356001600160a01b038116811461396e57600080fd5b919050565b6000806040838503121561398657600080fd5b61398f83613957565b946020939093013593505050565b6000602082840312156139af57600080fd5b813567ffffffffffffffff8116811461211f57600080fd5b6000806000606084860312156139dc57600080fd5b6139e584613957565b92506139f360208501613957565b9150604084013590509250925092565b60008060208385031215613a1657600080fd5b823567ffffffffffffffff80821115613a2e57600080fd5b818501915085601f830112613a4257600080fd5b813581811115613a5157600080fd5b866020828501011115613a6357600080fd5b60209290920196919550909350505050565b600060208284031215613a8757600080fd5b61211f82613957565b60008083601f840112613aa257600080fd5b50813567ffffffffffffffff811115613aba57600080fd5b6020830191508360208260051b8501011115613ad557600080fd5b9250929050565b600080600060408486031215613af157600080fd5b833567ffffffffffffffff811115613b0857600080fd5b613b1486828701613a90565b909450925050602084013560ff81168114613b2e57600080fd5b809150509250925092565b60008060408385031215613b4c57600080fd5b50508035926020909101359150565b80151581146123a057600080fd5b60008060408385031215613b7c57600080fd5b613b8583613957565b91506020830135613b9581613b5b565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215613bcc57600080fd5b613bd585613957565b9350613be360208601613957565b925060408501359150606085013567ffffffffffffffff80821115613c0757600080fd5b818701915087601f830112613c1b57600080fd5b813581811115613c2d57613c2d613ba0565b604051601f8201601f19908116603f01168101908382118183101715613c5557613c55613ba0565b816040528281528a6020848701011115613c6e57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060408486031215613ca757600080fd5b613cb084613957565b9250602084013567ffffffffffffffff811115613ccc57600080fd5b613cd886828701613a90565b9497909650939450505050565b60008060408385031215613cf857600080fd5b613d0183613957565b9150613d0f60208401613957565b90509250929050565b600181811c90821680613d2c57607f821691505b60208210811415613d4d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613d7d57613d7d613d53565b5060010190565b60008219821115613d9757613d97613d53565b500190565b634e487b7160e01b600052601260045260246000fd5b600082613dc157613dc1613d9c565b500690565b600082613dd557613dd5613d9c565b500490565b600060ff821680613ded57613ded613d53565b6000190192915050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615613e2757613e27613d53565b500290565b600060208284031215613e3e57600080fd5b5051919050565b600060208284031215613e5757600080fd5b815161211f81613b5b565b60008351613e748184602088016138d3565b835190830190613e888183602088016138d3565b01949350505050565b60006001600160801b0383811690831681811015613eb157613eb1613d53565b039392505050565b60006001600160801b03808316818516808303821115613e8857613e88613d53565b600082821015613eed57613eed613d53565b500390565b600081613f0157613f01613d53565b506000190190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f3b60808301846138ff565b9695505050505050565b600060208284031215613f5757600080fd5b815161211f816138a0565b6001600160a01b0384168152826020820152606060408201526000613f8a60608301846138ff565b95945050505050565b600060ff831680613fa657613fa6613d9c565b8060ff8416069150509291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c634300080c000a000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000022b80000000000000000000000000000000000000000000000000000000000000032000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000

Deployed Bytecode

0x60806040526004361061036b5760003560e01c80638295784d116101c6578063b88d4fde116100f7578063dbcad76f11610095578063f2fde38b1161006f578063f2fde38b14610abf578063fbe1aa5114610adf578063fc291da314610b13578063fe0a4a2b14610b2857600080fd5b8063dbcad76f14610a36578063dc33e68114610a56578063e985e9c514610a7657600080fd5b8063d6065935116100d1578063d6065935146109bb578063d7224ba0146109db578063d97cad6e146109f1578063dae0506114610a1157600080fd5b8063b88d4fde14610966578063c87b56dd14610986578063cceee99e146109a657600080fd5b806394985ddd1161016457806396f8340a1161013e57806396f8340a146108d6578063a22cb465146108f6578063a3fab02314610916578063ac4460021461095157600080fd5b806394985ddd1461088c57806394c4c143146108ac57806395d89b41146108c157600080fd5b80638da5cb5b116101a05780638da5cb5b146107875780638dc654a2146107a557806390aa0b0f146107ba5780639231ab2a1461083e57600080fd5b80638295784d146107205780638bc35c2f146107405780638ca887ca1461077457600080fd5b806341fbddbd116102a05780636352211e1161023e578063715018a611610218578063715018a6146106a357806372ba4902146106b857806374ed82f6146106d85780637de869091461070057600080fd5b80636352211e1461062a57806363c82ab01461064a57806370a082311461068357600080fd5b806346cf2c8b1161027a57806346cf2c8b146105a45780634f6ccce7146105ba57806355f804b3146105da5780635ccba052146105fa57600080fd5b806341fbddbd1461055c57806342842e0e1461056457806345df7cf01461058457600080fd5b8063158b10721161030d57806323b872dd116102e757806323b872dd146104dc5780632aec3ab9146104fc5780632f745c591461051c578063375a069a1461053c57600080fd5b8063158b10721461048857806318160ddd1461049d578063229c2048146104bc57600080fd5b8063081812fc11610349578063081812fc146103e9578063095ea7b3146104215780630f90fbcc1461044157806311c9c1c81461046157600080fd5b8063015952661461037057806301ffc9a71461039257806306fdde03146103c7575b600080fd5b34801561037c57600080fd5b5061039061038b36600461387a565b610b3d565b005b34801561039e57600080fd5b506103b26103ad3660046138b6565b610bb2565b60405190151581526020015b60405180910390f35b3480156103d357600080fd5b506103dc610c1f565b6040516103be919061392b565b3480156103f557600080fd5b5061040961040436600461393e565b610cb1565b6040516001600160a01b0390911681526020016103be565b34801561042d57600080fd5b5061039061043c366004613973565b610d4c565b34801561044d57600080fd5b50601054610409906001600160a01b031681565b34801561046d57600080fd5b50610476600281565b60405160ff90911681526020016103be565b34801561049457600080fd5b50610390610e64565b3480156104a957600080fd5b506001545b6040519081526020016103be565b3480156104c857600080fd5b506103906104d736600461399d565b610e6f565b3480156104e857600080fd5b506103906104f73660046139c7565b610ef9565b34801561050857600080fd5b5061039061051736600461393e565b610f04565b34801561052857600080fd5b506104ae610537366004613973565b610f51565b34801561054857600080fd5b5061039061055736600461393e565b6110d9565b6103906112dc565b34801561057057600080fd5b5061039061057f3660046139c7565b611531565b34801561059057600080fd5b5061040961059f36600461393e565b61154c565b3480156105b057600080fd5b506104ae600f5481565b3480156105c657600080fd5b506104ae6105d536600461393e565b611576565b3480156105e657600080fd5b506103906105f5366004613a03565b6115df565b34801561060657600080fd5b50610476610615366004613a75565b600c6020526000908152604090205460ff1681565b34801561063657600080fd5b5061040961064536600461393e565b611633565b34801561065657600080fd5b50610476610665366004613a75565b6001600160a01b03166000908152600e602052604090205460ff1690565b34801561068f57600080fd5b506104ae61069e366004613a75565b611645565b3480156106af57600080fd5b506103906116e8565b3480156106c457600080fd5b506103906106d3366004613a75565b61173a565b3480156106e457600080fd5b5061040973ed5af388653567af2f388e6224dc7c4b3241c54481565b34801561070c57600080fd5b5061039061071b36600461387a565b6117d4565b34801561072c57600080fd5b5061039061073b366004613adc565b611838565b34801561074c57600080fd5b506104ae7f000000000000000000000000000000000000000000000000000000000000000a81565b61039061078236600461393e565b6118fa565b34801561079357600080fd5b506000546001600160a01b0316610409565b3480156107b157600080fd5b50610390611b23565b3480156107c657600080fd5b50600b546108069063ffffffff8082169164010000000081049091169067ffffffffffffffff680100000000000000008204811691600160801b90041684565b6040805163ffffffff958616815294909316602085015267ffffffffffffffff918216928401929092521660608201526080016103be565b34801561084a57600080fd5b5061085e61085936600461393e565b611c99565b6040805182516001600160a01b0316815260209283015167ffffffffffffffff1692810192909252016103be565b34801561089857600080fd5b506103906108a7366004613b39565b611cb6565b3480156108b857600080fd5b50610476600181565b3480156108cd57600080fd5b506103dc611d38565b3480156108e257600080fd5b506103906108f136600461399d565b611d47565b34801561090257600080fd5b50610390610911366004613b69565b611dc7565b34801561092257600080fd5b506103b2610931366004613a75565b6001600160a01b03166000908152600e602052604090205460ff16151590565b34801561095d57600080fd5b50610390611e8c565b34801561097257600080fd5b50610390610981366004613bb6565b611fcc565b34801561099257600080fd5b506103dc6109a136600461393e565b61204b565b3480156109b257600080fd5b50610390612126565b3480156109c757600080fd5b506104096109d636600461393e565b6121da565b3480156109e757600080fd5b506104ae60085481565b3480156109fd57600080fd5b50610390610a0c366004613c92565b612209565b348015610a1d57600080fd5b50336000908152600e602052604090205460ff16610476565b348015610a4257600080fd5b506103b2610a51366004613b39565b6122b3565b348015610a6257600080fd5b506104ae610a71366004613a75565b6122c8565b348015610a8257600080fd5b506103b2610a91366004613ce5565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610acb57600080fd5b50610390610ada366004613a75565b6122d3565b348015610aeb57600080fd5b506104ae7f000000000000000000000000000000000000000000000000000000000000003281565b348015610b1f57600080fd5b506103906123a3565b348015610b3457600080fd5b50610390612443565b6000546001600160a01b03163314610b8a5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb683398151915260448201526064015b60405180910390fd5b600b805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b60006001600160e01b031982166380ac58cd60e01b1480610be357506001600160e01b03198216635b5e139f60e01b145b80610bfe57506001600160e01b0319821663780e9d6360e01b145b80610c1957506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060028054610c2e90613d18565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a90613d18565b8015610ca75780601f10610c7c57610100808354040283529160200191610ca7565b820191906000526020600020905b815481529060010190602001808311610c8a57829003601f168201915b5050505050905090565b6000610cbe826001541190565b610d305760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201527f78697374656e7420746f6b656e000000000000000000000000000000000000006064820152608401610b81565b506000908152600660205260409020546001600160a01b031690565b6000610d5782611633565b9050806001600160a01b0316836001600160a01b03161415610dc65760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610b81565b336001600160a01b0382161480610de25750610de28133610a91565b610e545760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610b81565b610e5f838383612655565b505050565b610e6d336126b1565b565b6000546001600160a01b03163314610eb75760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600b805467ffffffffffffffff909216600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff909216919091179055565b610e5f8383836126da565b6000546001600160a01b03163314610f4c5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b601655565b6000610f5c83611645565b8210610fb55760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610b81565b6000610fc060015490565b905060008060005b8381101561106a576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff16918301919091521561101b57805192505b876001600160a01b0316836001600160a01b03161415611057578684141561104957509350610c1992505050565b8361105381613d69565b9450505b508061106281613d69565b915050610fc8565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201527f6f776e657220627920696e6465780000000000000000000000000000000000006064820152608401610b81565b6000546001600160a01b031633146111215760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b7f00000000000000000000000000000000000000000000000000000000000000328161114c60015490565b6111569190613d84565b11156111ca5760405162461bcd60e51b815260206004820152602760248201527f746f6f206d616e7920616c7265616479206d696e746564206265666f7265206460448201527f6576206d696e74000000000000000000000000000000000000000000000000006064820152608401610b81565b6111f47f000000000000000000000000000000000000000000000000000000000000000a82613db2565b156112675760405162461bcd60e51b815260206004820152602c60248201527f63616e206f6e6c79206d696e742061206d756c7469706c65206f66207468652060448201527f6d6178426174636853697a6500000000000000000000000000000000000000006064820152608401610b81565b60006112937f000000000000000000000000000000000000000000000000000000000000000a83613dc6565b905060005b81811015610e5f576112ca337f000000000000000000000000000000000000000000000000000000000000000a612a98565b806112d481613d69565b915050611298565b32331461132b5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610b81565b600b5467ffffffffffffffff680100000000000000008204169063ffffffff16611354336126b1565b804210156113a45760405162461bcd60e51b815260206004820181905260248201527f616c6c6f776c6973742073616c6520686173206e6f7420626567756e207965746044820152606401610b81565b816113f15760405162461bcd60e51b815260206004820181905260248201527f616c6c6f776c6973742073616c6520686173206e6f7420626567756e207965746044820152606401610b81565b6113fa33612ab2565b6114465760405162461bcd60e51b815260206004820152601f60248201527f6e6f7420656c696769626c6520666f7220616c6c6f776c697374206d696e74006044820152606401610b81565b7f00000000000000000000000000000000000000000000000000000000000022b861147060015490565b61147b906001613d84565b11156114c95760405162461bcd60e51b815260206004820152601260248201527f72656163686564206d617820737570706c7900000000000000000000000000006044820152606401610b81565b336000908152600c602052604090205460ff161561151957336000908152600c60205260408120805460ff16916114ff83613dda565b91906101000a81548160ff021916908360ff160217905550505b611524336001612a98565b61152d82612ba2565b5050565b610e5f83838360405180602001604052806000815250611fcc565b600d818154811061155c57600080fd5b6000918252602090912001546001600160a01b0316905081565b600061158160015490565b82106115db5760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610b81565b5090565b6000546001600160a01b031633146116275760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b610e5f601783836137aa565b600061163e82612c30565b5192915050565b60006001600160a01b0382166116c35760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610b81565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b6000546001600160a01b031633146117305760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b610e6d6000612dfb565b6000546001600160a01b031633146117825760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461181c5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600b805463ffffffff191663ffffffff92909216919091179055565b6000546001600160a01b031633146118805760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b60005b828110156118f45781600c60008686858181106118a2576118a2613df7565b90506020020160208101906118b79190613a75565b6001600160a01b031681526020810191909152604001600020805460ff191660ff92909216919091179055806118ec81613d69565b915050611883565b50505050565b3233146119495760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610b81565b60408051608081018252600b5463ffffffff80821683526401000000008204166020830181905267ffffffffffffffff680100000000000000008304811694840194909452600160801b9091049092166060820181905290916119ab336126b1565b6119b582826122b3565b611a015760405162461bcd60e51b815260206004820152601d60248201527f7075626c69632073616c6520686173206e6f7420626567756e207965740000006044820152606401610b81565b7f00000000000000000000000000000000000000000000000000000000000022b884611a2c60015490565b611a369190613d84565b1115611a845760405162461bcd60e51b815260206004820152601260248201527f72656163686564206d617820737570706c7900000000000000000000000000006044820152606401610b81565b7f000000000000000000000000000000000000000000000000000000000000000a84611aaf336122c8565b611ab99190613d84565b1115611b075760405162461bcd60e51b815260206004820152601660248201527f63616e206e6f74206d696e742074686973206d616e79000000000000000000006044820152606401610b81565b611b113385612a98565b6118f4611b1e8584613e0d565b612ba2565b6000546001600160a01b03163314611b6b5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b6014546040516370a0823160e01b81523060048201526001600160a01b03918216916000917f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca909116906370a0823190602401602060405180830381865afa158015611bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bff9190613e2c565b9050801561152d57816001600160a01b031663a9059cbb611c286000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015611c75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5f9190613e45565b6040805180820190915260008082526020820152610c1982612c30565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614611d2e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610b81565b61152d8282612e4b565b606060038054610c2e90613d18565b6000546001600160a01b03163314611d8f5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600b805467ffffffffffffffff90921668010000000000000000026fffffffffffffffff000000000000000019909216919091179055565b6001600160a01b038216331415611e205760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610b81565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b03163314611ed45760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b60026009541415611f275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b81565b6002600955604051600090339047908381818185875af1925050503d8060008114611f6e576040519150601f19603f3d011682016040523d82523d6000602084013e611f73565b606091505b5050905080611fc45760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610b81565b506001600955565b611fd78484846126da565b611fe384848484612eaf565b6118f45760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b6064820152608401610b81565b6060612058826001541190565b6120ca5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610b81565b60006120d4612ffa565b905060008151116120f4576040518060200160405280600081525061211f565b806120fe84613009565b60405160200161210f929190613e62565b6040516020818303038152906040525b9392505050565b6000546001600160a01b0316331461216e5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b6010546001600160a01b0316156121c75760405162461bcd60e51b815260206004820152601760248201527f77696e6e657220616c72656164792073656c65637465640000000000000000006044820152606401610b81565b6121d560155460165461311f565b601255565b601181815481106121ea57600080fd5b60009182526020909120600290910201546001600160a01b0316905081565b60116040518060400160405280856001600160a01b031681526020018484808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250939094525050835460018082018655948252602091829020845160029092020180546001600160a01b0319166001600160a01b03909216919091178155838201518051949591946122ab945091850192019061382a565b505050505050565b6000821580159061211f575050421015919050565b6000610c198261329b565b6000546001600160a01b0316331461231b5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b6001600160a01b0381166123975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b81565b6123a081612dfb565b50565b6000546001600160a01b031633146123eb5760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b03191673ed5af388653567af2f388e6224dc7c4b3241c544179055565b6010546001600160a01b031661249b5760405162461bcd60e51b815260206004820152601760248201527f77696e6e6572206d7573742062652073656c65637465640000000000000000006044820152606401610b81565b6000546001600160a01b031633146124e35760405162461bcd60e51b81526020600482018190526024820152600080516020613fb68339815191526044820152606401610b81565b60005b6011548110156123a05760006011828154811061250557612505613df7565b6000918252602091829020604080518082018252600290930290910180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561257b57602002820191906000526020600020905b815481526020019060010190808311612567575b5050509190925250508151602083015192935091905060005b815181101561263e5760008282815181106125b1576125b1613df7565b6020908102919091010151601054604051632142170760e11b81523060048201526001600160a01b039182166024820152604481018390529192508516906342842e0e90606401600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b5050505050808061263690613d69565b915050612594565b50505050808061264d90613d69565b9150506124e6565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6001600160a01b0381166000908152600e602052604090205460ff166123a0576123a081613345565b60006126e582612c30565b80519091506000906001600160a01b0316336001600160a01b0316148061271c57503361271184610cb1565b6001600160a01b0316145b8061272e5750815161272e9033610a91565b9050806127a35760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610b81565b846001600160a01b031682600001516001600160a01b03161461282e5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f727265637460448201527f206f776e657200000000000000000000000000000000000000000000000000006064820152608401610b81565b6001600160a01b0384166128aa5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610b81565b6128ba6000848460000151612655565b6001600160a01b03851660009081526005602052604081208054600192906128ec9084906001600160801b0316613e91565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b0386166000908152600560205260408120805460019450909261293891859116613eb9565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b03808716825267ffffffffffffffff428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b031990911691909216171790556129c0846001613d84565b6000818152600460205260409020549091506001600160a01b0316612a52576129ea816001541190565b15612a525760408051808201825284516001600160a01b03908116825260208087015167ffffffffffffffff9081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46122ab565b61152d828260405180602001604052806000815250613414565b6001600160a01b0381166000908152600c602052604081205460ff1615612adb57506001919050565b60005b600d54811015612b99576000600d8281548110612afd57612afd613df7565b60009182526020822001546040516370a0823160e01b81526001600160a01b038781166004830152909116925082906370a0823190602401602060405180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b769190613e2c565b1115612b86575060019392505050565b5080612b9181613d69565b915050612ade565b50600092915050565b80341015612bf25760405162461bcd60e51b815260206004820152601660248201527f4e65656420746f2073656e64206d6f7265204554482e000000000000000000006044820152606401610b81565b803411156123a057336108fc612c088334613edb565b6040518115909202916000818181858888f1935050505015801561152d573d6000803e3d6000fd5b6040805180820190915260008082526020820152612c4f826001541190565b612cc15760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e000000000000000000000000000000000000000000006064820152608401610b81565b60007f000000000000000000000000000000000000000000000000000000000000000a8310612d2257612d147f000000000000000000000000000000000000000000000000000000000000000a84613edb565b612d1f906001613d84565b90505b825b818110612d8c576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff169183019190915215612d7957949350505050565b5080612d8481613ef2565b915050612d24565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201527f206f776e6572206f6620746f6b656e00000000000000000000000000000000006064820152608401610b81565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60125482148015612e6557506010546001600160a01b0316155b1561152d57612e7d612e7660015490565b829061373b565b600f819055612e8b90611633565b601080546001600160a01b0319166001600160a01b03929092169190911790555050565b60006001600160a01b0384163b15612fee57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ef3903390899088908890600401613f09565b6020604051808303816000875af1925050508015612f2e575060408051601f3d908101601f19168201909252612f2b91810190613f45565b60015b612fd4573d808015612f5c576040519150601f19603f3d011682016040523d82523d6000602084013e612f61565b606091505b508051612fcc5760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b6064820152608401610b81565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612ff2565b5060015b949350505050565b606060178054610c2e90613d18565b60608161302d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613057578061304181613d69565b91506130509050600a83613dc6565b9150613031565b60008167ffffffffffffffff81111561307257613072613ba0565b6040519080825280601f01601f19166020018201604052801561309c576020820181803683370190505b5090505b8415612ff2576130b1600183613edb565b91506130be600a86613db2565b6130c9906030613d84565b60f81b8183815181106130de576130de613df7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613118600a86613dc6565b94506130a0565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79528486600060405160200161318f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016131bc93929190613f62565b6020604051808303816000875af11580156131db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ff9190613e45565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a09091019092528151918301919091209387905291905261325b906001613d84565b6000858152600a6020526040902055612ff28482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60006001600160a01b0382166133195760405162461bcd60e51b815260206004820152603160248201527f455243373231413a206e756d626572206d696e74656420717565727920666f7260448201527f20746865207a65726f20616464726573730000000000000000000000000000006064820152608401610b81565b506001600160a01b0316600090815260056020526040902054600160801b90046001600160801b031690565b6001600160a01b0381166000908152600e602052604090205460ff16156133b95760405162461bcd60e51b815260206004820152602260248201527f4163636f756e7420616c72656164792061737369676e656420746f2061207369604482015261646560f01b6064820152608401610b81565b6000806133c4613747565b90506133d1600282613f93565b60ff166133e157600191506133e6565b600291505b506001600160a01b03919091166000908152600e60205260409020805460ff191660ff909216919091179055565b6001546001600160a01b0384166134775760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b81565b613482816001541190565b156134cf5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610b81565b7f000000000000000000000000000000000000000000000000000000000000000a83111561354a5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610b81565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b90910416918101919091528151808301909252805190919081906135a6908790613eb9565b6001600160801b031681526020018583602001516135c49190613eb9565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b0297909616969096179094558451808601865291825267ffffffffffffffff4281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156137305760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46136a86000888488612eaf565b6137105760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b6064820152608401610b81565b8161371a81613d69565b925050808061372890613d69565b91505061365b565b5060018190556122ab565b600061211f8284613db2565b600042485a3361375660015490565b6040805160208101969096528501939093526060808501929092526bffffffffffffffffffffffff19911b166080830152609482015260b40160405160208183030381529060405280519060200120905090565b8280546137b690613d18565b90600052602060002090601f0160209004810192826137d8576000855561381e565b82601f106137f15782800160ff1982351617855561381e565b8280016001018555821561381e579182015b8281111561381e578235825591602001919060010190613803565b506115db929150613865565b82805482825590600052602060002090810192821561381e579160200282015b8281111561381e57825182559160200191906001019061384a565b5b808211156115db5760008155600101613866565b60006020828403121561388c57600080fd5b813563ffffffff8116811461211f57600080fd5b6001600160e01b0319811681146123a057600080fd5b6000602082840312156138c857600080fd5b813561211f816138a0565b60005b838110156138ee5781810151838201526020016138d6565b838111156118f45750506000910152565b600081518084526139178160208601602086016138d3565b601f01601f19169290920160200192915050565b60208152600061211f60208301846138ff565b60006020828403121561395057600080fd5b5035919050565b80356001600160a01b038116811461396e57600080fd5b919050565b6000806040838503121561398657600080fd5b61398f83613957565b946020939093013593505050565b6000602082840312156139af57600080fd5b813567ffffffffffffffff8116811461211f57600080fd5b6000806000606084860312156139dc57600080fd5b6139e584613957565b92506139f360208501613957565b9150604084013590509250925092565b60008060208385031215613a1657600080fd5b823567ffffffffffffffff80821115613a2e57600080fd5b818501915085601f830112613a4257600080fd5b813581811115613a5157600080fd5b866020828501011115613a6357600080fd5b60209290920196919550909350505050565b600060208284031215613a8757600080fd5b61211f82613957565b60008083601f840112613aa257600080fd5b50813567ffffffffffffffff811115613aba57600080fd5b6020830191508360208260051b8501011115613ad557600080fd5b9250929050565b600080600060408486031215613af157600080fd5b833567ffffffffffffffff811115613b0857600080fd5b613b1486828701613a90565b909450925050602084013560ff81168114613b2e57600080fd5b809150509250925092565b60008060408385031215613b4c57600080fd5b50508035926020909101359150565b80151581146123a057600080fd5b60008060408385031215613b7c57600080fd5b613b8583613957565b91506020830135613b9581613b5b565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215613bcc57600080fd5b613bd585613957565b9350613be360208601613957565b925060408501359150606085013567ffffffffffffffff80821115613c0757600080fd5b818701915087601f830112613c1b57600080fd5b813581811115613c2d57613c2d613ba0565b604051601f8201601f19908116603f01168101908382118183101715613c5557613c55613ba0565b816040528281528a6020848701011115613c6e57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060408486031215613ca757600080fd5b613cb084613957565b9250602084013567ffffffffffffffff811115613ccc57600080fd5b613cd886828701613a90565b9497909650939450505050565b60008060408385031215613cf857600080fd5b613d0183613957565b9150613d0f60208401613957565b90509250929050565b600181811c90821680613d2c57607f821691505b60208210811415613d4d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613d7d57613d7d613d53565b5060010190565b60008219821115613d9757613d97613d53565b500190565b634e487b7160e01b600052601260045260246000fd5b600082613dc157613dc1613d9c565b500690565b600082613dd557613dd5613d9c565b500490565b600060ff821680613ded57613ded613d53565b6000190192915050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615613e2757613e27613d53565b500290565b600060208284031215613e3e57600080fd5b5051919050565b600060208284031215613e5757600080fd5b815161211f81613b5b565b60008351613e748184602088016138d3565b835190830190613e888183602088016138d3565b01949350505050565b60006001600160801b0383811690831681811015613eb157613eb1613d53565b039392505050565b60006001600160801b03808316818516808303821115613e8857613e88613d53565b600082821015613eed57613eed613d53565b500390565b600081613f0157613f01613d53565b506000190190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f3b60808301846138ff565b9695505050505050565b600060208284031215613f5757600080fd5b815161211f816138a0565b6001600160a01b0384168152826020820152606060408201526000613f8a60608301846138ff565b95945050505050565b600060ff831680613fa657613fa6613d9c565b8060ff8416069150509291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c634300080c000a

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

000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000022b80000000000000000000000000000000000000000000000000000000000000032000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000

-----Decoded View---------------
Arg [0] : maxBatchSize_ (uint256): 10
Arg [1] : collectionSize_ (uint256): 8888
Arg [2] : amountForDevs_ (uint256): 50
Arg [3] : vrfCoordinator_ (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [4] : linkToken_ (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [5] : vrfKeyHash_ (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [6] : vrfFee_ (uint256): 2000000000000000000

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [1] : 00000000000000000000000000000000000000000000000000000000000022b8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [3] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [4] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [5] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [6] : 0000000000000000000000000000000000000000000000001bc16d674ec80000


Loading...
Loading
Loading...
Loading
[ 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.