Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
165 CATBRICK
Holders
96
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 CATBRICKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CatBricksClubhouse
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 2100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; /* CAT BRICKS CLUBHOUSE @INVADERETH - DEV @OOFFSETT - ART @ITSFUJIFUJI - FINANCE @HUMZAH_ETH - COMMUNITY @SHARK_IDK - COMMUNITY @DAKL__ - MARKETING @1KIWEE - MARKETING This contract has been insanely gas optimized with the latest best practices. Features such as off-chain whitelisting and permanent OpenSea approval have been implemented - saving gas both on the minting and secondary market end. LEGAL NOTICE The following addresses the issues of copyright or trademark infringement. LEGO® is a trademark of the LEGO Group, which does not sponsor, authorize or endorse the Cat Bricks Clubhouse project. The LEGO Group is neither endorsing the modification in any way, shape, or form, nor accepting any responsibility for unforeseen and/or adverse consequences. The patent for the Toy figure model expired in 1993. The models are open to usage so long as the aforementioned LEGO brand is not infringed upon. */ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./ERC721SeqEnumerable.sol"; import "./common/ContextMixin.sol"; import "./common/NativeMetaTransaction.sol"; contract OwnableDelegateProxy { } contract OpenSeaProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract CatBricksClubhouse is ERC721SeqEnumerable, ContextMixin, NativeMetaTransaction, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant CBC_MAX = 9999; uint256 public constant CBC_PRIVATE = 8888; uint256 public constant CBC_PRICE = 0.08 ether; uint256 public constant PRIV_PER_MINT = 2; uint256 public constant PUB_PER_MINT = 4; uint256 public lostCats; string private _contractURI = "https://cbc.mypinata.cloud/ipfs/Qmdbo4z1WLduLoMe7sU9YXe8SDGkiFc7uXwnnodJ2anfc5"; string private _tokenBaseURI = "https://cbc.mypinata.cloud/ipfs/QmZZ5FiQ8FVroynJ4e9v7q5NPygojWv3xFxpJZjaxSkx1H/"; string private _tokenExtension = ".json"; address private _vault = 0x563e6750e382fe86E458153ba520B89F986471aa; address private _signer = 0xb82209b16Ab5c56716f096dc1a51B95d424f755a; address private _proxy = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; bool public presaleLive; bool public saleLive; mapping(address => bool) public projectProxy; mapping(address => uint256) public presalerListPurchases; constructor() ERC721Sequencial("Cat Bricks Clubhouse", "CATBRICK") { _initializeEIP712("Cat Bricks Clubhouse"); } // Mint during public sale function buy(uint256 tokenQuantity) external payable { require(saleLive, "Sale Inactive"); require(!presaleLive, "Only Presale"); require(tokenQuantity <= PUB_PER_MINT, "Exceed Max"); require(totalSupply() + tokenQuantity < CBC_MAX, "Out of Stock"); require(CBC_PRICE * tokenQuantity <= msg.value, "More ETH Needed"); for (uint256 i = 0; i < tokenQuantity; i++) { _safeMint(msg.sender); } } // Mint during presale - disables contract minting function privateBuy(uint256 tokenQuantity, bytes32 hash, bytes memory signature) external payable { require(!saleLive && presaleLive, "Presale Inactive"); require(matchAddressSigner(hash, signature), "Contract Disabled for Presale"); require(tokenQuantity <= PRIV_PER_MINT, "Exceed Max"); require(presalerListPurchases[msg.sender] + tokenQuantity <= PRIV_PER_MINT, "Holding Max Allowed"); require(CBC_PRICE * tokenQuantity <= msg.value, "More ETH"); require(totalSupply() + tokenQuantity <= CBC_PRIVATE, "Exceed Supply"); for (uint256 i = 0; i < tokenQuantity; i++) { _safeMint(msg.sender); } presalerListPurchases[msg.sender] += tokenQuantity; } // Close or open the private sale function togglePrivateSaleStatus() external onlyOwner { presaleLive = !presaleLive; } // Close or open the public sale function toggleSaleStatus() external onlyOwner { saleLive = !saleLive; } // Withdraw funds for team expenses and payment function withdraw() external onlyOwner { (bool success, ) = _vault.call{value: address(this).balance}(""); require(success, "Failed to send to vault."); } // Approves OpenSea - bypassing approval fee payment function isApprovedForAll(address _owner, address operator) public view override returns (bool) { OpenSeaProxyRegistry proxyRegistry = OpenSeaProxyRegistry(_proxy); if (address(proxyRegistry.proxies(_owner)) == operator || projectProxy[operator]) return true; return super.isApprovedForAll(_owner, operator); } // ** - SETTERS - ** // // Set the vault address for payments function setVaultAddress(address addr) external onlyOwner { _vault = addr; } // Set the proxy address for payments function setProxyAddress(address addr) external onlyOwner { _proxy = addr; } // For future proxy approval management function flipProxyState(address proxyAddress) public onlyOwner { projectProxy[proxyAddress] = !projectProxy[proxyAddress]; } // Set the contract URL for OpenSea Metadata function setContractURI(string calldata URI) external onlyOwner { _contractURI = URI; } // Set image path for metadata function setBaseURI(string calldata URI) external onlyOwner { _tokenBaseURI = URI; } // Set file extension for metadata function setTokenExtension(string calldata extension) external onlyOwner { _tokenExtension = extension; } function gift(address[] calldata _recipients) external onlyOwner { uint256 recipients = _recipients.length; require( recipients + _owners.length <= CBC_MAX, "Exceeds Supply" ); for (uint256 i = 0; i < recipients; i++) { _safeMint(_recipients[i]); } } // Future game usage or user choice function burn(uint256 tokenId) public { require(_isApprovedOrOwner(_msgSender(), tokenId), "Not approved to burn."); _burn(tokenId); lostCats++; } // ** - READ - ** // function contractURI() public view returns (string memory) { return _contractURI; } function tokenExtension() public view returns (string memory) { return _tokenExtension; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "Nonexistent token"); return string(abi.encodePacked(_tokenBaseURI, tokenId.toString(), _tokenExtension)); } function presalePurchasedCount(address addr) external view returns (uint256) { return presalerListPurchases[addr]; } function matchAddressSigner(bytes32 hash, bytes memory signature) private view returns(bool) { return _signer == hash.recover(signature); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "./ERC721Sequencial.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /** * @dev This is a no storage implemntation of the optional extension {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. These functions * are mainly for convienence and should NEVER be called from inside a * contract on the chain. */ abstract contract ERC721SeqEnumerable is ERC721Sequencial, IERC721Enumerable { address constant zero = address(0); /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721Sequencial) 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 tokenId) { uint256 length = _owners.length; unchecked { for (; tokenId < length; ++tokenId) { if (_owners[tokenId] == owner) { if (index-- == 0) { break; } } } } require( tokenId < length, "ERC721Enumerable: owner index out of bounds" ); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256 supply) { unchecked { uint256 length = _owners.length; for (uint256 tokenId = 0; tokenId < length; ++tokenId) { if (_owners[tokenId] != zero) { ++supply; } } } } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { uint256 length = _owners.length; unchecked { for (; tokenId < length; ++tokenId) { if (_owners[tokenId] != zero) { if (index-- == 0) { break; } } } } require( tokenId < length, "ERC721Enumerable: global index out of bounds" ); } /** * @dev Get all tokens owned by owner. */ function ownerTokens(address owner) public view returns (uint256[] memory) { uint256 tokenCount = ERC721Sequencial.balanceOf(owner); require(tokenCount != 0, "ERC721Enumerable: owner owns no tokens"); uint256 length = _owners.length; uint256[] memory tokenIds = new uint256[](tokenCount); unchecked { uint256 i = 0; for (uint256 tokenId = 0; tokenId < length; ++tokenId) { if (_owners[tokenId] == owner) { tokenIds[i++] = tokenId; } } } return tokenIds; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721 * [ERC721] Non-Fungible Token Standard * * This implmentation of ERC721 assumes sequencial token creation to provide * efficient minting. Storage for balance are no longer required reducing * gas significantly. This comes at the price of calculating the balance by * iterating through the entire array. The balanceOf function should NOT * be used inside a contract. Gas usage will explode as the size of tokens * increase. A convineiance function is provided which returns the entire * list of owners whose index maps tokenIds to thier owners. Zero addresses * indicate burned tokens. * */ contract ERC721Sequencial 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 address[] _owners; // 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 balance) { require(owner != address(0), "ERC721: balance query for the zero address"); unchecked { uint256 length = _owners.length; for (uint256 i = 0; i < length; ++i) { if (_owners[i] == owner) { ++balance; } } } } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: owner query for nonexistent token"); address owner = _owners[tokenId]; return owner; } /** * @dev Returns entire list of owner enumerated by thier tokenIds. Burned tokens * will have a zero address. */ function owners() public view returns (address[] memory) { address[] memory owners_ = _owners; return owners_; } /** * @dev Return largest tokenId minted. */ function maxTokenId() public view returns (uint256) { return _owners.length > 0 ? _owners.length - 1 : 0; } /** * @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 = ERC721Sequencial.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _owners.length && _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 = ERC721Sequencial.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) internal virtual returns (uint256 tokenId) { tokenId = _safeMint(to, ""); } /** * @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, bytes memory _data ) internal virtual returns (uint256 tokenId) { tokenId = _mint(to); 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) internal virtual returns (uint256 tokenId) { require(to != address(0), "ERC721: mint to the zero address"); tokenId = _owners.length; _beforeTokenTransfer(address(0), to, tokenId); _owners.push(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 = ERC721Sequencial.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); 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(ERC721Sequencial.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); _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(ERC721Sequencial.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) 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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string public constant ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712(string memory name) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.11; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
{ "optimizer": { "enabled": true, "runs": 2100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CBC_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CBC_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CBC_PRIVATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRIV_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUB_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"flipProxyState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lostCats","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenId","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"ownerTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"presalePurchasedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presalerListPurchases","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenQuantity","type":"uint256"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"privateBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"projectProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"saleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setProxyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"extension","type":"string"}],"name":"setTokenExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"togglePrivateSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenExtension","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":"tokenId","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":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6005805460ff19169055610100604052604e6080818152906200414960a03980516200003491600a9160209091019062000342565b506040518060800160405280604f815260200162004197604f913980516200006591600b9160209091019062000342565b5060408051808201909152600580825264173539b7b760d91b60209092019182526200009491600c9162000342565b50600d80546001600160a01b031990811673563e6750e382fe86e458153ba520b89f986471aa17909155600e8054821673b82209b16ab5c56716f096dc1a51b95d424f755a179055600f805490911673a5409ec958c83c3f309868babaca7c86dcb077c11790553480156200010857600080fd5b50604080518082018252601481527f43617420427269636b7320436c7562686f757365000000000000000000000000602080830191825283518085019094526008845267434154425249434b60c01b9084015281519192916200016e9160009162000342565b5080516200018490600190602084019062000342565b505050620001a16200019b620001e660201b60201c565b620001ea565b60408051808201909152601481527f43617420427269636b7320436c7562686f7573650000000000000000000000006020820152620001e0906200023c565b62000425565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60055460ff1615620002855760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015260640160405180910390fd5b6200029081620002a0565b506005805460ff19166001179055565b6040518060800160405280604f8152602001620040fa604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600655565b8280546200035090620003e8565b90600052602060002090601f016020900481019282620003745760008555620003bf565b82601f106200038f57805160ff1916838001178555620003bf565b82800160010185558215620003bf579182015b82811115620003bf578251825591602001919060010190620003a2565b50620003cd929150620003d1565b5090565b5b80821115620003cd5760008155600101620003d2565b600181811c90821680620003fd57607f821691505b602082108114156200041f57634e487b7160e01b600052602260045260246000fd5b50919050565b613cc580620004356000396000f3fe60806040526004361061034a5760003560e01c806370a08231116101bb578063b88d4fde116100f7578063e081b78111610095578063f2fde38b1161006f578063f2fde38b1461096b578063f35372bf1461098b578063f47ccd5a146109a0578063f73c814b146109b557600080fd5b8063e081b78114610915578063e8a3d48514610936578063e985e9c51461094b57600080fd5b8063d8381788116100d1578063d8381788146108c1578063d8b066c2146108d7578063d8b4e311146108ec578063d96a094a1461090257600080fd5b8063b88d4fde14610854578063bba7723e14610874578063c87b56dd146108a157600080fd5b80638da5cb5b1161016457806395d89b411161013e57806395d89b41146107d05780639bf80316146107e5578063a22cb46514610812578063affe39c11461083257600080fd5b80638da5cb5b1461077d57806391ba317a1461079b578063938e3d7b146107b057600080fd5b80637bff43e1116101955780637bff43e11461072757806383a9e0491461073c57806385535cc51461075d57600080fd5b806370a08231146106d6578063715018a6146106f6578063771c46621461070b57600080fd5b80632f745c591161028a5780634f6ccce7116102335780635bab26e21161020d5780635bab26e21461063d5780635c9f0e451461066d5780635ce7af1f146106805780636352211e146106b657600080fd5b80634f6ccce7146105e7578063544259501461060757806355f804b31461061d57600080fd5b806342842e0e1161026457806342842e0e1461058757806342966c68146105a757806346a7dadc146105c757600080fd5b80632f745c591461053f5780633408e4701461055f5780633ccfd60b1461057257600080fd5b80630f7e5970116102f757806318160ddd116102d157806318160ddd146104b157806320379ee5146104d457806323b872dd146104e95780632d0335ab1461050957600080fd5b80630f7e597014610428578063147c071814610471578063163e1e611461049157600080fd5b8063081812fc11610328578063081812fc146103bd578063095ea7b3146103f55780630c53c51c1461041557600080fd5b806301ffc9a71461034f578063049c5c491461038457806306fdde031461039b575b600080fd5b34801561035b57600080fd5b5061036f61036a36600461346d565b6109d5565b60405190151581526020015b60405180910390f35b34801561039057600080fd5b50610399610a31565b005b3480156103a757600080fd5b506103b0610acc565b60405161037b91906134e2565b3480156103c957600080fd5b506103dd6103d83660046134f5565b610b5e565b6040516001600160a01b03909116815260200161037b565b34801561040157600080fd5b50610399610410366004613523565b610bf7565b6103b06104233660046135f2565b610d29565b34801561043457600080fd5b506103b06040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b34801561047d57600080fd5b5061039961048c366004613670565b610f2f565b34801561049d57600080fd5b506103996104ac3660046136e2565b610f95565b3480156104bd57600080fd5b506104c66110a3565b60405190815260200161037b565b3480156104e057600080fd5b506006546104c6565b3480156104f557600080fd5b50610399610504366004613745565b6110ff565b34801561051557600080fd5b506104c6610524366004613786565b6001600160a01b031660009081526007602052604090205490565b34801561054b57600080fd5b506104c661055a366004613523565b611187565b34801561056b57600080fd5b50466104c6565b34801561057e57600080fd5b50610399611264565b34801561059357600080fd5b506103996105a2366004613745565b611364565b3480156105b357600080fd5b506103996105c23660046134f5565b61137f565b3480156105d357600080fd5b506103996105e2366004613786565b6113f5565b3480156105f357600080fd5b506104c66106023660046134f5565b61147e565b34801561061357600080fd5b506104c660095481565b34801561062957600080fd5b50610399610638366004613670565b61155a565b34801561064957600080fd5b5061036f610658366004613786565b60106020526000908152604090205460ff1681565b61039961067b3660046137a3565b6115c0565b34801561068c57600080fd5b506104c661069b366004613786565b6001600160a01b031660009081526011602052604090205490565b3480156106c257600080fd5b506103dd6106d13660046134f5565b611858565b3480156106e257600080fd5b506104c66106f1366004613786565b611906565b34801561070257600080fd5b506103996119e0565b34801561071757600080fd5b506104c667011c37937e08000081565b34801561073357600080fd5b506103b0611a46565b34801561074857600080fd5b50600f5461036f90600160a01b900460ff1681565b34801561076957600080fd5b50610399610778366004613786565b611a55565b34801561078957600080fd5b506008546001600160a01b03166103dd565b3480156107a757600080fd5b506104c6611ade565b3480156107bc57600080fd5b506103996107cb366004613670565b611b02565b3480156107dc57600080fd5b506103b0611b68565b3480156107f157600080fd5b506104c6610800366004613786565b60116020526000908152604090205481565b34801561081e57600080fd5b5061039961082d3660046137f3565b611b77565b34801561083e57600080fd5b50610847611b86565b60405161037b9190613831565b34801561086057600080fd5b5061039961086f36600461387e565b611bec565b34801561088057600080fd5b5061089461088f366004613786565b611c74565b60405161037b91906138ea565b3480156108ad57600080fd5b506103b06108bc3660046134f5565b611dbd565b3480156108cd57600080fd5b506104c66122b881565b3480156108e357600080fd5b50610399611e49565b3480156108f857600080fd5b506104c661270f81565b6103996109103660046134f5565b611edf565b34801561092157600080fd5b50600f5461036f90600160a81b900460ff1681565b34801561094257600080fd5b506103b06120ce565b34801561095757600080fd5b5061036f610966366004613922565b6120dd565b34801561097757600080fd5b50610399610986366004613786565b6121da565b34801561099757600080fd5b506104c6600281565b3480156109ac57600080fd5b506104c6600481565b3480156109c157600080fd5b506103996109d0366004613786565b6122b9565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610a2b5750610a2b8261233c565b92915050565b6008546001600160a01b03163314610a905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600f80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b606060008054610adb90613950565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0790613950565b8015610b545780601f10610b2957610100808354040283529160200191610b54565b820191906000526020600020905b815481529060010190602001808311610b3757829003601f168201915b5050505050905090565b6000610b698261241f565b610bdb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a87565b506000908152600360205260409020546001600160a01b031690565b6000610c0282611858565b9050806001600160a01b0316836001600160a01b03161415610c8c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b336001600160a01b0382161480610ca85750610ca881336120dd565b610d1a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a87565b610d248383612469565b505050565b60408051606081810183526001600160a01b03881660008181526007602090815290859020548452830152918101869052610d6787828787876124e4565b610dd95760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b6001600160a01b038716600090815260076020526040902054610dfd9060016125ec565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610e4d90899033908a90613985565b60405180910390a1600080306001600160a01b0316888a604051602001610e759291906139ba565b60408051601f1981840301815290829052610e8f91613a04565b6000604051808303816000865af19150503d8060008114610ecc576040519150601f19603f3d011682016040523d82523d6000602084013e610ed1565b606091505b509150915081610f235760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610a87565b98975050505050505050565b6008546001600160a01b03163314610f895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b610d24600c83836133a6565b6008546001600160a01b03163314610fef5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600254819061270f906110029083613a36565b11156110505760405162461bcd60e51b815260206004820152600e60248201527f4578636565647320537570706c790000000000000000000000000000000000006044820152606401610a87565b60005b8181101561109d5761108a84848381811061107057611070613a4e565b90506020020160208101906110859190613786565b6125ff565b508061109581613a64565b915050611053565b50505050565b600254600090815b818110156110fa5760006001600160a01b0316600282815481106110d1576110d1613a4e565b6000918252602090912001546001600160a01b0316146110f2578260010192505b6001016110ab565b505090565b61110a335b8261261a565b61117c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a87565b610d248383836126ed565b6002546000905b808210156111e857836001600160a01b0316600283815481106111b3576111b3613a4e565b6000918252602090912001546001600160a01b031614156111dd576000198301926111dd576111e8565b81600101915061118e565b80821061125d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610a87565b5092915050565b6008546001600160a01b031633146112be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600d546040516000916001600160a01b03169047908381818185875af1925050503d806000811461130b576040519150601f19603f3d011682016040523d82523d6000602084013e611310565b606091505b50509050806113615760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2073656e6420746f207661756c742e00000000000000006044820152606401610a87565b50565b610d2483838360405180602001604052806000815250611bec565b61138833611104565b6113d45760405162461bcd60e51b815260206004820152601560248201527f4e6f7420617070726f76656420746f206275726e2e00000000000000000000006044820152606401610a87565b6113dd8161287d565b600980549060006113ed83613a64565b919050555050565b6008546001600160a01b0316331461144f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6002546000905b808210156114df5760006001600160a01b0316600283815481106114ab576114ab613a4e565b6000918252602090912001546001600160a01b0316146114d4576000198301926114d4576114df565b816001019150611485565b8082106115545760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610a87565b50919050565b6008546001600160a01b031633146115b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b610d24600b83836133a6565b600f54600160a81b900460ff161580156115e35750600f54600160a01b900460ff165b61162f5760405162461bcd60e51b815260206004820152601060248201527f50726573616c6520496e616374697665000000000000000000000000000000006044820152606401610a87565b6116398282612907565b6116855760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742044697361626c656420666f722050726573616c650000006044820152606401610a87565b60028311156116d65760405162461bcd60e51b815260206004820152600a60248201527f457863656564204d6178000000000000000000000000000000000000000000006044820152606401610a87565b336000908152601160205260409020546002906116f4908590613a36565b11156117425760405162461bcd60e51b815260206004820152601360248201527f486f6c64696e67204d617820416c6c6f776564000000000000000000000000006044820152606401610a87565b346117558467011c37937e080000613a7f565b11156117a35760405162461bcd60e51b815260206004820152600860248201527f4d6f7265204554480000000000000000000000000000000000000000000000006044820152606401610a87565b6122b8836117af6110a3565b6117b99190613a36565b11156118075760405162461bcd60e51b815260206004820152600d60248201527f45786365656420537570706c79000000000000000000000000000000000000006044820152606401610a87565b60005b8381101561182e5761181b336125ff565b508061182681613a64565b91505061180a565b50336000908152601160205260408120805485929061184e908490613a36565b9091555050505050565b60006118638261241f565b6118d55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610a87565b6000600283815481106118ea576118ea613a4e565b6000918252602090912001546001600160a01b03169392505050565b60006001600160a01b0382166119845760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610a87565b60025460005b818110156119d957836001600160a01b0316600282815481106119af576119af613a4e565b6000918252602090912001546001600160a01b031614156119d1578260010192505b60010161198a565b5050919050565b6008546001600160a01b03163314611a3a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b611a44600061292b565b565b6060600c8054610adb90613950565b6008546001600160a01b03163314611aaf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600254600090611aee5750600090565b600254611afd90600190613a9e565b905090565b6008546001600160a01b03163314611b5c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b610d24600a83836133a6565b606060018054610adb90613950565b611b8233838361298a565b5050565b606060006002805480602002602001604051908101604052809291908181526020018280548015611be057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bc2575b50939695505050505050565b611bf6338361261a565b611c685760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a87565b61109d84848484612a59565b60606000611c8183611906565b905080611cf65760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f2060448201527f746f6b656e7300000000000000000000000000000000000000000000000000006064820152608401610a87565b60025460008267ffffffffffffffff811115611d1457611d1461354f565b604051908082528060200260200182016040528015611d3d578160200160208202803683370190505b5090506000805b83811015611db257866001600160a01b031660028281548110611d6957611d69613a4e565b6000918252602090912001546001600160a01b03161415611daa5780838380600101945081518110611d9d57611d9d613a4e565b6020026020010181815250505b600101611d44565b509095945050505050565b6060611dc88261241f565b611e145760405162461bcd60e51b815260206004820152601160248201527f4e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006044820152606401610a87565b600b611e1f83612ae2565b600c604051602001611e3393929190613b4f565b6040516020818303038152906040529050919050565b6008546001600160a01b03163314611ea35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b600f54600160a81b900460ff16611f385760405162461bcd60e51b815260206004820152600d60248201527f53616c6520496e616374697665000000000000000000000000000000000000006044820152606401610a87565b600f54600160a01b900460ff1615611f925760405162461bcd60e51b815260206004820152600c60248201527f4f6e6c792050726573616c6500000000000000000000000000000000000000006044820152606401610a87565b6004811115611fe35760405162461bcd60e51b815260206004820152600a60248201527f457863656564204d6178000000000000000000000000000000000000000000006044820152606401610a87565b61270f81611fef6110a3565b611ff99190613a36565b106120465760405162461bcd60e51b815260206004820152600c60248201527f4f7574206f662053746f636b00000000000000000000000000000000000000006044820152606401610a87565b346120598267011c37937e080000613a7f565b11156120a75760405162461bcd60e51b815260206004820152600f60248201527f4d6f726520455448204e656564656400000000000000000000000000000000006044820152606401610a87565b60005b81811015611b82576120bb336125ff565b50806120c681613a64565b9150506120aa565b6060600a8054610adb90613950565b600f546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260009281169190841690829063c455279190602401602060405180830381865afa158015612148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216c9190613b82565b6001600160a01b0316148061219957506001600160a01b03831660009081526010602052604090205460ff165b156121a8576001915050610a2b565b6001600160a01b0380851660009081526004602090815260408083209387168352929052205460ff165b949350505050565b6008546001600160a01b031633146122345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b6001600160a01b0381166122b05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a87565b6113618161292b565b6008546001600160a01b031633146123135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b6001600160a01b03166000908152601060205260409020805460ff19811660ff90911615179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806123cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a2b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2b565b60025460009082108015610a2b575060006001600160a01b03166002838154811061244c5761244c613a4e565b6000918252602090912001546001600160a01b0316141592915050565b6000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906124ab82611858565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166125625760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201527f49474e45520000000000000000000000000000000000000000000000000000006064820152608401610a87565b600161257561257087612c14565b612c91565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa1580156125c3573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006125f88284613a36565b9392505050565b6000610a2b8260405180602001604052806000815250612cdc565b60006126258261241f565b6126975760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a87565b60006126a283611858565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610b5e565b6001600160a01b0316145b806121d257506121d281856120dd565b826001600160a01b031661270082611858565b6001600160a01b03161461277c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610a87565b6001600160a01b0382166127f75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610a87565b612802600082612469565b816002828154811061281657612816613a4e565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600061288882611858565b9050612895600083612469565b600282815481106128a8576128a8613a4e565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff191690556040518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006129138383612d68565b600e546001600160a01b039182169116149392505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156129ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a87565b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a648484846126ed565b612a7084848484612d8c565b61109d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a87565b606081612b2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612b4c5780612b3681613a64565b9150612b459050600a83613bb5565b9150612b26565b60008167ffffffffffffffff811115612b6757612b6761354f565b6040519080825280601f01601f191660200182016040528015612b91576020820181803683370190505b5090505b84156121d257612ba6600183613a9e565b9150612bb3600a86613bc9565b612bbe906030613a36565b60f81b818381518110612bd357612bd3613a4e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612c0d600a86613bb5565b9450612b95565b6000604051806080016040528060438152602001613c4d6043913980516020918201208351848301516040808701518051908601209051612c74950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000612c9c60065490565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201612c74565b6000612ce783612f2a565b9050612cf66000848385612d8c565b610a2b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a87565b6000806000612d778585613010565b91509150612d8481613080565b509392505050565b60006001600160a01b0384163b15612f1f576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290612de9903390899088908890600401613bdd565b6020604051808303816000875af1925050508015612e24575060408051601f3d908101601f19168201909252612e2191810190613c19565b60015b612ed4573d808015612e52576040519150601f19603f3d011682016040523d82523d6000602084013e612e57565b606091505b508051612ecc5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a87565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506121d2565b506001949350505050565b60006001600160a01b038216612f825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a87565b506002546002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b6000808251604114156130475760208301516040840151606085015160001a61303b87828585613271565b94509450505050613079565b825160401415613071576020830151604084015161306686838361335e565b935093505050613079565b506000905060025b9250929050565b600081600481111561309457613094613c36565b141561309d5750565b60018160048111156130b1576130b1613c36565b14156130ff5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a87565b600281600481111561311357613113613c36565b14156131615760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a87565b600381600481111561317557613175613c36565b14156131e95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b60048160048111156131fd576131fd613c36565b14156113615760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156132a85750600090506003613355565b8460ff16601b141580156132c057508460ff16601c14155b156132d15750600090506004613355565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613325573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661334e57600060019250925050613355565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161339887828885613271565b935093505050935093915050565b8280546133b290613950565b90600052602060002090601f0160209004810192826133d4576000855561341a565b82601f106133ed5782800160ff1982351617855561341a565b8280016001018555821561341a579182015b8281111561341a5782358255916020019190600101906133ff565b5061342692915061342a565b5090565b5b80821115613426576000815560010161342b565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461136157600080fd5b60006020828403121561347f57600080fd5b81356125f88161343f565b60005b838110156134a557818101518382015260200161348d565b8381111561109d5750506000910152565b600081518084526134ce81602086016020860161348a565b601f01601f19169290920160200192915050565b6020815260006125f860208301846134b6565b60006020828403121561350757600080fd5b5035919050565b6001600160a01b038116811461136157600080fd5b6000806040838503121561353657600080fd5b82356135418161350e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261357657600080fd5b813567ffffffffffffffff808211156135915761359161354f565b604051601f8301601f19908116603f011681019082821181831017156135b9576135b961354f565b816040528381528660208588010111156135d257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561360a57600080fd5b85356136158161350e565b9450602086013567ffffffffffffffff81111561363157600080fd5b61363d88828901613565565b9450506040860135925060608601359150608086013560ff8116811461366257600080fd5b809150509295509295909350565b6000806020838503121561368357600080fd5b823567ffffffffffffffff8082111561369b57600080fd5b818501915085601f8301126136af57600080fd5b8135818111156136be57600080fd5b8660208285010111156136d057600080fd5b60209290920196919550909350505050565b600080602083850312156136f557600080fd5b823567ffffffffffffffff8082111561370d57600080fd5b818501915085601f83011261372157600080fd5b81358181111561373057600080fd5b8660208260051b85010111156136d057600080fd5b60008060006060848603121561375a57600080fd5b83356137658161350e565b925060208401356137758161350e565b929592945050506040919091013590565b60006020828403121561379857600080fd5b81356125f88161350e565b6000806000606084860312156137b857600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156137dd57600080fd5b6137e986828701613565565b9150509250925092565b6000806040838503121561380657600080fd5b82356138118161350e565b91506020830135801515811461382657600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156138725783516001600160a01b03168352928401929184019160010161384d565b50909695505050505050565b6000806000806080858703121561389457600080fd5b843561389f8161350e565b935060208501356138af8161350e565b925060408501359150606085013567ffffffffffffffff8111156138d257600080fd5b6138de87828801613565565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b8181101561387257835183529284019291840191600101613906565b6000806040838503121561393557600080fd5b82356139408161350e565b915060208301356138268161350e565b600181811c9082168061396457607f821691505b6020821081141561155457634e487b7160e01b600052602260045260246000fd5b60006001600160a01b038086168352808516602084015250606060408301526139b160608301846134b6565b95945050505050565b600083516139cc81846020880161348a565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b60008251613a1681846020870161348a565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613a4957613a49613a20565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613a7857613a78613a20565b5060010190565b6000816000190483118215151615613a9957613a99613a20565b500290565b600082821015613ab057613ab0613a20565b500390565b8054600090600181811c9080831680613acf57607f831692505b6020808410821415613af157634e487b7160e01b600052602260045260246000fd5b818015613b055760018114613b1657613b43565b60ff19861689528489019650613b43565b60008881526020902060005b86811015613b3b5781548b820152908501908301613b22565b505084890196505b50505050505092915050565b6000613b5b8286613ab5565b8451613b6b81836020890161348a565b613b7781830186613ab5565b979650505050505050565b600060208284031215613b9457600080fd5b81516125f88161350e565b634e487b7160e01b600052601260045260246000fd5b600082613bc457613bc4613b9f565b500490565b600082613bd857613bd8613b9f565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613c0f60808301846134b6565b9695505050505050565b600060208284031215613c2b57600080fd5b81516125f88161343f565b634e487b7160e01b600052602160045260246000fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a264697066735822122014e544c5863b6e78fd53629fc317a70dbaca4fac8dd92687df74ec0b66316b7264736f6c634300080b0033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742968747470733a2f2f6362632e6d7970696e6174612e636c6f75642f697066732f516d64626f347a31574c64754c6f4d6537735539595865385344476b694663377558776e6e6f644a32616e66633568747470733a2f2f6362632e6d7970696e6174612e636c6f75642f697066732f516d5a5a35466951384656726f796e4a346539763771354e5079676f6a577633784678704a5a6a6178536b7831482f
Deployed Bytecode
0x60806040526004361061034a5760003560e01c806370a08231116101bb578063b88d4fde116100f7578063e081b78111610095578063f2fde38b1161006f578063f2fde38b1461096b578063f35372bf1461098b578063f47ccd5a146109a0578063f73c814b146109b557600080fd5b8063e081b78114610915578063e8a3d48514610936578063e985e9c51461094b57600080fd5b8063d8381788116100d1578063d8381788146108c1578063d8b066c2146108d7578063d8b4e311146108ec578063d96a094a1461090257600080fd5b8063b88d4fde14610854578063bba7723e14610874578063c87b56dd146108a157600080fd5b80638da5cb5b1161016457806395d89b411161013e57806395d89b41146107d05780639bf80316146107e5578063a22cb46514610812578063affe39c11461083257600080fd5b80638da5cb5b1461077d57806391ba317a1461079b578063938e3d7b146107b057600080fd5b80637bff43e1116101955780637bff43e11461072757806383a9e0491461073c57806385535cc51461075d57600080fd5b806370a08231146106d6578063715018a6146106f6578063771c46621461070b57600080fd5b80632f745c591161028a5780634f6ccce7116102335780635bab26e21161020d5780635bab26e21461063d5780635c9f0e451461066d5780635ce7af1f146106805780636352211e146106b657600080fd5b80634f6ccce7146105e7578063544259501461060757806355f804b31461061d57600080fd5b806342842e0e1161026457806342842e0e1461058757806342966c68146105a757806346a7dadc146105c757600080fd5b80632f745c591461053f5780633408e4701461055f5780633ccfd60b1461057257600080fd5b80630f7e5970116102f757806318160ddd116102d157806318160ddd146104b157806320379ee5146104d457806323b872dd146104e95780632d0335ab1461050957600080fd5b80630f7e597014610428578063147c071814610471578063163e1e611461049157600080fd5b8063081812fc11610328578063081812fc146103bd578063095ea7b3146103f55780630c53c51c1461041557600080fd5b806301ffc9a71461034f578063049c5c491461038457806306fdde031461039b575b600080fd5b34801561035b57600080fd5b5061036f61036a36600461346d565b6109d5565b60405190151581526020015b60405180910390f35b34801561039057600080fd5b50610399610a31565b005b3480156103a757600080fd5b506103b0610acc565b60405161037b91906134e2565b3480156103c957600080fd5b506103dd6103d83660046134f5565b610b5e565b6040516001600160a01b03909116815260200161037b565b34801561040157600080fd5b50610399610410366004613523565b610bf7565b6103b06104233660046135f2565b610d29565b34801561043457600080fd5b506103b06040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b34801561047d57600080fd5b5061039961048c366004613670565b610f2f565b34801561049d57600080fd5b506103996104ac3660046136e2565b610f95565b3480156104bd57600080fd5b506104c66110a3565b60405190815260200161037b565b3480156104e057600080fd5b506006546104c6565b3480156104f557600080fd5b50610399610504366004613745565b6110ff565b34801561051557600080fd5b506104c6610524366004613786565b6001600160a01b031660009081526007602052604090205490565b34801561054b57600080fd5b506104c661055a366004613523565b611187565b34801561056b57600080fd5b50466104c6565b34801561057e57600080fd5b50610399611264565b34801561059357600080fd5b506103996105a2366004613745565b611364565b3480156105b357600080fd5b506103996105c23660046134f5565b61137f565b3480156105d357600080fd5b506103996105e2366004613786565b6113f5565b3480156105f357600080fd5b506104c66106023660046134f5565b61147e565b34801561061357600080fd5b506104c660095481565b34801561062957600080fd5b50610399610638366004613670565b61155a565b34801561064957600080fd5b5061036f610658366004613786565b60106020526000908152604090205460ff1681565b61039961067b3660046137a3565b6115c0565b34801561068c57600080fd5b506104c661069b366004613786565b6001600160a01b031660009081526011602052604090205490565b3480156106c257600080fd5b506103dd6106d13660046134f5565b611858565b3480156106e257600080fd5b506104c66106f1366004613786565b611906565b34801561070257600080fd5b506103996119e0565b34801561071757600080fd5b506104c667011c37937e08000081565b34801561073357600080fd5b506103b0611a46565b34801561074857600080fd5b50600f5461036f90600160a01b900460ff1681565b34801561076957600080fd5b50610399610778366004613786565b611a55565b34801561078957600080fd5b506008546001600160a01b03166103dd565b3480156107a757600080fd5b506104c6611ade565b3480156107bc57600080fd5b506103996107cb366004613670565b611b02565b3480156107dc57600080fd5b506103b0611b68565b3480156107f157600080fd5b506104c6610800366004613786565b60116020526000908152604090205481565b34801561081e57600080fd5b5061039961082d3660046137f3565b611b77565b34801561083e57600080fd5b50610847611b86565b60405161037b9190613831565b34801561086057600080fd5b5061039961086f36600461387e565b611bec565b34801561088057600080fd5b5061089461088f366004613786565b611c74565b60405161037b91906138ea565b3480156108ad57600080fd5b506103b06108bc3660046134f5565b611dbd565b3480156108cd57600080fd5b506104c66122b881565b3480156108e357600080fd5b50610399611e49565b3480156108f857600080fd5b506104c661270f81565b6103996109103660046134f5565b611edf565b34801561092157600080fd5b50600f5461036f90600160a81b900460ff1681565b34801561094257600080fd5b506103b06120ce565b34801561095757600080fd5b5061036f610966366004613922565b6120dd565b34801561097757600080fd5b50610399610986366004613786565b6121da565b34801561099757600080fd5b506104c6600281565b3480156109ac57600080fd5b506104c6600481565b3480156109c157600080fd5b506103996109d0366004613786565b6122b9565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610a2b5750610a2b8261233c565b92915050565b6008546001600160a01b03163314610a905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600f80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b606060008054610adb90613950565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0790613950565b8015610b545780601f10610b2957610100808354040283529160200191610b54565b820191906000526020600020905b815481529060010190602001808311610b3757829003601f168201915b5050505050905090565b6000610b698261241f565b610bdb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a87565b506000908152600360205260409020546001600160a01b031690565b6000610c0282611858565b9050806001600160a01b0316836001600160a01b03161415610c8c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b336001600160a01b0382161480610ca85750610ca881336120dd565b610d1a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a87565b610d248383612469565b505050565b60408051606081810183526001600160a01b03881660008181526007602090815290859020548452830152918101869052610d6787828787876124e4565b610dd95760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b6001600160a01b038716600090815260076020526040902054610dfd9060016125ec565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610e4d90899033908a90613985565b60405180910390a1600080306001600160a01b0316888a604051602001610e759291906139ba565b60408051601f1981840301815290829052610e8f91613a04565b6000604051808303816000865af19150503d8060008114610ecc576040519150601f19603f3d011682016040523d82523d6000602084013e610ed1565b606091505b509150915081610f235760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610a87565b98975050505050505050565b6008546001600160a01b03163314610f895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b610d24600c83836133a6565b6008546001600160a01b03163314610fef5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600254819061270f906110029083613a36565b11156110505760405162461bcd60e51b815260206004820152600e60248201527f4578636565647320537570706c790000000000000000000000000000000000006044820152606401610a87565b60005b8181101561109d5761108a84848381811061107057611070613a4e565b90506020020160208101906110859190613786565b6125ff565b508061109581613a64565b915050611053565b50505050565b600254600090815b818110156110fa5760006001600160a01b0316600282815481106110d1576110d1613a4e565b6000918252602090912001546001600160a01b0316146110f2578260010192505b6001016110ab565b505090565b61110a335b8261261a565b61117c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a87565b610d248383836126ed565b6002546000905b808210156111e857836001600160a01b0316600283815481106111b3576111b3613a4e565b6000918252602090912001546001600160a01b031614156111dd576000198301926111dd576111e8565b81600101915061118e565b80821061125d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610a87565b5092915050565b6008546001600160a01b031633146112be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600d546040516000916001600160a01b03169047908381818185875af1925050503d806000811461130b576040519150601f19603f3d011682016040523d82523d6000602084013e611310565b606091505b50509050806113615760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2073656e6420746f207661756c742e00000000000000006044820152606401610a87565b50565b610d2483838360405180602001604052806000815250611bec565b61138833611104565b6113d45760405162461bcd60e51b815260206004820152601560248201527f4e6f7420617070726f76656420746f206275726e2e00000000000000000000006044820152606401610a87565b6113dd8161287d565b600980549060006113ed83613a64565b919050555050565b6008546001600160a01b0316331461144f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6002546000905b808210156114df5760006001600160a01b0316600283815481106114ab576114ab613a4e565b6000918252602090912001546001600160a01b0316146114d4576000198301926114d4576114df565b816001019150611485565b8082106115545760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610a87565b50919050565b6008546001600160a01b031633146115b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b610d24600b83836133a6565b600f54600160a81b900460ff161580156115e35750600f54600160a01b900460ff165b61162f5760405162461bcd60e51b815260206004820152601060248201527f50726573616c6520496e616374697665000000000000000000000000000000006044820152606401610a87565b6116398282612907565b6116855760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742044697361626c656420666f722050726573616c650000006044820152606401610a87565b60028311156116d65760405162461bcd60e51b815260206004820152600a60248201527f457863656564204d6178000000000000000000000000000000000000000000006044820152606401610a87565b336000908152601160205260409020546002906116f4908590613a36565b11156117425760405162461bcd60e51b815260206004820152601360248201527f486f6c64696e67204d617820416c6c6f776564000000000000000000000000006044820152606401610a87565b346117558467011c37937e080000613a7f565b11156117a35760405162461bcd60e51b815260206004820152600860248201527f4d6f7265204554480000000000000000000000000000000000000000000000006044820152606401610a87565b6122b8836117af6110a3565b6117b99190613a36565b11156118075760405162461bcd60e51b815260206004820152600d60248201527f45786365656420537570706c79000000000000000000000000000000000000006044820152606401610a87565b60005b8381101561182e5761181b336125ff565b508061182681613a64565b91505061180a565b50336000908152601160205260408120805485929061184e908490613a36565b9091555050505050565b60006118638261241f565b6118d55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610a87565b6000600283815481106118ea576118ea613a4e565b6000918252602090912001546001600160a01b03169392505050565b60006001600160a01b0382166119845760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610a87565b60025460005b818110156119d957836001600160a01b0316600282815481106119af576119af613a4e565b6000918252602090912001546001600160a01b031614156119d1578260010192505b60010161198a565b5050919050565b6008546001600160a01b03163314611a3a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b611a44600061292b565b565b6060600c8054610adb90613950565b6008546001600160a01b03163314611aaf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600254600090611aee5750600090565b600254611afd90600190613a9e565b905090565b6008546001600160a01b03163314611b5c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b610d24600a83836133a6565b606060018054610adb90613950565b611b8233838361298a565b5050565b606060006002805480602002602001604051908101604052809291908181526020018280548015611be057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bc2575b50939695505050505050565b611bf6338361261a565b611c685760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610a87565b61109d84848484612a59565b60606000611c8183611906565b905080611cf65760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f2060448201527f746f6b656e7300000000000000000000000000000000000000000000000000006064820152608401610a87565b60025460008267ffffffffffffffff811115611d1457611d1461354f565b604051908082528060200260200182016040528015611d3d578160200160208202803683370190505b5090506000805b83811015611db257866001600160a01b031660028281548110611d6957611d69613a4e565b6000918252602090912001546001600160a01b03161415611daa5780838380600101945081518110611d9d57611d9d613a4e565b6020026020010181815250505b600101611d44565b509095945050505050565b6060611dc88261241f565b611e145760405162461bcd60e51b815260206004820152601160248201527f4e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006044820152606401610a87565b600b611e1f83612ae2565b600c604051602001611e3393929190613b4f565b6040516020818303038152906040529050919050565b6008546001600160a01b03163314611ea35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b600f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b600f54600160a81b900460ff16611f385760405162461bcd60e51b815260206004820152600d60248201527f53616c6520496e616374697665000000000000000000000000000000000000006044820152606401610a87565b600f54600160a01b900460ff1615611f925760405162461bcd60e51b815260206004820152600c60248201527f4f6e6c792050726573616c6500000000000000000000000000000000000000006044820152606401610a87565b6004811115611fe35760405162461bcd60e51b815260206004820152600a60248201527f457863656564204d6178000000000000000000000000000000000000000000006044820152606401610a87565b61270f81611fef6110a3565b611ff99190613a36565b106120465760405162461bcd60e51b815260206004820152600c60248201527f4f7574206f662053746f636b00000000000000000000000000000000000000006044820152606401610a87565b346120598267011c37937e080000613a7f565b11156120a75760405162461bcd60e51b815260206004820152600f60248201527f4d6f726520455448204e656564656400000000000000000000000000000000006044820152606401610a87565b60005b81811015611b82576120bb336125ff565b50806120c681613a64565b9150506120aa565b6060600a8054610adb90613950565b600f546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260009281169190841690829063c455279190602401602060405180830381865afa158015612148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216c9190613b82565b6001600160a01b0316148061219957506001600160a01b03831660009081526010602052604090205460ff165b156121a8576001915050610a2b565b6001600160a01b0380851660009081526004602090815260408083209387168352929052205460ff165b949350505050565b6008546001600160a01b031633146122345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b6001600160a01b0381166122b05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a87565b6113618161292b565b6008546001600160a01b031633146123135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a87565b6001600160a01b03166000908152601060205260409020805460ff19811660ff90911615179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806123cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a2b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a2b565b60025460009082108015610a2b575060006001600160a01b03166002838154811061244c5761244c613a4e565b6000918252602090912001546001600160a01b0316141592915050565b6000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906124ab82611858565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166125625760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201527f49474e45520000000000000000000000000000000000000000000000000000006064820152608401610a87565b600161257561257087612c14565b612c91565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa1580156125c3573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006125f88284613a36565b9392505050565b6000610a2b8260405180602001604052806000815250612cdc565b60006126258261241f565b6126975760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a87565b60006126a283611858565b9050806001600160a01b0316846001600160a01b031614806126dd5750836001600160a01b03166126d284610b5e565b6001600160a01b0316145b806121d257506121d281856120dd565b826001600160a01b031661270082611858565b6001600160a01b03161461277c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610a87565b6001600160a01b0382166127f75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610a87565b612802600082612469565b816002828154811061281657612816613a4e565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600061288882611858565b9050612895600083612469565b600282815481106128a8576128a8613a4e565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff191690556040518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006129138383612d68565b600e546001600160a01b039182169116149392505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156129ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a87565b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a648484846126ed565b612a7084848484612d8c565b61109d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a87565b606081612b2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612b4c5780612b3681613a64565b9150612b459050600a83613bb5565b9150612b26565b60008167ffffffffffffffff811115612b6757612b6761354f565b6040519080825280601f01601f191660200182016040528015612b91576020820181803683370190505b5090505b84156121d257612ba6600183613a9e565b9150612bb3600a86613bc9565b612bbe906030613a36565b60f81b818381518110612bd357612bd3613a4e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612c0d600a86613bb5565b9450612b95565b6000604051806080016040528060438152602001613c4d6043913980516020918201208351848301516040808701518051908601209051612c74950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000612c9c60065490565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201612c74565b6000612ce783612f2a565b9050612cf66000848385612d8c565b610a2b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a87565b6000806000612d778585613010565b91509150612d8481613080565b509392505050565b60006001600160a01b0384163b15612f1f576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290612de9903390899088908890600401613bdd565b6020604051808303816000875af1925050508015612e24575060408051601f3d908101601f19168201909252612e2191810190613c19565b60015b612ed4573d808015612e52576040519150601f19603f3d011682016040523d82523d6000602084013e612e57565b606091505b508051612ecc5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610a87565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506121d2565b506001949350505050565b60006001600160a01b038216612f825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a87565b506002546002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b6000808251604114156130475760208301516040840151606085015160001a61303b87828585613271565b94509450505050613079565b825160401415613071576020830151604084015161306686838361335e565b935093505050613079565b506000905060025b9250929050565b600081600481111561309457613094613c36565b141561309d5750565b60018160048111156130b1576130b1613c36565b14156130ff5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a87565b600281600481111561311357613113613c36565b14156131615760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a87565b600381600481111561317557613175613c36565b14156131e95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b60048160048111156131fd576131fd613c36565b14156113615760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610a87565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156132a85750600090506003613355565b8460ff16601b141580156132c057508460ff16601c14155b156132d15750600090506004613355565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613325573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661334e57600060019250925050613355565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161339887828885613271565b935093505050935093915050565b8280546133b290613950565b90600052602060002090601f0160209004810192826133d4576000855561341a565b82601f106133ed5782800160ff1982351617855561341a565b8280016001018555821561341a579182015b8281111561341a5782358255916020019190600101906133ff565b5061342692915061342a565b5090565b5b80821115613426576000815560010161342b565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461136157600080fd5b60006020828403121561347f57600080fd5b81356125f88161343f565b60005b838110156134a557818101518382015260200161348d565b8381111561109d5750506000910152565b600081518084526134ce81602086016020860161348a565b601f01601f19169290920160200192915050565b6020815260006125f860208301846134b6565b60006020828403121561350757600080fd5b5035919050565b6001600160a01b038116811461136157600080fd5b6000806040838503121561353657600080fd5b82356135418161350e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261357657600080fd5b813567ffffffffffffffff808211156135915761359161354f565b604051601f8301601f19908116603f011681019082821181831017156135b9576135b961354f565b816040528381528660208588010111156135d257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561360a57600080fd5b85356136158161350e565b9450602086013567ffffffffffffffff81111561363157600080fd5b61363d88828901613565565b9450506040860135925060608601359150608086013560ff8116811461366257600080fd5b809150509295509295909350565b6000806020838503121561368357600080fd5b823567ffffffffffffffff8082111561369b57600080fd5b818501915085601f8301126136af57600080fd5b8135818111156136be57600080fd5b8660208285010111156136d057600080fd5b60209290920196919550909350505050565b600080602083850312156136f557600080fd5b823567ffffffffffffffff8082111561370d57600080fd5b818501915085601f83011261372157600080fd5b81358181111561373057600080fd5b8660208260051b85010111156136d057600080fd5b60008060006060848603121561375a57600080fd5b83356137658161350e565b925060208401356137758161350e565b929592945050506040919091013590565b60006020828403121561379857600080fd5b81356125f88161350e565b6000806000606084860312156137b857600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156137dd57600080fd5b6137e986828701613565565b9150509250925092565b6000806040838503121561380657600080fd5b82356138118161350e565b91506020830135801515811461382657600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156138725783516001600160a01b03168352928401929184019160010161384d565b50909695505050505050565b6000806000806080858703121561389457600080fd5b843561389f8161350e565b935060208501356138af8161350e565b925060408501359150606085013567ffffffffffffffff8111156138d257600080fd5b6138de87828801613565565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b8181101561387257835183529284019291840191600101613906565b6000806040838503121561393557600080fd5b82356139408161350e565b915060208301356138268161350e565b600181811c9082168061396457607f821691505b6020821081141561155457634e487b7160e01b600052602260045260246000fd5b60006001600160a01b038086168352808516602084015250606060408301526139b160608301846134b6565b95945050505050565b600083516139cc81846020880161348a565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b60008251613a1681846020870161348a565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613a4957613a49613a20565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613a7857613a78613a20565b5060010190565b6000816000190483118215151615613a9957613a99613a20565b500290565b600082821015613ab057613ab0613a20565b500390565b8054600090600181811c9080831680613acf57607f831692505b6020808410821415613af157634e487b7160e01b600052602260045260246000fd5b818015613b055760018114613b1657613b43565b60ff19861689528489019650613b43565b60008881526020902060005b86811015613b3b5781548b820152908501908301613b22565b505084890196505b50505050505092915050565b6000613b5b8286613ab5565b8451613b6b81836020890161348a565b613b7781830186613ab5565b979650505050505050565b600060208284031215613b9457600080fd5b81516125f88161350e565b634e487b7160e01b600052601260045260246000fd5b600082613bc457613bc4613b9f565b500490565b600082613bd857613bd8613b9f565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613c0f60808301846134b6565b9695505050505050565b600060208284031215613c2b57600080fd5b81516125f88161343f565b634e487b7160e01b600052602160045260246000fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a264697066735822122014e544c5863b6e78fd53629fc317a70dbaca4fac8dd92687df74ec0b66316b7264736f6c634300080b0033
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.