ETH Price: $3,342.34 (-1.04%)
Gas: 6.99 Gwei

Token

CoolNouns (COOL)
 

Overview

Max Total Supply

91 COOL

Holders

9

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
passme.eth
Balance
1 COOL
0x2227de445Dbfd90712C48bCD74D492CccA1Cb242
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:
CoolNouns

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 19 : NounsToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title The Cool DAO ERC-721 token

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░████████████░░░░░░░░░░░ *
 * ░░░░░░██████░█░███░░░░░░░░░░░ *
 * ░░░░███████░█░█░██████░░░░░░░ *
 * ░░░████████░░░░░██████░░░░░░░ *
 * ░░░████████████████████████░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/
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;
    }
}


pragma solidity ^0.8.6;

import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { INounsDescriptor } from './interfaces/INounsDescriptor.sol';
import { INounsSeeder } from './interfaces/INounsSeeder.sol';
import { INounsToken } from './interfaces/INounsToken.sol';
import { ERC721 } from '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import { ERC721Enumerable } from '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { IProxyRegistry } from './external/opensea/IProxyRegistry.sol';
import { Strings } from './Strings.sol';
import { Base64 } from 'base64-sol/base64.sol';

contract CoolNouns is INounsToken, Ownable, ERC721Enumerable {
    using Strings for uint256;
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdTracker;
    
    uint256 public price = 25000000000000000; // .02 eth
    uint256 public max_tokens = 2222;
    uint256 public mint_limit= 20;

    string public tokenDescription = 'Nouns are pretty boring, so we made them pretty cool. 8).';

    string public hatSVG = '<rect width="120" height="10" x="50" y="120" fill="#000000"/><rect width="110" height="10" x="170" y="120" fill="#000000"/><rect width="20" height="10" x="50" y="130" fill="#000000"/><rect width="10" height="10" x="70" y="130" fill="#CACACA"/><rect width="10" height="10" x="80" y="130" fill="#000000"/><rect width="10" height="10" x="90" y="130" fill="#CACACA"/><rect width="60" height="10" x="100" y="130" fill="#000000"/><rect width="20" height="10" x="60" y="140" fill="#000000"/><rect width="10" height="10" x="80" y="140" fill="#CACACA"/><rect width="10" height="10" x="90" y="140" fill="#000000"/><rect width="10" height="10" x="100" y="140" fill="#CACACA"/><rect width="50" height="10" x="110" y="140" fill="#000000"/><rect width="20" height="10" x="70" y="150" fill="#000000"/><rect width="10" height="10" x="90" y="150" fill="#CACACA"/><rect width="10" height="10" x="100" y="150" fill="#000000"/><rect width="10" height="10" x="110" y="150" fill="#CACACA"/><rect width="30" height="10" x="120" y="150" fill="#000000"/><rect width="60" height="10" x="80" y="160" fill="#000000"/><rect width="10" height="20" x="170" y="130" fill="#000000"/><rect width="10" height="20" x="180" y="140" fill="#000000"/><rect width="10" height="20" x="190" y="150" fill="#000000"/><rect width="60" height="10" x="190" y="160" fill="#000000"/><rect width="10" height="10" x="180" y="130" fill="#CACACA"/><rect width="10" height="10" x="190" y="130" fill="#000000"/><rect width="10" height="10" x="200" y="130" fill="#CACACA"/><rect width="70" height="10" x="210" y="130" fill="#000000"/><rect width="10" height="10" x="190" y="140" fill="#CACACA"/><rect width="10" height="10" x="200" y="140" fill="#000000"/><rect width="10" height="10" x="210" y="140" fill="#CACACA"/><rect width="50" height="10" x="220" y="140" fill="#000000"/><rect width="10" height="10" x="200" y="150" fill="#CACACA"/><rect width="10" height="10" x="210" y="150" fill="#000000"/><rect width="10" height="10" x="220" y="150" fill="#CACACA"/><rect width="30" height="10" x="230" y="150" fill="#000000"/>';

    // An array of publicly available clothes (SVG snippets)
    string[] public clothingList;

    // Tracks state of clothing per tokenId. Example: Noun #0 is wearing 3 items
    // of clothing at `clothingList` index 4, 9, and 14. This will represented
    // as `clothingState[0][4,9,14]`.
    mapping (uint256 => uint256[]) public clothingState;

    // The Nouns token URI descriptor
    INounsDescriptor public descriptor;

    // The Nouns token seeder
    INounsSeeder public seeder;

    // The Nouns seeds
    mapping(uint256 => INounsSeeder.Seed) public seeds;

    // The internal tokenId tracker
    uint256 private _currentNounId;

    // IPFS content hash of contract-level metadata. For OpenSea description.
    string private _contractURIHash = '';

    // OpenSea's Proxy Registry
    IProxyRegistry public immutable proxyRegistry;

    constructor() ERC721('CoolNouns', 'COOL') {
        // Populate `clothingList`
        clothingList.push(hatSVG);

        // Mainnet addresses
        descriptor = INounsDescriptor(0x0Cfdb3Ba1694c2bb2CFACB0339ad7b1Ae5932B63);
        seeder = INounsSeeder(0xCC8a0FB5ab3C7132c1b2A0109142Fb112c4Ce515);
        proxyRegistry = IProxyRegistry(0xa5409ec958C83C3f309868babACA7c86DCB077c1);

    }

    /**
     * @notice Withdraw contract balance to team.
     */
    function withdrawAll() public {
        uint256 amount = address(this).balance;
        require(payable(owner()).send(amount));
    }

    /**
     * @notice The IPFS URI of contract-level metadata.
     */
    function contractURI() public view returns (string memory) {
        return string(abi.encodePacked('ipfs://', _contractURIHash));
    }

    /**
     * @notice Set the _contractURIHash. For OpenSea collection description.
     * @dev Only callable by the owner.
     */
    function setContractURIHash(string memory newContractURIHash) external onlyOwner {
        _contractURIHash = newContractURIHash;
    }


    /**
     * @notice Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
     */
    function isApprovedForAll(address owner, address operator) public view override(IERC721, ERC721) returns (bool) {
        // Whitelist OpenSea proxy contract for easy trading.
        if (proxyRegistry.proxies(owner) == operator) {
            return true;
        }
        return super.isApprovedForAll(owner, operator);
    }

    /**
     * @notice Mint Nouns to sender
     */
    function mint(uint256 num_tokens) external override payable {

        require (num_tokens<=mint_limit,"minted too many");

        require(num_tokens+totalSupply()<=max_tokens,"exceeds maximum tokens");

        require(msg.value>=num_tokens*price,"not enough ethers sent");

        for (uint256 x=0;x<num_tokens;x++) {
            _mintTo(msg.sender, _currentNounId++);
            _tokenIdTracker.increment();
        }
    }

    function _totalSupply() internal view returns (uint256) {
        return _tokenIdTracker.current();
    }

    /**
     * @notice Burn a Noun.
     */
    function burn(uint256 nounId) public override onlyOwner {
        _burn(nounId);
        emit NounBurned(nounId);
    }

    // Let owner update the description that appears for each Fast Food Noun
    // so we can make it better if we need to.
    function updateTokenDescription(string calldata newDescription) public onlyOwner returns (string memory) {
        tokenDescription = newDescription;
        return 'Description updated';
    }

    /**
     * @notice Compose tokenURI for a Noun. Fetches original SVG, adds clothes.
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), 'nonexistent token');
        string memory NounID = tokenId.toString();
        string memory name = string(abi.encodePacked('CoolNounsDAO ', NounID));
        string memory description = tokenDescription;

        // Fetch the original SVG (base64 encoded) from Nouns descriptor
        string memory SVG = descriptor.generateSVGImage(seeds[tokenId]);
        // Decode base64 SVG into bytes
        bytes memory decodedSVG = Base64.decode(SVG);
        // Remove the SVG closing tag `</svg>`
        string memory substring = removeLastSVGTag(decodedSVG);
        // Encode substring bytes
        bytes memory finalSVGBytes = abi.encodePacked(substring);
        // Loop through clothes for this tokenId and encode them in
        for (uint256 i = 0; i < clothingState[tokenId].length; i++) {
            uint256 clothingIndexToAdd = clothingState[tokenId][i];
            // Encode the clothing bytes for these clothes
            finalSVGBytes = abi.encodePacked(finalSVGBytes, clothingList[clothingIndexToAdd]);
        }
        // Finally, encode the closing SVG tag in
        finalSVGBytes = abi.encodePacked(finalSVGBytes, '</svg>');
        // Rencode SVG to base64
        string memory encodedFinalSVG = Base64.encode(finalSVGBytes);
        // Compose json string
        string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name":"', name, '", "description":"', description, '", "image":"data:image/svg+xml;base64,', encodedFinalSVG, '"}'))));
        return string(abi.encodePacked('data:application/json;base64,', json));
    }

    /**
     * @notice Set the token URI descriptor.
     */
    function setDescriptor(INounsDescriptor _descriptor) external override onlyOwner {
        descriptor = _descriptor;

        emit DescriptorUpdated(_descriptor);
    }

    /**
     * @notice Set the token seeder.
     */
    function setSeeder(INounsSeeder _seeder) external override onlyOwner {
        seeder = _seeder;

        emit SeederUpdated(_seeder);
    }

    /**
     * @notice Mint a Noun with `nounId` to the provided `to` address.
     */
    function _mintTo(address to, uint256 nounId) internal returns (uint256) {
        INounsSeeder.Seed memory seed = seeds[nounId] = seeder.generateSeed(nounId, descriptor);
        _mint(to, nounId);
        // Automatically set new mints as wearing the fast food hat
        clothingState[nounId] = [0];
        emit NounCreated(nounId, seed);

        return nounId;
    }

    // Returns SVG string without the closing tag so we can insert more elements
    function removeLastSVGTag(bytes memory svgBytes) internal pure returns (string memory) {
        // This will be length of svgBytes minus length of svg closing tag `</svg>`
        bytes memory result = new bytes(svgBytes.length - 6);
        for(uint i = 0; i < result.length; i++) {
            result[i] = svgBytes[i];
        }
        return string(result);
    }
    
}

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

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

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

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

        // 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) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, 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;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

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

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // 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, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {

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

}

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

pragma solidity ^0.8.6;

interface IProxyRegistry {
    function proxies(address) external view returns (address);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

File 8 of 19 : INounsToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NounsToken

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { INounsDescriptor } from './INounsDescriptor.sol';
import { INounsSeeder } from './INounsSeeder.sol';

interface INounsToken is IERC721 {
    event NounCreated(uint256 indexed tokenId, INounsSeeder.Seed seed);

    event NounBurned(uint256 indexed tokenId);

    event DescriptorUpdated(INounsDescriptor descriptor);

    event SeederUpdated(INounsSeeder seeder);

    function mint(uint256 num_tokens) external payable;

    function burn(uint256 tokenId) external;

    function setDescriptor(INounsDescriptor descriptor) external;

    function setSeeder(INounsSeeder seeder) external;

}

File 9 of 19 : INounsSeeder.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NounsSeeder

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { INounsDescriptor } from './INounsDescriptor.sol';

interface INounsSeeder {
    struct Seed {
        uint48 background;
        uint48 body;
        uint48 accessory;
        uint48 head;
        uint48 glasses;
    }

    function generateSeed(uint256 nounId, INounsDescriptor descriptor) external view returns (Seed memory);
}

File 10 of 19 : INounsDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NounsDescriptor

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { INounsSeeder } from './INounsSeeder.sol';

interface INounsDescriptor {
    event PartsLocked();

    event DataURIToggled(bool enabled);

    event BaseURIUpdated(string baseURI);

    function arePartsLocked() external returns (bool);

    function isDataURIEnabled() external returns (bool);

    function baseURI() external returns (string memory);

    function palettes(uint8 paletteIndex, uint256 colorIndex) external view returns (string memory);

    function backgrounds(uint256 index) external view returns (string memory);

    function bodies(uint256 index) external view returns (bytes memory);

    function accessories(uint256 index) external view returns (bytes memory);

    function heads(uint256 index) external view returns (bytes memory);

    function glasses(uint256 index) external view returns (bytes memory);

    function backgroundCount() external view returns (uint256);

    function bodyCount() external view returns (uint256);

    function accessoryCount() external view returns (uint256);

    function headCount() external view returns (uint256);

    function glassesCount() external view returns (uint256);

    function addManyColorsToPalette(uint8 paletteIndex, string[] calldata newColors) external;

    function addManyBackgrounds(string[] calldata backgrounds) external;

    function addManyBodies(bytes[] calldata bodies) external;

    function addManyAccessories(bytes[] calldata accessories) external;

    function addManyHeads(bytes[] calldata heads) external;

    function addManyGlasses(bytes[] calldata glasses) external;

    function addColorToPalette(uint8 paletteIndex, string calldata color) external;

    function addBackground(string calldata background) external;

    function addBody(bytes calldata body) external;

    function addAccessory(bytes calldata accessory) external;

    function addHead(bytes calldata head) external;

    function addGlasses(bytes calldata glasses) external;

    function lockParts() external;

    function toggleDataURIEnabled() external;

    function setBaseURI(string calldata baseURI) external;

    function tokenURI(uint256 tokenId, INounsSeeder.Seed memory seed) external view returns (string memory);

    function dataURI(uint256 tokenId, INounsSeeder.Seed memory seed) external view returns (string memory);

    function genericDataURI(
        string calldata name,
        string calldata description,
        INounsSeeder.Seed memory seed
    ) external view returns (string memory);

    function generateSVGImage(INounsSeeder.Seed memory seed) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "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":false,"internalType":"contract INounsDescriptor","name":"descriptor","type":"address"}],"name":"DescriptorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NounBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"indexed":false,"internalType":"struct INounsSeeder.Seed","name":"seed","type":"tuple"}],"name":"NounCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract INounsSeeder","name":"seeder","type":"address"}],"name":"SeederUpdated","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":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nounId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"clothingList","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"clothingState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"contract INounsDescriptor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hatSVG","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":"max_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"num_tokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mint_limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistry","outputs":[{"internalType":"contract IProxyRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seeder","outputs":[{"internalType":"contract INounsSeeder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURIHash","type":"string"}],"name":"setContractURIHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INounsDescriptor","name":"_descriptor","type":"address"}],"name":"setDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INounsSeeder","name":"_seeder","type":"address"}],"name":"setSeeder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenDescription","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":"string","name":"newDescription","type":"string"}],"name":"updateTokenDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6658d15e17628000600c556108ae600d556014600e55610100604052603960a0818152906200431960c03980516200004091600f9160209091019062000244565b5060405180610840016040528061081181526020016200435261081191398051620000749160109160209091019062000244565b50604080516020810191829052600090819052620000959160179162000244565b50348015620000a357600080fd5b5060405180604001604052806009815260200168436f6f6c4e6f756e7360b81b8152506040518060400160405280600481526020016310d3d3d360e21b815250620000fd620000f7620001f060201b60201c565b620001f4565b81516200011290600190602085019062000244565b5080516200012890600290602084019062000244565b505060118054600181018255600091909152601080547f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c6890920192509062000170906200036e565b6200017d929190620002d3565b50601380546001600160a01b0319908116730cfdb3ba1694c2bb2cfacb0339ad7b1ae5932b63179091556014805490911673cc8a0fb5ab3c7132c1b2a0109142fb112c4ce5151790557fa5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000608052620003ab565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000252906200036e565b90600052602060002090601f016020900481019282620002765760008555620002c1565b82601f106200029157805160ff1916838001178555620002c1565b82800160010185558215620002c1579182015b82811115620002c1578251825591602001919060010190620002a4565b50620002cf92915062000357565b5090565b828054620002e1906200036e565b90600052602060002090601f016020900481019282620003055760008555620002c1565b82601f10620003185780548555620002c1565b82800160010185558215620002c157600052602060002091601f016020900482015b82811115620002c15782548255916001019190600101906200033a565b5b80821115620002cf576000815560010162000358565b600181811c908216806200038357607f821691505b60208210811415620003a557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c613f48620003d1600039600081816106400152611ab70152613f486000f3fe6080604052600436106102855760003560e01c806370a0823111610153578063a2d6309c116100cb578063d50b31eb1161007f578063e985e9c511610064578063e985e9c5146106f7578063f0503e8014610717578063f2fde38b146107df57600080fd5b8063d50b31eb146106c2578063e8a3d485146106e257600080fd5b8063b88d4fde116100b0578063b88d4fde14610662578063baedc1c414610682578063c87b56dd146106a257600080fd5b8063a2d6309c1461060e578063b50cbd9f1461062e57600080fd5b806395d89b4111610122578063a035b1fe11610107578063a035b1fe146105c5578063a0712d68146105db578063a22cb465146105ee57600080fd5b806395d89b41146105905780639b8bb83a146105a557600080fd5b806370a082311461051b578063715018a61461053b578063853828b6146105505780638da5cb5b1461056557600080fd5b80632f745c5911610201578063449be308116101b557806354572e091161019a57806354572e09146104b85780636352211e146104ce578063684931ed146104ee57600080fd5b8063449be308146104835780634f6ccce71461049857600080fd5b806337ff6b77116101e657806337ff6b771461042357806342842e0e1461044357806342966c681461046357600080fd5b80632f745c59146103d6578063303e74df146103f657600080fd5b8063095ea7b31161025857806318160ddd1161023d57806318160ddd1461038c57806323b872dd146103a157806325e6f516146103c157600080fd5b8063095ea7b314610348578063114e31011461036857600080fd5b806301b9a3971461028a57806301ffc9a7146102ac57806306fdde03146102e1578063081812fc14610303575b600080fd5b34801561029657600080fd5b506102aa6102a53660046133af565b6107ff565b005b3480156102b857600080fd5b506102cc6102c7366004613542565b6108e5565b60405190151581526020015b60405180910390f35b3480156102ed57600080fd5b506102f6610941565b6040516102d89190613b22565b34801561030f57600080fd5b5061032361031e36600461373c565b6109d3565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102d8565b34801561035457600080fd5b506102aa610363366004613516565b610a93565b34801561037457600080fd5b5061037e600e5481565b6040519081526020016102d8565b34801561039857600080fd5b5060095461037e565b3480156103ad57600080fd5b506102aa6103bc366004613422565b610bec565b3480156103cd57600080fd5b506102f6610c73565b3480156103e257600080fd5b5061037e6103f1366004613516565b610d01565b34801561040257600080fd5b506013546103239073ffffffffffffffffffffffffffffffffffffffff1681565b34801561042f57600080fd5b506102f661043e36600461373c565b610db6565b34801561044f57600080fd5b506102aa61045e366004613422565b610de1565b34801561046f57600080fd5b506102aa61047e36600461373c565b610dfc565b34801561048f57600080fd5b506102f6610e9a565b3480156104a457600080fd5b5061037e6104b336600461373c565b610ea7565b3480156104c457600080fd5b5061037e600d5481565b3480156104da57600080fd5b506103236104e936600461373c565b610f4b565b3480156104fa57600080fd5b506014546103239073ffffffffffffffffffffffffffffffffffffffff1681565b34801561052757600080fd5b5061037e6105363660046133af565b610fe3565b34801561054757600080fd5b506102aa611097565b34801561055c57600080fd5b506102aa61110a565b34801561057157600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610323565b34801561059c57600080fd5b506102f661116a565b3480156105b157600080fd5b506102f66105c036600461357c565b611179565b3480156105d157600080fd5b5061037e600c5481565b6102aa6105e936600461373c565b61122b565b3480156105fa57600080fd5b506102aa6106093660046134e3565b611386565b34801561061a57600080fd5b5061037e610629366004613755565b611483565b34801561063a57600080fd5b506103237f000000000000000000000000000000000000000000000000000000000000000081565b34801561066e57600080fd5b506102aa61067d366004613463565b6114b4565b34801561068e57600080fd5b506102aa61069d3660046135ee565b611542565b3480156106ae57600080fd5b506102f66106bd36600461373c565b6115bc565b3480156106ce57600080fd5b506102aa6106dd3660046133af565b611969565b3480156106ee57600080fd5b506102f6611a43565b34801561070357600080fd5b506102cc6107123660046133e9565b611a6b565b34801561072357600080fd5b506107a661073236600461373c565b60156020526000908152604090205465ffffffffffff80821691660100000000000081048216916c0100000000000000000000000082048116917201000000000000000000000000000000000000810482169178010000000000000000000000000000000000000000000000009091041685565b6040805165ffffffffffff968716815294861660208601529285169284019290925283166060830152909116608082015260a0016102d8565b3480156107eb57600080fd5b506102aa6107fa3660046133af565b611b93565b60005473ffffffffffffffffffffffffffffffffffffffff16331461086b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000148061093b575061093b82611c8c565b92915050565b60606001805461095090613c76565b80601f016020809104026020016040519081016040528092919081815260200182805461097c90613c76565b80156109c95780601f1061099e576101008083540402835291602001916109c9565b820191906000526020600020905b8154815290600101906020018083116109ac57829003601f168201915b5050505050905090565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff16610a6a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610862565b5060009081526005602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a9e82610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b425760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610862565b3373ffffffffffffffffffffffffffffffffffffffff82161480610b6b5750610b6b8133611a6b565b610bdd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610862565b610be78383611d6f565b505050565b610bf63382611e0f565b610c685760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610862565b610be7838383611f38565b600f8054610c8090613c76565b80601f0160208091040260200160405190810160405280929190818152602001828054610cac90613c76565b8015610cf95780601f10610cce57610100808354040283529160200191610cf9565b820191906000526020600020905b815481529060010190602001808311610cdc57829003601f168201915b505050505081565b6000610d0c83610fe3565b8210610d805760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610862565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600760209081526040808320938352929052205490565b60118181548110610dc657600080fd5b906000526020600020016000915090508054610c8090613c76565b610be7838383604051806020016040528060008152506114b4565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b610e6c81612176565b60405181907f806be94a2ac8b92d74e99aa8add5a8e54528a01ec914a9e00d201a6480ed986390600090a250565b60108054610c8090613c76565b6000610eb260095490565b8210610f265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610862565b60098281548110610f3957610f39613da4565b90600052602060002001549050919050565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff168061093b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610862565b600073ffffffffffffffffffffffffffffffffffffffff821661106e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610862565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1633146110fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b611108600061224f565b565b4761112a60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061116757600080fd5b50565b60606002805461095090613c76565b60005460609073ffffffffffffffffffffffffffffffffffffffff1633146111e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b6111ef600f84846131eb565b505060408051808201909152601381527f4465736372697074696f6e207570646174656400000000000000000000000000602082015292915050565b600e5481111561127d5760405162461bcd60e51b815260206004820152600f60248201527f6d696e74656420746f6f206d616e7900000000000000000000000000000000006044820152606401610862565b600d5460095461128d9083613bca565b11156112db5760405162461bcd60e51b815260206004820152601660248201527f65786365656473206d6178696d756d20746f6b656e73000000000000000000006044820152606401610862565b600c546112e89082613bf6565b3410156113375760405162461bcd60e51b815260206004820152601660248201527f6e6f7420656e6f756768206574686572732073656e74000000000000000000006044820152606401610862565b60005b81811015611382576016805461136191339190600061135883613cca565b919050556122c4565b50611370600b80546001019055565b8061137a81613cca565b91505061133a565b5050565b73ffffffffffffffffffffffffffffffffffffffff82163314156113ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610862565b33600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6012602052816000526040600020818154811061149f57600080fd5b90600052602060002001600091509150505481565b6114be3383611e0f565b6115305760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610862565b61153c84848484612590565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115a95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b805161138290601790602084019061328d565b60008181526003602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166116305760405162461bcd60e51b815260206004820152601160248201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006044820152606401610862565b600061163b83612619565b90506000816040516020016116509190613a1d565b60405160208183030381529060405290506000600f805461167090613c76565b80601f016020809104026020016040519081016040528092919081815260200182805461169c90613c76565b80156116e95780601f106116be576101008083540402835291602001916116e9565b820191906000526020600020905b8154815290600101906020018083116116cc57829003601f168201915b505060135460008a81526015602052604080822090517f2ea04300000000000000000000000000000000000000000000000000000000008152905465ffffffffffff8082166004840152603082901c81166024840152606082901c81166044840152609082901c8116606484015260c09190911c1660848201529596509473ffffffffffffffffffffffffffffffffffffffff9091169350632ea04300925060a401905060006040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526117ff9190810190613637565b9050600061180c8261274b565b90506000611819826128fc565b905060008160405160200161182e91906138f1565b604051602081830303815290604052905060005b60008a8152601260205260409020548110156118d95760008a815260126020526040812080548390811061187857611878613da4565b90600052602060002001549050826011828154811061189957611899613da4565b906000526020600020016040516020016118b4929190613892565b60405160208183030381529060405292505080806118d190613cca565b915050611842565b50806040516020016118eb91906138b0565b60405160208183030381529060405290506000611907826129d6565b905060006119378888846040516020016119239392919061390d565b6040516020818303038152906040526129d6565b90508060405160200161194a9190613a94565b6040516020818303038152906040529950505050505050505050919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b601480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e906020016108da565b60606017604051602001611a579190613a62565b604051602081830303815290604052905090565b6040517fc455279100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091818416917f0000000000000000000000000000000000000000000000000000000000000000169063c45527919060240160206040518083038186803b158015611af957600080fd5b505afa158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3191906133cc565b73ffffffffffffffffffffffffffffffffffffffff161415611b555750600161093b565b73ffffffffffffffffffffffffffffffffffffffff80841660009081526006602090815260408083209386168352929052205460ff165b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611bfa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b73ffffffffffffffffffffffffffffffffffffffff8116611c835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610862565b6111678161224f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611d1f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061093b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461093b565b600081815260056020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190611dc982610f4b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff16611ea65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610862565b6000611eb183610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611f2057508373ffffffffffffffffffffffffffffffffffffffff16611f08846109d3565b73ffffffffffffffffffffffffffffffffffffffff16145b80611f305750611f308185611a6b565b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16611f5882610f4b565b73ffffffffffffffffffffffffffffffffffffffff1614611fe15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610862565b73ffffffffffffffffffffffffffffffffffffffff82166120695760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610862565b612074838383612baf565b61207f600082611d6f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604081208054600192906120b5908490613c33565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604081208054600192906120f0908490613bca565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061218182610f4b565b905061218f81600084612baf565b61219a600083611d6f565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604081208054600192906121d0908490613c33565b909155505060008281526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6014546013546040517f422e2e990000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff91821660248201526000928392169063422e2e999060440160a06040518083038186803b15801561233c57600080fd5b505afa158015612350573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237491906136ae565b6000848152601560209081526040918290208351815485840151868601516060808901516080998a015165ffffffffffff9687167fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009096169590951766010000000000009487168502177fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c0100000000000000000000000093871684027fffffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff161772010000000000000000000000000000000000009187168202177fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff811678010000000000000000000000000000000000000000000000009688168702908117988990558a5160a081018c529188169088161781529387048616978401979097529085048416968201969096529383048216948401949094529290049091169181019190915290506124e78484612cb5565b6040805160208082018352600080835286815260129091529190912061250e916001613301565b50827f1106ee9d020bfbb5ee34cf5535a5fbf024a011bd130078088cbf124ab3092478826040516125809190815165ffffffffffff9081168252602080840151821690830152604080840151821690830152606080840151821690830152608092830151169181019190915260a00190565b60405180910390a2509092915050565b61259b848484611f38565b6125a784848484612e4f565b61153c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610862565b60608161265957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612683578061266d81613cca565b915061267c9050600a83613be2565b915061265d565b60008167ffffffffffffffff81111561269e5761269e613dd3565b6040519080825280601f01601f1916602001820160405280156126c8576020820181803683370190505b5090505b8415611f30576126dd600183613c33565b91506126ea600a86613d03565b6126f5906030613bca565b60f81b81838151811061270a5761270a613da4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612744600a86613be2565b94506126cc565b8051606090829061276c575050604080516000815260208101909152919050565b6004815161277a9190613d03565b156127c75760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420626173653634206465636f64657220696e707574000000006044820152606401610862565b60006040518060a0016040528060808152602001613e936080913990506000600483516127f49190613be2565b6127ff906003613bf6565b9050600061280e826020613bca565b67ffffffffffffffff81111561282657612826613dd3565b6040519080825280601f01601f191660200182016040528015612850576020820181803683370190505b5090508351840151603d60ff8216141561287f57600183039250613d3d61ffff8216141561287f576001830392505b50818152600183018485518101602084015b818310156128ee57600483019250825160ff8082168601511660ff808360081c168701511660061b0160ff808360101c1687015116600c1b60ff808460181c168801511660121b010190508060e81b825250600381019050612891565b509298975050505050505050565b606060006006835161290e9190613c33565b67ffffffffffffffff81111561292657612926613dd3565b6040519080825280601f01601f191660200182016040528015612950576020820181803683370190505b50905060005b81518110156129cf5783818151811061297157612971613da4565b602001015160f81c60f81b82828151811061298e5761298e613da4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806129c781613cca565b915050612956565b5092915050565b60608151600014156129f657505060408051602081019091526000815290565b6000604051806060016040528060408152602001613e536040913990506000600384516002612a259190613bca565b612a2f9190613be2565b612a3a906004613bf6565b90506000612a49826020613bca565b67ffffffffffffffff811115612a6157612a61613dd3565b6040519080825280601f01601f191660200182016040528015612a8b576020820181803683370190505b509050818152600183018586518101602084015b81831015612af7576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101612a9f565b600389510660018114612b115760028114612b5b57612ba1565b7f3d3d0000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe830152612ba1565b7f3d000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301525b509398975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316612c1757612c1281600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612c54565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612c5457612c548382613034565b73ffffffffffffffffffffffffffffffffffffffff8216612c7857610be7816130eb565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610be757610be7828261319a565b73ffffffffffffffffffffffffffffffffffffffff8216612d185760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610862565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612d8a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610862565b612d9660008383612baf565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120805460019290612dcc908490613bca565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613029576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290612ec6903390899088908890600401613ad9565b602060405180830381600087803b158015612ee057600080fd5b505af1925050508015612f2e575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612f2b9181019061355f565b60015b612fde573d808015612f5c576040519150601f19603f3d011682016040523d82523d6000602084013e612f61565b606091505b508051612fd65760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610862565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611f30565b506001949350505050565b6000600161304184610fe3565b61304b9190613c33565b6000838152600860205260409020549091508082146130ab5773ffffffffffffffffffffffffffffffffffffffff841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b50600091825260086020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600781528383209183525290812055565b6009546000906130fd90600190613c33565b6000838152600a60205260408120546009805493945090928490811061312557613125613da4565b90600052602060002001549050806009838154811061314657613146613da4565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061317e5761317e613d75565b6001900381819060005260206000200160009055905550505050565b60006131a583610fe3565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8280546131f790613c76565b90600052602060002090601f016020900481019282613219576000855561327d565b82601f10613250578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082351617855561327d565b8280016001018555821561327d579182015b8281111561327d578235825591602001919060010190613262565b50613289929150613341565b5090565b82805461329990613c76565b90600052602060002090601f0160209004810192826132bb576000855561327d565b82601f106132d457805160ff191683800117855561327d565b8280016001018555821561327d579182015b8281111561327d5782518255916020019190600101906132e6565b82805482825590600052602060002090810192821561327d579160200282015b8281111561327d578251829060ff16905591602001919060010190613321565b5b808211156132895760008155600101613342565b600061336961336484613b84565b613b35565b905082815283838301111561337d57600080fd5b828260208301376000602084830101529392505050565b805165ffffffffffff811681146133aa57600080fd5b919050565b6000602082840312156133c157600080fd5b8135611b8c81613e02565b6000602082840312156133de57600080fd5b8151611b8c81613e02565b600080604083850312156133fc57600080fd5b823561340781613e02565b9150602083013561341781613e02565b809150509250929050565b60008060006060848603121561343757600080fd5b833561344281613e02565b9250602084013561345281613e02565b929592945050506040919091013590565b6000806000806080858703121561347957600080fd5b843561348481613e02565b9350602085013561349481613e02565b925060408501359150606085013567ffffffffffffffff8111156134b757600080fd5b8501601f810187136134c857600080fd5b6134d787823560208401613356565b91505092959194509250565b600080604083850312156134f657600080fd5b823561350181613e02565b91506020830135801515811461341757600080fd5b6000806040838503121561352957600080fd5b823561353481613e02565b946020939093013593505050565b60006020828403121561355457600080fd5b8135611b8c81613e24565b60006020828403121561357157600080fd5b8151611b8c81613e24565b6000806020838503121561358f57600080fd5b823567ffffffffffffffff808211156135a757600080fd5b818501915085601f8301126135bb57600080fd5b8135818111156135ca57600080fd5b8660208285010111156135dc57600080fd5b60209290920196919550909350505050565b60006020828403121561360057600080fd5b813567ffffffffffffffff81111561361757600080fd5b8201601f8101841361362857600080fd5b611f3084823560208401613356565b60006020828403121561364957600080fd5b815167ffffffffffffffff81111561366057600080fd5b8201601f8101841361367157600080fd5b805161367f61336482613b84565b81815285602083850101111561369457600080fd5b6136a5826020830160208601613c4a565b95945050505050565b600060a082840312156136c057600080fd5b60405160a0810181811067ffffffffffffffff821117156136e3576136e3613dd3565b6040526136ef83613394565b81526136fd60208401613394565b602082015261370e60408401613394565b604082015261371f60608401613394565b606082015261373060808401613394565b60808201529392505050565b60006020828403121561374e57600080fd5b5035919050565b6000806040838503121561376857600080fd5b50508035926020909101359150565b6000815180845261378f816020860160208601613c4a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8054600090600181811c90808316806137db57607f831692505b6020808410821415613816577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b81801561382a576001811461385957613886565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861689528489019650613886565b60008881526020902060005b8681101561387e5781548b820152908501908301613865565b505084890196505b50505050505092915050565b600083516138a4818460208801613c4a565b6136a5818401856137c1565b600082516138c2818460208701613c4a565b7f3c2f7376673e0000000000000000000000000000000000000000000000000000920191825250600601919050565b60008251613903818460208701613c4a565b9190910192915050565b7f7b226e616d65223a220000000000000000000000000000000000000000000000815260008451613945816009850160208901613c4a565b7f222c20226465736372697074696f6e223a220000000000000000000000000000600991840191820152845161398281601b840160208901613c4a565b7f222c2022696d616765223a22646174613a696d6167652f7376672b786d6c3b62601b92909101918201527f61736536342c0000000000000000000000000000000000000000000000000000603b82015283516139e6816041840160208801613c4a565b7f227d0000000000000000000000000000000000000000000000000000000000006041929091019182015260430195945050505050565b7f436f6f6c4e6f756e7344414f2000000000000000000000000000000000000000815260008251613a5581600d850160208701613c4a565b91909101600d0192915050565b7f697066733a2f2f0000000000000000000000000000000000000000000000000081526000611b8c60078301846137c1565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613acc81601d850160208701613c4a565b91909101601d0192915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613b186080830184613777565b9695505050505050565b602081526000611b8c6020830184613777565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b7c57613b7c613dd3565b604052919050565b600067ffffffffffffffff821115613b9e57613b9e613dd3565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008219821115613bdd57613bdd613d17565b500190565b600082613bf157613bf1613d46565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613c2e57613c2e613d17565b500290565b600082821015613c4557613c45613d17565b500390565b60005b83811015613c65578181015183820152602001613c4d565b8381111561153c5750506000910152565b600181811c90821680613c8a57607f821691505b60208210811415613cc4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613cfc57613cfc613d17565b5060010190565b600082613d1257613d12613d46565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461116757600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461116757600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e0000003f3435363738393a3b3c3d00000000000000000102030405060708090a0b0c0d0e0f101112131415161718190000000000001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000a2646970667358221220f2a4f24bdda36ad2b53e546413ca0bf4e35a58d302b3cdf5e19bd5d97281b52c64736f6c634300080600334e6f756e73206172652070726574747920626f72696e672c20736f207765206d616465207468656d2070726574747920636f6f6c2e2038292e3c726563742077696474683d2231323022206865696768743d2231302220783d2235302220793d22313230222066696c6c3d2223303030303030222f3e3c726563742077696474683d2231313022206865696768743d2231302220783d223137302220793d22313230222066696c6c3d2223303030303030222f3e3c726563742077696474683d22323022206865696768743d2231302220783d2235302220793d22313330222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d2237302220793d22313330222066696c6c3d2223434143414341222f3e3c726563742077696474683d22313022206865696768743d2231302220783d2238302220793d22313330222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d2239302220793d22313330222066696c6c3d2223434143414341222f3e3c726563742077696474683d22363022206865696768743d2231302220783d223130302220793d22313330222066696c6c3d2223303030303030222f3e3c726563742077696474683d22323022206865696768743d2231302220783d2236302220793d22313430222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d2238302220793d22313430222066696c6c3d2223434143414341222f3e3c726563742077696474683d22313022206865696768743d2231302220783d2239302220793d22313430222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223130302220793d22313430222066696c6c3d2223434143414341222f3e3c726563742077696474683d22353022206865696768743d2231302220783d223131302220793d22313430222066696c6c3d2223303030303030222f3e3c726563742077696474683d22323022206865696768743d2231302220783d2237302220793d22313530222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d2239302220793d22313530222066696c6c3d2223434143414341222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223130302220793d22313530222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223131302220793d22313530222066696c6c3d2223434143414341222f3e3c726563742077696474683d22333022206865696768743d2231302220783d223132302220793d22313530222066696c6c3d2223303030303030222f3e3c726563742077696474683d22363022206865696768743d2231302220783d2238302220793d22313630222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2232302220783d223137302220793d22313330222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2232302220783d223138302220793d22313430222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2232302220783d223139302220793d22313530222066696c6c3d2223303030303030222f3e3c726563742077696474683d22363022206865696768743d2231302220783d223139302220793d22313630222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223138302220793d22313330222066696c6c3d2223434143414341222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223139302220793d22313330222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223230302220793d22313330222066696c6c3d2223434143414341222f3e3c726563742077696474683d22373022206865696768743d2231302220783d223231302220793d22313330222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223139302220793d22313430222066696c6c3d2223434143414341222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223230302220793d22313430222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223231302220793d22313430222066696c6c3d2223434143414341222f3e3c726563742077696474683d22353022206865696768743d2231302220783d223232302220793d22313430222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223230302220793d22313530222066696c6c3d2223434143414341222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223231302220793d22313530222066696c6c3d2223303030303030222f3e3c726563742077696474683d22313022206865696768743d2231302220783d223232302220793d22313530222066696c6c3d2223434143414341222f3e3c726563742077696474683d22333022206865696768743d2231302220783d223233302220793d22313530222066696c6c3d2223303030303030222f3e

Deployed Bytecode

0x6080604052600436106102855760003560e01c806370a0823111610153578063a2d6309c116100cb578063d50b31eb1161007f578063e985e9c511610064578063e985e9c5146106f7578063f0503e8014610717578063f2fde38b146107df57600080fd5b8063d50b31eb146106c2578063e8a3d485146106e257600080fd5b8063b88d4fde116100b0578063b88d4fde14610662578063baedc1c414610682578063c87b56dd146106a257600080fd5b8063a2d6309c1461060e578063b50cbd9f1461062e57600080fd5b806395d89b4111610122578063a035b1fe11610107578063a035b1fe146105c5578063a0712d68146105db578063a22cb465146105ee57600080fd5b806395d89b41146105905780639b8bb83a146105a557600080fd5b806370a082311461051b578063715018a61461053b578063853828b6146105505780638da5cb5b1461056557600080fd5b80632f745c5911610201578063449be308116101b557806354572e091161019a57806354572e09146104b85780636352211e146104ce578063684931ed146104ee57600080fd5b8063449be308146104835780634f6ccce71461049857600080fd5b806337ff6b77116101e657806337ff6b771461042357806342842e0e1461044357806342966c681461046357600080fd5b80632f745c59146103d6578063303e74df146103f657600080fd5b8063095ea7b31161025857806318160ddd1161023d57806318160ddd1461038c57806323b872dd146103a157806325e6f516146103c157600080fd5b8063095ea7b314610348578063114e31011461036857600080fd5b806301b9a3971461028a57806301ffc9a7146102ac57806306fdde03146102e1578063081812fc14610303575b600080fd5b34801561029657600080fd5b506102aa6102a53660046133af565b6107ff565b005b3480156102b857600080fd5b506102cc6102c7366004613542565b6108e5565b60405190151581526020015b60405180910390f35b3480156102ed57600080fd5b506102f6610941565b6040516102d89190613b22565b34801561030f57600080fd5b5061032361031e36600461373c565b6109d3565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102d8565b34801561035457600080fd5b506102aa610363366004613516565b610a93565b34801561037457600080fd5b5061037e600e5481565b6040519081526020016102d8565b34801561039857600080fd5b5060095461037e565b3480156103ad57600080fd5b506102aa6103bc366004613422565b610bec565b3480156103cd57600080fd5b506102f6610c73565b3480156103e257600080fd5b5061037e6103f1366004613516565b610d01565b34801561040257600080fd5b506013546103239073ffffffffffffffffffffffffffffffffffffffff1681565b34801561042f57600080fd5b506102f661043e36600461373c565b610db6565b34801561044f57600080fd5b506102aa61045e366004613422565b610de1565b34801561046f57600080fd5b506102aa61047e36600461373c565b610dfc565b34801561048f57600080fd5b506102f6610e9a565b3480156104a457600080fd5b5061037e6104b336600461373c565b610ea7565b3480156104c457600080fd5b5061037e600d5481565b3480156104da57600080fd5b506103236104e936600461373c565b610f4b565b3480156104fa57600080fd5b506014546103239073ffffffffffffffffffffffffffffffffffffffff1681565b34801561052757600080fd5b5061037e6105363660046133af565b610fe3565b34801561054757600080fd5b506102aa611097565b34801561055c57600080fd5b506102aa61110a565b34801561057157600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610323565b34801561059c57600080fd5b506102f661116a565b3480156105b157600080fd5b506102f66105c036600461357c565b611179565b3480156105d157600080fd5b5061037e600c5481565b6102aa6105e936600461373c565b61122b565b3480156105fa57600080fd5b506102aa6106093660046134e3565b611386565b34801561061a57600080fd5b5061037e610629366004613755565b611483565b34801561063a57600080fd5b506103237f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c181565b34801561066e57600080fd5b506102aa61067d366004613463565b6114b4565b34801561068e57600080fd5b506102aa61069d3660046135ee565b611542565b3480156106ae57600080fd5b506102f66106bd36600461373c565b6115bc565b3480156106ce57600080fd5b506102aa6106dd3660046133af565b611969565b3480156106ee57600080fd5b506102f6611a43565b34801561070357600080fd5b506102cc6107123660046133e9565b611a6b565b34801561072357600080fd5b506107a661073236600461373c565b60156020526000908152604090205465ffffffffffff80821691660100000000000081048216916c0100000000000000000000000082048116917201000000000000000000000000000000000000810482169178010000000000000000000000000000000000000000000000009091041685565b6040805165ffffffffffff968716815294861660208601529285169284019290925283166060830152909116608082015260a0016102d8565b3480156107eb57600080fd5b506102aa6107fa3660046133af565b611b93565b60005473ffffffffffffffffffffffffffffffffffffffff16331461086b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000148061093b575061093b82611c8c565b92915050565b60606001805461095090613c76565b80601f016020809104026020016040519081016040528092919081815260200182805461097c90613c76565b80156109c95780601f1061099e576101008083540402835291602001916109c9565b820191906000526020600020905b8154815290600101906020018083116109ac57829003601f168201915b5050505050905090565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff16610a6a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610862565b5060009081526005602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a9e82610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b425760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610862565b3373ffffffffffffffffffffffffffffffffffffffff82161480610b6b5750610b6b8133611a6b565b610bdd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610862565b610be78383611d6f565b505050565b610bf63382611e0f565b610c685760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610862565b610be7838383611f38565b600f8054610c8090613c76565b80601f0160208091040260200160405190810160405280929190818152602001828054610cac90613c76565b8015610cf95780601f10610cce57610100808354040283529160200191610cf9565b820191906000526020600020905b815481529060010190602001808311610cdc57829003601f168201915b505050505081565b6000610d0c83610fe3565b8210610d805760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610862565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600760209081526040808320938352929052205490565b60118181548110610dc657600080fd5b906000526020600020016000915090508054610c8090613c76565b610be7838383604051806020016040528060008152506114b4565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b610e6c81612176565b60405181907f806be94a2ac8b92d74e99aa8add5a8e54528a01ec914a9e00d201a6480ed986390600090a250565b60108054610c8090613c76565b6000610eb260095490565b8210610f265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610862565b60098281548110610f3957610f39613da4565b90600052602060002001549050919050565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff168061093b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610862565b600073ffffffffffffffffffffffffffffffffffffffff821661106e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610862565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1633146110fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b611108600061224f565b565b4761112a60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061116757600080fd5b50565b60606002805461095090613c76565b60005460609073ffffffffffffffffffffffffffffffffffffffff1633146111e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b6111ef600f84846131eb565b505060408051808201909152601381527f4465736372697074696f6e207570646174656400000000000000000000000000602082015292915050565b600e5481111561127d5760405162461bcd60e51b815260206004820152600f60248201527f6d696e74656420746f6f206d616e7900000000000000000000000000000000006044820152606401610862565b600d5460095461128d9083613bca565b11156112db5760405162461bcd60e51b815260206004820152601660248201527f65786365656473206d6178696d756d20746f6b656e73000000000000000000006044820152606401610862565b600c546112e89082613bf6565b3410156113375760405162461bcd60e51b815260206004820152601660248201527f6e6f7420656e6f756768206574686572732073656e74000000000000000000006044820152606401610862565b60005b81811015611382576016805461136191339190600061135883613cca565b919050556122c4565b50611370600b80546001019055565b8061137a81613cca565b91505061133a565b5050565b73ffffffffffffffffffffffffffffffffffffffff82163314156113ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610862565b33600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6012602052816000526040600020818154811061149f57600080fd5b90600052602060002001600091509150505481565b6114be3383611e0f565b6115305760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610862565b61153c84848484612590565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115a95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b805161138290601790602084019061328d565b60008181526003602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166116305760405162461bcd60e51b815260206004820152601160248201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006044820152606401610862565b600061163b83612619565b90506000816040516020016116509190613a1d565b60405160208183030381529060405290506000600f805461167090613c76565b80601f016020809104026020016040519081016040528092919081815260200182805461169c90613c76565b80156116e95780601f106116be576101008083540402835291602001916116e9565b820191906000526020600020905b8154815290600101906020018083116116cc57829003601f168201915b505060135460008a81526015602052604080822090517f2ea04300000000000000000000000000000000000000000000000000000000008152905465ffffffffffff8082166004840152603082901c81166024840152606082901c81166044840152609082901c8116606484015260c09190911c1660848201529596509473ffffffffffffffffffffffffffffffffffffffff9091169350632ea04300925060a401905060006040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526117ff9190810190613637565b9050600061180c8261274b565b90506000611819826128fc565b905060008160405160200161182e91906138f1565b604051602081830303815290604052905060005b60008a8152601260205260409020548110156118d95760008a815260126020526040812080548390811061187857611878613da4565b90600052602060002001549050826011828154811061189957611899613da4565b906000526020600020016040516020016118b4929190613892565b60405160208183030381529060405292505080806118d190613cca565b915050611842565b50806040516020016118eb91906138b0565b60405160208183030381529060405290506000611907826129d6565b905060006119378888846040516020016119239392919061390d565b6040516020818303038152906040526129d6565b90508060405160200161194a9190613a94565b6040516020818303038152906040529950505050505050505050919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b601480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e906020016108da565b60606017604051602001611a579190613a62565b604051602081830303815290604052905090565b6040517fc455279100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091818416917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1169063c45527919060240160206040518083038186803b158015611af957600080fd5b505afa158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3191906133cc565b73ffffffffffffffffffffffffffffffffffffffff161415611b555750600161093b565b73ffffffffffffffffffffffffffffffffffffffff80841660009081526006602090815260408083209386168352929052205460ff165b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611bfa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610862565b73ffffffffffffffffffffffffffffffffffffffff8116611c835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610862565b6111678161224f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611d1f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061093b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461093b565b600081815260056020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190611dc982610f4b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff16611ea65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610862565b6000611eb183610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611f2057508373ffffffffffffffffffffffffffffffffffffffff16611f08846109d3565b73ffffffffffffffffffffffffffffffffffffffff16145b80611f305750611f308185611a6b565b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16611f5882610f4b565b73ffffffffffffffffffffffffffffffffffffffff1614611fe15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610862565b73ffffffffffffffffffffffffffffffffffffffff82166120695760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610862565b612074838383612baf565b61207f600082611d6f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604081208054600192906120b5908490613c33565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604081208054600192906120f0908490613bca565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061218182610f4b565b905061218f81600084612baf565b61219a600083611d6f565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604081208054600192906121d0908490613c33565b909155505060008281526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6014546013546040517f422e2e990000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff91821660248201526000928392169063422e2e999060440160a06040518083038186803b15801561233c57600080fd5b505afa158015612350573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237491906136ae565b6000848152601560209081526040918290208351815485840151868601516060808901516080998a015165ffffffffffff9687167fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009096169590951766010000000000009487168502177fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c0100000000000000000000000093871684027fffffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff161772010000000000000000000000000000000000009187168202177fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff811678010000000000000000000000000000000000000000000000009688168702908117988990558a5160a081018c529188169088161781529387048616978401979097529085048416968201969096529383048216948401949094529290049091169181019190915290506124e78484612cb5565b6040805160208082018352600080835286815260129091529190912061250e916001613301565b50827f1106ee9d020bfbb5ee34cf5535a5fbf024a011bd130078088cbf124ab3092478826040516125809190815165ffffffffffff9081168252602080840151821690830152604080840151821690830152606080840151821690830152608092830151169181019190915260a00190565b60405180910390a2509092915050565b61259b848484611f38565b6125a784848484612e4f565b61153c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610862565b60608161265957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612683578061266d81613cca565b915061267c9050600a83613be2565b915061265d565b60008167ffffffffffffffff81111561269e5761269e613dd3565b6040519080825280601f01601f1916602001820160405280156126c8576020820181803683370190505b5090505b8415611f30576126dd600183613c33565b91506126ea600a86613d03565b6126f5906030613bca565b60f81b81838151811061270a5761270a613da4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612744600a86613be2565b94506126cc565b8051606090829061276c575050604080516000815260208101909152919050565b6004815161277a9190613d03565b156127c75760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420626173653634206465636f64657220696e707574000000006044820152606401610862565b60006040518060a0016040528060808152602001613e936080913990506000600483516127f49190613be2565b6127ff906003613bf6565b9050600061280e826020613bca565b67ffffffffffffffff81111561282657612826613dd3565b6040519080825280601f01601f191660200182016040528015612850576020820181803683370190505b5090508351840151603d60ff8216141561287f57600183039250613d3d61ffff8216141561287f576001830392505b50818152600183018485518101602084015b818310156128ee57600483019250825160ff8082168601511660ff808360081c168701511660061b0160ff808360101c1687015116600c1b60ff808460181c168801511660121b010190508060e81b825250600381019050612891565b509298975050505050505050565b606060006006835161290e9190613c33565b67ffffffffffffffff81111561292657612926613dd3565b6040519080825280601f01601f191660200182016040528015612950576020820181803683370190505b50905060005b81518110156129cf5783818151811061297157612971613da4565b602001015160f81c60f81b82828151811061298e5761298e613da4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806129c781613cca565b915050612956565b5092915050565b60608151600014156129f657505060408051602081019091526000815290565b6000604051806060016040528060408152602001613e536040913990506000600384516002612a259190613bca565b612a2f9190613be2565b612a3a906004613bf6565b90506000612a49826020613bca565b67ffffffffffffffff811115612a6157612a61613dd3565b6040519080825280601f01601f191660200182016040528015612a8b576020820181803683370190505b509050818152600183018586518101602084015b81831015612af7576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101612a9f565b600389510660018114612b115760028114612b5b57612ba1565b7f3d3d0000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe830152612ba1565b7f3d000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301525b509398975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316612c1757612c1281600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612c54565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612c5457612c548382613034565b73ffffffffffffffffffffffffffffffffffffffff8216612c7857610be7816130eb565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610be757610be7828261319a565b73ffffffffffffffffffffffffffffffffffffffff8216612d185760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610862565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612d8a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610862565b612d9660008383612baf565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120805460019290612dcc908490613bca565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613029576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290612ec6903390899088908890600401613ad9565b602060405180830381600087803b158015612ee057600080fd5b505af1925050508015612f2e575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612f2b9181019061355f565b60015b612fde573d808015612f5c576040519150601f19603f3d011682016040523d82523d6000602084013e612f61565b606091505b508051612fd65760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610862565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611f30565b506001949350505050565b6000600161304184610fe3565b61304b9190613c33565b6000838152600860205260409020549091508082146130ab5773ffffffffffffffffffffffffffffffffffffffff841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b50600091825260086020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600781528383209183525290812055565b6009546000906130fd90600190613c33565b6000838152600a60205260408120546009805493945090928490811061312557613125613da4565b90600052602060002001549050806009838154811061314657613146613da4565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061317e5761317e613d75565b6001900381819060005260206000200160009055905550505050565b60006131a583610fe3565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8280546131f790613c76565b90600052602060002090601f016020900481019282613219576000855561327d565b82601f10613250578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082351617855561327d565b8280016001018555821561327d579182015b8281111561327d578235825591602001919060010190613262565b50613289929150613341565b5090565b82805461329990613c76565b90600052602060002090601f0160209004810192826132bb576000855561327d565b82601f106132d457805160ff191683800117855561327d565b8280016001018555821561327d579182015b8281111561327d5782518255916020019190600101906132e6565b82805482825590600052602060002090810192821561327d579160200282015b8281111561327d578251829060ff16905591602001919060010190613321565b5b808211156132895760008155600101613342565b600061336961336484613b84565b613b35565b905082815283838301111561337d57600080fd5b828260208301376000602084830101529392505050565b805165ffffffffffff811681146133aa57600080fd5b919050565b6000602082840312156133c157600080fd5b8135611b8c81613e02565b6000602082840312156133de57600080fd5b8151611b8c81613e02565b600080604083850312156133fc57600080fd5b823561340781613e02565b9150602083013561341781613e02565b809150509250929050565b60008060006060848603121561343757600080fd5b833561344281613e02565b9250602084013561345281613e02565b929592945050506040919091013590565b6000806000806080858703121561347957600080fd5b843561348481613e02565b9350602085013561349481613e02565b925060408501359150606085013567ffffffffffffffff8111156134b757600080fd5b8501601f810187136134c857600080fd5b6134d787823560208401613356565b91505092959194509250565b600080604083850312156134f657600080fd5b823561350181613e02565b91506020830135801515811461341757600080fd5b6000806040838503121561352957600080fd5b823561353481613e02565b946020939093013593505050565b60006020828403121561355457600080fd5b8135611b8c81613e24565b60006020828403121561357157600080fd5b8151611b8c81613e24565b6000806020838503121561358f57600080fd5b823567ffffffffffffffff808211156135a757600080fd5b818501915085601f8301126135bb57600080fd5b8135818111156135ca57600080fd5b8660208285010111156135dc57600080fd5b60209290920196919550909350505050565b60006020828403121561360057600080fd5b813567ffffffffffffffff81111561361757600080fd5b8201601f8101841361362857600080fd5b611f3084823560208401613356565b60006020828403121561364957600080fd5b815167ffffffffffffffff81111561366057600080fd5b8201601f8101841361367157600080fd5b805161367f61336482613b84565b81815285602083850101111561369457600080fd5b6136a5826020830160208601613c4a565b95945050505050565b600060a082840312156136c057600080fd5b60405160a0810181811067ffffffffffffffff821117156136e3576136e3613dd3565b6040526136ef83613394565b81526136fd60208401613394565b602082015261370e60408401613394565b604082015261371f60608401613394565b606082015261373060808401613394565b60808201529392505050565b60006020828403121561374e57600080fd5b5035919050565b6000806040838503121561376857600080fd5b50508035926020909101359150565b6000815180845261378f816020860160208601613c4a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8054600090600181811c90808316806137db57607f831692505b6020808410821415613816577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b81801561382a576001811461385957613886565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861689528489019650613886565b60008881526020902060005b8681101561387e5781548b820152908501908301613865565b505084890196505b50505050505092915050565b600083516138a4818460208801613c4a565b6136a5818401856137c1565b600082516138c2818460208701613c4a565b7f3c2f7376673e0000000000000000000000000000000000000000000000000000920191825250600601919050565b60008251613903818460208701613c4a565b9190910192915050565b7f7b226e616d65223a220000000000000000000000000000000000000000000000815260008451613945816009850160208901613c4a565b7f222c20226465736372697074696f6e223a220000000000000000000000000000600991840191820152845161398281601b840160208901613c4a565b7f222c2022696d616765223a22646174613a696d6167652f7376672b786d6c3b62601b92909101918201527f61736536342c0000000000000000000000000000000000000000000000000000603b82015283516139e6816041840160208801613c4a565b7f227d0000000000000000000000000000000000000000000000000000000000006041929091019182015260430195945050505050565b7f436f6f6c4e6f756e7344414f2000000000000000000000000000000000000000815260008251613a5581600d850160208701613c4a565b91909101600d0192915050565b7f697066733a2f2f0000000000000000000000000000000000000000000000000081526000611b8c60078301846137c1565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613acc81601d850160208701613c4a565b91909101601d0192915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613b186080830184613777565b9695505050505050565b602081526000611b8c6020830184613777565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b7c57613b7c613dd3565b604052919050565b600067ffffffffffffffff821115613b9e57613b9e613dd3565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008219821115613bdd57613bdd613d17565b500190565b600082613bf157613bf1613d46565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613c2e57613c2e613d17565b500290565b600082821015613c4557613c45613d17565b500390565b60005b83811015613c65578181015183820152602001613c4d565b8381111561153c5750506000910152565b600181811c90821680613c8a57607f821691505b60208210811415613cc4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613cfc57613cfc613d17565b5060010190565b600082613d1257613d12613d46565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461116757600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461116757600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e0000003f3435363738393a3b3c3d00000000000000000102030405060708090a0b0c0d0e0f101112131415161718190000000000001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000a2646970667358221220f2a4f24bdda36ad2b53e546413ca0bf4e35a58d302b3cdf5e19bd5d97281b52c64736f6c63430008060033

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.