ETH Price: $3,132.12 (-0.42%)

Token

Banned (BANNED)
 

Overview

Max Total Supply

421 BANNED

Holders

240

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
kasumi.eth
Balance
1 BANNED
0x6799d8c6da994409ce53bdecdd0c3ebcfcfc3cea
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

BANNED is a generative art NFT project seeded with the unique photography of @JakeTheDegen, @iJmillz, and @ChipWalkerNFT. It is a declaration that community and greatness stems from what one does in the face of adversity.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Banned

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : Banned.sol
// SPDX-License-Identifier: MIT

/*  
     
     
           
           #"**T"%"%@  ]b"""""@b ]b"""@#"W%@b]b*%*@#"W%@b@#WWWWW%$@ #%%W8WWW%@
           #        jb @       # ]b   j#   ]b]b   j#   ]b@b       @b#        'Q
           #   ]#    # #   #   @ @b    @b  ]b@b    @b  ]b@b       @M#    #    #
           #   j#   ]#]b   #   @p@b     %  ]b@b     W  ]b@b   @#### #   j#    #
           b        @ @b   #   j#]b        jb]b        jb@b       @ #   j#    #
           b   j#    b@    7    @@b  #     jb]b  #     jb@b   @#### #    #    #
           b   'M    #@    s    @]b  %#    jb]b  @#    jb@b       @ #    #    #
           b        ]b@    #    @jb   @b   jbjb   @b   jb@b       @ #         #
           ########## @##########j#####@####bj#####@####b]mmssmess@ #mmmmmmms#`
     
     
*/

pragma solidity ^0.8.0;

import "./IBanned.sol";
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol';
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";

/*
* @title ERC721 token for Banned
*
* @author original logic by Niftydude, extended by @bitcoinski, @georgefatlion, and borrowed out of love by @andrewjiang
*/
                                                                                                                                               
contract Banned is IBanned, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
    using Strings for uint256;
    using SafeMath for uint256;
    using Counters for Counters.Counter;

    Counters.Counter private generalCounter; 
    uint public constant MAX_MINT = 10000;

    // VRF stuff
    address public VRFCoordinator;
    address public LinkToken;
    bytes32 internal keyHash;
    uint256 public baseSeed;
  
    struct RedemptionWindow {
        bool open;
        uint8 maxRedeemPerWallet;
        bytes32 merkleRoot;
        uint256 pricePerToken;
    }

    mapping(uint8 => RedemptionWindow) public redemptionWindows;

    // links
    string private baseTokenURI;
    string public _contractURI;
    string public _sourceURI;

    event Minted(address indexed account, string tokens);

    /**
    * @notice Constructor to create contract
    * 
    * @param _name the token name
    * @param _symbol the token symbol
    * @param _maxRedeemPerWallet the max mint per redemption by index
    * @param _merkleRoots the merkle root for redemption window by index
    * @param _prices the prices for each redemption window by index
    * @param _baseTokenURI the respective base URI
    * @param _contractMetaDataURI the respective contract meta data URI
    * @param _VRFCoordinator the address of the vrf coordinator
    * @param _LinkToken link token
    * @param _keyHash chainlink keyhash
    */
    
    constructor (
        string memory _name, 
        string memory _symbol,
        uint8[] memory _maxRedeemPerWallet,
        bytes32[] memory _merkleRoots,
        uint256[] memory _prices,
        string memory _baseTokenURI,
        string memory _contractMetaDataURI,
        address _VRFCoordinator, 
        address _LinkToken,
        bytes32 _keyHash
    ) 
    
    VRFConsumerBase(_VRFCoordinator, _LinkToken)

    ERC721(_name, _symbol) {

        // vrf stuff
        VRFCoordinator = _VRFCoordinator;
        LinkToken = _LinkToken;

        // erc721 stuff
        baseTokenURI = _baseTokenURI;    
        _contractURI = _contractMetaDataURI;
        keyHash = _keyHash;
        
        // set up the different redeption windows
        for(uint8 i = 0; i < _prices.length; i++) {
            redemptionWindows[i].open = false;
            redemptionWindows[i].maxRedeemPerWallet = _maxRedeemPerWallet[i];
            redemptionWindows[i].merkleRoot = _merkleRoots[i];
            redemptionWindows[i].pricePerToken = _prices[i];
        }
    }

    /**
    * @notice Pause redeems until unpause is called. this pauses the whole contract. 
    */
    function pause() external override onlyOwner {
        _pause();
    }

    /**
    * @notice Unpause redeems until pause is called. this unpauses the whole contract. 
    */
    function unpause() external override onlyOwner {
        _unpause();
    }

    /**
    * @notice edit a redemption window. only writes value if it is different. 
    * 
    * @param _windowID the index of the claim window to set.
    * @param _merkleRoot the window merkleRoot.
    * @param _open the window open state.
    * @param _maxPerWallet the window maximum per wallet. 
    * @param _pricePerToken the window price per token. 
    */
    function editRedemptionWindow(
        uint8 _windowID,
        bytes32 _merkleRoot, 
        bool _open,
        uint8 _maxPerWallet,
        uint256 _pricePerToken
    ) external override onlyOwner {
        if(redemptionWindows[_windowID].open != _open)
        {
            redemptionWindows[_windowID].open = _open;
        }
        if(redemptionWindows[_windowID].maxRedeemPerWallet != _maxPerWallet)
        {
            redemptionWindows[_windowID].maxRedeemPerWallet = _maxPerWallet;
        }
        if(redemptionWindows[_windowID].merkleRoot != _merkleRoot)
        {
            redemptionWindows[_windowID].merkleRoot = _merkleRoot;
        }
        if(redemptionWindows[_windowID].pricePerToken != _pricePerToken)
        {
            redemptionWindows[_windowID].pricePerToken = _pricePerToken;
        }
    }       

    /**
    * @notice Widthdraw Ether from contract.
    * 
    * @param _to the address to send to
    * @param _amount the amount to withdraw
    */
    function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
    {
        _to.transfer(_amount);
    }

    /**
    * @notice Mint Banned.
    * 
    * @param windowIndex the index of the claim window to use.
    * @param amount the amount of tokens to mint
    * @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
    */
    function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external payable override{

        // checks
        require(redemptionWindows[windowIndex].open, "Redeem: window is not open");
        require(amount > 0, "Redeem: amount cannot be zero");

        // check value of transaction is high enough. 
        // if window index is 0 and they have no tokens, 1 mint is free. 
        if (windowIndex == 0 && balanceOf(msg.sender) == 0)
        {
            require(msg.value >= price(amount-1, windowIndex), "Value below price");
        }
        else
        {
            require(msg.value >= price(amount, windowIndex), "Value below price");
        }

        // check if there are enough tokens left for them to mint. 
        require(generalCounter.current() + amount <= MAX_MINT, "Max limit");

        // limit number that can be claimed for given window. 
        require(balanceOf(msg.sender) + amount <=  redemptionWindows[windowIndex].maxRedeemPerWallet, "Too many");

        // check the merkle proof
        require(verifyMerkleProof(merkleProof, redemptionWindows[windowIndex].merkleRoot),"Invalid proof");          

        string memory tokens = "";

        for(uint256 j = 0; j < amount; j++) {
            _safeMint(msg.sender, generalCounter.current());
        
            tokens = string(abi.encodePacked(tokens, generalCounter.current().toString(), ","));
            generalCounter.increment();
        }
        emit Minted(msg.sender, tokens);
    }  

    function ownerMint(
        address to,
        uint8 windowIndex,
        uint8 amount) external onlyOwner
    {
        require(redemptionWindows[windowIndex].open, "Redeem: window is not open");
        require(amount > 0, "Redeem: amount cannot be zero");

        // check if there are enough tokens left for them to mint. 
        require(generalCounter.current() + amount <= MAX_MINT, "Max limit");

        string memory tokens = "";

        for(uint256 j = 0; j < amount; j++) {
            _safeMint(msg.sender, generalCounter.current());
        
            tokens = string(abi.encodePacked(tokens, generalCounter.current().toString(), ","));
            generalCounter.increment();
        }
        emit Minted(msg.sender, tokens);
    }

    /**
    * @notice Verify the merkle proof for a given root.   
    *     
    * @param proof vrf keyhash value
    * @param root vrf keyhash value
    */
    function verifyMerkleProof(bytes32[] memory proof, bytes32 root)
        public
        view
        returns (bool)
    {
        if(root == 0x000000000000000000000000000000000000000000007075626c696373616c65){
            return true;
        }
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        return MerkleProof.verify(proof, root, leaf);
    }

    /**
    * @notice assign the returned chainlink vrf random number to baseSeed variable.   
    *     
    * @param requestId the id of the request - unused.
    * @param randomness the random number from chainlink vrf. 
    */
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        baseSeed = randomness;
    }

    /**
    * @notice Get the transaction price for a given number of tokens and redemption window. 
    * 
    * @param _amount the number of tokens
    * @param _windowIndex the ID of the window to check. 
    */
    function price(uint8 _amount, uint8 _windowIndex) public view returns (uint256) {
        return redemptionWindows[_windowIndex].pricePerToken.mul(_amount);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
        return super.supportsInterface(interfaceId);
    }  

    /**
    * @notice Change the base URI for returning metadata
    * 
    * @param _baseTokenURI the respective base URI
    */
    function setBaseURI(string memory _baseTokenURI) external override onlyOwner {
        baseTokenURI = _baseTokenURI;    
    }

    /**
    * @notice Return the baseTokenURI
    */   
    function _baseURI() internal view override returns (string memory) {
            return baseTokenURI;
    }    

    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
        super._beforeTokenTransfer(from, to, tokenId);
    } 

    /**
    * @notice Change the base URI for returning metadata
    * 
    * @param uri the uri of the processing source code
    */
    function setSourceURI(string memory uri) external onlyOwner{
        _sourceURI = uri;
    }  

    function setContractURI(string memory uri) external onlyOwner{
        _contractURI = uri;
    }

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    /**
    * @notice Call chainlink to get a random number to use as the base for the random seeds.  
    *     
    */
    function plantSeed(uint256 fee) public onlyOwner returns (bytes32 requestId) {
        require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK");
        return requestRandomness(keyHash, fee);
    }

    /**
    * @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF. 
    * 
    * @param tokenId the token id 
    */
    function getSeed(uint256 tokenId) public view returns (uint256)
    {
        require(totalSupply()>tokenId, "Token Not Found");

        if (baseSeed == 0){
            return 0;
        }
        else{
            return uint256(keccak256(abi.encode(baseSeed, tokenId))) % 2000000000;
        }
    }
}

File 2 of 23 : IBanned.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';
interface IBanned is IERC721Enumerable {
    function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) payable external;
    function unpause() external;
    function pause() external;
    function setBaseURI(string memory _baseTokenURI) external;
    function editRedemptionWindow(uint8 _windowID, bytes32 _merkleRoot, bool _open, uint8 _maxPerWallet,uint256 _pricePerToken) external;
}

File 3 of 23 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 23 : ERC721Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "../../../security/Pausable.sol";

/**
 * @dev ERC721 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC721Pausable is ERC721, Pausable {
    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        require(!paused(), "ERC721Pausable: token transfer while paused");
    }
}

File 5 of 23 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 6 of 23 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 7 of 23 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 8 of 23 : SafeMath.sol
// SPDX-License-Identifier: MIT

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 no longer needed starting with Solidity 0.8. 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 9 of 23 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 10 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

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

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

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

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

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

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

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

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

File 12 of 23 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 13 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 14 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 15 of 23 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

File 16 of 23 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 17 of 23 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 18 of 23 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 20 of 23 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 21 of 23 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

interface LinkTokenInterface {

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

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

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

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

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

  function increaseApproval(
    address spender,
    uint256 subtractedValue
  ) external;

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

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

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

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

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

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

}

File 23 of 23 : 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
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8[]","name":"_maxRedeemPerWallet","type":"uint8[]"},{"internalType":"bytes32[]","name":"_merkleRoots","type":"bytes32[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"string","name":"_contractMetaDataURI","type":"string"},{"internalType":"address","name":"_VRFCoordinator","type":"address"},{"internalType":"address","name":"_LinkToken","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"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":"account","type":"address"},{"indexed":false,"internalType":"string","name":"tokens","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"LinkToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VRFCoordinator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sourceURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_windowID","type":"uint8"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"bool","name":"_open","type":"bool"},{"internalType":"uint8","name":"_maxPerWallet","type":"uint8"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"}],"name":"editRedemptionWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"windowIndex","type":"uint8"},{"internalType":"uint8","name":"amount","type":"uint8"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"windowIndex","type":"uint8"},{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"plantSeed","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"},{"internalType":"uint8","name":"_windowIndex","type":"uint8"}],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"redemptionWindows","outputs":[{"internalType":"bool","name":"open","type":"bool"},{"internalType":"uint8","name":"maxRedeemPerWallet","type":"uint8"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setSourceURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"verifyMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162003d2938038062003d298339810160408190526200003491620004c7565b82828b8b8160009080519060200190620000509291906200028f565b508051620000669060019060208401906200028f565b5050600a805460ff1916905550620000876200008162000231565b62000235565b6001600160601b0319606092831b811660a052911b16608052600d80546001600160a01b038581166001600160a01b031992831617909255600e8054928516929091169190911790558451620000e59060129060208801906200028f565b508351620000fb9060139060208701906200028f565b50600f81905560005b86518160ff161015620002205760ff81166000818152601160205260409020805460ff1916905589518a919081106200014d57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160ff8084166000818152601190945260409093208054919092166101000261ff001990911617905588518991908110620001a357634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160ff83166000818152601190935260409092206001015587518891908110620001e857634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160ff831660009081526011909252604090912060020155806200021781620006af565b91505062000104565b5050505050505050505050620006f2565b3390565b600a80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200029d9062000672565b90600052602060002090601f016020900481019282620002c157600085556200030c565b82601f10620002dc57805160ff19168380011785556200030c565b828001600101855582156200030c579182015b828111156200030c578251825591602001919060010190620002ef565b506200031a9291506200031e565b5090565b5b808211156200031a57600081556001016200031f565b80516001600160a01b03811681146200034d57600080fd5b919050565b600082601f83011262000363578081fd5b815160206200037c62000376836200064c565b62000620565b828152818101908583018385028701840188101562000399578586fd5b855b85811015620003b9578151845292840192908401906001016200039b565b5090979650505050505050565b600082601f830112620003d7578081fd5b81516020620003ea62000376836200064c565b828152818101908583018385028701840188101562000407578586fd5b855b85811015620003b957815160ff8116811462000423578788fd5b8452928401929084019060010162000409565b600082601f83011262000447578081fd5b81516001600160401b03811115620004635762000463620006dc565b602062000479601f8301601f1916820162000620565b82815285828487010111156200048d578384fd5b835b83811015620004ac5785810183015182820184015282016200048f565b83811115620004bd57848385840101525b5095945050505050565b6000806000806000806000806000806101408b8d031215620004e7578586fd5b8a516001600160401b0380821115620004fe578788fd5b6200050c8e838f0162000436565b9b5060208d015191508082111562000522578788fd5b620005308e838f0162000436565b9a5060408d015191508082111562000546578788fd5b620005548e838f01620003c6565b995060608d01519150808211156200056a578788fd5b620005788e838f0162000352565b985060808d01519150808211156200058e578788fd5b6200059c8e838f0162000352565b975060a08d0151915080821115620005b2578687fd5b620005c08e838f0162000436565b965060c08d0151915080821115620005d6578586fd5b50620005e58d828e0162000436565b945050620005f660e08c0162000335565b9250620006076101008c0162000335565b91506101208b015190509295989b9194979a5092959850565b6040518181016001600160401b0381118282101715620006445762000644620006dc565b604052919050565b60006001600160401b03821115620006685762000668620006dc565b5060209081020190565b6002810460018216806200068757607f821691505b60208210811415620006a957634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff811415620006d357634e487b7160e01b82526011600452602482fd5b60010192915050565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c6135fd6200072c600039600081816110ac0152611e540152600081816112300152611e2501526135fd6000f3fe60806040526004361061025c5760003560e01c80635f04405211610144578063b1297e56116100b6578063e0d4ea371161007a578063e0d4ea37146106bf578063e8595c53146106df578063e8a3d485146106f4578063e985e9c514610709578063f0292a0314610729578063f2fde38b1461073e5761025c565b8063b1297e5614610637578063b88d4fde14610657578063b91ca62214610677578063c0e727401461068a578063c87b56dd1461069f5761025c565b80638da5cb5b116101085780638da5cb5b14610598578063938e3d7b146105ad57806394985ddd146105cd57806395d89b41146105ed5780639e8ed6f714610602578063a22cb465146106175761025c565b80635f0440521461050e5780636352211e1461052e57806370a082311461054e578063715018a61461056e5780638456cb59146105835761025c565b806333b60863116101dd5780634f6ccce7116101a15780634f6ccce7146104545780634f8e2fdf14610474578063522f68151461048957806355f804b3146104a95780635c975abb146104c95780635eac1378146104de5761025c565b806333b60863146103ca5780633f4ba83a146103df57806342842e0e146103f457806342966c68146104145780634a1da541146104345761025c565b806318160ddd1161022457806318160ddd1461032857806320d0900f1461034a57806323b872dd1461036a578063241985171461038a5780632f745c59146103aa5761025c565b806301ffc9a71461026157806306fdde0314610297578063081812fc146102b9578063095ea7b3146102e6578063110575db14610308575b600080fd5b34801561026d57600080fd5b5061028161027c366004612901565b61075e565b60405161028e9190612c1e565b60405180910390f35b3480156102a357600080fd5b506102ac610771565b60405161028e9190612c76565b3480156102c557600080fd5b506102d96102d436600461297f565b610803565b60405161028e9190612b9d565b3480156102f257600080fd5b506103066103013660046127c1565b61084f565b005b34801561031457600080fd5b506103066103233660046127d3565b6108e7565b34801561033457600080fd5b5061033d610a7b565b60405161028e9190612c49565b34801561035657600080fd5b506103066103653660046129c9565b610a81565b34801561037657600080fd5b506103066103853660046126d7565b610bbc565b34801561039657600080fd5b506103066103a5366004612939565b610bf4565b3480156103b657600080fd5b5061033d6103c53660046127c1565b610c4a565b3480156103d657600080fd5b506102d9610c9f565b3480156103eb57600080fd5b50610306610cae565b34801561040057600080fd5b5061030661040f3660046126d7565b610cf7565b34801561042057600080fd5b5061030661042f36600461297f565b610d12565b34801561044057600080fd5b5061033d61044f366004612a1f565b610d45565b34801561046057600080fd5b5061033d61046f36600461297f565b610d71565b34801561048057600080fd5b506102d9610dcc565b34801561049557600080fd5b506103066104a4366004612674565b610ddb565b3480156104b557600080fd5b506103066104c4366004612939565b610e50565b3480156104d557600080fd5b50610281610ea2565b3480156104ea57600080fd5b506104fe6104f93660046129af565b610eab565b60405161028e9493929190612c29565b34801561051a57600080fd5b50610281610529366004612817565b610ed8565b34801561053a57600080fd5b506102d961054936600461297f565b610f32565b34801561055a57600080fd5b5061033d610569366004612658565b610f67565b34801561057a57600080fd5b50610306610fab565b34801561058f57600080fd5b50610306610ff4565b3480156105a457600080fd5b506102d961103b565b3480156105b957600080fd5b506103066105c8366004612939565b61104f565b3480156105d957600080fd5b506103066105e83660046128e0565b6110a1565b3480156105f957600080fd5b506102ac6110f3565b34801561060e57600080fd5b5061033d611102565b34801561062357600080fd5b50610306610632366004612794565b611108565b34801561064357600080fd5b5061033d61065236600461297f565b6111d6565b34801561066357600080fd5b50610306610672366004612717565b6112df565b610306610685366004612a51565b61131e565b34801561069657600080fd5b506102ac6115a1565b3480156106ab57600080fd5b506102ac6106ba36600461297f565b61162f565b3480156106cb57600080fd5b5061033d6106da36600461297f565b6116b1565b3480156106eb57600080fd5b506102ac61172c565b34801561070057600080fd5b506102ac611739565b34801561071557600080fd5b5061028161072436600461269f565b611748565b34801561073557600080fd5b5061033d611776565b34801561074a57600080fd5b50610306610759366004612658565b61177c565b6000610769826117ea565b90505b919050565b606060008054610780906134e2565b80601f01602080910402602001604051908101604052809291908181526020018280546107ac906134e2565b80156107f95780601f106107ce576101008083540402835291602001916107f9565b820191906000526020600020905b8154815290600101906020018083116107dc57829003601f168201915b5050505050905090565b600061080e8261180f565b6108335760405162461bcd60e51b815260040161082a906130de565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061085a82610f32565b9050806001600160a01b0316836001600160a01b0316141561088e5760405162461bcd60e51b815260040161082a9061327b565b806001600160a01b03166108a061182c565b6001600160a01b031614806108bc57506108bc8161072461182c565b6108d85760405162461bcd60e51b815260040161082a90612f90565b6108e28383611830565b505050565b6108ef61182c565b6001600160a01b031661090061103b565b6001600160a01b0316146109265760405162461bcd60e51b815260040161082a9061314c565b60ff808316600090815260116020526040902054166109575760405162461bcd60e51b815260040161082a90612e97565b60008160ff161161097a5760405162461bcd60e51b815260040161082a906132bc565b6127108160ff1661098b600c61189e565b6109959190613431565b11156109b35760405162461bcd60e51b815260040161082a90612ece565b604080516020810190915260008082525b8260ff16811015610a33576109e2336109dd600c61189e565b6118a2565b816109f56109f0600c61189e565b6118bc565b604051602001610a06929190612b62565b6040516020818303038152906040529150610a21600c6119d7565b80610a2b8161351d565b9150506109c4565b50336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f9282604051610a6d9190612c76565b60405180910390a250505050565b60085490565b610a8961182c565b6001600160a01b0316610a9a61103b565b6001600160a01b031614610ac05760405162461bcd60e51b815260040161082a9061314c565b60ff80861660009081526011602052604090205416151583151514610afe5760ff85166000908152601160205260409020805460ff19168415151790555b60ff8581166000908152601160205260409020546101009004811690831614610b4b5760ff808616600090815260116020526040902080549184166101000261ff00199092169190911790555b60ff85166000908152601160205260409020600101548414610b805760ff851660009081526011602052604090206001018490555b60ff85166000908152601160205260409020600201548114610bb55760ff851660009081526011602052604090206002018190555b5050505050565b610bcd610bc761182c565b826119e0565b610be95760405162461bcd60e51b815260040161082a906132f3565b6108e2838383611a5d565b610bfc61182c565b6001600160a01b0316610c0d61103b565b6001600160a01b031614610c335760405162461bcd60e51b815260040161082a9061314c565b8051610c46906014906020840190612556565b5050565b6000610c5583610f67565b8210610c735760405162461bcd60e51b815260040161082a90612d02565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b600d546001600160a01b031681565b610cb661182c565b6001600160a01b0316610cc761103b565b6001600160a01b031614610ced5760405162461bcd60e51b815260040161082a9061314c565b610cf5611b8a565b565b6108e2838383604051806020016040528060008152506112df565b610d1d610bc761182c565b610d395760405162461bcd60e51b815260040161082a906133b7565b610d4281611bf8565b50565b60ff8181166000908152601160205260408120600201549091610d6a91908516611c9f565b9392505050565b6000610d7b610a7b565b8210610d995760405162461bcd60e51b815260040161082a90613344565b60088281548110610dba57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e546001600160a01b031681565b610de361182c565b6001600160a01b0316610df461103b565b6001600160a01b031614610e1a5760405162461bcd60e51b815260040161082a9061314c565b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156108e2573d6000803e3d6000fd5b610e5861182c565b6001600160a01b0316610e6961103b565b6001600160a01b031614610e8f5760405162461bcd60e51b815260040161082a9061314c565b8051610c46906012906020840190612556565b600a5460ff1690565b60116020526000908152604090208054600182015460029092015460ff8083169361010090930416919084565b6000697075626c696373616c65821415610ef457506001610c99565b600033604051602001610f079190612b08565b604051602081830303815290604052805190602001209050610f2a848483611cab565b949350505050565b6000818152600260205260408120546001600160a01b0316806107695760405162461bcd60e51b815260040161082a90613037565b60006001600160a01b038216610f8f5760405162461bcd60e51b815260040161082a90612fed565b506001600160a01b031660009081526003602052604090205490565b610fb361182c565b6001600160a01b0316610fc461103b565b6001600160a01b031614610fea5760405162461bcd60e51b815260040161082a9061314c565b610cf56000611d66565b610ffc61182c565b6001600160a01b031661100d61103b565b6001600160a01b0316146110335760405162461bcd60e51b815260040161082a9061314c565b610cf5611dc0565b600a5461010090046001600160a01b031690565b61105761182c565b6001600160a01b031661106861103b565b6001600160a01b03161461108e5760405162461bcd60e51b815260040161082a9061314c565b8051610c46906013906020840190612556565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110e95760405162461bcd60e51b815260040161082a90613219565b610c468282611e1b565b606060018054610780906134e2565b60105481565b61111061182c565b6001600160a01b0316826001600160a01b031614156111415760405162461bcd60e51b815260040161082a90612e60565b806005600061114e61182c565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561119261182c565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111ca9190612c1e565b60405180910390a35050565b60006111e061182c565b6001600160a01b03166111f161103b565b6001600160a01b0316146112175760405162461bcd60e51b815260040161082a9061314c565b6040516370a0823160e01b815282906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611265903090600401612b9d565b60206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b59190612997565b10156112d35760405162461bcd60e51b815260040161082a90612f67565b610769600f5483611e21565b6112f06112ea61182c565b836119e0565b61130c5760405162461bcd60e51b815260040161082a906132f3565b61131884848484611f5c565b50505050565b60ff8085166000908152601160205260409020541661134f5760405162461bcd60e51b815260040161082a90612e97565b60008360ff16116113725760405162461bcd60e51b815260040161082a906132bc565b60ff8416158015611389575061138733610f67565b155b156113c6576113a261139c600185613493565b85610d45565b3410156113c15760405162461bcd60e51b815260040161082a90613250565b6113ef565b6113d08385610d45565b3410156113ef5760405162461bcd60e51b815260040161082a90613250565b6127108360ff16611400600c61189e565b61140a9190613431565b11156114285760405162461bcd60e51b815260040161082a90612ece565b60ff8085166000908152601160205260409020546101009004811690841661144f33610f67565b6114599190613431565b11156114775760405162461bcd60e51b815260040161082a9061312a565b6114c6828280806020026020016040519081016040528093929190818152602001838360200280828437600092018290525060ff8a168152601160205260409020600101549250610ed8915050565b6114e25760405162461bcd60e51b815260040161082a90613390565b604080516020810190915260008082525b8460ff168110156115585761150c336109dd600c61189e565b8161151a6109f0600c61189e565b60405160200161152b929190612b62565b6040516020818303038152906040529150611546600c6119d7565b806115508161351d565b9150506114f3565b50336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f92826040516115929190612c76565b60405180910390a25050505050565b601380546115ae906134e2565b80601f01602080910402602001604051908101604052809291908181526020018280546115da906134e2565b80156116275780601f106115fc57610100808354040283529160200191611627565b820191906000526020600020905b81548152906001019060200180831161160a57829003601f168201915b505050505081565b606061163a8261180f565b6116565760405162461bcd60e51b815260040161082a906131ca565b6000611660611f8f565b905060008151116116805760405180602001604052806000815250610d6a565b8061168a846118bc565b60405160200161169b929190612b33565b6040516020818303038152906040529392505050565b6000816116bc610a7b565b116116d95760405162461bcd60e51b815260040161082a90613080565b6010546116e85750600061076c565b637735940060105483604051602001611702929190612b25565b6040516020818303038152906040528051906020012060001c6117259190613538565b905061076c565b601480546115ae906134e2565b606060138054610780906134e2565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61271081565b61178461182c565b6001600160a01b031661179561103b565b6001600160a01b0316146117bb5760405162461bcd60e51b815260040161082a9061314c565b6001600160a01b0381166117e15760405162461bcd60e51b815260040161082a90612d9f565b610d4281611d66565b60006001600160e01b0319821663780e9d6360e01b1480610769575061076982611f9e565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061186582610f32565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5490565b610c46828260405180602001604052806000815250611fde565b6060816118e157506040805180820190915260018152600360fc1b602082015261076c565b8160005b811561190b57806118f58161351d565b91506119049050600a83613449565b91506118e5565b60008167ffffffffffffffff81111561193457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561195e576020820181803683370190505b5090505b8415610f2a5761197360018361347c565b9150611980600a86613538565b61198b906030613431565b60f81b8183815181106119ae57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506119d0600a86613449565b9450611962565b80546001019055565b60006119eb8261180f565b611a075760405162461bcd60e51b815260040161082a90612ef1565b6000611a1283610f32565b9050806001600160a01b0316846001600160a01b03161480611a4d5750836001600160a01b0316611a4284610803565b6001600160a01b0316145b80610f2a5750610f2a8185611748565b826001600160a01b0316611a7082610f32565b6001600160a01b031614611a965760405162461bcd60e51b815260040161082a90613181565b6001600160a01b038216611abc5760405162461bcd60e51b815260040161082a90612e1c565b611ac7838383612011565b611ad2600082611830565b6001600160a01b0383166000908152600360205260408120805460019290611afb90849061347c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b29908490613431565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611b92610ea2565b611bae5760405162461bcd60e51b815260040161082a90612cd4565b600a805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611be161182c565b604051611bee9190612b9d565b60405180910390a1565b6000611c0382610f32565b9050611c1181600084612011565b611c1c600083611830565b6001600160a01b0381166000908152600360205260408120805460019290611c4590849061347c565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000610d6a828461345d565b600081815b8551811015611d5b576000868281518110611cdb57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311611d1c578281604051602001611cff929190612b25565b604051602081830303815290604052805190602001209250611d48565b8083604051602001611d2f929190612b25565b6040516020818303038152906040528051906020012092505b5080611d538161351d565b915050611cb0565b509092149392505050565b600a80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611dc8610ea2565b15611de55760405162461bcd60e51b815260040161082a90612f3d565b600a805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611be161182c565b60105550565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611e88929190612b25565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611eb593929190612bee565b602060405180830381600087803b158015611ecf57600080fd5b505af1158015611ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f0791906128c4565b506000838152600b6020526040812054611f269085908390309061201c565b6000858152600b6020526040902054909150611f43906001613431565b6000858152600b6020526040902055610f2a8482612056565b611f67848484611a5d565b611f7384848484612089565b6113185760405162461bcd60e51b815260040161082a90612d4d565b606060128054610780906134e2565b60006001600160e01b031982166380ac58cd60e01b1480611fcf57506001600160e01b03198216635b5e139f60e01b145b806107695750610769826121a1565b611fe883836121ba565b611ff56000848484612089565b6108e25760405162461bcd60e51b815260040161082a90612d4d565b6108e2838383612299565b6000848484846040516020016120359493929190612c52565b60408051601f19818403018152919052805160209091012095945050505050565b6000828260405160200161206b929190612b25565b60405160208183030381529060405280519060200120905092915050565b600061209d846001600160a01b03166122c9565b1561219957836001600160a01b031663150b7a026120b961182c565b8786866040518563ffffffff1660e01b81526004016120db9493929190612bb1565b602060405180830381600087803b1580156120f557600080fd5b505af1925050508015612125575060408051601f3d908101601f191682019092526121229181019061291d565b60015b61217f573d808015612153576040519150601f19603f3d011682016040523d82523d6000602084013e612158565b606091505b5080516121775760405162461bcd60e51b815260040161082a90612d4d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f2a565b506001610f2a565b6001600160e01b031981166301ffc9a760e01b14919050565b6001600160a01b0382166121e05760405162461bcd60e51b815260040161082a906130a9565b6121e98161180f565b156122065760405162461bcd60e51b815260040161082a90612de5565b61221260008383612011565b6001600160a01b038216600090815260036020526040812080546001929061223b908490613431565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6122a48383836122cf565b6122ac610ea2565b156108e25760405162461bcd60e51b815260040161082a90612c89565b3b151590565b6122da8383836108e2565b6001600160a01b0383166122f6576122f181612358565b612319565b816001600160a01b0316836001600160a01b03161461231957612319838261239c565b6001600160a01b0382166123355761233081612439565b6108e2565b826001600160a01b0316826001600160a01b0316146108e2576108e28282612512565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016123a984610f67565b6123b3919061347c565b600083815260076020526040902054909150808214612406576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061244b9060019061347c565b6000838152600960205260408120546008805493945090928490811061248157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106124b057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806124f657634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061251d83610f67565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612562906134e2565b90600052602060002090601f01602090048101928261258457600085556125ca565b82601f1061259d57805160ff19168380011785556125ca565b828001600101855582156125ca579182015b828111156125ca5782518255916020019190600101906125af565b506125d69291506125da565b5090565b5b808211156125d657600081556001016125db565b600067ffffffffffffffff83111561260957612609613578565b61261c601f8401601f1916602001613407565b905082815283838301111561263057600080fd5b828260208301376000602084830101529392505050565b803560ff8116811461076c57600080fd5b600060208284031215612669578081fd5b8135610d6a8161358e565b60008060408385031215612686578081fd5b82356126918161358e565b946020939093013593505050565b600080604083850312156126b1578182fd5b82356126bc8161358e565b915060208301356126cc8161358e565b809150509250929050565b6000806000606084860312156126eb578081fd5b83356126f68161358e565b925060208401356127068161358e565b929592945050506040919091013590565b6000806000806080858703121561272c578081fd5b84356127378161358e565b935060208501356127478161358e565b925060408501359150606085013567ffffffffffffffff811115612769578182fd5b8501601f81018713612779578182fd5b612788878235602084016125ef565b91505092959194509250565b600080604083850312156127a6578182fd5b82356127b18161358e565b915060208301356126cc816135a3565b60008060408385031215612686578182fd5b6000806000606084860312156127e7578283fd5b83356127f28161358e565b925061280060208501612647565b915061280e60408501612647565b90509250925092565b60008060408385031215612829578182fd5b823567ffffffffffffffff80821115612840578384fd5b818501915085601f830112612853578384fd5b813560208282111561286757612867613578565b8082029250612877818401613407565b8281528181019085830185870184018b1015612891578889fd5b8896505b848710156128b3578035835260019690960195918301918301612895565b509997909101359750505050505050565b6000602082840312156128d5578081fd5b8151610d6a816135a3565b600080604083850312156128f2578182fd5b50508035926020909101359150565b600060208284031215612912578081fd5b8135610d6a816135b1565b60006020828403121561292e578081fd5b8151610d6a816135b1565b60006020828403121561294a578081fd5b813567ffffffffffffffff811115612960578182fd5b8201601f81018413612970578182fd5b610f2a848235602084016125ef565b600060208284031215612990578081fd5b5035919050565b6000602082840312156129a8578081fd5b5051919050565b6000602082840312156129c0578081fd5b610d6a82612647565b600080600080600060a086880312156129e0578283fd5b6129e986612647565b9450602086013593506040860135612a00816135a3565b9250612a0e60608701612647565b949793965091946080013592915050565b60008060408385031215612a31578182fd5b612a3a83612647565b9150612a4860208401612647565b90509250929050565b60008060008060608587031215612a66578182fd5b612a6f85612647565b9350612a7d60208601612647565b9250604085013567ffffffffffffffff80821115612a99578384fd5b818701915087601f830112612aac578384fd5b813581811115612aba578485fd5b8860208083028501011115612acd578485fd5b95989497505060200194505050565b60008151808452612af48160208601602086016134b6565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b918252602082015260400190565b60008351612b458184602088016134b6565b835190830190612b598183602088016134b6565b01949350505050565b60008351612b748184602088016134b6565b835190830190612b888183602088016134b6565b600b60fa1b9101908152600101949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612be490830184612adc565b9695505050505050565b600060018060a01b038516825283602083015260606040830152612c156060830184612adc565b95945050505050565b901515815260200190565b931515845260ff9290921660208401526040830152606082015260800190565b90815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b600060208252610d6a6020830184612adc565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252601a908201527f52656465656d3a2077696e646f77206973206e6f74206f70656e000000000000604082015260600190565b60208082526009908201526813585e081b1a5b5a5d60ba1b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252600f908201526e4e6f7420656e6f756768204c494e4b60881b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252600f908201526e151bdad95b88139bdd08119bdd5b99608a1b604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b602080825260089082015267546f6f206d616e7960c01b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601f908201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604082015260600190565b60208082526011908201527056616c75652062656c6f7720707269636560781b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601d908201527f52656465656d3a20616d6f756e742063616e6e6f74206265207a65726f000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252600d908201526c24b73b30b634b210383937b7b360991b604082015260600190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b60405181810167ffffffffffffffff8111828210171561342957613429613578565b604052919050565b600082198211156134445761344461354c565b500190565b60008261345857613458613562565b500490565b60008160001904831182151516156134775761347761354c565b500290565b60008282101561348e5761348e61354c565b500390565b600060ff821660ff8416808210156134ad576134ad61354c565b90039392505050565b60005b838110156134d15781810151838201526020016134b9565b838111156113185750506000910152565b6002810460018216806134f657607f821691505b6020821081141561351757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156135315761353161354c565b5060010190565b60008261354757613547613562565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610d4257600080fd5b8015158114610d4257600080fd5b6001600160e01b031981168114610d4257600080fdfea26469706673582212203852ae12802771b3fe6d4df70af44ba8c572bfc7a3f4a48cfe5212ba666ddfd164736f6c634300080000330000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445000000000000000000000000000000000000000000000000000000000000000642616e6e65640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000642414e4e454400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000000027feae811f1dd71365dcf6fd706405f8091e441accdf3a77fcd78723f8b6bafa5000000000000000000000000000000000000000000007075626c696373616c6500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008e1bc9bf040000000000000000000000000000000000000000000000000000000000000000001a68747470733a2f2f6170692e62616e6e65642e73747564696f2f000000000000000000000000000000000000000000000000000000000000000000000000004468747470733a2f2f697066732e696f2f697066732f516d56575247734663577759557a466355426b31644c586566767645675356523479566e556947575462657876622f00000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061025c5760003560e01c80635f04405211610144578063b1297e56116100b6578063e0d4ea371161007a578063e0d4ea37146106bf578063e8595c53146106df578063e8a3d485146106f4578063e985e9c514610709578063f0292a0314610729578063f2fde38b1461073e5761025c565b8063b1297e5614610637578063b88d4fde14610657578063b91ca62214610677578063c0e727401461068a578063c87b56dd1461069f5761025c565b80638da5cb5b116101085780638da5cb5b14610598578063938e3d7b146105ad57806394985ddd146105cd57806395d89b41146105ed5780639e8ed6f714610602578063a22cb465146106175761025c565b80635f0440521461050e5780636352211e1461052e57806370a082311461054e578063715018a61461056e5780638456cb59146105835761025c565b806333b60863116101dd5780634f6ccce7116101a15780634f6ccce7146104545780634f8e2fdf14610474578063522f68151461048957806355f804b3146104a95780635c975abb146104c95780635eac1378146104de5761025c565b806333b60863146103ca5780633f4ba83a146103df57806342842e0e146103f457806342966c68146104145780634a1da541146104345761025c565b806318160ddd1161022457806318160ddd1461032857806320d0900f1461034a57806323b872dd1461036a578063241985171461038a5780632f745c59146103aa5761025c565b806301ffc9a71461026157806306fdde0314610297578063081812fc146102b9578063095ea7b3146102e6578063110575db14610308575b600080fd5b34801561026d57600080fd5b5061028161027c366004612901565b61075e565b60405161028e9190612c1e565b60405180910390f35b3480156102a357600080fd5b506102ac610771565b60405161028e9190612c76565b3480156102c557600080fd5b506102d96102d436600461297f565b610803565b60405161028e9190612b9d565b3480156102f257600080fd5b506103066103013660046127c1565b61084f565b005b34801561031457600080fd5b506103066103233660046127d3565b6108e7565b34801561033457600080fd5b5061033d610a7b565b60405161028e9190612c49565b34801561035657600080fd5b506103066103653660046129c9565b610a81565b34801561037657600080fd5b506103066103853660046126d7565b610bbc565b34801561039657600080fd5b506103066103a5366004612939565b610bf4565b3480156103b657600080fd5b5061033d6103c53660046127c1565b610c4a565b3480156103d657600080fd5b506102d9610c9f565b3480156103eb57600080fd5b50610306610cae565b34801561040057600080fd5b5061030661040f3660046126d7565b610cf7565b34801561042057600080fd5b5061030661042f36600461297f565b610d12565b34801561044057600080fd5b5061033d61044f366004612a1f565b610d45565b34801561046057600080fd5b5061033d61046f36600461297f565b610d71565b34801561048057600080fd5b506102d9610dcc565b34801561049557600080fd5b506103066104a4366004612674565b610ddb565b3480156104b557600080fd5b506103066104c4366004612939565b610e50565b3480156104d557600080fd5b50610281610ea2565b3480156104ea57600080fd5b506104fe6104f93660046129af565b610eab565b60405161028e9493929190612c29565b34801561051a57600080fd5b50610281610529366004612817565b610ed8565b34801561053a57600080fd5b506102d961054936600461297f565b610f32565b34801561055a57600080fd5b5061033d610569366004612658565b610f67565b34801561057a57600080fd5b50610306610fab565b34801561058f57600080fd5b50610306610ff4565b3480156105a457600080fd5b506102d961103b565b3480156105b957600080fd5b506103066105c8366004612939565b61104f565b3480156105d957600080fd5b506103066105e83660046128e0565b6110a1565b3480156105f957600080fd5b506102ac6110f3565b34801561060e57600080fd5b5061033d611102565b34801561062357600080fd5b50610306610632366004612794565b611108565b34801561064357600080fd5b5061033d61065236600461297f565b6111d6565b34801561066357600080fd5b50610306610672366004612717565b6112df565b610306610685366004612a51565b61131e565b34801561069657600080fd5b506102ac6115a1565b3480156106ab57600080fd5b506102ac6106ba36600461297f565b61162f565b3480156106cb57600080fd5b5061033d6106da36600461297f565b6116b1565b3480156106eb57600080fd5b506102ac61172c565b34801561070057600080fd5b506102ac611739565b34801561071557600080fd5b5061028161072436600461269f565b611748565b34801561073557600080fd5b5061033d611776565b34801561074a57600080fd5b50610306610759366004612658565b61177c565b6000610769826117ea565b90505b919050565b606060008054610780906134e2565b80601f01602080910402602001604051908101604052809291908181526020018280546107ac906134e2565b80156107f95780601f106107ce576101008083540402835291602001916107f9565b820191906000526020600020905b8154815290600101906020018083116107dc57829003601f168201915b5050505050905090565b600061080e8261180f565b6108335760405162461bcd60e51b815260040161082a906130de565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061085a82610f32565b9050806001600160a01b0316836001600160a01b0316141561088e5760405162461bcd60e51b815260040161082a9061327b565b806001600160a01b03166108a061182c565b6001600160a01b031614806108bc57506108bc8161072461182c565b6108d85760405162461bcd60e51b815260040161082a90612f90565b6108e28383611830565b505050565b6108ef61182c565b6001600160a01b031661090061103b565b6001600160a01b0316146109265760405162461bcd60e51b815260040161082a9061314c565b60ff808316600090815260116020526040902054166109575760405162461bcd60e51b815260040161082a90612e97565b60008160ff161161097a5760405162461bcd60e51b815260040161082a906132bc565b6127108160ff1661098b600c61189e565b6109959190613431565b11156109b35760405162461bcd60e51b815260040161082a90612ece565b604080516020810190915260008082525b8260ff16811015610a33576109e2336109dd600c61189e565b6118a2565b816109f56109f0600c61189e565b6118bc565b604051602001610a06929190612b62565b6040516020818303038152906040529150610a21600c6119d7565b80610a2b8161351d565b9150506109c4565b50336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f9282604051610a6d9190612c76565b60405180910390a250505050565b60085490565b610a8961182c565b6001600160a01b0316610a9a61103b565b6001600160a01b031614610ac05760405162461bcd60e51b815260040161082a9061314c565b60ff80861660009081526011602052604090205416151583151514610afe5760ff85166000908152601160205260409020805460ff19168415151790555b60ff8581166000908152601160205260409020546101009004811690831614610b4b5760ff808616600090815260116020526040902080549184166101000261ff00199092169190911790555b60ff85166000908152601160205260409020600101548414610b805760ff851660009081526011602052604090206001018490555b60ff85166000908152601160205260409020600201548114610bb55760ff851660009081526011602052604090206002018190555b5050505050565b610bcd610bc761182c565b826119e0565b610be95760405162461bcd60e51b815260040161082a906132f3565b6108e2838383611a5d565b610bfc61182c565b6001600160a01b0316610c0d61103b565b6001600160a01b031614610c335760405162461bcd60e51b815260040161082a9061314c565b8051610c46906014906020840190612556565b5050565b6000610c5583610f67565b8210610c735760405162461bcd60e51b815260040161082a90612d02565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b600d546001600160a01b031681565b610cb661182c565b6001600160a01b0316610cc761103b565b6001600160a01b031614610ced5760405162461bcd60e51b815260040161082a9061314c565b610cf5611b8a565b565b6108e2838383604051806020016040528060008152506112df565b610d1d610bc761182c565b610d395760405162461bcd60e51b815260040161082a906133b7565b610d4281611bf8565b50565b60ff8181166000908152601160205260408120600201549091610d6a91908516611c9f565b9392505050565b6000610d7b610a7b565b8210610d995760405162461bcd60e51b815260040161082a90613344565b60088281548110610dba57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e546001600160a01b031681565b610de361182c565b6001600160a01b0316610df461103b565b6001600160a01b031614610e1a5760405162461bcd60e51b815260040161082a9061314c565b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156108e2573d6000803e3d6000fd5b610e5861182c565b6001600160a01b0316610e6961103b565b6001600160a01b031614610e8f5760405162461bcd60e51b815260040161082a9061314c565b8051610c46906012906020840190612556565b600a5460ff1690565b60116020526000908152604090208054600182015460029092015460ff8083169361010090930416919084565b6000697075626c696373616c65821415610ef457506001610c99565b600033604051602001610f079190612b08565b604051602081830303815290604052805190602001209050610f2a848483611cab565b949350505050565b6000818152600260205260408120546001600160a01b0316806107695760405162461bcd60e51b815260040161082a90613037565b60006001600160a01b038216610f8f5760405162461bcd60e51b815260040161082a90612fed565b506001600160a01b031660009081526003602052604090205490565b610fb361182c565b6001600160a01b0316610fc461103b565b6001600160a01b031614610fea5760405162461bcd60e51b815260040161082a9061314c565b610cf56000611d66565b610ffc61182c565b6001600160a01b031661100d61103b565b6001600160a01b0316146110335760405162461bcd60e51b815260040161082a9061314c565b610cf5611dc0565b600a5461010090046001600160a01b031690565b61105761182c565b6001600160a01b031661106861103b565b6001600160a01b03161461108e5760405162461bcd60e51b815260040161082a9061314c565b8051610c46906013906020840190612556565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146110e95760405162461bcd60e51b815260040161082a90613219565b610c468282611e1b565b606060018054610780906134e2565b60105481565b61111061182c565b6001600160a01b0316826001600160a01b031614156111415760405162461bcd60e51b815260040161082a90612e60565b806005600061114e61182c565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561119261182c565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111ca9190612c1e565b60405180910390a35050565b60006111e061182c565b6001600160a01b03166111f161103b565b6001600160a01b0316146112175760405162461bcd60e51b815260040161082a9061314c565b6040516370a0823160e01b815282906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a0823190611265903090600401612b9d565b60206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b59190612997565b10156112d35760405162461bcd60e51b815260040161082a90612f67565b610769600f5483611e21565b6112f06112ea61182c565b836119e0565b61130c5760405162461bcd60e51b815260040161082a906132f3565b61131884848484611f5c565b50505050565b60ff8085166000908152601160205260409020541661134f5760405162461bcd60e51b815260040161082a90612e97565b60008360ff16116113725760405162461bcd60e51b815260040161082a906132bc565b60ff8416158015611389575061138733610f67565b155b156113c6576113a261139c600185613493565b85610d45565b3410156113c15760405162461bcd60e51b815260040161082a90613250565b6113ef565b6113d08385610d45565b3410156113ef5760405162461bcd60e51b815260040161082a90613250565b6127108360ff16611400600c61189e565b61140a9190613431565b11156114285760405162461bcd60e51b815260040161082a90612ece565b60ff8085166000908152601160205260409020546101009004811690841661144f33610f67565b6114599190613431565b11156114775760405162461bcd60e51b815260040161082a9061312a565b6114c6828280806020026020016040519081016040528093929190818152602001838360200280828437600092018290525060ff8a168152601160205260409020600101549250610ed8915050565b6114e25760405162461bcd60e51b815260040161082a90613390565b604080516020810190915260008082525b8460ff168110156115585761150c336109dd600c61189e565b8161151a6109f0600c61189e565b60405160200161152b929190612b62565b6040516020818303038152906040529150611546600c6119d7565b806115508161351d565b9150506114f3565b50336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f92826040516115929190612c76565b60405180910390a25050505050565b601380546115ae906134e2565b80601f01602080910402602001604051908101604052809291908181526020018280546115da906134e2565b80156116275780601f106115fc57610100808354040283529160200191611627565b820191906000526020600020905b81548152906001019060200180831161160a57829003601f168201915b505050505081565b606061163a8261180f565b6116565760405162461bcd60e51b815260040161082a906131ca565b6000611660611f8f565b905060008151116116805760405180602001604052806000815250610d6a565b8061168a846118bc565b60405160200161169b929190612b33565b6040516020818303038152906040529392505050565b6000816116bc610a7b565b116116d95760405162461bcd60e51b815260040161082a90613080565b6010546116e85750600061076c565b637735940060105483604051602001611702929190612b25565b6040516020818303038152906040528051906020012060001c6117259190613538565b905061076c565b601480546115ae906134e2565b606060138054610780906134e2565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61271081565b61178461182c565b6001600160a01b031661179561103b565b6001600160a01b0316146117bb5760405162461bcd60e51b815260040161082a9061314c565b6001600160a01b0381166117e15760405162461bcd60e51b815260040161082a90612d9f565b610d4281611d66565b60006001600160e01b0319821663780e9d6360e01b1480610769575061076982611f9e565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061186582610f32565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5490565b610c46828260405180602001604052806000815250611fde565b6060816118e157506040805180820190915260018152600360fc1b602082015261076c565b8160005b811561190b57806118f58161351d565b91506119049050600a83613449565b91506118e5565b60008167ffffffffffffffff81111561193457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561195e576020820181803683370190505b5090505b8415610f2a5761197360018361347c565b9150611980600a86613538565b61198b906030613431565b60f81b8183815181106119ae57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506119d0600a86613449565b9450611962565b80546001019055565b60006119eb8261180f565b611a075760405162461bcd60e51b815260040161082a90612ef1565b6000611a1283610f32565b9050806001600160a01b0316846001600160a01b03161480611a4d5750836001600160a01b0316611a4284610803565b6001600160a01b0316145b80610f2a5750610f2a8185611748565b826001600160a01b0316611a7082610f32565b6001600160a01b031614611a965760405162461bcd60e51b815260040161082a90613181565b6001600160a01b038216611abc5760405162461bcd60e51b815260040161082a90612e1c565b611ac7838383612011565b611ad2600082611830565b6001600160a01b0383166000908152600360205260408120805460019290611afb90849061347c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b29908490613431565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611b92610ea2565b611bae5760405162461bcd60e51b815260040161082a90612cd4565b600a805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611be161182c565b604051611bee9190612b9d565b60405180910390a1565b6000611c0382610f32565b9050611c1181600084612011565b611c1c600083611830565b6001600160a01b0381166000908152600360205260408120805460019290611c4590849061347c565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000610d6a828461345d565b600081815b8551811015611d5b576000868281518110611cdb57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311611d1c578281604051602001611cff929190612b25565b604051602081830303815290604052805190602001209250611d48565b8083604051602001611d2f929190612b25565b6040516020818303038152906040528051906020012092505b5080611d538161351d565b915050611cb0565b509092149392505050565b600a80546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611dc8610ea2565b15611de55760405162461bcd60e51b815260040161082a90612f3d565b600a805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611be161182c565b60105550565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001611e88929190612b25565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611eb593929190612bee565b602060405180830381600087803b158015611ecf57600080fd5b505af1158015611ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f0791906128c4565b506000838152600b6020526040812054611f269085908390309061201c565b6000858152600b6020526040902054909150611f43906001613431565b6000858152600b6020526040902055610f2a8482612056565b611f67848484611a5d565b611f7384848484612089565b6113185760405162461bcd60e51b815260040161082a90612d4d565b606060128054610780906134e2565b60006001600160e01b031982166380ac58cd60e01b1480611fcf57506001600160e01b03198216635b5e139f60e01b145b806107695750610769826121a1565b611fe883836121ba565b611ff56000848484612089565b6108e25760405162461bcd60e51b815260040161082a90612d4d565b6108e2838383612299565b6000848484846040516020016120359493929190612c52565b60408051601f19818403018152919052805160209091012095945050505050565b6000828260405160200161206b929190612b25565b60405160208183030381529060405280519060200120905092915050565b600061209d846001600160a01b03166122c9565b1561219957836001600160a01b031663150b7a026120b961182c565b8786866040518563ffffffff1660e01b81526004016120db9493929190612bb1565b602060405180830381600087803b1580156120f557600080fd5b505af1925050508015612125575060408051601f3d908101601f191682019092526121229181019061291d565b60015b61217f573d808015612153576040519150601f19603f3d011682016040523d82523d6000602084013e612158565b606091505b5080516121775760405162461bcd60e51b815260040161082a90612d4d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f2a565b506001610f2a565b6001600160e01b031981166301ffc9a760e01b14919050565b6001600160a01b0382166121e05760405162461bcd60e51b815260040161082a906130a9565b6121e98161180f565b156122065760405162461bcd60e51b815260040161082a90612de5565b61221260008383612011565b6001600160a01b038216600090815260036020526040812080546001929061223b908490613431565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6122a48383836122cf565b6122ac610ea2565b156108e25760405162461bcd60e51b815260040161082a90612c89565b3b151590565b6122da8383836108e2565b6001600160a01b0383166122f6576122f181612358565b612319565b816001600160a01b0316836001600160a01b03161461231957612319838261239c565b6001600160a01b0382166123355761233081612439565b6108e2565b826001600160a01b0316826001600160a01b0316146108e2576108e28282612512565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016123a984610f67565b6123b3919061347c565b600083815260076020526040902054909150808214612406576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061244b9060019061347c565b6000838152600960205260408120546008805493945090928490811061248157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106124b057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806124f657634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061251d83610f67565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612562906134e2565b90600052602060002090601f01602090048101928261258457600085556125ca565b82601f1061259d57805160ff19168380011785556125ca565b828001600101855582156125ca579182015b828111156125ca5782518255916020019190600101906125af565b506125d69291506125da565b5090565b5b808211156125d657600081556001016125db565b600067ffffffffffffffff83111561260957612609613578565b61261c601f8401601f1916602001613407565b905082815283838301111561263057600080fd5b828260208301376000602084830101529392505050565b803560ff8116811461076c57600080fd5b600060208284031215612669578081fd5b8135610d6a8161358e565b60008060408385031215612686578081fd5b82356126918161358e565b946020939093013593505050565b600080604083850312156126b1578182fd5b82356126bc8161358e565b915060208301356126cc8161358e565b809150509250929050565b6000806000606084860312156126eb578081fd5b83356126f68161358e565b925060208401356127068161358e565b929592945050506040919091013590565b6000806000806080858703121561272c578081fd5b84356127378161358e565b935060208501356127478161358e565b925060408501359150606085013567ffffffffffffffff811115612769578182fd5b8501601f81018713612779578182fd5b612788878235602084016125ef565b91505092959194509250565b600080604083850312156127a6578182fd5b82356127b18161358e565b915060208301356126cc816135a3565b60008060408385031215612686578182fd5b6000806000606084860312156127e7578283fd5b83356127f28161358e565b925061280060208501612647565b915061280e60408501612647565b90509250925092565b60008060408385031215612829578182fd5b823567ffffffffffffffff80821115612840578384fd5b818501915085601f830112612853578384fd5b813560208282111561286757612867613578565b8082029250612877818401613407565b8281528181019085830185870184018b1015612891578889fd5b8896505b848710156128b3578035835260019690960195918301918301612895565b509997909101359750505050505050565b6000602082840312156128d5578081fd5b8151610d6a816135a3565b600080604083850312156128f2578182fd5b50508035926020909101359150565b600060208284031215612912578081fd5b8135610d6a816135b1565b60006020828403121561292e578081fd5b8151610d6a816135b1565b60006020828403121561294a578081fd5b813567ffffffffffffffff811115612960578182fd5b8201601f81018413612970578182fd5b610f2a848235602084016125ef565b600060208284031215612990578081fd5b5035919050565b6000602082840312156129a8578081fd5b5051919050565b6000602082840312156129c0578081fd5b610d6a82612647565b600080600080600060a086880312156129e0578283fd5b6129e986612647565b9450602086013593506040860135612a00816135a3565b9250612a0e60608701612647565b949793965091946080013592915050565b60008060408385031215612a31578182fd5b612a3a83612647565b9150612a4860208401612647565b90509250929050565b60008060008060608587031215612a66578182fd5b612a6f85612647565b9350612a7d60208601612647565b9250604085013567ffffffffffffffff80821115612a99578384fd5b818701915087601f830112612aac578384fd5b813581811115612aba578485fd5b8860208083028501011115612acd578485fd5b95989497505060200194505050565b60008151808452612af48160208601602086016134b6565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b918252602082015260400190565b60008351612b458184602088016134b6565b835190830190612b598183602088016134b6565b01949350505050565b60008351612b748184602088016134b6565b835190830190612b888183602088016134b6565b600b60fa1b9101908152600101949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612be490830184612adc565b9695505050505050565b600060018060a01b038516825283602083015260606040830152612c156060830184612adc565b95945050505050565b901515815260200190565b931515845260ff9290921660208401526040830152606082015260800190565b90815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b600060208252610d6a6020830184612adc565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252601a908201527f52656465656d3a2077696e646f77206973206e6f74206f70656e000000000000604082015260600190565b60208082526009908201526813585e081b1a5b5a5d60ba1b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252600f908201526e4e6f7420656e6f756768204c494e4b60881b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252600f908201526e151bdad95b88139bdd08119bdd5b99608a1b604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b602080825260089082015267546f6f206d616e7960c01b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601f908201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604082015260600190565b60208082526011908201527056616c75652062656c6f7720707269636560781b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601d908201527f52656465656d3a20616d6f756e742063616e6e6f74206265207a65726f000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252600d908201526c24b73b30b634b210383937b7b360991b604082015260600190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b60405181810167ffffffffffffffff8111828210171561342957613429613578565b604052919050565b600082198211156134445761344461354c565b500190565b60008261345857613458613562565b500490565b60008160001904831182151516156134775761347761354c565b500290565b60008282101561348e5761348e61354c565b500390565b600060ff821660ff8416808210156134ad576134ad61354c565b90039392505050565b60005b838110156134d15781810151838201526020016134b9565b838111156113185750506000910152565b6002810460018216806134f657607f821691505b6020821081141561351757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156135315761353161354c565b5060010190565b60008261354757613547613562565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610d4257600080fd5b8015158114610d4257600080fd5b6001600160e01b031981168114610d4257600080fdfea26469706673582212203852ae12802771b3fe6d4df70af44ba8c572bfc7a3f4a48cfe5212ba666ddfd164736f6c63430008000033

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

0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445000000000000000000000000000000000000000000000000000000000000000642616e6e65640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000642414e4e454400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000000027feae811f1dd71365dcf6fd706405f8091e441accdf3a77fcd78723f8b6bafa5000000000000000000000000000000000000000000007075626c696373616c6500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008e1bc9bf040000000000000000000000000000000000000000000000000000000000000000001a68747470733a2f2f6170692e62616e6e65642e73747564696f2f000000000000000000000000000000000000000000000000000000000000000000000000004468747470733a2f2f697066732e696f2f697066732f516d56575247734663577759557a466355426b31644c586566767645675356523479566e556947575462657876622f00000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Banned
Arg [1] : _symbol (string): BANNED
Arg [2] : _maxRedeemPerWallet (uint8[]): 1,200
Arg [3] : _merkleRoots (bytes32[]): System.Byte[],System.Byte[]
Arg [4] : _prices (uint256[]): 0,40000000000000000
Arg [5] : _baseTokenURI (string): https://api.banned.studio/
Arg [6] : _contractMetaDataURI (string): https://ipfs.io/ipfs/QmVWRGsFcWwYUzFcUBk1dLXefvvEgSVR4yVnUiGWTbexvb/
Arg [7] : _VRFCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [8] : _LinkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [9] : _keyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445

-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [5] : 00000000000000000000000000000000000000000000000000000000000002e0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000320
Arg [7] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [8] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [9] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [11] : 42616e6e65640000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [13] : 42414e4e45440000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [16] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [18] : 7feae811f1dd71365dcf6fd706405f8091e441accdf3a77fcd78723f8b6bafa5
Arg [19] : 000000000000000000000000000000000000000000007075626c696373616c65
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [22] : 000000000000000000000000000000000000000000000000008e1bc9bf040000
Arg [23] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [24] : 68747470733a2f2f6170692e62616e6e65642e73747564696f2f000000000000
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000044
Arg [26] : 68747470733a2f2f697066732e696f2f697066732f516d565752477346635777
Arg [27] : 59557a466355426b31644c586566767645675356523479566e55694757546265
Arg [28] : 7876622f00000000000000000000000000000000000000000000000000000000


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

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