ETH Price: $3,088.99 (-2.96%)

Token

OnChainKevin (DERP)
 

Overview

Max Total Supply

574 DERP

Holders

104

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
10 DERP
0x373f28531e700b21376f54708476f96af227b405
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:
OnChainKevin

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

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

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./OnChainKevinLib.sol";
import "./interfaces/IOnChainKevinRenderer.sol";


//  ______     __   __     ______     __  __     ______     __     __   __     __  __     ______     __   __   __     __   __    
// /\  __ \   /\ "-.\ \   /\  ___\   /\ \_\ \   /\  __ \   /\ \   /\ "-.\ \   /\ \/ /    /\  ___\   /\ \ / /  /\ \   /\ "-.\ \   
// \ \ \/\ \  \ \ \-.  \  \ \ \____  \ \  __ \  \ \  __ \  \ \ \  \ \ \-.  \  \ \  _"-.  \ \  __\   \ \ \'/   \ \ \  \ \ \-.  \  
//  \ \_____\  \ \_\\"\_\  \ \_____\  \ \_\ \_\  \ \_\ \_\  \ \_\  \ \_\\"\_\  \ \_\ \_\  \ \_____\  \ \__|    \ \_\  \ \_\\"\_\ 
//   \/_____/   \/_/ \/_/   \/_____/   \/_/\/_/   \/_/\/_/   \/_/   \/_/ \/_/   \/_/\/_/   \/_____/   \/_/      \/_/   \/_/ \/_/ 


contract OnChainKevin is ERC721Enumerable, ReentrancyGuard {
    using OnChainKevinLib for uint8;
    using Counters for Counters.Counter;
    Counters.Counter private tokenIds;

    mapping(string => bool) internal hashToMinted;
    mapping(uint256 => string) internal _tokenIdToHash;
    mapping(address => uint256) public addressMintedCounts;

    address public renderingContractAddress;

    //uint256s
    uint256 SEED_NONCE = 0;

    uint256 private constant MAX_KEVINS = 2000;
    uint256 private constant V1_FOUNDER_KEVINS = 50;
    uint256 private constant MAX_PUBLIC_MINT = MAX_KEVINS - V1_FOUNDER_KEVINS;
    uint256 private constant NUM_LAYERS = 9;
    string[] private TRAIT_INDEX_NAME = [
        "Lasers",
        "Head Accessory",
        "Mouth",
        "Face Accessory",
        "Eyes",
        "Nose",
        "Shirt",
        "Skin",
        "Background"
    ];

    string public baseURI = "https://onchainkevin.com/api/v3/";
    uint256 internal v1PublicKevins = 519;
    uint256 internal maxPerAddress = 5;
    uint16[][NUM_LAYERS] private TIERS;
    bool public isMintingPaused = true;
    address _owner;

    constructor() ERC721("OnChainKevin", "DERP") {
        _owner = msg.sender;

        // *SHOUTOUT* to Anonymice and Chain Runners for the inspiration.

        //Lasers
        TIERS[0] = [2, 5, 10, 30, 40, 50, 1863];
        //Head Accessory
        TIERS[1] = [10, 15, 20, 35, 50, 60, 65, 70, 75, 80, 90, 95, 150, 170, 180, 190, 200, 215, 230];
        //Mouth
        TIERS[2] = [40, 80, 100, 120, 160, 200, 250, 300, 350, 400];
        //Face Accessory
        TIERS[3] = [10, 15, 20, 35, 50, 60, 70, 75, 80, 110, 115, 160, 220, 230, 240, 250, 260];
        //Eyes
        TIERS[4] = [200, 250, 280, 290, 300, 330, 350];
        //Nose
        TIERS[5] = [200, 300, 400, 500, 600];
        //Shirt
        TIERS[6] = [40, 45, 55, 65, 80, 85, 95, 100, 110, 115, 120, 150, 220, 230, 240, 250];
        //Skin
        TIERS[7] = [50, 750, 1200];
        //Background
        TIERS[8] = [10, 80, 100, 180, 200, 210, 220, 230, 240, 260, 270];
    }

    modifier whenPublicMintActive() {
        require(isPublicMintActive(), "Public sale not open");
        _;
    }

/*
  __  __ _     _   _             ___             _   _             
 |  \/  (_)_ _| |_(_)_ _  __ _  | __|  _ _ _  __| |_(_)___ _ _  ___
 | |\/| | | ' \  _| | ' \/ _` | | _| || | ' \/ _|  _| / _ \ ' \(_-<
 |_|  |_|_|_||_\__|_|_||_\__, | |_| \_,_|_||_\__|\__|_\___/_||_/__/
                         |___/                                     
*/

    function rarityGen(uint256 _randinput, uint8 _rarityTier)
        internal
        view
        returns (uint8)
    {
        uint16 currentLowerBound = 0;
        for (uint8 i = 0; i < TIERS[_rarityTier].length; i++) {
            uint16 thisPercentage = TIERS[_rarityTier][i];
            if (
                _randinput >= currentLowerBound &&
                _randinput < currentLowerBound + thisPercentage
            ) return i;
            currentLowerBound = currentLowerBound + thisPercentage;
        }

        revert();
    }

    function hash(
        uint256 _t,
        address _a,
        uint256 _c
    ) internal returns (string memory) {
        require(_c < 19, "Too many layers");

        // This will generate a 18 character string.
        string memory currentHash = "";

        for (uint8 i = 0; i < NUM_LAYERS; i++) {
            SEED_NONCE++;
            uint16 _randinput = uint16(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            block.timestamp,
                            block.difficulty,
                            _t,
                            _a,
                            _c,
                            SEED_NONCE
                        )
                    )
                ) % MAX_KEVINS
            );

            uint8 rarity = rarityGen(_randinput, i);

            if (rarity < 10) {
                currentHash = string(
                    abi.encodePacked(currentHash, "0", rarity)
                );
            } else {
                currentHash = string(
                    abi.encodePacked(currentHash, rarity)
                );
            }

        }

        if (hashToMinted[currentHash]) return hash(_t, _a, _c + 1);

        return currentHash;
    }

    function mint(uint256 tokenId) internal {
        _tokenIdToHash[tokenId] = hash(tokenId, msg.sender, 0);
        hashToMinted[_tokenIdToHash[tokenId]] = true;

        _safeMint(msg.sender, tokenId);
    }

    function mintKevin(uint256 _count) external whenPublicMintActive returns (uint256, uint256) {
        require(_count > 0, "Invalid Kevin count");
        require(tokenIds.current() + v1PublicKevins + _count <= MAX_PUBLIC_MINT, "All OnChainKevins are gone");

        uint256 userMintedAmount = addressMintedCounts[msg.sender] + _count;
        require(userMintedAmount <= maxPerAddress, "Exceeded max mints allowed.");

        uint256 firstMintedId = tokenIds.current() + v1PublicKevins + 1;

        for (uint256 i = 0; i < _count; i++) {
            tokenIds.increment();
            mint(tokenIds.current() + v1PublicKevins);
        }

        addressMintedCounts[msg.sender] = userMintedAmount;
        return (firstMintedId, _count);
    }

/*
 ____     ___   ____  ___        _____  __ __  ____     __ ______  ____  ___   ____   _____
|    \   /  _] /    ||   \      |     ||  |  ||    \   /  ]      ||    |/   \ |    \ / ___/
|  D  ) /  [_ |  o  ||    \     |   __||  |  ||  _  | /  /|      | |  ||     ||  _  (   \_ 
|    / |    _]|     ||  D  |    |  |_  |  |  ||  |  |/  / |_|  |_| |  ||  O  ||  |  |\__  |
|    \ |   [_ |  _  ||     |    |   _] |  :  ||  |  /   \_  |  |   |  ||     ||  |  |/  \ |
|  .  \|     ||  |  ||     |    |  |   |     ||  |  \     | |  |   |  ||     ||  |  |\    |
|__|\_||_____||__|__||_____|    |__|    \__,_||__|__|\____| |__|  |____|\___/ |__|__| \___|

*/

    function isPublicMintActive() public view returns (bool) {
        return tokenIds.current() + v1PublicKevins + V1_FOUNDER_KEVINS < MAX_PUBLIC_MINT && isMintingPaused == false;
    }

    function hashToSVG(string memory _hash)
        public
        view
        returns (string memory)
    {
        if (renderingContractAddress == address(0)) {
            return '';
        }

        IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress);
        return renderer.hashToSVG(_hash);
    }

    function hashToMetadata(string memory _hash)
        public
        view
        returns (string memory)
    {
        if (renderingContractAddress == address(0)) {
            return '';
        }

        IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress);
        return renderer.hashToMetadata(_hash);
    }

    function tokenURI(uint256 _tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(_exists(_tokenId), "Invalid token");
        if (_tokenId > v1PublicKevins && _tokenId <= MAX_KEVINS - V1_FOUNDER_KEVINS) {
            return string(abi.encodePacked(baseURI, OnChainKevinLib.toString(_tokenId), "?dna=", _tokenIdToHash[_tokenId]));
        }

        if (renderingContractAddress == address(0)) {
            return '';
        }

        IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress);
        return string(abi.encodePacked(baseURI, OnChainKevinLib.toString(_tokenId), "?dna=", renderer._tokenIdToHash(_tokenId)));
    }

    function tokenIdToHash(uint256 _tokenId)
        public
        view
        returns (string memory)
    {
        if (_tokenId > v1PublicKevins && _tokenId <= MAX_KEVINS - V1_FOUNDER_KEVINS) {
            return _tokenIdToHash[_tokenId];
        }

        if (renderingContractAddress == address(0)) {
            return '';
        }

        IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress);
        return renderer._tokenIdToHash(_tokenId);
    }

    function walletOfOwner(address _wallet)
        public
        view
        returns (uint256[] memory)
    {
        uint256 tokenCount = balanceOf(_wallet);

        uint256[] memory tokensId = new uint256[](tokenCount);
        for (uint256 i; i < tokenCount; i++) {
            tokensId[i] = tokenOfOwnerByIndex(_wallet, i);
        }
        return tokensId;
    }

    /*

  ___   __    __  ____     ___  ____       _____  __ __  ____     __ ______  ____  ___   ____   _____
 /   \ |  |__|  ||    \   /  _]|    \     |     ||  |  ||    \   /  ]      ||    |/   \ |    \ / ___/
|     ||  |  |  ||  _  | /  [_ |  D  )    |   __||  |  ||  _  | /  /|      | |  ||     ||  _  (   \_ 
|  O  ||  |  |  ||  |  ||    _]|    /     |  |_  |  |  ||  |  |/  / |_|  |_| |  ||  O  ||  |  |\__  |
|     ||  `  '  ||  |  ||   [_ |    \     |   _] |  :  ||  |  /   \_  |  |   |  ||     ||  |  |/  \ |
|     | \      / |  |  ||     ||  .  \    |  |   |     ||  |  \     | |  |   |  ||     ||  |  |\    |
 \___/   \_/\_/  |__|__||_____||__|\_|    |__|    \__,_||__|__|\____| |__|  |____|\___/ |__|__| \___|

    */

    function setRenderingContractAddress(address _renderingContractAddress) external onlyOwner {
        renderingContractAddress = _renderingContractAddress;
    }

    function changeMaxPerAddress(uint256 _maxPerAddress) external onlyOwner {
        maxPerAddress = _maxPerAddress;
    }

    function changeBaseURI(string memory _baseURI) external onlyOwner {
        baseURI = _baseURI;
    }

    function changeV1PublicKevins(uint256 _v1PublicKevins) external onlyOwner {
        v1PublicKevins = _v1PublicKevins;
    }

    function airdropKevins(address[] memory _to, uint256[] memory _tokenIds, string[] memory _hashes)
        external
        onlyOwner
    returns (uint256) {
        uint256 length = _to.length;
        for (uint256 i = 0; i < length; i++) {
            hashToMinted[_hashes[i]] = true;
            _mint(_to[i], _tokenIds[i]);
        }

        return length;
    }

    function toggleMinting() external onlyOwner {
        isMintingPaused = !isMintingPaused;
    }

    function transferOwnership(address _newOwner) external onlyOwner {
        _owner = _newOwner;
    }

    modifier onlyOwner() {
        require(_owner == msg.sender);
        _;
    }

    function withdraw() external onlyOwner nonReentrant {
        (bool success,) = msg.sender.call{value : address(this).balance}('');
        require(success, "Withdrawal failed");
    }
}

File 2 of 16 : IOnChainKevinRenderer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

interface IOnChainKevinRenderer {
    function _tokenIdToHash(uint256 tokenId) external view returns (string memory);
    function hashToSVG(string memory _hash) external view returns (string memory);
    function hashToMetadata(string memory _hash) external view returns (string memory);
}

File 3 of 16 : OnChainKevinLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

library OnChainKevinLib {
    string internal constant TABLE =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return "";

        // load the table into memory
        string memory table = TABLE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                dataPtr := add(dataPtr, 3)

                // read 3 bytes
                let input := mload(dataPtr)

                // write 4 characters
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
                mstore(
                    resultPtr,
                    shl(248, mload(add(tablePtr, and(input, 0x3F))))
                )
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }
        }

        return result;
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        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);
    }

    function parseInt(string memory _a)
        internal
        pure
        returns (uint8 _parsedInt)
    {
        bytes memory bresult = bytes(_a);
        uint8 mint = 0;
        for (uint8 i = 0; i < bresult.length; i++) {
            if (
                (uint8(uint8(bresult[i])) >= 48) &&
                (uint8(uint8(bresult[i])) <= 57)
            ) {
                mint *= 10;
                mint += uint8(bresult[i]) - 48;
            }
        }
        return mint;
    }

    function _substring(
        string memory str,
        uint256 startIndex,
        uint256 endIndex
    ) internal pure returns (string memory) {
        bytes memory strBytes = bytes(str);
        bytes memory result = new bytes(endIndex - startIndex);
        for (uint256 i = startIndex; i < endIndex; i++) {
            result[i - startIndex] = strBytes[i];
        }
        return string(result);
    }

    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;
    }
}

File 4 of 16 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 6 of 16 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 8 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

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 {
        _setApprovalForAll(_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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

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

File 9 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressMintedCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_hashes","type":"string[]"}],"name":"airdropKevins","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"changeBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerAddress","type":"uint256"}],"name":"changeMaxPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_v1PublicKevins","type":"uint256"}],"name":"changeV1PublicKevins","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"hashToMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"hashToSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"mintKevin","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderingContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_renderingContractAddress","type":"address"}],"name":"setRenderingContractAddress","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":"toggleMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600060105560066101a0908152654c617365727360d01b6101c0526080908152600e6101e08181526d48656164204163636573736f727960901b6102005260a05260056102208181526409adeeae8d60db1b6102405260c0526102609182526d46616365204163636573736f727960901b6102805260e09190915260046102a0818152634579657360e01b6102c052610100526102e0818152634e6f736560e01b61030052610120526103209182526414da1a5c9d60da1b61034052610140919091526103609081526329b5b4b760e11b61038052610160526103e0604052600a6103a090815269109858dad9dc9bdd5b9960b21b6103c052610180526200010c906011906009620005bf565b506040805180820190915260208082527f68747470733a2f2f6f6e636861696e6b6576696e2e636f6d2f6170692f76332f918101918252620001519160129162000623565b506102076013556005601455601e805460ff191660011790553480156200017757600080fd5b50604080518082018252600c81526b27b721b430b4b725b2bb34b760a11b6020808301918252835180850190945260048452630444552560e41b908401528151919291620001c89160009162000623565b508051620001de90600190602084019062000623565b50506001600a908155601e8054610100600160a81b03191633610100021781556040805160e081018252600281526005602082015290810192909252606082015260286080820152603260a082015261074760c08201526200024691506015906007620006ae565b506040805161026081018252600a8152600f60208201526014918101919091526023606082015260326080820152603c60a0820152604160c0820152604660e0820152604b6101008201526050610120820152605a610140820152605f610160820152609661018082015260aa6101a082015260b46101c082015260be6101e082015260c861020082015260d761022082015260e6610240820152620002f190601690601362000759565b50604080516101408101825260288152605060208201526064918101919091526078606082015260a06080820181905260c89082015260fa60c082015261012c60e082015261015e6101008201526101906101208201526200035890601790600a620006ae565b506040805161022081018252600a8152600f60208201526014918101919091526023606082015260326080820152603c60a080830191909152604660c0830152604b60e08301526050610100830152606e610120830152607361014083015261016082015260dc61018082015260e66101a082015260f06101c082015260fa6101e0820152610104610200820152620003f6906018906011620006ae565b506040805160e08101825260c8815260fa602082015261011891810191909152610122606082015261012c608082015261014a60a082015261015e60c082015262000446906019906007620006ae565b506040805160a08101825260c8815261012c6020820152610190918101919091526101f4606082015261025860808201526200048790601a906005620006ae565b50604080516102008101825260288152602d60208201526037918101919091526041606082015260506080820152605560a0820152605f60c0820152606460e0820152606e61010082015260736101208201526078610140820152609661016082015260dc61018082015260e66101a082015260f06101c082015260fa6101e08201526200051a90601b90601062000759565b5060408051606081018252603281526102ee60208201526104b0918101919091526200054b90601c906003620006ae565b506040805161016081018252600a81526050602082015260649181019190915260b4606082015260c8608082015260d260a082015260dc60c082015260e660e082015260f061010082015261010461012082015261010e610140820152620005b890601d90600b620006ae565b506200087b565b82805482825590600052602060002090810192821562000611579160200282015b828111156200061157825180516200060091849160209091019062000623565b5091602001919060010190620005e0565b506200061f929150620007c4565b5090565b82805462000631906200083e565b90600052602060002090601f016020900481019282620006555760008555620006a0565b82601f106200067057805160ff1916838001178555620006a0565b82800160010185558215620006a0579182015b82811115620006a057825182559160200191906001019062000683565b506200061f929150620007e5565b82805482825590600052602060002090600f01601090048101928215620006a05791602002820160005b838211156200071a57835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302620006d8565b80156200074a5782816101000a81549061ffff02191690556002016020816001010492830192600103026200071a565b50506200061f929150620007e5565b82805482825590600052602060002090600f01601090048101928215620006a05791602002820160005b838211156200071a57835183826101000a81548161ffff021916908360ff160217905550926020019260020160208160010104928301926001030262000783565b808211156200061f576000620007db8282620007fc565b50600101620007c4565b5b808211156200061f5760008155600101620007e6565b5080546200080a906200083e565b6000825580601f106200081b575050565b601f0160209004906000526020600020908101906200083b9190620007e5565b50565b600181811c908216806200085357607f821691505b602082108114156200087557634e487b7160e01b600052602260045260246000fd5b50919050565b612c14806200088b6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80636352211e1161011a578063b51a1e75116100ad578063c973abd31161007c578063c973abd314610447578063e96978f51461045a578063e985e9c51461047a578063f1b46738146104b6578063f2fde38b146104c957600080fd5b8063b51a1e75146103e6578063b88d4fde1461040e578063c074f41214610421578063c87b56dd1461043457600080fd5b80637d55094d116100e95780637d55094d146103b057806389ce3074146103b857806395d89b41146103cb578063a22cb465146103d357600080fd5b80636352211e1461036f57806366e33870146103825780636c0360eb1461039557806370a082311461039d57600080fd5b80632e105b421161019d57806342842e0e1161016c57806342842e0e14610303578063438b6300146103165780634f6ccce714610336578063579d9b4014610349578063621a1f741461035c57600080fd5b80632e105b42146102c85780632f745c59146102d557806339a0c6f9146102e85780633ccfd60b146102fb57600080fd5b806312b40a9f116101d957806312b40a9f1461028857806318160ddd1461029b57806323b872dd146102ad5780632d6b6224146102c057600080fd5b806301ffc9a71461020b57806306fdde0314610233578063081812fc14610248578063095ea7b314610273575b600080fd5b61021e610219366004612213565b6104dc565b60405190151581526020015b60405180910390f35b61023b610507565b60405161022a9190612288565b61025b61025636600461229b565b610599565b6040516001600160a01b03909116815260200161022a565b6102866102813660046122d0565b610633565b005b6102866102963660046122fa565b610749565b6008545b60405190815260200161022a565b6102866102bb366004612315565b610787565b61021e6107b8565b601e5461021e9060ff1681565b61029f6102e33660046122d0565b6107fe565b6102866102f636600461241e565b610894565b6102866108c7565b610286610311366004612315565b6109cf565b6103296103243660046122fa565b6109ea565b60405161022a9190612453565b61029f61034436600461229b565b610a8c565b61028661035736600461229b565b610b1f565b61023b61036a36600461229b565b610b40565b61025b61037d36600461229b565b610c9f565b61023b61039036600461241e565b610d16565b61023b610d6f565b61029f6103ab3660046122fa565b610dfd565b610286610e84565b61023b6103c636600461241e565b610eb4565b61023b610f0d565b6102866103e1366004612497565b610f1c565b6103f96103f436600461229b565b610f27565b6040805192835260208301919091520161022a565b61028661041c3660046124d3565b61112e565b600f5461025b906001600160a01b031681565b61023b61044236600461229b565b611166565b61029f610455366004612659565b6112f0565b61029f6104683660046122fa565b600e6020526000908152604090205481565b61021e61048836600461273d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102866104c436600461229b565b6113c3565b6102866104d73660046122fa565b6113e4565b60006001600160e01b0319821663780e9d6360e01b1480610501575061050182611428565b92915050565b60606000805461051690612770565b80601f016020809104026020016040519081016040528092919081815260200182805461054290612770565b801561058f5780601f106105645761010080835404028352916020019161058f565b820191906000526020600020905b81548152906001019060200180831161057257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106175760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061063e82610c9f565b9050806001600160a01b0316836001600160a01b031614156106ac5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161060e565b336001600160a01b03821614806106c857506106c88133610488565b61073a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161060e565b6107448383611478565b505050565b601e5461010090046001600160a01b0316331461076557600080fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b61079133826114e6565b6107ad5760405162461bcd60e51b815260040161060e906127ab565b6107448383836115dd565b60006107c760326107d0612812565b60326013546107d5600b5490565b6107df9190612829565b6107e99190612829565b1080156107f95750601e5460ff16155b905090565b600061080983610dfd565b821061086b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161060e565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b601e5461010090046001600160a01b031633146108b057600080fd5b80516108c3906012906020840190612164565b5050565b601e5461010090046001600160a01b031633146108e357600080fd5b6002600a5414156109365760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161060e565b6002600a55604051600090339047908381818185875af1925050503d806000811461097d576040519150601f19603f3d011682016040523d82523d6000602084013e610982565b606091505b50509050806109c75760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b604482015260640161060e565b506001600a55565b6107448383836040518060200160405280600081525061112e565b606060006109f783610dfd565b905060008167ffffffffffffffff811115610a1457610a14612351565b604051908082528060200260200182016040528015610a3d578160200160208202803683370190505b50905060005b82811015610a8457610a5585826107fe565b828281518110610a6757610a67612841565b602090810291909101015280610a7c81612857565b915050610a43565b509392505050565b6000610a9760085490565b8210610afa5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161060e565b60088281548110610b0d57610b0d612841565b90600052602060002001549050919050565b601e5461010090046001600160a01b03163314610b3b57600080fd5b601455565b606060135482118015610b5f5750610b5b60326107d0612812565b8211155b15610c02576000828152600d602052604090208054610b7d90612770565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba990612770565b8015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b50505050509050919050565b600f546001600160a01b0316610c2657505060408051602081019091526000815290565b600f54604051625ea30760e01b8152600481018490526001600160a01b03909116908190625ea307906024015b600060405180830381865afa158015610c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c989190810190612872565b9392505050565b6000818152600260205260408120546001600160a01b0316806105015760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161060e565b600f546060906001600160a01b0316610d3d57505060408051602081019091526000815290565b600f5460405163066e338760e41b81526001600160a01b039091169081906366e3387090610c53908690600401612288565b60128054610d7c90612770565b80601f0160208091040260200160405190810160405280929190818152602001828054610da890612770565b8015610df55780601f10610dca57610100808354040283529160200191610df5565b820191906000526020600020905b815481529060010190602001808311610dd857829003601f168201915b505050505081565b60006001600160a01b038216610e685760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161060e565b506001600160a01b031660009081526003602052604090205490565b601e5461010090046001600160a01b03163314610ea057600080fd5b601e805460ff19811660ff90911615179055565b600f546060906001600160a01b0316610edb57505060408051602081019091526000815290565b600f546040516322738c1d60e21b81526001600160a01b039091169081906389ce307490610c53908690600401612288565b60606001805461051690612770565b6108c3338383611784565b600080610f326107b8565b610f755760405162461bcd60e51b8152602060048201526014602482015273283ab13634b19039b0b632903737ba1037b832b760611b604482015260640161060e565b60008311610fbb5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590812d95d9a5b8818dbdd5b9d606a1b604482015260640161060e565b610fc860326107d0612812565b83601354610fd5600b5490565b610fdf9190612829565b610fe99190612829565b11156110375760405162461bcd60e51b815260206004820152601a60248201527f416c6c204f6e436861696e4b6576696e732061726520676f6e65000000000000604482015260640161060e565b336000908152600e6020526040812054611052908590612829565b90506014548111156110a65760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206d6178206d696e747320616c6c6f7765642e0000000000604482015260640161060e565b60006013546110b4600b5490565b6110be9190612829565b6110c9906001612829565b905060005b85811015611114576110e4600b80546001019055565b6111026013546110f3600b5490565b6110fd9190612829565b611853565b8061110c81612857565b9150506110ce565b50336000908152600e602052604090209190915593915050565b61113833836114e6565b6111545760405162461bcd60e51b815260040161060e906127ab565b611160848484846118d4565b50505050565b6000818152600260205260409020546060906001600160a01b03166111bd5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640161060e565b601354821180156111da57506111d660326107d0612812565b8211155b156112215760126111ea83611907565b6000848152600d6020908152604091829020915161120b9493929101612983565b6040516020818303038152906040529050919050565b600f546001600160a01b031661124557505060408051602081019091526000815290565b600f546001600160a01b0316601261125c84611907565b604051625ea30760e01b8152600481018690526001600160a01b03841690625ea30790602401600060405180830381865afa15801561129f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112c79190810190612872565b6040516020016112d9939291906129c4565b604051602081830303815290604052915050919050565b601e5460009061010090046001600160a01b0316331461130f57600080fd5b835160005b818110156113ba576001600c85838151811061133257611332612841565b60200260200101516040516113479190612a0e565b908152602001604051809103902060006101000a81548160ff0219169083151502179055506113a886828151811061138157611381612841565b602002602001015186838151811061139b5761139b612841565b6020026020010151611a05565b806113b281612857565b915050611314565b50949350505050565b601e5461010090046001600160a01b031633146113df57600080fd5b601355565b601e5461010090046001600160a01b0316331461140057600080fd5b601e80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061145957506001600160e01b03198216635b5e139f60e01b145b8061050157506301ffc9a760e01b6001600160e01b0319831614610501565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114ad82610c9f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661155f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161060e565b600061156a83610c9f565b9050806001600160a01b0316846001600160a01b031614806115a55750836001600160a01b031661159a84610599565b6001600160a01b0316145b806115d557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166115f082610c9f565b6001600160a01b0316146116545760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161060e565b6001600160a01b0382166116b65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161060e565b6116c1838383611b53565b6116cc600082611478565b6001600160a01b03831660009081526003602052604081208054600192906116f5908490612812565b90915550506001600160a01b0382166000908152600360205260408120805460019290611723908490612829565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b031614156117e65760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161060e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61185f81336000611c0b565b6000828152600d6020908152604090912082516118829391929190910190612164565b506001600c600d60008481526020019081526020016000206040516118a79190612a2a565b908152604051908190036020019020805491151560ff199092169190911790556118d13382611dba565b50565b6118df8484846115dd565b6118eb84848484611dd4565b6111605760405162461bcd60e51b815260040161060e90612a36565b60608161192b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611955578061193f81612857565b915061194e9050600a83612a9e565b915061192f565b60008167ffffffffffffffff81111561197057611970612351565b6040519080825280601f01601f19166020018201604052801561199a576020820181803683370190505b5090505b84156115d5576119af600183612812565b91506119bc600a86612ab2565b6119c7906030612829565b60f81b8183815181106119dc576119dc612841565b60200101906001600160f81b031916908160001a9053506119fe600a86612a9e565b945061199e565b6001600160a01b038216611a5b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161060e565b6000818152600260205260409020546001600160a01b031615611ac05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161060e565b611acc60008383611b53565b6001600160a01b0382166000908152600360205260408120805460019290611af5908490612829565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316611bae57611ba981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611bd1565b816001600160a01b0316836001600160a01b031614611bd157611bd18382611ed2565b6001600160a01b038216611be85761074481611f6f565b826001600160a01b0316826001600160a01b03161461074457610744828261201e565b606060138210611c4f5760405162461bcd60e51b815260206004820152600f60248201526e546f6f206d616e79206c617965727360881b604482015260640161060e565b604080516020810190915260008082525b60098160ff161015611d745760108054906000611c7c83612857565b9091555050601054604080514260208201524491810191909152606080820189905287901b6bffffffffffffffffffffffff191660808201526094810186905260b48101919091526000906107d09060d4016040516020818303038152906040528051906020012060001c611cf19190612ab2565b90506000611d038261ffff1684612062565b9050600a8160ff161015611d3a578381604051602001611d24929190612ac6565b6040516020818303038152906040529350611d5f565b8381604051602001611d4d929190612b00565b60405160208183030381529060405293505b50508080611d6c90612b32565b915050611c60565b50600c81604051611d859190612a0e565b9081526040519081900360200190205460ff16156115d557611db28585611dad866001612829565b611c0b565b915050610c98565b6108c3828260405180602001604052806000815250612131565b60006001600160a01b0384163b15611ec757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e18903390899088908890600401612b52565b6020604051808303816000875af1925050508015611e53575060408051601f3d908101601f19168201909252611e5091810190612b85565b60015b611ead573d808015611e81576040519150601f19603f3d011682016040523d82523d6000602084013e611e86565b606091505b508051611ea55760405162461bcd60e51b815260040161060e90612a36565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115d5565b506001949350505050565b60006001611edf84610dfd565b611ee99190612812565b600083815260076020526040902054909150808214611f3c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611f8190600190612812565b60008381526009602052604081205460088054939450909284908110611fa957611fa9612841565b906000526020600020015490508060088381548110611fca57611fca612841565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061200257612002612ba2565b6001900381819060005260206000200160009055905550505050565b600061202983610dfd565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600080805b60158460ff166009811061207d5761207d612841565b015460ff8216101561212b57600060158560ff16600981106120a1576120a1612841565b018260ff16815481106120b6576120b6612841565b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff1686101580156120fc57506120f58184612bb8565b61ffff1686105b1561210b575091506105019050565b6121158184612bb8565b925050808061212390612b32565b915050612067565b50600080fd5b61213b8383611a05565b6121486000848484611dd4565b6107445760405162461bcd60e51b815260040161060e90612a36565b82805461217090612770565b90600052602060002090601f01602090048101928261219257600085556121d8565b82601f106121ab57805160ff19168380011785556121d8565b828001600101855582156121d8579182015b828111156121d85782518255916020019190600101906121bd565b506121e49291506121e8565b5090565b5b808211156121e457600081556001016121e9565b6001600160e01b0319811681146118d157600080fd5b60006020828403121561222557600080fd5b8135610c98816121fd565b60005b8381101561224b578181015183820152602001612233565b838111156111605750506000910152565b60008151808452612274816020860160208601612230565b601f01601f19169290920160200192915050565b602081526000610c98602083018461225c565b6000602082840312156122ad57600080fd5b5035919050565b80356001600160a01b03811681146122cb57600080fd5b919050565b600080604083850312156122e357600080fd5b6122ec836122b4565b946020939093013593505050565b60006020828403121561230c57600080fd5b610c98826122b4565b60008060006060848603121561232a57600080fd5b612333846122b4565b9250612341602085016122b4565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561239057612390612351565b604052919050565b600067ffffffffffffffff8211156123b2576123b2612351565b50601f01601f191660200190565b60006123d36123ce84612398565b612367565b90508281528383830111156123e757600080fd5b828260208301376000602084830101529392505050565b600082601f83011261240f57600080fd5b610c98838335602085016123c0565b60006020828403121561243057600080fd5b813567ffffffffffffffff81111561244757600080fd5b6115d5848285016123fe565b6020808252825182820181905260009190848201906040850190845b8181101561248b5783518352928401929184019160010161246f565b50909695505050505050565b600080604083850312156124aa57600080fd5b6124b3836122b4565b9150602083013580151581146124c857600080fd5b809150509250929050565b600080600080608085870312156124e957600080fd5b6124f2856122b4565b9350612500602086016122b4565b925060408501359150606085013567ffffffffffffffff81111561252357600080fd5b8501601f8101871361253457600080fd5b612543878235602084016123c0565b91505092959194509250565b600067ffffffffffffffff82111561256957612569612351565b5060051b60200190565b600082601f83011261258457600080fd5b813560206125946123ce8361254f565b82815260059290921b840181019181810190868411156125b357600080fd5b8286015b848110156125ce57803583529183019183016125b7565b509695505050505050565b600082601f8301126125ea57600080fd5b813560206125fa6123ce8361254f565b82815260059290921b8401810191818101908684111561261957600080fd5b8286015b848110156125ce57803567ffffffffffffffff81111561263d5760008081fd5b61264b8986838b01016123fe565b84525091830191830161261d565b60008060006060848603121561266e57600080fd5b833567ffffffffffffffff8082111561268657600080fd5b818601915086601f83011261269a57600080fd5b813560206126aa6123ce8361254f565b82815260059290921b8401810191818101908a8411156126c957600080fd5b948201945b838610156126ee576126df866122b4565b825294820194908201906126ce565b9750508701359250508082111561270457600080fd5b61271087838801612573565b9350604086013591508082111561272657600080fd5b50612733868287016125d9565b9150509250925092565b6000806040838503121561275057600080fd5b612759836122b4565b9150612767602084016122b4565b90509250929050565b600181811c9082168061278457607f821691505b602082108114156127a557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015612824576128246127fc565b500390565b6000821982111561283c5761283c6127fc565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561286b5761286b6127fc565b5060010190565b60006020828403121561288457600080fd5b815167ffffffffffffffff81111561289b57600080fd5b8201601f810184136128ac57600080fd5b80516128ba6123ce82612398565b8181528560208385010111156128cf57600080fd5b6128e0826020830160208601612230565b95945050505050565b8054600090600181811c908083168061290357607f831692505b602080841082141561292557634e487b7160e01b600052602260045260246000fd5b818015612939576001811461294a57612977565b60ff19861689528489019650612977565b60008881526020902060005b8681101561296f5781548b820152908501908301612956565b505084890196505b50505050505092915050565b600061298f82866128e9565b845161299f818360208901612230565b643f646e613d60d81b91019081526129ba60058201856128e9565b9695505050505050565b60006129d082866128e9565b84516129e0818360208901612230565b643f646e613d60d81b91019081528351612a01816005840160208801612230565b0160050195945050505050565b60008251612a20818460208701612230565b9190910192915050565b6000610c9882846128e9565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612aad57612aad612a88565b500490565b600082612ac157612ac1612a88565b500690565b60008351612ad8818460208801612230565b600360fc1b92019182525060f89190911b6001600160f81b0319166001820152600201919050565b60008351612b12818460208801612230565b60f89390931b6001600160f81b0319169190920190815260010192915050565b600060ff821660ff811415612b4957612b496127fc565b60010192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906129ba9083018461225c565b600060208284031215612b9757600080fd5b8151610c98816121fd565b634e487b7160e01b600052603160045260246000fd5b600061ffff808316818516808303821115612bd557612bd56127fc565b0194935050505056fea2646970667358221220ef9921019563103194efce0da84b6cc3d798534bef40edcee3f0d151d24b893664736f6c634300080c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636352211e1161011a578063b51a1e75116100ad578063c973abd31161007c578063c973abd314610447578063e96978f51461045a578063e985e9c51461047a578063f1b46738146104b6578063f2fde38b146104c957600080fd5b8063b51a1e75146103e6578063b88d4fde1461040e578063c074f41214610421578063c87b56dd1461043457600080fd5b80637d55094d116100e95780637d55094d146103b057806389ce3074146103b857806395d89b41146103cb578063a22cb465146103d357600080fd5b80636352211e1461036f57806366e33870146103825780636c0360eb1461039557806370a082311461039d57600080fd5b80632e105b421161019d57806342842e0e1161016c57806342842e0e14610303578063438b6300146103165780634f6ccce714610336578063579d9b4014610349578063621a1f741461035c57600080fd5b80632e105b42146102c85780632f745c59146102d557806339a0c6f9146102e85780633ccfd60b146102fb57600080fd5b806312b40a9f116101d957806312b40a9f1461028857806318160ddd1461029b57806323b872dd146102ad5780632d6b6224146102c057600080fd5b806301ffc9a71461020b57806306fdde0314610233578063081812fc14610248578063095ea7b314610273575b600080fd5b61021e610219366004612213565b6104dc565b60405190151581526020015b60405180910390f35b61023b610507565b60405161022a9190612288565b61025b61025636600461229b565b610599565b6040516001600160a01b03909116815260200161022a565b6102866102813660046122d0565b610633565b005b6102866102963660046122fa565b610749565b6008545b60405190815260200161022a565b6102866102bb366004612315565b610787565b61021e6107b8565b601e5461021e9060ff1681565b61029f6102e33660046122d0565b6107fe565b6102866102f636600461241e565b610894565b6102866108c7565b610286610311366004612315565b6109cf565b6103296103243660046122fa565b6109ea565b60405161022a9190612453565b61029f61034436600461229b565b610a8c565b61028661035736600461229b565b610b1f565b61023b61036a36600461229b565b610b40565b61025b61037d36600461229b565b610c9f565b61023b61039036600461241e565b610d16565b61023b610d6f565b61029f6103ab3660046122fa565b610dfd565b610286610e84565b61023b6103c636600461241e565b610eb4565b61023b610f0d565b6102866103e1366004612497565b610f1c565b6103f96103f436600461229b565b610f27565b6040805192835260208301919091520161022a565b61028661041c3660046124d3565b61112e565b600f5461025b906001600160a01b031681565b61023b61044236600461229b565b611166565b61029f610455366004612659565b6112f0565b61029f6104683660046122fa565b600e6020526000908152604090205481565b61021e61048836600461273d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102866104c436600461229b565b6113c3565b6102866104d73660046122fa565b6113e4565b60006001600160e01b0319821663780e9d6360e01b1480610501575061050182611428565b92915050565b60606000805461051690612770565b80601f016020809104026020016040519081016040528092919081815260200182805461054290612770565b801561058f5780601f106105645761010080835404028352916020019161058f565b820191906000526020600020905b81548152906001019060200180831161057257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106175760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061063e82610c9f565b9050806001600160a01b0316836001600160a01b031614156106ac5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161060e565b336001600160a01b03821614806106c857506106c88133610488565b61073a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161060e565b6107448383611478565b505050565b601e5461010090046001600160a01b0316331461076557600080fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b61079133826114e6565b6107ad5760405162461bcd60e51b815260040161060e906127ab565b6107448383836115dd565b60006107c760326107d0612812565b60326013546107d5600b5490565b6107df9190612829565b6107e99190612829565b1080156107f95750601e5460ff16155b905090565b600061080983610dfd565b821061086b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161060e565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b601e5461010090046001600160a01b031633146108b057600080fd5b80516108c3906012906020840190612164565b5050565b601e5461010090046001600160a01b031633146108e357600080fd5b6002600a5414156109365760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161060e565b6002600a55604051600090339047908381818185875af1925050503d806000811461097d576040519150601f19603f3d011682016040523d82523d6000602084013e610982565b606091505b50509050806109c75760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b604482015260640161060e565b506001600a55565b6107448383836040518060200160405280600081525061112e565b606060006109f783610dfd565b905060008167ffffffffffffffff811115610a1457610a14612351565b604051908082528060200260200182016040528015610a3d578160200160208202803683370190505b50905060005b82811015610a8457610a5585826107fe565b828281518110610a6757610a67612841565b602090810291909101015280610a7c81612857565b915050610a43565b509392505050565b6000610a9760085490565b8210610afa5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161060e565b60088281548110610b0d57610b0d612841565b90600052602060002001549050919050565b601e5461010090046001600160a01b03163314610b3b57600080fd5b601455565b606060135482118015610b5f5750610b5b60326107d0612812565b8211155b15610c02576000828152600d602052604090208054610b7d90612770565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba990612770565b8015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b50505050509050919050565b600f546001600160a01b0316610c2657505060408051602081019091526000815290565b600f54604051625ea30760e01b8152600481018490526001600160a01b03909116908190625ea307906024015b600060405180830381865afa158015610c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c989190810190612872565b9392505050565b6000818152600260205260408120546001600160a01b0316806105015760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161060e565b600f546060906001600160a01b0316610d3d57505060408051602081019091526000815290565b600f5460405163066e338760e41b81526001600160a01b039091169081906366e3387090610c53908690600401612288565b60128054610d7c90612770565b80601f0160208091040260200160405190810160405280929190818152602001828054610da890612770565b8015610df55780601f10610dca57610100808354040283529160200191610df5565b820191906000526020600020905b815481529060010190602001808311610dd857829003601f168201915b505050505081565b60006001600160a01b038216610e685760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161060e565b506001600160a01b031660009081526003602052604090205490565b601e5461010090046001600160a01b03163314610ea057600080fd5b601e805460ff19811660ff90911615179055565b600f546060906001600160a01b0316610edb57505060408051602081019091526000815290565b600f546040516322738c1d60e21b81526001600160a01b039091169081906389ce307490610c53908690600401612288565b60606001805461051690612770565b6108c3338383611784565b600080610f326107b8565b610f755760405162461bcd60e51b8152602060048201526014602482015273283ab13634b19039b0b632903737ba1037b832b760611b604482015260640161060e565b60008311610fbb5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590812d95d9a5b8818dbdd5b9d606a1b604482015260640161060e565b610fc860326107d0612812565b83601354610fd5600b5490565b610fdf9190612829565b610fe99190612829565b11156110375760405162461bcd60e51b815260206004820152601a60248201527f416c6c204f6e436861696e4b6576696e732061726520676f6e65000000000000604482015260640161060e565b336000908152600e6020526040812054611052908590612829565b90506014548111156110a65760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206d6178206d696e747320616c6c6f7765642e0000000000604482015260640161060e565b60006013546110b4600b5490565b6110be9190612829565b6110c9906001612829565b905060005b85811015611114576110e4600b80546001019055565b6111026013546110f3600b5490565b6110fd9190612829565b611853565b8061110c81612857565b9150506110ce565b50336000908152600e602052604090209190915593915050565b61113833836114e6565b6111545760405162461bcd60e51b815260040161060e906127ab565b611160848484846118d4565b50505050565b6000818152600260205260409020546060906001600160a01b03166111bd5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640161060e565b601354821180156111da57506111d660326107d0612812565b8211155b156112215760126111ea83611907565b6000848152600d6020908152604091829020915161120b9493929101612983565b6040516020818303038152906040529050919050565b600f546001600160a01b031661124557505060408051602081019091526000815290565b600f546001600160a01b0316601261125c84611907565b604051625ea30760e01b8152600481018690526001600160a01b03841690625ea30790602401600060405180830381865afa15801561129f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112c79190810190612872565b6040516020016112d9939291906129c4565b604051602081830303815290604052915050919050565b601e5460009061010090046001600160a01b0316331461130f57600080fd5b835160005b818110156113ba576001600c85838151811061133257611332612841565b60200260200101516040516113479190612a0e565b908152602001604051809103902060006101000a81548160ff0219169083151502179055506113a886828151811061138157611381612841565b602002602001015186838151811061139b5761139b612841565b6020026020010151611a05565b806113b281612857565b915050611314565b50949350505050565b601e5461010090046001600160a01b031633146113df57600080fd5b601355565b601e5461010090046001600160a01b0316331461140057600080fd5b601e80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061145957506001600160e01b03198216635b5e139f60e01b145b8061050157506301ffc9a760e01b6001600160e01b0319831614610501565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114ad82610c9f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661155f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161060e565b600061156a83610c9f565b9050806001600160a01b0316846001600160a01b031614806115a55750836001600160a01b031661159a84610599565b6001600160a01b0316145b806115d557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166115f082610c9f565b6001600160a01b0316146116545760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161060e565b6001600160a01b0382166116b65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161060e565b6116c1838383611b53565b6116cc600082611478565b6001600160a01b03831660009081526003602052604081208054600192906116f5908490612812565b90915550506001600160a01b0382166000908152600360205260408120805460019290611723908490612829565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b031614156117e65760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161060e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61185f81336000611c0b565b6000828152600d6020908152604090912082516118829391929190910190612164565b506001600c600d60008481526020019081526020016000206040516118a79190612a2a565b908152604051908190036020019020805491151560ff199092169190911790556118d13382611dba565b50565b6118df8484846115dd565b6118eb84848484611dd4565b6111605760405162461bcd60e51b815260040161060e90612a36565b60608161192b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611955578061193f81612857565b915061194e9050600a83612a9e565b915061192f565b60008167ffffffffffffffff81111561197057611970612351565b6040519080825280601f01601f19166020018201604052801561199a576020820181803683370190505b5090505b84156115d5576119af600183612812565b91506119bc600a86612ab2565b6119c7906030612829565b60f81b8183815181106119dc576119dc612841565b60200101906001600160f81b031916908160001a9053506119fe600a86612a9e565b945061199e565b6001600160a01b038216611a5b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161060e565b6000818152600260205260409020546001600160a01b031615611ac05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161060e565b611acc60008383611b53565b6001600160a01b0382166000908152600360205260408120805460019290611af5908490612829565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316611bae57611ba981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611bd1565b816001600160a01b0316836001600160a01b031614611bd157611bd18382611ed2565b6001600160a01b038216611be85761074481611f6f565b826001600160a01b0316826001600160a01b03161461074457610744828261201e565b606060138210611c4f5760405162461bcd60e51b815260206004820152600f60248201526e546f6f206d616e79206c617965727360881b604482015260640161060e565b604080516020810190915260008082525b60098160ff161015611d745760108054906000611c7c83612857565b9091555050601054604080514260208201524491810191909152606080820189905287901b6bffffffffffffffffffffffff191660808201526094810186905260b48101919091526000906107d09060d4016040516020818303038152906040528051906020012060001c611cf19190612ab2565b90506000611d038261ffff1684612062565b9050600a8160ff161015611d3a578381604051602001611d24929190612ac6565b6040516020818303038152906040529350611d5f565b8381604051602001611d4d929190612b00565b60405160208183030381529060405293505b50508080611d6c90612b32565b915050611c60565b50600c81604051611d859190612a0e565b9081526040519081900360200190205460ff16156115d557611db28585611dad866001612829565b611c0b565b915050610c98565b6108c3828260405180602001604052806000815250612131565b60006001600160a01b0384163b15611ec757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e18903390899088908890600401612b52565b6020604051808303816000875af1925050508015611e53575060408051601f3d908101601f19168201909252611e5091810190612b85565b60015b611ead573d808015611e81576040519150601f19603f3d011682016040523d82523d6000602084013e611e86565b606091505b508051611ea55760405162461bcd60e51b815260040161060e90612a36565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115d5565b506001949350505050565b60006001611edf84610dfd565b611ee99190612812565b600083815260076020526040902054909150808214611f3c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611f8190600190612812565b60008381526009602052604081205460088054939450909284908110611fa957611fa9612841565b906000526020600020015490508060088381548110611fca57611fca612841565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061200257612002612ba2565b6001900381819060005260206000200160009055905550505050565b600061202983610dfd565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600080805b60158460ff166009811061207d5761207d612841565b015460ff8216101561212b57600060158560ff16600981106120a1576120a1612841565b018260ff16815481106120b6576120b6612841565b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff1686101580156120fc57506120f58184612bb8565b61ffff1686105b1561210b575091506105019050565b6121158184612bb8565b925050808061212390612b32565b915050612067565b50600080fd5b61213b8383611a05565b6121486000848484611dd4565b6107445760405162461bcd60e51b815260040161060e90612a36565b82805461217090612770565b90600052602060002090601f01602090048101928261219257600085556121d8565b82601f106121ab57805160ff19168380011785556121d8565b828001600101855582156121d8579182015b828111156121d85782518255916020019190600101906121bd565b506121e49291506121e8565b5090565b5b808211156121e457600081556001016121e9565b6001600160e01b0319811681146118d157600080fd5b60006020828403121561222557600080fd5b8135610c98816121fd565b60005b8381101561224b578181015183820152602001612233565b838111156111605750506000910152565b60008151808452612274816020860160208601612230565b601f01601f19169290920160200192915050565b602081526000610c98602083018461225c565b6000602082840312156122ad57600080fd5b5035919050565b80356001600160a01b03811681146122cb57600080fd5b919050565b600080604083850312156122e357600080fd5b6122ec836122b4565b946020939093013593505050565b60006020828403121561230c57600080fd5b610c98826122b4565b60008060006060848603121561232a57600080fd5b612333846122b4565b9250612341602085016122b4565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561239057612390612351565b604052919050565b600067ffffffffffffffff8211156123b2576123b2612351565b50601f01601f191660200190565b60006123d36123ce84612398565b612367565b90508281528383830111156123e757600080fd5b828260208301376000602084830101529392505050565b600082601f83011261240f57600080fd5b610c98838335602085016123c0565b60006020828403121561243057600080fd5b813567ffffffffffffffff81111561244757600080fd5b6115d5848285016123fe565b6020808252825182820181905260009190848201906040850190845b8181101561248b5783518352928401929184019160010161246f565b50909695505050505050565b600080604083850312156124aa57600080fd5b6124b3836122b4565b9150602083013580151581146124c857600080fd5b809150509250929050565b600080600080608085870312156124e957600080fd5b6124f2856122b4565b9350612500602086016122b4565b925060408501359150606085013567ffffffffffffffff81111561252357600080fd5b8501601f8101871361253457600080fd5b612543878235602084016123c0565b91505092959194509250565b600067ffffffffffffffff82111561256957612569612351565b5060051b60200190565b600082601f83011261258457600080fd5b813560206125946123ce8361254f565b82815260059290921b840181019181810190868411156125b357600080fd5b8286015b848110156125ce57803583529183019183016125b7565b509695505050505050565b600082601f8301126125ea57600080fd5b813560206125fa6123ce8361254f565b82815260059290921b8401810191818101908684111561261957600080fd5b8286015b848110156125ce57803567ffffffffffffffff81111561263d5760008081fd5b61264b8986838b01016123fe565b84525091830191830161261d565b60008060006060848603121561266e57600080fd5b833567ffffffffffffffff8082111561268657600080fd5b818601915086601f83011261269a57600080fd5b813560206126aa6123ce8361254f565b82815260059290921b8401810191818101908a8411156126c957600080fd5b948201945b838610156126ee576126df866122b4565b825294820194908201906126ce565b9750508701359250508082111561270457600080fd5b61271087838801612573565b9350604086013591508082111561272657600080fd5b50612733868287016125d9565b9150509250925092565b6000806040838503121561275057600080fd5b612759836122b4565b9150612767602084016122b4565b90509250929050565b600181811c9082168061278457607f821691505b602082108114156127a557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015612824576128246127fc565b500390565b6000821982111561283c5761283c6127fc565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561286b5761286b6127fc565b5060010190565b60006020828403121561288457600080fd5b815167ffffffffffffffff81111561289b57600080fd5b8201601f810184136128ac57600080fd5b80516128ba6123ce82612398565b8181528560208385010111156128cf57600080fd5b6128e0826020830160208601612230565b95945050505050565b8054600090600181811c908083168061290357607f831692505b602080841082141561292557634e487b7160e01b600052602260045260246000fd5b818015612939576001811461294a57612977565b60ff19861689528489019650612977565b60008881526020902060005b8681101561296f5781548b820152908501908301612956565b505084890196505b50505050505092915050565b600061298f82866128e9565b845161299f818360208901612230565b643f646e613d60d81b91019081526129ba60058201856128e9565b9695505050505050565b60006129d082866128e9565b84516129e0818360208901612230565b643f646e613d60d81b91019081528351612a01816005840160208801612230565b0160050195945050505050565b60008251612a20818460208701612230565b9190910192915050565b6000610c9882846128e9565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612aad57612aad612a88565b500490565b600082612ac157612ac1612a88565b500690565b60008351612ad8818460208801612230565b600360fc1b92019182525060f89190911b6001600160f81b0319166001820152600201919050565b60008351612b12818460208801612230565b60f89390931b6001600160f81b0319169190920190815260010192915050565b600060ff821660ff811415612b4957612b496127fc565b60010192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906129ba9083018461225c565b600060208284031215612b9757600080fd5b8151610c98816121fd565b634e487b7160e01b600052603160045260246000fd5b600061ffff808316818516808303821115612bd557612bd56127fc565b0194935050505056fea2646970667358221220ef9921019563103194efce0da84b6cc3d798534bef40edcee3f0d151d24b893664736f6c634300080c0033

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.