ETH Price: $3,681.31 (+0.26%)
 

Overview

Max Total Supply

0 FOT

Holders

40

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
defidad.eth
Balance
1 FOT
0x2f71129b240080c638ac8d993bff52169e3551c3
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
FlippeningOtters

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

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

/*
	/$$$$$$$$ /$$ /$$                                         /$$                      /$$$$$$    /$$     /$$                                  
	| $$_____/| $$|__/                                        |__/                     /$$__  $$  | $$    | $$                                  
	| $$      | $$ /$$  /$$$$$$   /$$$$$$   /$$$$$$  /$$$$$$$  /$$ /$$$$$$$   /$$$$$$ | $$  \ $$ /$$$$$$ /$$$$$$    /$$$$$$   /$$$$$$   /$$$$$$$
	| $$$$$   | $$| $$ /$$__  $$ /$$__  $$ /$$__  $$| $$__  $$| $$| $$__  $$ /$$__  $$| $$  | $$|_  $$_/|_  $$_/   /$$__  $$ /$$__  $$ /$$_____/
	| $$__/   | $$| $$| $$  \ $$| $$  \ $$| $$$$$$$$| $$  \ $$| $$| $$  \ $$| $$  \ $$| $$  | $$  | $$    | $$    | $$$$$$$$| $$  \__/|  $$$$$$ 
	| $$      | $$| $$| $$  | $$| $$  | $$| $$_____/| $$  | $$| $$| $$  | $$| $$  | $$| $$  | $$  | $$ /$$| $$ /$$| $$_____/| $$       \____  $$
	| $$      | $$| $$| $$$$$$$/| $$$$$$$/|  $$$$$$$| $$  | $$| $$| $$  | $$|  $$$$$$$|  $$$$$$/  |  $$$$/|  $$$$/|  $$$$$$$| $$       /$$$$$$$/
	|__/      |__/|__/| $$____/ | $$____/  \_______/|__/  |__/|__/|__/  |__/ \____  $$ \______/    \___/   \___/   \_______/|__/      |_______/ 
					| $$      | $$                                         /$$  \ $$                                                          
					| $$      | $$                                        |  $$$$$$/                                                          
					|__/      |__/                                         \______/                                                           
*/
                                          
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "@chainlink/contracts/src/v0.8/interfaces/KeeperCompatibleInterface.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";

/**
 * Contract Timeline:
 * 1. Deploy the contract with right constructor params
 * 2. Send Link tokens to contract address
 * 3. Call getRandomNumber
 * 4. Set BaseURI, contractURI, lockMetadata
 * 5. Add presale address presale allocation
 * 6. Enable presale
 * 7. Add presale address giveaway allocation
 * 9. Enable sale
 * 10. Enable give away at 25% minting
 * 11. Enable companionUpdates at 50% minting
 * 12. Enable wingUpdates at 75% minting
 */ 
contract FlippeningOtters is ERC721, Ownable, KeeperCompatibleInterface, VRFConsumerBase {
    uint256 public constant OTTER_AIR_DROP_MAX = 300;
    uint256 public constant OTTER_GIVE_AWAY_MAX = 500;
    uint256 public constant OTTER_PRESALE_MAX = 300;
    uint256 public constant OTTER_MAX = 9999;
    uint256 public constant FLIPPENING_OTTER_TOKEN_ID = OTTER_MAX + 1;
    uint256 public constant OTTER_WING_PRICE = 0.02 ether;
    uint256 public constant OTTER_COMPANION_PRICE = 0.02 ether;
    uint256 public constant OTTER_PRESALE_PRICE = 0.01 ether;
    uint256 public OTTER_MINT_PRICE = 0.05 ether;
    address public gnosis_safe = 0xB836140717e545bCd59691aC1E4d50f1f94fb6b3;
    
    struct OtterAddOns { 
        string wing;
        string companion;
    }
    mapping(address => uint256) public giveAwayListAlloc;
    mapping(address => bool) public presalerListAlloc;
    mapping(uint256 => uint256) public tokenIdToImageId;
    mapping(uint256 => OtterAddOns) public tokenIdToAddons;
    
    string private _contractURI;
    string private _tokenBaseURI = "ipfs://Qmf41u6GGzoZeJWR3UccXVXvEvmxfrwczSUMvsLec6MU3j/";
	
    uint256 public airDropAmount;
    uint256 public giveAwayAmountMinted;
    uint256 public privateAmountMinted;
    uint256 public totalAmountMinted;
    uint256 public finalShifter;
    
    bytes32 mintingFinalRandRequestId;
    bool public mintingFinalized;
    bool public presaleLive;
    bool public giveAwayLive;
    bool public saleLive;
    bool public companionsAvailable;
    bool public wingsAvailable;
    bool public locked;
    
    
    AggregatorV3Interface internal ethMarketCapFeed;
    AggregatorV3Interface internal btcMarketCapFeed;
    bool public flipped;
    
    bool internal enableKeeper;
    bytes32 internal randomKeyHash;
    uint256 internal randomLinkFee;
    uint256 public randomResult;
    
    // ETH Mainnet params.
    //
    // https://docs.chain.link/docs/ethereum-addresses
    // ethFeed: 0xAA2FE1324b84981832AafCf7Dc6E6Fe6cF124283
    // btcFeed: 0x47E1e89570689c13E723819bf633548d611D630C
    //
    // https://docs.chain.link/docs/vrf-contracts/
    // vrfLinkToken: 0x514910771AF9Ca656af840dff83E8264EcF986CA
    // vrfCoordinator: 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
    // keyHash: 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445
    // Fee: 2000000000000000000 
    //
    // Kovan: 0x9326BFA02ADD2366b30bacB125260Af641031331,0x6135b13325bfC4B00278B4abC5e20bbce2D6580e,0xa36085F69e2889c224210F603D836748e7dC0088,0xdD3782915140c8f3b190B5D67eAc6dc5760C46E9,0x6c3699283bda56ad74f6b855546325b68d482e983852a7a82979cc4807b641f4,100000000000000000
    // Rinkeby: 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e,0x2431452A0010a43878bF198e170F6319Af6d27F4,0x01BE23585060835E02B77ef475b0Cc51aA1e0709,0xb3dCcb4Cf7a26f6cf6B120Cf5A73875B7BBc655B,0x2ed0feb3e7fd2022120aa84fab1945545a9f2ffc9076fd6156fa96eaff4c1311,100000000000000000
    constructor(address ethFeed, address btcFeed, address vrfLinkToken, address vrfCoordinator, bytes32 keyHash, uint256 linkFee) 
        ERC721("Flippening Otters", "FOT") 
        VRFConsumerBase(
            vrfCoordinator, // VRF Coordinator
            vrfLinkToken  // LINK Token
        ) { 
      ethMarketCapFeed = AggregatorV3Interface(ethFeed);
      btcMarketCapFeed = AggregatorV3Interface(btcFeed);
      randomKeyHash = keyHash;
      randomLinkFee = linkFee; // LINK (Varies by network)
    }
    
    modifier notLocked {
        require(!locked, "Contract metadata methods are locked");
        _;
    }

    function increaseGiveAwayBudget(address[] calldata entries) external onlyOwner {
        for(uint256 i = 0; i < entries.length; i++) {
            address entry = entries[i];
            require(entry != address(0), "NULL_ADDRESS");
            giveAwayListAlloc[entry]++;
        }   
    }

    function decreaseGiveAwayBudget(address[] calldata entries) external onlyOwner {
        for(uint256 i = 0; i < entries.length; i++) {
            address entry = entries[i];
            require(entry != address(0), "NULL_ADDRESS");
            giveAwayListAlloc[entry]--;
        }
    }

    function addToPresaleList(address[] calldata entries) external onlyOwner {
        for(uint256 i = 0; i < entries.length; i++) {
            address entry = entries[i];
            require(entry != address(0), "NULL_ADDRESS");
            require(!presalerListAlloc[entry], "DUPLICATE_ENTRY");
            presalerListAlloc[entry] = true;
        }   
    }

    function removeFromPresaleList(address[] calldata entries) external onlyOwner {
        for(uint256 i = 0; i < entries.length; i++) {
            address entry = entries[i];
            require(entry != address(0), "NULL_ADDRESS");
            presalerListAlloc[entry] = false;
        }
    }

    function mint(uint256 tokenQuantity) external payable {
        require(saleLive, "SALE_CLOSED");
        uint256 totalAmountMintedLocal = totalAmountMinted;
        require(totalAmountMintedLocal + tokenQuantity <= OTTER_MAX, "OUT_OF_STOCK");
        require(OTTER_MINT_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH");
        
        for(uint256 i = 0; i < tokenQuantity; i++) {
            totalAmountMintedLocal++;
            shuffleMint(msg.sender, totalAmountMintedLocal);
        }
        totalAmountMinted = totalAmountMintedLocal;
    }
    
    function presaleBuy(uint256 tokenQuantity) external payable {
        require(presaleLive, "PRESALE_CLOSED");
        uint256 totalAmountMintedLocal = totalAmountMinted;
        uint256 privateAmountMintedLocal = privateAmountMinted;
        require(totalAmountMintedLocal + tokenQuantity <= OTTER_MAX, "OUT_OF_STOCK");
        require(privateAmountMintedLocal + tokenQuantity <= OTTER_PRESALE_MAX, "EXCEED_PRIVATE");
        require(presalerListAlloc[msg.sender], "NOT_ELIGIBLE");
        require(OTTER_PRESALE_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH");
        
        for (uint256 i = 0; i < tokenQuantity; i++) {
            privateAmountMintedLocal++;
            totalAmountMintedLocal++;
            shuffleMint(msg.sender, totalAmountMintedLocal);
        }
        privateAmountMinted = privateAmountMintedLocal;
        totalAmountMinted = totalAmountMintedLocal;
    }
    
    // Free give away.    
    function giveAwayBuy() external {
        require(giveAwayLive, "GIVE_AWAY_CLOSED");
        require(totalAmountMinted + 1 <= OTTER_MAX, "OUT_OF_STOCK");
        require(giveAwayAmountMinted + 1 <= OTTER_GIVE_AWAY_MAX, "EXCEED_GIVE_AWAY");
        require(giveAwayListAlloc[msg.sender] > 0, "NOT_QUALIFIED");

        giveAwayAmountMinted++;
        giveAwayListAlloc[msg.sender]--;
        totalAmountMinted++;
        shuffleMint(msg.sender, totalAmountMinted);
    }

    function airDrop(address[] calldata receivers) external onlyOwner {
        require(totalAmountMinted + receivers.length <= OTTER_MAX, "MAX_MINT");
        uint256 airDropAmountLocal = airDropAmount;
        uint256 totalAmountMintedLocal = totalAmountMinted;
        require(airDropAmount + receivers.length <= OTTER_AIR_DROP_MAX, "EXCEED_AIR_DROP");
        
        for (uint256 i = 0; i < receivers.length; i++) {
            airDropAmountLocal++;
            totalAmountMintedLocal++;
            shuffleMint(receivers[i], totalAmountMintedLocal);
        }
        airDropAmount = airDropAmountLocal;
        totalAmountMinted = totalAmountMintedLocal;
    }
    
    function updateCompanion(uint256 tokenId, string calldata companionType) external payable {
        require(_exists(tokenId), "Cannot query non-existent token");
        require(companionsAvailable, "Companion changes are not available");
        require(ownerOf(tokenId) == msg.sender, "Only token owner can change companions");
        bool isDelete = compare(companionType, "");
        // Deletion is free.
        require(isDelete || OTTER_COMPANION_PRICE <= msg.value, "INSUFFICIENT_ETH");

        if (isDelete) {
            delete tokenIdToAddons[tokenId].companion;
        } else {
            tokenIdToAddons[tokenId].companion = companionType;
        }
    } 

    function updateWing(uint256 tokenId, string calldata wingType) external payable {
        require(_exists(tokenId), "Cannot query non-existent token");
        require(wingsAvailable, "Wing changes are not available");
        require(ownerOf(tokenId) == msg.sender, "Only token owner can change wings");
        bool isDelete = compare(wingType, "");
        // Deletion is free.
        require(isDelete || OTTER_WING_PRICE <= msg.value, "INSUFFICIENT_ETH");

        if (isDelete) {
            delete tokenIdToAddons[tokenId].wing;
        } else {
            tokenIdToAddons[tokenId].wing = wingType;
        }
    }

    /**
     * Generates a number between 1 to num (inclusive).
     */ 
    function rangedRandomNum(uint256 num) internal view returns (uint256) {
        return rangedRandomNumWithSeed(num, block.timestamp);
    }

    function rangedRandomNumWithSeed(uint256 num, uint256 counter) internal view returns (uint256) {
        return uint256(keccak256(abi.encode(counter, msg.sender, totalAmountMinted, randomResult)))%num + 1;
    }

    // Finalize the allocation of Otters and stop minting forever.
    function finalizeMinting() public onlyOwner {
        if(!mintingFinalized) {
            saleLive = false;
            presaleLive = false;
            giveAwayLive = false;
            mintingFinalRandRequestId = getRandomNumber();
        }
    }

    function shuffleMint(address to, uint256 tokenId) internal {
        require(!mintingFinalized, "Fair minting has already completed");
        uint256 target = rangedRandomNum(tokenId);
        _safeMint(to, tokenId);
        // Swap target and tokenId image mapping.
        tokenIdToImageId[tokenId] = target;
        tokenIdToImageId[target] = tokenId;
        if(tokenId == OTTER_MAX) {
            finalizeMinting();
        }
    }

    
    function withdraw() external onlyOwner {
        payable(gnosis_safe).transfer(address(this).balance);
    }

    function setDesstinationAddress(address addr) external onlyOwner {
        gnosis_safe = addr;
    }
    
    function burn(uint256[] calldata tokenIds) external onlyOwner() {
          for (uint256 i = 0; i < tokenIds.length; i++) {
              _burn(tokenIds[i]);
              delete tokenIdToImageId[tokenIds[i]];
        }
    }
    
    // Owner functions for enabling presale, sale, revealing and setting the provenance hash
    function lockMetadata() external onlyOwner {
        locked = true;
    }
    
    function togglePresaleStatus() external onlyOwner {
        presaleLive = !presaleLive;
    }

    function toggleGiveAwayStatus() external onlyOwner {
        giveAwayLive = !giveAwayLive;
    }
    
    function toggleSaleStatus() external onlyOwner {
        saleLive = !saleLive;
    }

    function toggleCompanionsAvailable() external onlyOwner {
        companionsAvailable = !companionsAvailable;
    }

    function toggleWingsAvailable() external onlyOwner {
        wingsAvailable = !wingsAvailable;
    }
    
    function contractURI() public view returns (string memory) {
        return _contractURI;
    }
    
    function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
        require(_exists(tokenId), "Cannot query non-existent token");
        require(tokenIdToImageId[tokenId] > 0, "Cannot query non-existent imageId");
        
        uint256 imageId = 0; // "Wait for minting to complete"
        if(mintingFinalized) {
            imageId = tokenIdToImageId[tokenId];
            if(tokenId != FLIPPENING_OTTER_TOKEN_ID) {
                imageId = (imageId + finalShifter)%OTTER_MAX + 1;
            }
        }

        string memory uri = string(abi.encodePacked(_tokenBaseURI, Strings.toString(imageId), "/base"));
        if(bytes(tokenIdToAddons[tokenId].wing).length != 0) {
            uri = string(abi.encodePacked(uri, "_", tokenIdToAddons[tokenId].wing));
        }
        if(bytes(tokenIdToAddons[tokenId].companion).length != 0) {
            uri = string(abi.encodePacked(uri, "_", tokenIdToAddons[tokenId].companion));
        }
        uri = string(abi.encodePacked(uri, ".json"));
        return uri;
    }
    
    function compare(string memory s1, string memory s2) public pure returns (bool) {
        return keccak256(abi.encodePacked(s1)) == keccak256(abi.encodePacked(s2));
    }

    function updateLinkFee(uint256 linkFee) external onlyOwner {
      randomLinkFee = linkFee;
    }
    
    
    function updateKeyHash(bytes32 keyHash) external onlyOwner {
      randomKeyHash = keyHash;
    }
    
    /** 
     * Requests randomness 
     */
    function getRandomNumber() public onlyOwner returns (bytes32 requestId) {
        require(LINK.balanceOf(address(this)) >= randomLinkFee, "Not enough LINK - fill contract with faucet");
        return requestRandomness(randomKeyHash, randomLinkFee);
    }

    /**
     * Callback function used by VRF Coordinator
     */
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        if(mintingFinalRandRequestId == requestId) {
            mintingFinalized = true;
            // All tokenId to imageId shifted by finalShifter, except Flippening Otter.
            finalShifter = randomness%OTTER_MAX;        
        } else {
            randomResult = randomness;
        }
    }
    
    // TODO: change it to internal function after testing.
    function isFlipped() public view returns (bool) {
        (, int256 btcMarketCap,,,) = btcMarketCapFeed.latestRoundData();
        (, int256 ethMarketCap,,,) = ethMarketCapFeed.latestRoundData();
        return btcMarketCap <= ethMarketCap ;
    }

	function setEnableKeeper() public onlyOwner {
		enableKeeper = true;
	}
    
    function checkUpkeep(bytes calldata /* checkData */) external view override returns (bool upkeepNeeded, bytes memory /* performData */) {
        upkeepNeeded = enableKeeper && !flipped && isFlipped();
        // We don't use the checkData in this. The checkData is defined when the Upkeep was registered.
    }

    function performUpkeep(bytes calldata /* performData */) external override {
        require(!flipped, "Flippening otter should only be assigned once");
        require(isFlipped(), "Flippening event must have already happened");
        // Mint the Flippening Otter
        flipped = true;
        uint256 counter = block.timestamp;
        uint256 tokenId = rangedRandomNumWithSeed(totalAmountMinted, counter);
        // Find a tokenId with valid owner. This is required to handle burned tokens.
        while(ownerOf(tokenId) == address(0)) {
            counter++;
            tokenId = rangedRandomNumWithSeed(totalAmountMinted, counter);
        }
        // Assign Flippening Otter to owner of one of the existing otters.
        _safeMint(ownerOf(tokenId), FLIPPENING_OTTER_TOKEN_ID);
        tokenIdToImageId[FLIPPENING_OTTER_TOKEN_ID] = FLIPPENING_OTTER_TOKEN_ID;
    } 

    function setContractURI(string calldata URI) external onlyOwner notLocked {
        _contractURI = URI;
    }

    function setBaseURI(string calldata URI) external onlyOwner notLocked {
        _tokenBaseURI = URI;
    }

    function setOtterMintPrice(uint256 price) external onlyOwner {
        OTTER_MINT_PRICE = price;
    }
}

File 2 of 16 : 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 3 of 16 : 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 4 of 16 : 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 5 of 16 : 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 6 of 16 : 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 7 of 16 : 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 8 of 16 : 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 9 of 16 : 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 10 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

File 11 of 16 : 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 12 of 16 : 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 13 of 16 : KeeperCompatibleInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface KeeperCompatibleInterface {

  /**
   * @notice checks if the contract requires work to be done.
   * @param checkData data passed to the contract when checking for upkeep.
   * @return upkeepNeeded boolean to indicate whether the keeper should call
   * performUpkeep or not.
   * @return performData bytes that the keeper should call performUpkeep with,
   * if upkeep is needed.
   */
  function checkUpkeep(
    bytes calldata checkData
  )
    external
    returns (
      bool upkeepNeeded,
      bytes memory performData
    );

  /**
   * @notice Performs work on the contract. Executed by the keepers, via the registry.
   * @param performData is the data which was passed back from the checkData
   * simulation.
   */
  function performUpkeep(
    bytes calldata performData
  ) external;
}

File 14 of 16 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {

  function decimals()
    external
    view
    returns (
      uint8
    );

  function description()
    external
    view
    returns (
      string memory
    );

  function version()
    external
    view
    returns (
      uint256
    );

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(
    uint80 _roundId
  )
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

}

File 15 of 16 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"ethFeed","type":"address"},{"internalType":"address","name":"btcFeed","type":"address"},{"internalType":"address","name":"vrfLinkToken","type":"address"},{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint256","name":"linkFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"FLIPPENING_OTTER_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_AIR_DROP_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_COMPANION_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_GIVE_AWAY_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_PRESALE_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_PRESALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTTER_WING_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"entries","type":"address[]"}],"name":"addToPresaleList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"receivers","type":"address[]"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airDropAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"companionsAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"s1","type":"string"},{"internalType":"string","name":"s2","type":"string"}],"name":"compare","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"entries","type":"address[]"}],"name":"decreaseGiveAwayBudget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalShifter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"giveAwayAmountMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giveAwayBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"giveAwayListAlloc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giveAwayLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gnosis_safe","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"entries","type":"address[]"}],"name":"increaseGiveAwayBudget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFlipped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintingFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"performUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"presaleBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presalerListAlloc","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateAmountMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomResult","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":"address[]","name":"entries","type":"address[]"}],"name":"removeFromPresaleList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setDesstinationAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setEnableKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setOtterMintPrice","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":[],"name":"toggleCompanionsAvailable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleGiveAwayStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePresaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleWingsAvailable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToAddons","outputs":[{"internalType":"string","name":"wing","type":"string"},{"internalType":"string","name":"companion","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToImageId","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":"totalAmountMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"companionType","type":"string"}],"name":"updateCompanion","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"name":"updateKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"linkFee","type":"uint256"}],"name":"updateLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"wingType","type":"string"}],"name":"updateWing","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"wingsAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

66b1a2bc2ec50000600855600980546001600160a01b03191673b836140717e545bcd59691ac1e4d50f1f94fb6b3179055610120604052603660c0818152906200452360e03980516200005b91600f91602090910190620001da565b503480156200006957600080fd5b5060405162004559380380620045598339810160408190526200008c916200029d565b6040805180820182526011815270466c697070656e696e67204f747465727360781b6020808301918252835180850190945260038452621193d560ea1b90840152815186938893929091620000e491600091620001da565b508051620000fa906001906020840190620001da565b50505062000117620001116200018460201b60201c565b62000188565b606091821b6001600160601b031990811660a052911b1660805260168054600160381b600160d81b0319166701000000000000006001600160a01b0398891602179055601780546001600160a01b0319169590961694909417909455505060189190915560195562000349565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001e8906200030c565b90600052602060002090601f0160209004810192826200020c576000855562000257565b82601f106200022757805160ff191683800117855562000257565b8280016001018555821562000257579182015b82811115620002575782518255916020019190600101906200023a565b506200026592915062000269565b5090565b5b808211156200026557600081556001016200026a565b80516001600160a01b03811681146200029857600080fd5b919050565b60008060008060008060c08789031215620002b757600080fd5b620002c28762000280565b9550620002d26020880162000280565b9450620002e26040880162000280565b9350620002f26060880162000280565b92506080870151915060a087015190509295509295509295565b600181811c908216806200032157607f821691505b602082108114156200034357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160601c6141a06200038360003960008181611d5c0152613262015260008181612591015261323301526141a06000f3fe6080604052600436106104515760003560e01c8063815f7bbd1161023f578063b179e06011610139578063e081b781116100b6578063eb910aec1161007a578063eb910aec146107b3578063f2fde38b14610cc8578063f30d162914610ce8578063f7e3596814610cfe578063f809ea6f1461093f57600080fd5b8063e081b78114610c09578063e359776814610c2a578063e7fa67e514610c4a578063e8a3d48514610c6a578063e985e9c514610c7f57600080fd5b8063cf309012116100fd578063cf30901214610b73578063dba4f89b14610b94578063dbdff2c114610bc1578063df9c983a14610bd6578063e02b987414610bf657600080fd5b8063b179e06014610ad0578063b79597f414610af0578063b80f55c914610b13578063b88d4fde14610b33578063c87b56dd14610b5357600080fd5b806399cda7a1116101c7578063a413bc1a1161018b578063a413bc1a14610a59578063a444a0be14610a6f578063a4ecb1ef14610a84578063a682a1ed14610a99578063abc7503d14610aae57600080fd5b806399cda7a1146109c45780639ac0ffa3146109d95780639ac8ce2914610a06578063a0712d6814610a26578063a22cb46514610a3957600080fd5b80638e66ef871161020e5780638e66ef871461093f578063938e3d7b1461095a57806394985ddd1461097a57806395d89b411461099a578063989bdbb6146109af57600080fd5b8063815f7bbd146108cf57806383a9e049146108e25780638bb7861f146109015780638da5cb5b1461092157600080fd5b80633ccfd60b1161035057806359a12ad5116102d857806370a082311161029c57806370a0823114610837578063715018a6146108575780637204a3c91461086c57806374ebde581461088c5780637bffb4ce146108ba57600080fd5b806359a12ad51461079d57806359ec5b35146107b35780636352211e146107c957806364f30497146107e95780636e04ff0d1461080957600080fd5b80634585e33b1161031f5780634585e33b146107185780634846c09f14610738578063490ad9fc1461074d5780634934bf5c1461076357806355f804b31461077d57600080fd5b80633ccfd60b146106b257806342619f66146106c757806342842e0e146106dd5780634437df71146106fd57600080fd5b8063095ea7b3116103de5780632265bd6d116103a25780632265bd6d1461062757806323b872dd1461063d57806325dee0c41461065d5780632c1c86d01461067d5780633a96fdd71461069257600080fd5b8063095ea7b31461058d5780630a8953b7146105ad5780630aeb1ac7146105cd578063161f5a10146105e257806316927003146105f757600080fd5b806306fdde031161042557806306fdde03146104e65780630710579e1461050857806307d0ad2f14610529578063081812fc1461053f57806308e9988b1461057757600080fd5b8062b6849f1461045657806301ffc9a71461047857806301ffeaa4146104ad578063049c5c49146104d1575b600080fd5b34801561046257600080fd5b506104766104713660046139c9565b610d11565b005b34801561048457600080fd5b50610498610493366004613a63565b610e58565b60405190151581526020015b60405180910390f35b3480156104b957600080fd5b506104c360135481565b6040519081526020016104a4565b3480156104dd57600080fd5b50610476610eaa565b3480156104f257600080fd5b506104fb610ef5565b6040516104a49190613dde565b34801561051457600080fd5b5060175461049890600160a01b900460ff1681565b34801561053557600080fd5b506104c360145481565b34801561054b57600080fd5b5061055f61055a366004613a28565b610f87565b6040516001600160a01b0390911681526020016104a4565b34801561058357600080fd5b506104c360105481565b34801561059957600080fd5b506104766105a836600461399f565b61100f565b3480156105b957600080fd5b506016546104989062010000900460ff1681565b3480156105d957600080fd5b50610476611125565b3480156105ee57600080fd5b50610498611174565b34801561060357600080fd5b50610498610612366004613862565b600b6020526000908152604090205460ff1681565b34801561063357600080fd5b506104c360115481565b34801561064957600080fd5b506104766106583660046138b0565b611299565b34801561066957600080fd5b50610476610678366004613a28565b6112ca565b34801561068957600080fd5b506104766112f9565b34801561069e57600080fd5b506104986106ad366004613ad3565b611348565b3480156106be57600080fd5b506104766113a1565b3480156106d357600080fd5b506104c3601a5481565b3480156106e957600080fd5b506104766106f83660046138b0565b611407565b34801561070957600080fd5b506104c3662386f26fc1000081565b34801561072457600080fd5b50610476610733366004613a9d565b611422565b34801561074457600080fd5b506104766115af565b34801561075957600080fd5b506104c36101f481565b34801561076f57600080fd5b506016546104989060ff1681565b34801561078957600080fd5b50610476610798366004613a9d565b6115f8565b3480156107a957600080fd5b506104c360125481565b3480156107bf57600080fd5b506104c361012c81565b3480156107d557600080fd5b5061055f6107e4366004613a28565b611658565b3480156107f557600080fd5b506104766108043660046139c9565b6116cf565b34801561081557600080fd5b50610829610824366004613a9d565b611792565b6040516104a4929190613dc3565b34801561084357600080fd5b506104c3610852366004613862565b6117d3565b34801561086357600080fd5b5061047661185a565b34801561087857600080fd5b506104766108873660046139c9565b61188e565b34801561089857600080fd5b506108ac6108a7366004613a28565b6119a3565b6040516104a4929190613df1565b3480156108c657600080fd5b50610476611acf565b6104766108dd366004613a28565b611b16565b3480156108ee57600080fd5b5060165461049890610100900460ff1681565b34801561090d57600080fd5b5061047661091c366004613862565b611ca5565b34801561092d57600080fd5b506006546001600160a01b031661055f565b34801561094b57600080fd5b506104c366470de4df82000081565b34801561096657600080fd5b50610476610975366004613a9d565b611cf1565b34801561098657600080fd5b50610476610995366004613a41565b611d51565b3480156109a657600080fd5b506104fb611dd7565b3480156109bb57600080fd5b50610476611de6565b3480156109d057600080fd5b506104c3611e28565b3480156109e557600080fd5b506104c36109f4366004613a28565b600c6020526000908152604090205481565b348015610a1257600080fd5b5060095461055f906001600160a01b031681565b610476610a34366004613a28565b611e38565b348015610a4557600080fd5b50610476610a54366004613968565b611f15565b348015610a6557600080fd5b506104c361270f81565b348015610a7b57600080fd5b50610476611fda565b348015610a9057600080fd5b50610476612019565b348015610aa557600080fd5b50610476612066565b348015610aba57600080fd5b5060165461049890640100000000900460ff1681565b348015610adc57600080fd5b50610476610aeb3660046139c9565b6121d6565b348015610afc57600080fd5b506016546104989065010000000000900460ff1681565b348015610b1f57600080fd5b50610476610b2e3660046139c9565b61228d565b348015610b3f57600080fd5b50610476610b4e3660046138ec565b612325565b348015610b5f57600080fd5b506104fb610b6e366004613a28565b61235d565b348015610b7f57600080fd5b5060165461049890600160301b900460ff1681565b348015610ba057600080fd5b506104c3610baf366004613862565b600a6020526000908152604090205481565b348015610bcd57600080fd5b506104c361254c565b348015610be257600080fd5b50610476610bf1366004613a28565b612688565b610476610c04366004613b50565b6126b7565b348015610c1557600080fd5b50601654610498906301000000900460ff1681565b348015610c3657600080fd5b50610476610c453660046139c9565b612863565b348015610c5657600080fd5b50610476610c65366004613a28565b612926565b348015610c7657600080fd5b506104fb612955565b348015610c8b57600080fd5b50610498610c9a36600461387d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610cd457600080fd5b50610476610ce3366004613862565b612964565b348015610cf457600080fd5b506104c360085481565b610476610d0c366004613b50565b6129fc565b6006546001600160a01b03163314610d445760405162461bcd60e51b8152600401610d3b90613eb4565b60405180910390fd5b60135461270f90610d56908390613fdf565b1115610d8f5760405162461bcd60e51b815260206004820152600860248201526713505617d352539560c21b6044820152606401610d3b565b60105460135461012c610da28484613fdf565b1115610de25760405162461bcd60e51b815260206004820152600f60248201526e04558434545445f4149525f44524f5608c1b6044820152606401610d3b565b60005b83811015610e4a5782610df7816140bf565b9350508180610e05906140bf565b925050610e38858583818110610e1d57610e1d61411a565b9050602002016020810190610e329190613862565b83612bb5565b80610e42816140bf565b915050610de5565b506010919091556013555050565b60006001600160e01b031982166380ac58cd60e01b1480610e8957506001600160e01b03198216635b5e139f60e01b145b80610ea457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6006546001600160a01b03163314610ed45760405162461bcd60e51b8152600401610d3b90613eb4565b6016805463ff00000019811663010000009182900460ff1615909102179055565b606060008054610f0490614084565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3090614084565b8015610f7d5780601f10610f5257610100808354040283529160200191610f7d565b820191906000526020600020905b815481529060010190602001808311610f6057829003601f168201915b5050505050905090565b6000610f9282612c56565b610ff35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d3b565b506000908152600460205260409020546001600160a01b031690565b600061101a82611658565b9050806001600160a01b0316836001600160a01b031614156110885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d3b565b336001600160a01b03821614806110a457506110a48133610c9a565b6111165760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d3b565b6111208383612c73565b505050565b6006546001600160a01b0316331461114f5760405162461bcd60e51b8152600401610d3b90613eb4565b6016805465ff0000000000198116650100000000009182900460ff1615909102179055565b600080601760009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156111c557600080fd5b505afa1580156111d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fd9190613b9c565b5050509150506000601660079054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561125357600080fd5b505afa158015611267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128b9190613b9c565b505050909213159392505050565b6112a33382612ce1565b6112bf5760405162461bcd60e51b8152600401610d3b90613f64565b611120838383612dcb565b6006546001600160a01b031633146112f45760405162461bcd60e51b8152600401610d3b90613eb4565b601955565b6006546001600160a01b031633146113235760405162461bcd60e51b8152600401610d3b90613eb4565b60165460ff16611346576016805463ffffff001916905561134261254c565b6015555b565b60008160405160200161135b9190613cb2565b60405160208183030381529060405280519060200120836040516020016113829190613cb2565b6040516020818303038152906040528051906020012014905092915050565b6006546001600160a01b031633146113cb5760405162461bcd60e51b8152600401610d3b90613eb4565b6009546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611404573d6000803e3d6000fd5b50565b61112083838360405180602001604052806000815250612325565b601754600160a01b900460ff16156114925760405162461bcd60e51b815260206004820152602d60248201527f466c697070656e696e67206f747465722073686f756c64206f6e6c792062652060448201526c61737369676e6564206f6e636560981b6064820152608401610d3b565b61149a611174565b6114fa5760405162461bcd60e51b815260206004820152602b60248201527f466c697070656e696e67206576656e74206d757374206861766520616c72656160448201526a191e481a185c1c195b995960aa1b6064820152608401610d3b565b6017805460ff60a01b1916600160a01b179055601354429060009061151f9083612f6b565b90505b600061152d82611658565b6001600160a01b0316141561155c5781611546816140bf565b92505061155560135483612f6b565b9050611522565b61157a61156882611658565b61157561270f6001613fdf565b612fc7565b61158761270f6001613fdf565b600c600061159861270f6001613fdf565b815260208101919091526040016000205550505050565b6006546001600160a01b031633146115d95760405162461bcd60e51b8152600401610d3b90613eb4565b6016805462ff0000198116620100009182900460ff1615909102179055565b6006546001600160a01b031633146116225760405162461bcd60e51b8152600401610d3b90613eb4565b601654600160301b900460ff161561164c5760405162461bcd60e51b8152600401610d3b90613ee9565b611120600f8383613639565b6000818152600260205260408120546001600160a01b031680610ea45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d3b565b6006546001600160a01b031633146116f95760405162461bcd60e51b8152600401610d3b90613eb4565b60005b818110156111205760008383838181106117185761171861411a565b905060200201602081019061172d9190613862565b90506001600160a01b0381166117555760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b0381166000908152600a60205260408120805491611779836140bf565b919050555050808061178a906140bf565b9150506116fc565b601754600090606090600160a81b900460ff1680156117bb5750601754600160a01b900460ff16155b80156117ca57506117ca611174565b91509250929050565b60006001600160a01b03821661183e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d3b565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146118845760405162461bcd60e51b8152600401610d3b90613eb4565b6113466000612fe1565b6006546001600160a01b031633146118b85760405162461bcd60e51b8152600401610d3b90613eb4565b60005b818110156111205760008383838181106118d7576118d761411a565b90506020020160208101906118ec9190613862565b90506001600160a01b0381166119145760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b0381166000908152600b602052604090205460ff161561196f5760405162461bcd60e51b815260206004820152600f60248201526e4455504c49434154455f454e54525960881b6044820152606401610d3b565b6001600160a01b03166000908152600b60205260409020805460ff191660011790558061199b816140bf565b9150506118bb565b600d602052600090815260409020805481906119be90614084565b80601f01602080910402602001604051908101604052809291908181526020018280546119ea90614084565b8015611a375780601f10611a0c57610100808354040283529160200191611a37565b820191906000526020600020905b815481529060010190602001808311611a1a57829003601f168201915b505050505090806001018054611a4c90614084565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7890614084565b8015611ac55780601f10611a9a57610100808354040283529160200191611ac5565b820191906000526020600020905b815481529060010190602001808311611aa857829003601f168201915b5050505050905082565b6006546001600160a01b03163314611af95760405162461bcd60e51b8152600401610d3b90613eb4565b6016805461ff001981166101009182900460ff1615909102179055565b601654610100900460ff16611b5e5760405162461bcd60e51b815260206004820152600e60248201526d14149154d0531157d0d313d4d15160921b6044820152606401610d3b565b60135460125461270f611b718484613fdf565b1115611b8f5760405162461bcd60e51b8152600401610d3b90613e8e565b61012c611b9c8483613fdf565b1115611bdb5760405162461bcd60e51b815260206004820152600e60248201526d4558434545445f5052495641544560901b6044820152606401610d3b565b336000908152600b602052604090205460ff16611c295760405162461bcd60e51b815260206004820152600c60248201526b4e4f545f454c494749424c4560a01b6044820152606401610d3b565b34611c3b84662386f26fc1000061400b565b1115611c595760405162461bcd60e51b8152600401610d3b90613fb5565b60005b83811015611c9b5781611c6e816140bf565b9250508280611c7c906140bf565b935050611c893384612bb5565b80611c93816140bf565b915050611c5c565b5060125560135550565b6006546001600160a01b03163314611ccf5760405162461bcd60e51b8152600401610d3b90613eb4565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314611d1b5760405162461bcd60e51b8152600401610d3b90613eb4565b601654600160301b900460ff1615611d455760405162461bcd60e51b8152600401610d3b90613ee9565b611120600e8383613639565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611dc95760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610d3b565b611dd38282613033565b5050565b606060018054610f0490614084565b6006546001600160a01b03163314611e105760405162461bcd60e51b8152600401610d3b90613eb4565b6016805466ff0000000000001916600160301b179055565b611e3561270f6001613fdf565b81565b6016546301000000900460ff16611e7f5760405162461bcd60e51b815260206004820152600b60248201526a14d0531157d0d313d4d15160aa1b6044820152606401610d3b565b60135461270f611e8f8383613fdf565b1115611ead5760405162461bcd60e51b8152600401610d3b90613e8e565b3482600854611ebc919061400b565b1115611eda5760405162461bcd60e51b8152600401610d3b90613fb5565b60005b82811015611f0e5781611eef816140bf565b925050611efc3383612bb5565b80611f06816140bf565b915050611edd565b5060135550565b6001600160a01b038216331415611f6e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d3b565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b031633146120045760405162461bcd60e51b8152600401610d3b90613eb4565b6017805460ff60a81b1916600160a81b179055565b6006546001600160a01b031633146120435760405162461bcd60e51b8152600401610d3b90613eb4565b6016805464ff000000001981166401000000009182900460ff1615909102179055565b60165462010000900460ff166120b15760405162461bcd60e51b815260206004820152601060248201526f11d2559157d055d05657d0d313d4d15160821b6044820152606401610d3b565b61270f60135460016120c39190613fdf565b11156120e15760405162461bcd60e51b8152600401610d3b90613e8e565b6101f460115460016120f39190613fdf565b11156121345760405162461bcd60e51b815260206004820152601060248201526f4558434545445f474956455f4157415960801b6044820152606401610d3b565b336000908152600a60205260409020546121805760405162461bcd60e51b815260206004820152600d60248201526c1393d517d45550531251925151609a1b6044820152606401610d3b565b60118054906000612190836140bf565b9091555050336000908152600a602052604081208054916121b08361406d565b9091555050601380549060006121c5836140bf565b919050555061134633601354612bb5565b6006546001600160a01b031633146122005760405162461bcd60e51b8152600401610d3b90613eb4565b60005b8181101561112057600083838381811061221f5761221f61411a565b90506020020160208101906122349190613862565b90506001600160a01b03811661225c5760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b03166000908152600b60205260409020805460ff1916905580612285816140bf565b915050612203565b6006546001600160a01b031633146122b75760405162461bcd60e51b8152600401610d3b90613eb4565b60005b81811015611120576122e38383838181106122d7576122d761411a565b90506020020135613063565b600c60008484848181106122f9576122f961411a565b90506020020135815260200190815260200160002060009055808061231d906140bf565b9150506122ba565b61232f3383612ce1565b61234b5760405162461bcd60e51b8152600401610d3b90613f64565b612357848484846130fe565b50505050565b606061236882612c56565b6123845760405162461bcd60e51b8152600401610d3b90613f2d565b6000828152600c60205260409020546123e95760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f74207175657279206e6f6e2d6578697374656e7420696d616765496044820152601960fa1b6064820152608401610d3b565b60165460009060ff161561244357506000828152600c602052604090205461241461270f6001613fdf565b83146124435761270f6014548261242b9190613fdf565b61243591906140da565b612440906001613fdf565b90505b6000600f61245083613131565b604051602001612461929190613d2a565b60408051601f198184030181529181526000868152600d6020522080549192509061248b90614084565b1590506124c6576000848152600d602090815260409182902091516124b4928492909101613cf7565b60405160208183030381529060405290505b6000848152600d6020526040902060010180546124e290614084565b1590506125235780600d6000868152602001908152602001600020600101604051602001612511929190613cf7565b60405160208183030381529060405290505b806040516020016125349190613cce565b60408051601f19818403018152919052949350505050565b6006546000906001600160a01b031633146125795760405162461bcd60e51b8152600401610d3b90613eb4565b6019546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156125db57600080fd5b505afa1580156125ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126139190613b37565b10156126755760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b6064820152608401610d3b565b61268360185460195461322f565b905090565b6006546001600160a01b031633146126b25760405162461bcd60e51b8152600401610d3b90613eb4565b600855565b6126c083612c56565b6126dc5760405162461bcd60e51b8152600401610d3b90613f2d565b60165465010000000000900460ff166127375760405162461bcd60e51b815260206004820152601e60248201527f57696e67206368616e67657320617265206e6f7420617661696c61626c6500006044820152606401610d3b565b3361274184611658565b6001600160a01b0316146127a15760405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920746f6b656e206f776e65722063616e206368616e67652077696e676044820152607360f81b6064820152608401610d3b565b60006127f083838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081529250611348915050565b9050808061280557503466470de4df82000011155b6128215760405162461bcd60e51b8152600401610d3b90613fb5565b8015612843576000848152600d6020526040812061283e916136bd565b612357565b6000848152600d6020526040902061285c908484613639565b5050505050565b6006546001600160a01b0316331461288d5760405162461bcd60e51b8152600401610d3b90613eb4565b60005b818110156111205760008383838181106128ac576128ac61411a565b90506020020160208101906128c19190613862565b90506001600160a01b0381166128e95760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b0381166000908152600a6020526040812080549161290d8361406d565b919050555050808061291e906140bf565b915050612890565b6006546001600160a01b031633146129505760405162461bcd60e51b8152600401610d3b90613eb4565b601855565b6060600e8054610f0490614084565b6006546001600160a01b0316331461298e5760405162461bcd60e51b8152600401610d3b90613eb4565b6001600160a01b0381166129f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d3b565b61140481612fe1565b612a0583612c56565b612a215760405162461bcd60e51b8152600401610d3b90613f2d565b601654640100000000900460ff16612a875760405162461bcd60e51b815260206004820152602360248201527f436f6d70616e696f6e206368616e67657320617265206e6f7420617661696c61604482015262626c6560e81b6064820152608401610d3b565b33612a9184611658565b6001600160a01b031614612af65760405162461bcd60e51b815260206004820152602660248201527f4f6e6c7920746f6b656e206f776e65722063616e206368616e676520636f6d70604482015265616e696f6e7360d01b6064820152608401610d3b565b6000612b4583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081529250611348915050565b90508080612b5a57503466470de4df82000011155b612b765760405162461bcd60e51b8152600401610d3b90613fb5565b8015612b99576000848152600d6020526040812061283e916001909101906136bd565b6000848152600d6020526040902061285c906001018484613639565b60165460ff1615612c135760405162461bcd60e51b815260206004820152602260248201527f46616972206d696e74696e672068617320616c726561647920636f6d706c6574604482015261195960f21b6064820152608401610d3b565b6000612c1e826133ba565b9050612c2a8383612fc7565b6000828152600c6020526040808220839055828252902082905561270f821415611120576111206112f9565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ca882611658565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612cec82612c56565b612d4d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d3b565b6000612d5883611658565b9050806001600160a01b0316846001600160a01b03161480612d935750836001600160a01b0316612d8884610f87565b6001600160a01b0316145b80612dc357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612dde82611658565b6001600160a01b031614612e465760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610d3b565b6001600160a01b038216612ea85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d3b565b612eb3600082612c73565b6001600160a01b0383166000908152600360205260408120805460019290612edc90849061402a565b90915550506001600160a01b0382166000908152600360205260408120805460019290612f0a908490613fdf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b601354601a54604080516020808201869052338284015260608201949094526080808201939093528151808203909301835260a00190528051910120600090612fb59084906140da565b612fc0906001613fdf565b9392505050565b611dd38282604051806020016040528060008152506133c6565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b81601554141561305d576016805460ff1916600117905561305661270f826140da565b6014555050565b601a5550565b600061306e82611658565b905061307b600083612c73565b6001600160a01b03811660009081526003602052604081208054600192906130a490849061402a565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b613109848484612dcb565b613115848484846133f9565b6123575760405162461bcd60e51b8152600401610d3b90613e3c565b6060816131555750506040805180820190915260018152600360fc1b602082015290565b8160005b811561317f5780613169816140bf565b91506131789050600a83613ff7565b9150613159565b60008167ffffffffffffffff81111561319a5761319a614130565b6040519080825280601f01601f1916602001820160405280156131c4576020820181803683370190505b5090505b8415612dc3576131d960018361402a565b91506131e6600a866140da565b6131f1906030613fdf565b60f81b8183815181106132065761320661411a565b60200101906001600160f81b031916908160001a905350613228600a86613ff7565b94506131c8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f00000000000000000000000000000000000000000000000000000000000000008486600060405160200161329f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016132cc93929190613d9c565b602060405180830381600087803b1580156132e657600080fd5b505af11580156132fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061331e9190613a0b565b50600083815260076020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a09091019092528151918301919091209387905291905261337a906001613fdf565b600085815260076020526040902055612dc38482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000610ea48242612f6b565b6133d08383613506565b6133dd60008484846133f9565b6111205760405162461bcd60e51b8152600401610d3b90613e3c565b60006001600160a01b0384163b156134fb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061343d903390899088908890600401613d5f565b602060405180830381600087803b15801561345757600080fd5b505af1925050508015613487575060408051601f3d908101601f1916820190925261348491810190613a80565b60015b6134e1573d8080156134b5576040519150601f19603f3d011682016040523d82523d6000602084013e6134ba565b606091505b5080516134d95760405162461bcd60e51b8152600401610d3b90613e3c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612dc3565b506001949350505050565b6001600160a01b03821661355c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d3b565b61356581612c56565b156135b25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d3b565b6001600160a01b03821660009081526003602052604081208054600192906135db908490613fdf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461364590614084565b90600052602060002090601f01602090048101928261366757600085556136ad565b82601f106136805782800160ff198235161785556136ad565b828001600101855582156136ad579182015b828111156136ad578235825591602001919060010190613692565b506136b99291506136f3565b5090565b5080546136c990614084565b6000825580601f106136d9575050565b601f01602090049060005260206000209081019061140491905b5b808211156136b957600081556001016136f4565b600067ffffffffffffffff8084111561372357613723614130565b604051601f8501601f19908116603f0116810190828211818310171561374b5761374b614130565b8160405280935085815286868601111561376457600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461379557600080fd5b919050565b60008083601f8401126137ac57600080fd5b50813567ffffffffffffffff8111156137c457600080fd5b6020830191508360208260051b85010111156137df57600080fd5b9250929050565b60008083601f8401126137f857600080fd5b50813567ffffffffffffffff81111561381057600080fd5b6020830191508360208285010111156137df57600080fd5b600082601f83011261383957600080fd5b612fc083833560208501613708565b805169ffffffffffffffffffff8116811461379557600080fd5b60006020828403121561387457600080fd5b612fc08261377e565b6000806040838503121561389057600080fd5b6138998361377e565b91506138a76020840161377e565b90509250929050565b6000806000606084860312156138c557600080fd5b6138ce8461377e565b92506138dc6020850161377e565b9150604084013590509250925092565b6000806000806080858703121561390257600080fd5b61390b8561377e565b93506139196020860161377e565b925060408501359150606085013567ffffffffffffffff81111561393c57600080fd5b8501601f8101871361394d57600080fd5b61395c87823560208401613708565b91505092959194509250565b6000806040838503121561397b57600080fd5b6139848361377e565b9150602083013561399481614146565b809150509250929050565b600080604083850312156139b257600080fd5b6139bb8361377e565b946020939093013593505050565b600080602083850312156139dc57600080fd5b823567ffffffffffffffff8111156139f357600080fd5b6139ff8582860161379a565b90969095509350505050565b600060208284031215613a1d57600080fd5b8151612fc081614146565b600060208284031215613a3a57600080fd5b5035919050565b60008060408385031215613a5457600080fd5b50508035926020909101359150565b600060208284031215613a7557600080fd5b8135612fc081614154565b600060208284031215613a9257600080fd5b8151612fc081614154565b60008060208385031215613ab057600080fd5b823567ffffffffffffffff811115613ac757600080fd5b6139ff858286016137e6565b60008060408385031215613ae657600080fd5b823567ffffffffffffffff80821115613afe57600080fd5b613b0a86838701613828565b93506020850135915080821115613b2057600080fd5b50613b2d85828601613828565b9150509250929050565b600060208284031215613b4957600080fd5b5051919050565b600080600060408486031215613b6557600080fd5b83359250602084013567ffffffffffffffff811115613b8357600080fd5b613b8f868287016137e6565b9497909650939450505050565b600080600080600060a08688031215613bb457600080fd5b613bbd86613848565b9450602086015193506040860151925060608601519150613be060808701613848565b90509295509295909350565b60008151808452613c04816020860160208601614041565b601f01601f19169290920160200192915050565b8054600090600181811c9080831680613c3257607f831692505b6020808410821415613c5457634e487b7160e01b600052602260045260246000fd5b818015613c685760018114613c7957613ca6565b60ff19861689528489019650613ca6565b60008881526020902060005b86811015613c9e5781548b820152908501908301613c85565b505084890196505b50505050505092915050565b60008251613cc4818460208701614041565b9190910192915050565b60008251613ce0818460208701614041565b64173539b7b760d91b920191825250600501919050565b60008351613d09818460208801614041565b605f60f81b908301908152613d216001820185613c18565b95945050505050565b6000613d368285613c18565b8351613d46818360208801614041565b642f6261736560d81b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d9290830184613bec565b9695505050505050565b60018060a01b0384168152826020820152606060408201526000613d216060830184613bec565b8215158152604060208201526000612dc36040830184613bec565b602081526000612fc06020830184613bec565b604081526000613e046040830185613bec565b8281036020840152613d218185613bec565b6020808252600c908201526b4e554c4c5f4144445245535360a01b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600c908201526b4f55545f4f465f53544f434b60a01b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f436f6e7472616374206d65746164617461206d6574686f647320617265206c6f60408201526318dad95960e21b606082015260800190565b6020808252601f908201527f43616e6e6f74207175657279206e6f6e2d6578697374656e7420746f6b656e00604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526010908201526f0929ca6aa8c8c9286928a9ca8be8aa8960831b604082015260600190565b60008219821115613ff257613ff26140ee565b500190565b60008261400657614006614104565b500490565b6000816000190483118215151615614025576140256140ee565b500290565b60008282101561403c5761403c6140ee565b500390565b60005b8381101561405c578181015183820152602001614044565b838111156123575750506000910152565b60008161407c5761407c6140ee565b506000190190565b600181811c9082168061409857607f821691505b602082108114156140b957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156140d3576140d36140ee565b5060010190565b6000826140e9576140e9614104565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461140457600080fd5b6001600160e01b03198116811461140457600080fdfea2646970667358221220ce5b947953102c547a527648cd76ecacd690208405054bde4184ff6ddd542b2464736f6c63430008070033697066733a2f2f516d663431753647477a6f5a654a5752335563635856587645766d78667277637a53554d76734c6563364d55336a2f000000000000000000000000aa2fe1324b84981832aafcf7dc6e6fe6cf12428300000000000000000000000047e1e89570689c13e723819bf633548d611d630c000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000

Deployed Bytecode

0x6080604052600436106104515760003560e01c8063815f7bbd1161023f578063b179e06011610139578063e081b781116100b6578063eb910aec1161007a578063eb910aec146107b3578063f2fde38b14610cc8578063f30d162914610ce8578063f7e3596814610cfe578063f809ea6f1461093f57600080fd5b8063e081b78114610c09578063e359776814610c2a578063e7fa67e514610c4a578063e8a3d48514610c6a578063e985e9c514610c7f57600080fd5b8063cf309012116100fd578063cf30901214610b73578063dba4f89b14610b94578063dbdff2c114610bc1578063df9c983a14610bd6578063e02b987414610bf657600080fd5b8063b179e06014610ad0578063b79597f414610af0578063b80f55c914610b13578063b88d4fde14610b33578063c87b56dd14610b5357600080fd5b806399cda7a1116101c7578063a413bc1a1161018b578063a413bc1a14610a59578063a444a0be14610a6f578063a4ecb1ef14610a84578063a682a1ed14610a99578063abc7503d14610aae57600080fd5b806399cda7a1146109c45780639ac0ffa3146109d95780639ac8ce2914610a06578063a0712d6814610a26578063a22cb46514610a3957600080fd5b80638e66ef871161020e5780638e66ef871461093f578063938e3d7b1461095a57806394985ddd1461097a57806395d89b411461099a578063989bdbb6146109af57600080fd5b8063815f7bbd146108cf57806383a9e049146108e25780638bb7861f146109015780638da5cb5b1461092157600080fd5b80633ccfd60b1161035057806359a12ad5116102d857806370a082311161029c57806370a0823114610837578063715018a6146108575780637204a3c91461086c57806374ebde581461088c5780637bffb4ce146108ba57600080fd5b806359a12ad51461079d57806359ec5b35146107b35780636352211e146107c957806364f30497146107e95780636e04ff0d1461080957600080fd5b80634585e33b1161031f5780634585e33b146107185780634846c09f14610738578063490ad9fc1461074d5780634934bf5c1461076357806355f804b31461077d57600080fd5b80633ccfd60b146106b257806342619f66146106c757806342842e0e146106dd5780634437df71146106fd57600080fd5b8063095ea7b3116103de5780632265bd6d116103a25780632265bd6d1461062757806323b872dd1461063d57806325dee0c41461065d5780632c1c86d01461067d5780633a96fdd71461069257600080fd5b8063095ea7b31461058d5780630a8953b7146105ad5780630aeb1ac7146105cd578063161f5a10146105e257806316927003146105f757600080fd5b806306fdde031161042557806306fdde03146104e65780630710579e1461050857806307d0ad2f14610529578063081812fc1461053f57806308e9988b1461057757600080fd5b8062b6849f1461045657806301ffc9a71461047857806301ffeaa4146104ad578063049c5c49146104d1575b600080fd5b34801561046257600080fd5b506104766104713660046139c9565b610d11565b005b34801561048457600080fd5b50610498610493366004613a63565b610e58565b60405190151581526020015b60405180910390f35b3480156104b957600080fd5b506104c360135481565b6040519081526020016104a4565b3480156104dd57600080fd5b50610476610eaa565b3480156104f257600080fd5b506104fb610ef5565b6040516104a49190613dde565b34801561051457600080fd5b5060175461049890600160a01b900460ff1681565b34801561053557600080fd5b506104c360145481565b34801561054b57600080fd5b5061055f61055a366004613a28565b610f87565b6040516001600160a01b0390911681526020016104a4565b34801561058357600080fd5b506104c360105481565b34801561059957600080fd5b506104766105a836600461399f565b61100f565b3480156105b957600080fd5b506016546104989062010000900460ff1681565b3480156105d957600080fd5b50610476611125565b3480156105ee57600080fd5b50610498611174565b34801561060357600080fd5b50610498610612366004613862565b600b6020526000908152604090205460ff1681565b34801561063357600080fd5b506104c360115481565b34801561064957600080fd5b506104766106583660046138b0565b611299565b34801561066957600080fd5b50610476610678366004613a28565b6112ca565b34801561068957600080fd5b506104766112f9565b34801561069e57600080fd5b506104986106ad366004613ad3565b611348565b3480156106be57600080fd5b506104766113a1565b3480156106d357600080fd5b506104c3601a5481565b3480156106e957600080fd5b506104766106f83660046138b0565b611407565b34801561070957600080fd5b506104c3662386f26fc1000081565b34801561072457600080fd5b50610476610733366004613a9d565b611422565b34801561074457600080fd5b506104766115af565b34801561075957600080fd5b506104c36101f481565b34801561076f57600080fd5b506016546104989060ff1681565b34801561078957600080fd5b50610476610798366004613a9d565b6115f8565b3480156107a957600080fd5b506104c360125481565b3480156107bf57600080fd5b506104c361012c81565b3480156107d557600080fd5b5061055f6107e4366004613a28565b611658565b3480156107f557600080fd5b506104766108043660046139c9565b6116cf565b34801561081557600080fd5b50610829610824366004613a9d565b611792565b6040516104a4929190613dc3565b34801561084357600080fd5b506104c3610852366004613862565b6117d3565b34801561086357600080fd5b5061047661185a565b34801561087857600080fd5b506104766108873660046139c9565b61188e565b34801561089857600080fd5b506108ac6108a7366004613a28565b6119a3565b6040516104a4929190613df1565b3480156108c657600080fd5b50610476611acf565b6104766108dd366004613a28565b611b16565b3480156108ee57600080fd5b5060165461049890610100900460ff1681565b34801561090d57600080fd5b5061047661091c366004613862565b611ca5565b34801561092d57600080fd5b506006546001600160a01b031661055f565b34801561094b57600080fd5b506104c366470de4df82000081565b34801561096657600080fd5b50610476610975366004613a9d565b611cf1565b34801561098657600080fd5b50610476610995366004613a41565b611d51565b3480156109a657600080fd5b506104fb611dd7565b3480156109bb57600080fd5b50610476611de6565b3480156109d057600080fd5b506104c3611e28565b3480156109e557600080fd5b506104c36109f4366004613a28565b600c6020526000908152604090205481565b348015610a1257600080fd5b5060095461055f906001600160a01b031681565b610476610a34366004613a28565b611e38565b348015610a4557600080fd5b50610476610a54366004613968565b611f15565b348015610a6557600080fd5b506104c361270f81565b348015610a7b57600080fd5b50610476611fda565b348015610a9057600080fd5b50610476612019565b348015610aa557600080fd5b50610476612066565b348015610aba57600080fd5b5060165461049890640100000000900460ff1681565b348015610adc57600080fd5b50610476610aeb3660046139c9565b6121d6565b348015610afc57600080fd5b506016546104989065010000000000900460ff1681565b348015610b1f57600080fd5b50610476610b2e3660046139c9565b61228d565b348015610b3f57600080fd5b50610476610b4e3660046138ec565b612325565b348015610b5f57600080fd5b506104fb610b6e366004613a28565b61235d565b348015610b7f57600080fd5b5060165461049890600160301b900460ff1681565b348015610ba057600080fd5b506104c3610baf366004613862565b600a6020526000908152604090205481565b348015610bcd57600080fd5b506104c361254c565b348015610be257600080fd5b50610476610bf1366004613a28565b612688565b610476610c04366004613b50565b6126b7565b348015610c1557600080fd5b50601654610498906301000000900460ff1681565b348015610c3657600080fd5b50610476610c453660046139c9565b612863565b348015610c5657600080fd5b50610476610c65366004613a28565b612926565b348015610c7657600080fd5b506104fb612955565b348015610c8b57600080fd5b50610498610c9a36600461387d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610cd457600080fd5b50610476610ce3366004613862565b612964565b348015610cf457600080fd5b506104c360085481565b610476610d0c366004613b50565b6129fc565b6006546001600160a01b03163314610d445760405162461bcd60e51b8152600401610d3b90613eb4565b60405180910390fd5b60135461270f90610d56908390613fdf565b1115610d8f5760405162461bcd60e51b815260206004820152600860248201526713505617d352539560c21b6044820152606401610d3b565b60105460135461012c610da28484613fdf565b1115610de25760405162461bcd60e51b815260206004820152600f60248201526e04558434545445f4149525f44524f5608c1b6044820152606401610d3b565b60005b83811015610e4a5782610df7816140bf565b9350508180610e05906140bf565b925050610e38858583818110610e1d57610e1d61411a565b9050602002016020810190610e329190613862565b83612bb5565b80610e42816140bf565b915050610de5565b506010919091556013555050565b60006001600160e01b031982166380ac58cd60e01b1480610e8957506001600160e01b03198216635b5e139f60e01b145b80610ea457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6006546001600160a01b03163314610ed45760405162461bcd60e51b8152600401610d3b90613eb4565b6016805463ff00000019811663010000009182900460ff1615909102179055565b606060008054610f0490614084565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3090614084565b8015610f7d5780601f10610f5257610100808354040283529160200191610f7d565b820191906000526020600020905b815481529060010190602001808311610f6057829003601f168201915b5050505050905090565b6000610f9282612c56565b610ff35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d3b565b506000908152600460205260409020546001600160a01b031690565b600061101a82611658565b9050806001600160a01b0316836001600160a01b031614156110885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d3b565b336001600160a01b03821614806110a457506110a48133610c9a565b6111165760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d3b565b6111208383612c73565b505050565b6006546001600160a01b0316331461114f5760405162461bcd60e51b8152600401610d3b90613eb4565b6016805465ff0000000000198116650100000000009182900460ff1615909102179055565b600080601760009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156111c557600080fd5b505afa1580156111d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fd9190613b9c565b5050509150506000601660079054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561125357600080fd5b505afa158015611267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128b9190613b9c565b505050909213159392505050565b6112a33382612ce1565b6112bf5760405162461bcd60e51b8152600401610d3b90613f64565b611120838383612dcb565b6006546001600160a01b031633146112f45760405162461bcd60e51b8152600401610d3b90613eb4565b601955565b6006546001600160a01b031633146113235760405162461bcd60e51b8152600401610d3b90613eb4565b60165460ff16611346576016805463ffffff001916905561134261254c565b6015555b565b60008160405160200161135b9190613cb2565b60405160208183030381529060405280519060200120836040516020016113829190613cb2565b6040516020818303038152906040528051906020012014905092915050565b6006546001600160a01b031633146113cb5760405162461bcd60e51b8152600401610d3b90613eb4565b6009546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611404573d6000803e3d6000fd5b50565b61112083838360405180602001604052806000815250612325565b601754600160a01b900460ff16156114925760405162461bcd60e51b815260206004820152602d60248201527f466c697070656e696e67206f747465722073686f756c64206f6e6c792062652060448201526c61737369676e6564206f6e636560981b6064820152608401610d3b565b61149a611174565b6114fa5760405162461bcd60e51b815260206004820152602b60248201527f466c697070656e696e67206576656e74206d757374206861766520616c72656160448201526a191e481a185c1c195b995960aa1b6064820152608401610d3b565b6017805460ff60a01b1916600160a01b179055601354429060009061151f9083612f6b565b90505b600061152d82611658565b6001600160a01b0316141561155c5781611546816140bf565b92505061155560135483612f6b565b9050611522565b61157a61156882611658565b61157561270f6001613fdf565b612fc7565b61158761270f6001613fdf565b600c600061159861270f6001613fdf565b815260208101919091526040016000205550505050565b6006546001600160a01b031633146115d95760405162461bcd60e51b8152600401610d3b90613eb4565b6016805462ff0000198116620100009182900460ff1615909102179055565b6006546001600160a01b031633146116225760405162461bcd60e51b8152600401610d3b90613eb4565b601654600160301b900460ff161561164c5760405162461bcd60e51b8152600401610d3b90613ee9565b611120600f8383613639565b6000818152600260205260408120546001600160a01b031680610ea45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d3b565b6006546001600160a01b031633146116f95760405162461bcd60e51b8152600401610d3b90613eb4565b60005b818110156111205760008383838181106117185761171861411a565b905060200201602081019061172d9190613862565b90506001600160a01b0381166117555760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b0381166000908152600a60205260408120805491611779836140bf565b919050555050808061178a906140bf565b9150506116fc565b601754600090606090600160a81b900460ff1680156117bb5750601754600160a01b900460ff16155b80156117ca57506117ca611174565b91509250929050565b60006001600160a01b03821661183e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d3b565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146118845760405162461bcd60e51b8152600401610d3b90613eb4565b6113466000612fe1565b6006546001600160a01b031633146118b85760405162461bcd60e51b8152600401610d3b90613eb4565b60005b818110156111205760008383838181106118d7576118d761411a565b90506020020160208101906118ec9190613862565b90506001600160a01b0381166119145760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b0381166000908152600b602052604090205460ff161561196f5760405162461bcd60e51b815260206004820152600f60248201526e4455504c49434154455f454e54525960881b6044820152606401610d3b565b6001600160a01b03166000908152600b60205260409020805460ff191660011790558061199b816140bf565b9150506118bb565b600d602052600090815260409020805481906119be90614084565b80601f01602080910402602001604051908101604052809291908181526020018280546119ea90614084565b8015611a375780601f10611a0c57610100808354040283529160200191611a37565b820191906000526020600020905b815481529060010190602001808311611a1a57829003601f168201915b505050505090806001018054611a4c90614084565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7890614084565b8015611ac55780601f10611a9a57610100808354040283529160200191611ac5565b820191906000526020600020905b815481529060010190602001808311611aa857829003601f168201915b5050505050905082565b6006546001600160a01b03163314611af95760405162461bcd60e51b8152600401610d3b90613eb4565b6016805461ff001981166101009182900460ff1615909102179055565b601654610100900460ff16611b5e5760405162461bcd60e51b815260206004820152600e60248201526d14149154d0531157d0d313d4d15160921b6044820152606401610d3b565b60135460125461270f611b718484613fdf565b1115611b8f5760405162461bcd60e51b8152600401610d3b90613e8e565b61012c611b9c8483613fdf565b1115611bdb5760405162461bcd60e51b815260206004820152600e60248201526d4558434545445f5052495641544560901b6044820152606401610d3b565b336000908152600b602052604090205460ff16611c295760405162461bcd60e51b815260206004820152600c60248201526b4e4f545f454c494749424c4560a01b6044820152606401610d3b565b34611c3b84662386f26fc1000061400b565b1115611c595760405162461bcd60e51b8152600401610d3b90613fb5565b60005b83811015611c9b5781611c6e816140bf565b9250508280611c7c906140bf565b935050611c893384612bb5565b80611c93816140bf565b915050611c5c565b5060125560135550565b6006546001600160a01b03163314611ccf5760405162461bcd60e51b8152600401610d3b90613eb4565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314611d1b5760405162461bcd60e51b8152600401610d3b90613eb4565b601654600160301b900460ff1615611d455760405162461bcd60e51b8152600401610d3b90613ee9565b611120600e8383613639565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614611dc95760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610d3b565b611dd38282613033565b5050565b606060018054610f0490614084565b6006546001600160a01b03163314611e105760405162461bcd60e51b8152600401610d3b90613eb4565b6016805466ff0000000000001916600160301b179055565b611e3561270f6001613fdf565b81565b6016546301000000900460ff16611e7f5760405162461bcd60e51b815260206004820152600b60248201526a14d0531157d0d313d4d15160aa1b6044820152606401610d3b565b60135461270f611e8f8383613fdf565b1115611ead5760405162461bcd60e51b8152600401610d3b90613e8e565b3482600854611ebc919061400b565b1115611eda5760405162461bcd60e51b8152600401610d3b90613fb5565b60005b82811015611f0e5781611eef816140bf565b925050611efc3383612bb5565b80611f06816140bf565b915050611edd565b5060135550565b6001600160a01b038216331415611f6e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d3b565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b031633146120045760405162461bcd60e51b8152600401610d3b90613eb4565b6017805460ff60a81b1916600160a81b179055565b6006546001600160a01b031633146120435760405162461bcd60e51b8152600401610d3b90613eb4565b6016805464ff000000001981166401000000009182900460ff1615909102179055565b60165462010000900460ff166120b15760405162461bcd60e51b815260206004820152601060248201526f11d2559157d055d05657d0d313d4d15160821b6044820152606401610d3b565b61270f60135460016120c39190613fdf565b11156120e15760405162461bcd60e51b8152600401610d3b90613e8e565b6101f460115460016120f39190613fdf565b11156121345760405162461bcd60e51b815260206004820152601060248201526f4558434545445f474956455f4157415960801b6044820152606401610d3b565b336000908152600a60205260409020546121805760405162461bcd60e51b815260206004820152600d60248201526c1393d517d45550531251925151609a1b6044820152606401610d3b565b60118054906000612190836140bf565b9091555050336000908152600a602052604081208054916121b08361406d565b9091555050601380549060006121c5836140bf565b919050555061134633601354612bb5565b6006546001600160a01b031633146122005760405162461bcd60e51b8152600401610d3b90613eb4565b60005b8181101561112057600083838381811061221f5761221f61411a565b90506020020160208101906122349190613862565b90506001600160a01b03811661225c5760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b03166000908152600b60205260409020805460ff1916905580612285816140bf565b915050612203565b6006546001600160a01b031633146122b75760405162461bcd60e51b8152600401610d3b90613eb4565b60005b81811015611120576122e38383838181106122d7576122d761411a565b90506020020135613063565b600c60008484848181106122f9576122f961411a565b90506020020135815260200190815260200160002060009055808061231d906140bf565b9150506122ba565b61232f3383612ce1565b61234b5760405162461bcd60e51b8152600401610d3b90613f64565b612357848484846130fe565b50505050565b606061236882612c56565b6123845760405162461bcd60e51b8152600401610d3b90613f2d565b6000828152600c60205260409020546123e95760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f74207175657279206e6f6e2d6578697374656e7420696d616765496044820152601960fa1b6064820152608401610d3b565b60165460009060ff161561244357506000828152600c602052604090205461241461270f6001613fdf565b83146124435761270f6014548261242b9190613fdf565b61243591906140da565b612440906001613fdf565b90505b6000600f61245083613131565b604051602001612461929190613d2a565b60408051601f198184030181529181526000868152600d6020522080549192509061248b90614084565b1590506124c6576000848152600d602090815260409182902091516124b4928492909101613cf7565b60405160208183030381529060405290505b6000848152600d6020526040902060010180546124e290614084565b1590506125235780600d6000868152602001908152602001600020600101604051602001612511929190613cf7565b60405160208183030381529060405290505b806040516020016125349190613cce565b60408051601f19818403018152919052949350505050565b6006546000906001600160a01b031633146125795760405162461bcd60e51b8152600401610d3b90613eb4565b6019546040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b1580156125db57600080fd5b505afa1580156125ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126139190613b37565b10156126755760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b6064820152608401610d3b565b61268360185460195461322f565b905090565b6006546001600160a01b031633146126b25760405162461bcd60e51b8152600401610d3b90613eb4565b600855565b6126c083612c56565b6126dc5760405162461bcd60e51b8152600401610d3b90613f2d565b60165465010000000000900460ff166127375760405162461bcd60e51b815260206004820152601e60248201527f57696e67206368616e67657320617265206e6f7420617661696c61626c6500006044820152606401610d3b565b3361274184611658565b6001600160a01b0316146127a15760405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920746f6b656e206f776e65722063616e206368616e67652077696e676044820152607360f81b6064820152608401610d3b565b60006127f083838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081529250611348915050565b9050808061280557503466470de4df82000011155b6128215760405162461bcd60e51b8152600401610d3b90613fb5565b8015612843576000848152600d6020526040812061283e916136bd565b612357565b6000848152600d6020526040902061285c908484613639565b5050505050565b6006546001600160a01b0316331461288d5760405162461bcd60e51b8152600401610d3b90613eb4565b60005b818110156111205760008383838181106128ac576128ac61411a565b90506020020160208101906128c19190613862565b90506001600160a01b0381166128e95760405162461bcd60e51b8152600401610d3b90613e16565b6001600160a01b0381166000908152600a6020526040812080549161290d8361406d565b919050555050808061291e906140bf565b915050612890565b6006546001600160a01b031633146129505760405162461bcd60e51b8152600401610d3b90613eb4565b601855565b6060600e8054610f0490614084565b6006546001600160a01b0316331461298e5760405162461bcd60e51b8152600401610d3b90613eb4565b6001600160a01b0381166129f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d3b565b61140481612fe1565b612a0583612c56565b612a215760405162461bcd60e51b8152600401610d3b90613f2d565b601654640100000000900460ff16612a875760405162461bcd60e51b815260206004820152602360248201527f436f6d70616e696f6e206368616e67657320617265206e6f7420617661696c61604482015262626c6560e81b6064820152608401610d3b565b33612a9184611658565b6001600160a01b031614612af65760405162461bcd60e51b815260206004820152602660248201527f4f6e6c7920746f6b656e206f776e65722063616e206368616e676520636f6d70604482015265616e696f6e7360d01b6064820152608401610d3b565b6000612b4583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081529250611348915050565b90508080612b5a57503466470de4df82000011155b612b765760405162461bcd60e51b8152600401610d3b90613fb5565b8015612b99576000848152600d6020526040812061283e916001909101906136bd565b6000848152600d6020526040902061285c906001018484613639565b60165460ff1615612c135760405162461bcd60e51b815260206004820152602260248201527f46616972206d696e74696e672068617320616c726561647920636f6d706c6574604482015261195960f21b6064820152608401610d3b565b6000612c1e826133ba565b9050612c2a8383612fc7565b6000828152600c6020526040808220839055828252902082905561270f821415611120576111206112f9565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ca882611658565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612cec82612c56565b612d4d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d3b565b6000612d5883611658565b9050806001600160a01b0316846001600160a01b03161480612d935750836001600160a01b0316612d8884610f87565b6001600160a01b0316145b80612dc357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612dde82611658565b6001600160a01b031614612e465760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610d3b565b6001600160a01b038216612ea85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d3b565b612eb3600082612c73565b6001600160a01b0383166000908152600360205260408120805460019290612edc90849061402a565b90915550506001600160a01b0382166000908152600360205260408120805460019290612f0a908490613fdf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b601354601a54604080516020808201869052338284015260608201949094526080808201939093528151808203909301835260a00190528051910120600090612fb59084906140da565b612fc0906001613fdf565b9392505050565b611dd38282604051806020016040528060008152506133c6565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b81601554141561305d576016805460ff1916600117905561305661270f826140da565b6014555050565b601a5550565b600061306e82611658565b905061307b600083612c73565b6001600160a01b03811660009081526003602052604081208054600192906130a490849061402a565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b613109848484612dcb565b613115848484846133f9565b6123575760405162461bcd60e51b8152600401610d3b90613e3c565b6060816131555750506040805180820190915260018152600360fc1b602082015290565b8160005b811561317f5780613169816140bf565b91506131789050600a83613ff7565b9150613159565b60008167ffffffffffffffff81111561319a5761319a614130565b6040519080825280601f01601f1916602001820160405280156131c4576020820181803683370190505b5090505b8415612dc3576131d960018361402a565b91506131e6600a866140da565b6131f1906030613fdf565b60f81b8183815181106132065761320661411a565b60200101906001600160f81b031916908160001a905350613228600a86613ff7565b94506131c8565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79528486600060405160200161329f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016132cc93929190613d9c565b602060405180830381600087803b1580156132e657600080fd5b505af11580156132fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061331e9190613a0b565b50600083815260076020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a09091019092528151918301919091209387905291905261337a906001613fdf565b600085815260076020526040902055612dc38482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000610ea48242612f6b565b6133d08383613506565b6133dd60008484846133f9565b6111205760405162461bcd60e51b8152600401610d3b90613e3c565b60006001600160a01b0384163b156134fb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061343d903390899088908890600401613d5f565b602060405180830381600087803b15801561345757600080fd5b505af1925050508015613487575060408051601f3d908101601f1916820190925261348491810190613a80565b60015b6134e1573d8080156134b5576040519150601f19603f3d011682016040523d82523d6000602084013e6134ba565b606091505b5080516134d95760405162461bcd60e51b8152600401610d3b90613e3c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612dc3565b506001949350505050565b6001600160a01b03821661355c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d3b565b61356581612c56565b156135b25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d3b565b6001600160a01b03821660009081526003602052604081208054600192906135db908490613fdf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461364590614084565b90600052602060002090601f01602090048101928261366757600085556136ad565b82601f106136805782800160ff198235161785556136ad565b828001600101855582156136ad579182015b828111156136ad578235825591602001919060010190613692565b506136b99291506136f3565b5090565b5080546136c990614084565b6000825580601f106136d9575050565b601f01602090049060005260206000209081019061140491905b5b808211156136b957600081556001016136f4565b600067ffffffffffffffff8084111561372357613723614130565b604051601f8501601f19908116603f0116810190828211818310171561374b5761374b614130565b8160405280935085815286868601111561376457600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461379557600080fd5b919050565b60008083601f8401126137ac57600080fd5b50813567ffffffffffffffff8111156137c457600080fd5b6020830191508360208260051b85010111156137df57600080fd5b9250929050565b60008083601f8401126137f857600080fd5b50813567ffffffffffffffff81111561381057600080fd5b6020830191508360208285010111156137df57600080fd5b600082601f83011261383957600080fd5b612fc083833560208501613708565b805169ffffffffffffffffffff8116811461379557600080fd5b60006020828403121561387457600080fd5b612fc08261377e565b6000806040838503121561389057600080fd5b6138998361377e565b91506138a76020840161377e565b90509250929050565b6000806000606084860312156138c557600080fd5b6138ce8461377e565b92506138dc6020850161377e565b9150604084013590509250925092565b6000806000806080858703121561390257600080fd5b61390b8561377e565b93506139196020860161377e565b925060408501359150606085013567ffffffffffffffff81111561393c57600080fd5b8501601f8101871361394d57600080fd5b61395c87823560208401613708565b91505092959194509250565b6000806040838503121561397b57600080fd5b6139848361377e565b9150602083013561399481614146565b809150509250929050565b600080604083850312156139b257600080fd5b6139bb8361377e565b946020939093013593505050565b600080602083850312156139dc57600080fd5b823567ffffffffffffffff8111156139f357600080fd5b6139ff8582860161379a565b90969095509350505050565b600060208284031215613a1d57600080fd5b8151612fc081614146565b600060208284031215613a3a57600080fd5b5035919050565b60008060408385031215613a5457600080fd5b50508035926020909101359150565b600060208284031215613a7557600080fd5b8135612fc081614154565b600060208284031215613a9257600080fd5b8151612fc081614154565b60008060208385031215613ab057600080fd5b823567ffffffffffffffff811115613ac757600080fd5b6139ff858286016137e6565b60008060408385031215613ae657600080fd5b823567ffffffffffffffff80821115613afe57600080fd5b613b0a86838701613828565b93506020850135915080821115613b2057600080fd5b50613b2d85828601613828565b9150509250929050565b600060208284031215613b4957600080fd5b5051919050565b600080600060408486031215613b6557600080fd5b83359250602084013567ffffffffffffffff811115613b8357600080fd5b613b8f868287016137e6565b9497909650939450505050565b600080600080600060a08688031215613bb457600080fd5b613bbd86613848565b9450602086015193506040860151925060608601519150613be060808701613848565b90509295509295909350565b60008151808452613c04816020860160208601614041565b601f01601f19169290920160200192915050565b8054600090600181811c9080831680613c3257607f831692505b6020808410821415613c5457634e487b7160e01b600052602260045260246000fd5b818015613c685760018114613c7957613ca6565b60ff19861689528489019650613ca6565b60008881526020902060005b86811015613c9e5781548b820152908501908301613c85565b505084890196505b50505050505092915050565b60008251613cc4818460208701614041565b9190910192915050565b60008251613ce0818460208701614041565b64173539b7b760d91b920191825250600501919050565b60008351613d09818460208801614041565b605f60f81b908301908152613d216001820185613c18565b95945050505050565b6000613d368285613c18565b8351613d46818360208801614041565b642f6261736560d81b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d9290830184613bec565b9695505050505050565b60018060a01b0384168152826020820152606060408201526000613d216060830184613bec565b8215158152604060208201526000612dc36040830184613bec565b602081526000612fc06020830184613bec565b604081526000613e046040830185613bec565b8281036020840152613d218185613bec565b6020808252600c908201526b4e554c4c5f4144445245535360a01b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600c908201526b4f55545f4f465f53544f434b60a01b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f436f6e7472616374206d65746164617461206d6574686f647320617265206c6f60408201526318dad95960e21b606082015260800190565b6020808252601f908201527f43616e6e6f74207175657279206e6f6e2d6578697374656e7420746f6b656e00604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526010908201526f0929ca6aa8c8c9286928a9ca8be8aa8960831b604082015260600190565b60008219821115613ff257613ff26140ee565b500190565b60008261400657614006614104565b500490565b6000816000190483118215151615614025576140256140ee565b500290565b60008282101561403c5761403c6140ee565b500390565b60005b8381101561405c578181015183820152602001614044565b838111156123575750506000910152565b60008161407c5761407c6140ee565b506000190190565b600181811c9082168061409857607f821691505b602082108114156140b957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156140d3576140d36140ee565b5060010190565b6000826140e9576140e9614104565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461140457600080fd5b6001600160e01b03198116811461140457600080fdfea2646970667358221220ce5b947953102c547a527648cd76ecacd690208405054bde4184ff6ddd542b2464736f6c63430008070033

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

000000000000000000000000aa2fe1324b84981832aafcf7dc6e6fe6cf12428300000000000000000000000047e1e89570689c13e723819bf633548d611d630c000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000

-----Decoded View---------------
Arg [0] : ethFeed (address): 0xAA2FE1324b84981832AafCf7Dc6E6Fe6cF124283
Arg [1] : btcFeed (address): 0x47E1e89570689c13E723819bf633548d611D630C
Arg [2] : vrfLinkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [3] : vrfCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [4] : keyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [5] : linkFee (uint256): 2000000000000000000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000aa2fe1324b84981832aafcf7dc6e6fe6cf124283
Arg [1] : 00000000000000000000000047e1e89570689c13e723819bf633548d611d630c
Arg [2] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [3] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [4] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [5] : 0000000000000000000000000000000000000000000000001bc16d674ec80000


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.