Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
444 APOSTLE
Holders
41
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 APOSTLELoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
ApostolicNFT
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; // File: solidity-bits/contracts/Popcount.sol /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ //pragma solidity ^0.8.0; library Popcount { uint256 private constant m1 = 0x5555555555555555555555555555555555555555555555555555555555555555; uint256 private constant m2 = 0x3333333333333333333333333333333333333333333333333333333333333333; uint256 private constant m4 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f; uint256 private constant h01 = 0x0101010101010101010101010101010101010101010101010101010101010101; function popcount256A(uint256 x) internal pure returns (uint256 count) { unchecked{ for (count=0; x!=0; count++) x &= x - 1; } } function popcount256B(uint256 x) internal pure returns (uint256) { if (x == type(uint256).max) { return 256; } unchecked { x -= (x >> 1) & m1; //put count of each 2 bits into those 2 bits x = (x & m2) + ((x >> 2) & m2); //put count of each 4 bits into those 4 bits x = (x + (x >> 4)) & m4; //put count of each 8 bits into those 8 bits x = (x * h01) >> 248; //returns left 8 bits of x + (x<<8) + (x<<16) + (x<<24) + ... } return x; } } // File: solidity-bits/contracts/BitScan.sol /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ //pragma solidity ^0.8.0; library BitScan { uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff; bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8"; /** @dev Isolate the least significant set bit. */ function isolateLS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { return bb & (0 - bb); } } /** @dev Isolate the most significant set bit. */ function isolateMS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { bb |= bb >> 128; bb |= bb >> 64; bb |= bb >> 32; bb |= bb >> 16; bb |= bb >> 8; bb |= bb >> 4; bb |= bb >> 2; bb |= bb >> 1; return (bb >> 1) + 1; } } /** @dev Find the index of the lest significant set bit. (trailing zero count) */ function bitScanForward256(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]); } } /** @dev Find the index of the most significant set bit. */ function bitScanReverse256(uint256 bb) pure internal returns (uint8) { unchecked { return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]); } } function log2(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]); } } } // File: solidity-bits/contracts/BitMaps.sol /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ //pragma solidity ^0.8.0; /** * @dev This Library is a modified version of Openzeppelin's BitMaps library with extra features. * * 1. Functions of finding the index of the closest set bit from a given index are added. * The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB. * The modification of indexing makes finding the closest previous set bit more efficient in gas usage. * 2. Setting and unsetting the bitmap consecutively. * 3. Accounting number of set bits within a given range. * */ /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { using BitScan for uint256; uint256 private constant MASK_INDEX_ZERO = (1 << 255); uint256 private constant MASK_FULL = type(uint256).max; struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] &= ~mask; } /** * @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`. */ function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex; } else { bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex; amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = MASK_FULL; amount -= 256; bucket++; } bitmap._data[bucket] |= MASK_FULL << (256 - amount); } } } /** * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`. */ function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex); } else { bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = 0; amount -= 256; bucket++; } bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount)); } } } /** * @dev Returns number of set bits within a range. */ function popcountA(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { count += Popcount.popcount256A( bitmap._data[bucket] & (MASK_FULL << (256 - amount) >> bucketStartIndex) ); } else { count += Popcount.popcount256A( bitmap._data[bucket] & (MASK_FULL >> bucketStartIndex) ); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { count += Popcount.popcount256A(bitmap._data[bucket]); amount -= 256; bucket++; } count += Popcount.popcount256A( bitmap._data[bucket] & (MASK_FULL << (256 - amount)) ); } } } /** * @dev Returns number of set bits within a range. */ function popcountB(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { count += Popcount.popcount256B( bitmap._data[bucket] & (MASK_FULL << (256 - amount) >> bucketStartIndex) ); } else { count += Popcount.popcount256B( bitmap._data[bucket] & (MASK_FULL >> bucketStartIndex) ); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { count += Popcount.popcount256B(bitmap._data[bucket]); amount -= 256; bucket++; } count += Popcount.popcount256B( bitmap._data[bucket] & (MASK_FULL << (256 - amount)) ); } } } /** * @dev Find the closest index of the set bit before `index`. */ function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) { uint256 bucket = index >> 8; // index within the bucket uint256 bucketIndex = (index & 0xff); // load a bitboard from the bitmap. uint256 bb = bitmap._data[bucket]; // offset the bitboard to scan from `bucketIndex`. bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex) if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (bucketIndex - bb.bitScanForward256()); } } else { while(true) { require(bucket > 0, "BitMaps: The set bit before the index doesn't exist."); unchecked { bucket--; } // No offset. Always scan from the least significiant bit now. bb = bitmap._data[bucket]; if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (255 - bb.bitScanForward256()); break; } } } } } function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) { return bitmap._data[bucket]; } } // File: @openzeppelin/contracts/utils/StorageSlot.sol // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) //pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) //pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) //pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) //pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) //pragma solidity ^0.8.0; /** * @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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // 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); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) //pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) //pragma solidity ^0.8.0; /** * @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`. * * 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; /** * @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 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); } // File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) //pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } // File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) //pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File: docs.chain.link/EVAKeepersAutomationPsi.sol /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| - github: https://github.com/estarriolvetch/ERC721Psi - npm: https://www.npmjs.com/package/erc721psi */ //pragma solidity ^0.8.0; // File: SafeMath.sol /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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) { 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) { 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) { // 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) { 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) { 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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); 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) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @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. 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) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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) { 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) { require(b > 0, errorMessage); return a % b; } } contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _batchHead; string private _name; string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; uint256 internal _minted; mapping(uint256 => address) private _tokenApprovals; 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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint) { require(owner != address(0), "ERC721Psi: balance query for the zero address"); uint count; for( uint i; i < _minted; ++i ){ if(_exists(i)){ if( owner == ownerOf(i)){ ++count; } } } return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { (address owner, ) = _ownerAndBatchHeadOf(tokenId); return owner; } function _ownerAndBatchHeadOf(uint256 tokenId) internal view returns (address owner, uint256 tokenIdBatchHead){ require(_exists(tokenId), "ERC721Psi: owner query for nonexistent token"); tokenIdBatchHead = _getBatchHead(tokenId); owner = _owners[tokenIdBatchHead]; } /** * @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), "ERC721Psi: 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 = ownerOf(tokenId); require(to != owner, "ERC721Psi: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721Psi: 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), "ERC721Psi: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721Psi: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: 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), "ERC721Psi: 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, 1,_data), "ERC721Psi: 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`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _minted; } /** * @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), "ERC721Psi: operator query for nonexistent token" ); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { uint256 startTokenId = _minted; _mint(to, quantity); require( _checkOnERC721Received(address(0), to, startTokenId, quantity, _data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } function _mint( address to, uint256 quantity ) internal virtual { uint256 tokenIdBatchHead = _minted; require(quantity > 0, "ERC721Psi: quantity must be greater 0"); require(to != address(0), "ERC721Psi: mint to the zero address"); _beforeTokenTransfers(address(0), to, tokenIdBatchHead, quantity); _minted += quantity; _owners[tokenIdBatchHead] = to; _batchHead.set(tokenIdBatchHead); _afterTokenTransfers(address(0), to, tokenIdBatchHead, quantity); // Emit events for(uint256 tokenId=tokenIdBatchHead;tokenId < tokenIdBatchHead + quantity; tokenId++){ emit Transfer(address(0), to, 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 { (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(tokenId); require( owner == from, "ERC721Psi: transfer of token that is not own" ); require(to != address(0), "ERC721Psi: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId); uint256 nextTokenId = tokenId + 1; if(!_batchHead.get(nextTokenId) && nextTokenId < _minted ) { _owners[nextTokenId] = from; _batchHead.set(nextTokenId); } _owners[tokenId] = to; if(tokenId != tokenIdBatchHead) { _batchHead.set(tokenId); } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param startTokenId uint256 the first ID of the tokens to be transferred * @param quantity uint256 amount of the tokens to be transfered. * @param _data bytes optional data to send along with the call * @return r bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 startTokenId, uint256 quantity, bytes memory _data ) private returns (bool r) { if (to.isContract()) { r = true; for(uint256 tokenId = startTokenId; tokenId < startTokenId + quantity; tokenId++){ try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { r = r && retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721Psi: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } return r; } else { return true; } } function _getBatchHead(uint256 tokenId) internal view returns (uint256 tokenIdBatchHead) { tokenIdBatchHead = _batchHead.scanForward(tokenId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _minted; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { require(index < totalSupply(), "ERC721Psi: global index out of bounds"); uint count; for(uint i; i < _minted; i++){ if(_exists(i)){ if(count == index) return i; else count++; } } } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { uint count; for(uint i; i < _minted; i++){ if(_exists(i) && owner == ownerOf(i)){ if(count == index) return i; else count++; } } revert("ERC721Psi: owner index out of bounds"); } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); contract ApostolicNFT is ERC721Psi, Ownable { using SafeMath for uint256; using Strings for uint; /* * @dev Set Initial Parameters Before deployment * settings are still fully updateable after deployment */ uint256 public maxSupply = 444; uint256 public mintRate = 0.035 ether; uint256 public maxMints = 20; /* * @Dev Booleans for sale state * salesIsActive must be true in any case to mint */ bool public globalSaleIsActive = false; /* * @dev Set base URI in deploy */ string public baseURI; // Mapping to keep track of the mint count per wallet mapping(address => uint256) public walletMints; /* * @dev Set Collection/Contract name and Token Ticker * below. Cannot be changed after * contract deployment. */ constructor() ERC721Psi("Apostolic", "APOSTLE") { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); return string(abi.encodePacked(baseURI, "/", tokenId.toString(), "")); } /* *@dev * Set max per wallet */ function setMaxWallet(uint256 _max) external onlyOwner { maxMints = _max; } /* *@dev * Set publicsale price to mint per NFT */ function setMintPrice(uint256 _price) external onlyOwner { mintRate = _price; } /* * @dev mint funtion with _to address. no cost mint * by contract owner/deployer */ function oMint(uint256 quantity, address _to) external onlyOwner { require(totalSupply() + quantity <= maxSupply, "Not enough NFTs left to Mint"); _safeMint(_to, quantity); } /* * @dev mint function and checks for saleState, mint quantity, and max mints per wallet */ function mint(uint256 quantity) external payable { require(globalSaleIsActive, "Sales must be active to mint"); require(totalSupply() + quantity <= maxSupply, "Not enough NFTs left to Mint"); require((mintRate * quantity) <= msg.value, "Not enough Eth"); require(walletMints[msg.sender] + quantity <= maxMints, "Exceeds the maximum NFTs you can mint"); walletMints[msg.sender] += quantity; // Update the mint count for this wallet _safeMint(msg.sender, quantity); } /* * @dev Set new Base URI * useful for setting unrevealed uri to revealed Base URI * same as a reveal switch/state */ function setBaseURI(string calldata newBaseURI) external onlyOwner { baseURI = newBaseURI; } // global sale active to enable contract mints globally function setGlobalSaleActive() public onlyOwner { globalSaleIsActive = !globalSaleIsActive; } /* * @dev Public Keepers or to Owner wallet Withdrawl function, Contract ETH balance * to owner wallet address. */ function withdraw() external onlyOwner { payable(owner()).transfer(address(this).balance); } /* * @dev Alternative withdrawl * */ function Withdraw(uint256 _amount, address payable _to) external onlyOwner { require(_amount > 0, "Withdraw must be greater than 0"); require(_amount <= address(this).balance, "Amount too high"); (bool success, ) = _to.call{value: _amount}(""); require(success); } /** * Get the array of token for owner. */ function tokensOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); for (uint256 index; index < tokenCount; index++) { result[index] = tokenOfOwnerByIndex(_owner, index); } return result; } } }
{ "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
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":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":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_to","type":"address"}],"name":"Withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalSaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"oMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setGlobalSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"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":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526101bc600855667c5850872380006009556014600a55600b805460ff1916905534801562000030575f80fd5b506040518060400160405280600981526020016841706f73746f6c696360b81b8152506040518060400160405280600781526020016641504f53544c4560c81b8152508160019081620000849190620001ab565b506002620000938282620001ab565b505050620000b0620000aa620000b660201b60201c565b620000ba565b62000273565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200013457607f821691505b6020821081036200015357634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620001a6575f81815260208120601f850160051c81016020861015620001815750805b601f850160051c820191505b81811015620001a2578281556001016200018d565b5050505b505050565b81516001600160401b03811115620001c757620001c76200010b565b620001df81620001d884546200011f565b8462000159565b602080601f83116001811462000215575f8415620001fd5750858301515b5f19600386901b1c1916600185901b178555620001a2565b5f85815260208120601f198616915b82811015620002455788860151825594840194600190910190840162000224565b50858210156200026357878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b61269180620002815f395ff3fe60806040526004361061020f575f3560e01c806370a0823111610117578063b6b6f0c3116100ac578063d5abeb011161007c578063f0293fd311610062578063f0293fd3146105d0578063f2fde38b146105fb578063f4a0a5281461061a575f80fd5b8063d5abeb0114610574578063e985e9c514610589575f80fd5b8063b6b6f0c31461050c578063b88d4fde14610521578063c87b56dd14610540578063ca0dcf161461055f575f80fd5b80638da5cb5b116100e75780638da5cb5b146104a957806395d89b41146104c6578063a0712d68146104da578063a22cb465146104ed575f80fd5b806370a082311461042b578063715018a61461044a5780638353ffca1461045e5780638462151c1461047d575f80fd5b80632f745c59116101a75780634f6ccce7116101775780635d0044ca1161015d5780635d0044ca146103d95780636352211e146103f85780636c0360eb14610417575f80fd5b80634f6ccce71461039b57806355f804b3146103ba575f80fd5b80632f745c591461032a5780633ccfd60b1461034957806342842e0e1461035d578063468d83591461037c575f80fd5b8063095ea7b3116101e2578063095ea7b3146102b55780631348bcc1146102d457806318160ddd146102ed57806323b872dd1461030b575f80fd5b806301ffc9a71461021357806304c46ed91461024757806306fdde031461025d578063081812fc1461027e575b5f80fd5b34801561021e575f80fd5b5061023261022d366004611f36565b610639565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b5061025b6106a5565b005b348015610268575f80fd5b506102716106c1565b60405161023e9190611fa5565b348015610289575f80fd5b5061029d610298366004611fb7565b610751565b6040516001600160a01b03909116815260200161023e565b3480156102c0575f80fd5b5061025b6102cf366004611fe2565b6107e1565b3480156102df575f80fd5b50600b546102329060ff1681565b3480156102f8575f80fd5b506004545b60405190815260200161023e565b348015610316575f80fd5b5061025b61032536600461200c565b6108f7565b348015610335575f80fd5b506102fd610344366004611fe2565b61097e565b348015610354575f80fd5b5061025b610a46565b348015610368575f80fd5b5061025b61037736600461200c565b610a87565b348015610387575f80fd5b5061025b61039636600461204a565b610aa1565b3480156103a6575f80fd5b506102fd6103b5366004611fb7565b610b1c565b3480156103c5575f80fd5b5061025b6103d4366004612078565b610bec565b3480156103e4575f80fd5b5061025b6103f3366004611fb7565b610c01565b348015610403575f80fd5b5061029d610412366004611fb7565b610c0e565b348015610422575f80fd5b50610271610c21565b348015610436575f80fd5b506102fd6104453660046120e4565b610cad565b348015610455575f80fd5b5061025b610d8b565b348015610469575f80fd5b5061025b61047836600461204a565b610d9e565b348015610488575f80fd5b5061049c6104973660046120e4565b610ea0565b60405161023e91906120ff565b3480156104b4575f80fd5b506007546001600160a01b031661029d565b3480156104d1575f80fd5b50610271610f59565b61025b6104e8366004611fb7565b610f68565b3480156104f8575f80fd5b5061025b610507366004612142565b61113b565b348015610517575f80fd5b506102fd600a5481565b34801561052c575f80fd5b5061025b61053b366004612186565b6111fe565b34801561054b575f80fd5b5061027161055a366004611fb7565b61128c565b34801561056a575f80fd5b506102fd60095481565b34801561057f575f80fd5b506102fd60085481565b348015610594575f80fd5b506102326105a336600461225f565b6001600160a01b039182165f90815260066020908152604080832093909416825291909152205460ff1690565b3480156105db575f80fd5b506102fd6105ea3660046120e4565b600d6020525f908152604090205481565b348015610606575f80fd5b5061025b6106153660046120e4565b61132f565b348015610625575f80fd5b5061025b610634366004611fb7565b6113bc565b5f6001600160e01b031982166380ac58cd60e01b148061066957506001600160e01b03198216635b5e139f60e01b145b8061068457506001600160e01b0319821663780e9d6360e01b145b8061069f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6106ad6113c9565b600b805460ff19811660ff90911615179055565b6060600180546106d09061228b565b80601f01602080910402602001604051908101604052809291908181526020018280546106fc9061228b565b80156107475780601f1061071e57610100808354040283529160200191610747565b820191905f5260205f20905b81548152906001019060200180831161072a57829003601f168201915b5050505050905090565b5f61075d826004541190565b6107c65760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b505f908152600560205260409020546001600160a01b031690565b5f6107eb82610c0e565b9050806001600160a01b0316836001600160a01b03160361085a5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b60648201526084016107bd565b336001600160a01b0382161480610876575061087681336105a3565b6108e85760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c000000000060648201526084016107bd565b6108f28383611423565b505050565b6109013382611490565b6109735760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f76656400000000000000000000000060648201526084016107bd565b6108f283838361157c565b5f805f5b6004548110156109f157610997816004541190565b80156109bc57506109a781610c0e565b6001600160a01b0316856001600160a01b0316145b156109df578382036109d157915061069f9050565b816109db816122d1565b9250505b806109e9816122d1565b915050610982565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b60648201526084016107bd565b610a4e6113c9565b6007546040516001600160a01b03909116904780156108fc02915f818181858888f19350505050158015610a84573d5f803e3d5ffd5b50565b6108f283838360405180602001604052805f8152506111fe565b610aa96113c9565b60085482610ab660045490565b610ac091906122e9565b1115610b0e5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e465473206c65667420746f204d696e740000000060448201526064016107bd565b610b1881836117b7565b5050565b5f610b2660045490565b8210610b9a5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f66206260448201527f6f756e647300000000000000000000000000000000000000000000000000000060648201526084016107bd565b5f805b600454811015610be557610bb2816004541190565b15610bd357838203610bc5579392505050565b81610bcf816122d1565b9250505b80610bdd816122d1565b915050610b9d565b5050919050565b610bf46113c9565b600c6108f2828483612341565b610c096113c9565b600a55565b5f80610c19836117d0565b509392505050565b600c8054610c2e9061228b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a9061228b565b8015610ca55780601f10610c7c57610100808354040283529160200191610ca5565b820191905f5260205f20905b815481529060010190602001808311610c8857829003601f168201915b505050505081565b5f6001600160a01b038216610d2a5760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f20616464726573730000000000000000000000000000000000000060648201526084016107bd565b5f805b600454811015610d8457610d42816004541190565b15610d7457610d5081610c0e565b6001600160a01b0316846001600160a01b031603610d7457610d71826122d1565b91505b610d7d816122d1565b9050610d2d565b5092915050565b610d936113c9565b610d9c5f611878565b565b610da66113c9565b5f8211610df55760405162461bcd60e51b815260206004820152601f60248201527f5769746864726177206d7573742062652067726561746572207468616e20300060448201526064016107bd565b47821115610e455760405162461bcd60e51b815260206004820152600f60248201527f416d6f756e7420746f6f2068696768000000000000000000000000000000000060448201526064016107bd565b5f816001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610e8e576040519150601f19603f3d011682016040523d82523d5f602084013e610e93565b606091505b50509050806108f2575f80fd5b60605f610eac83610cad565b9050805f03610eca57604080515f8082526020820190925290610c19565b5f8167ffffffffffffffff811115610ee457610ee4612172565b604051908082528060200260200182016040528015610f0d578160200160208202803683370190505b5090505f5b82811015610c1957610f24858261097e565b828281518110610f3657610f366123fd565b602090810291909101015280610f4b816122d1565b915050610f12565b50919050565b6060600280546106d09061228b565b600b5460ff16610fba5760405162461bcd60e51b815260206004820152601c60248201527f53616c6573206d7573742062652061637469766520746f206d696e740000000060448201526064016107bd565b60085481610fc760045490565b610fd191906122e9565b111561101f5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e465473206c65667420746f204d696e740000000060448201526064016107bd565b348160095461102e9190612411565b111561107c5760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420656e6f7567682045746800000000000000000000000000000000000060448201526064016107bd565b600a54335f908152600d60205260409020546110999083906122e9565b111561110d5760405162461bcd60e51b815260206004820152602560248201527f4578636565647320746865206d6178696d756d204e46547320796f752063616e60448201527f206d696e7400000000000000000000000000000000000000000000000000000060648201526084016107bd565b335f908152600d60205260408120805483929061112b9084906122e9565b90915550610a84905033826117b7565b336001600160a01b038316036111935760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c65720000000060448201526064016107bd565b335f8181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112083383611490565b61127a5760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f76656400000000000000000000000060648201526084016107bd565b611286848484846118c9565b50505050565b6060611299826004541190565b6112fd5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107bd565b600c61130883611954565b604051602001611319929190612428565b6040516020818303038152906040529050919050565b6113376113c9565b6001600160a01b0381166113b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107bd565b610a8481611878565b6113c46113c9565b600955565b6007546001600160a01b03163314610d9c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b5f81815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061145782610c0e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5f61149c826004541190565b6115005760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107bd565b5f61150a83610c0e565b9050806001600160a01b0316846001600160a01b031614806115455750836001600160a01b031661153a84610751565b6001600160a01b0316145b8061157457506001600160a01b038082165f9081526006602090815260408083209388168352929052205460ff165b949350505050565b5f80611587836117d0565b91509150846001600160a01b0316826001600160a01b0316146116125760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b03841661168e5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f616464726573730000000000000000000000000000000000000000000000000060648201526084016107bd565b6116985f84611423565b5f6116a48460016122e9565b600881901c5f90815260208190526040902054909150600160ff1b60ff83161c161580156116d3575060045481105b1561171e575f81815260036020908152604080832080546001600160a01b0319166001600160a01b038b16179055600884901c83529082905290208054600160ff1b60ff84161c1790555b5f84815260036020526040902080546001600160a01b0319166001600160a01b03871617905581841461176d57600884901c5f9081526020819052604090208054600160ff1b60ff87161c1790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610b18828260405180602001604052805f815250611a69565b5f806117dd836004541190565b61184f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016107bd565b61185883611a83565b5f818152600360205260409020546001600160a01b031694909350915050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6118d484848461157c565b6118e2848484600185611a8e565b6112865760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e746572000000000000000000000060648201526084016107bd565b6060815f0361197a5750506040805180820190915260018152600360fc1b602082015290565b815f5b81156119a3578061198d816122d1565b915061199c9050600a836124cc565b915061197d565b5f8167ffffffffffffffff8111156119bd576119bd612172565b6040519080825280601f01601f1916602001820160405280156119e7576020820181803683370190505b5090505b8415611574576119fc6001836124df565b9150611a09600a866124f2565b611a149060306122e9565b60f81b818381518110611a2957611a296123fd565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350611a62600a866124cc565b94506119eb565b600454611a768484611c17565b6118e25f85838686611a8e565b5f61069f8183611da6565b5f6001600160a01b0385163b15611c0a57506001835b611aae84866122e9565b811015611c0457604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290611ae79033908b9086908990600401612505565b6020604051808303815f875af1925050508015611b21575060408051601f3d908101601f19168201909252611b1e91810190612540565b60015b611bd2573d808015611b4e576040519150601f19603f3d011682016040523d82523d5f602084013e611b53565b606091505b5080515f03611bca5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e746572000000000000000000000060648201526084016107bd565b805181602001fd5b828015611bef57506001600160e01b03198116630a85bd0160e11b145b92505080611bfc816122d1565b915050611aa4565b50611c0e565b5060015b95945050505050565b60045481611c8d5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f746572203000000000000000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b038316611cef5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107bd565b8160045f828254611d0091906122e9565b90915550505f81815260036020908152604080832080546001600160a01b0319166001600160a01b038816179055600884901c83529082905290208054600160ff1b60ff84161c179055805b611d5683836122e9565b8110156112865760405181906001600160a01b038616905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480611d9e816122d1565b915050611d4c565b600881901c5f8181526020849052604081205490919060ff808516919082181c8015611de757611dd581611ea3565b60ff168203600884901b179350611e9a565b5f8311611e5c5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e00000000000000000000000060648201526084016107bd565b505f199091015f818152602086905260409020549091908015611e9557611e8281611ea3565b60ff0360ff16600884901b179350611e9a565b611de7565b50505092915050565b5f604051806101200160405280610100815260200161255c610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff611eeb85611f0c565b02901c81518110611efe57611efe6123fd565b016020015160f81c92915050565b5f808211611f18575f80fd5b505f8190031690565b6001600160e01b031981168114610a84575f80fd5b5f60208284031215611f46575f80fd5b8135611f5181611f21565b9392505050565b5f5b83811015611f72578181015183820152602001611f5a565b50505f910152565b5f8151808452611f91816020860160208601611f58565b601f01601f19169290920160200192915050565b602081525f611f516020830184611f7a565b5f60208284031215611fc7575f80fd5b5035919050565b6001600160a01b0381168114610a84575f80fd5b5f8060408385031215611ff3575f80fd5b8235611ffe81611fce565b946020939093013593505050565b5f805f6060848603121561201e575f80fd5b833561202981611fce565b9250602084013561203981611fce565b929592945050506040919091013590565b5f806040838503121561205b575f80fd5b82359150602083013561206d81611fce565b809150509250929050565b5f8060208385031215612089575f80fd5b823567ffffffffffffffff808211156120a0575f80fd5b818501915085601f8301126120b3575f80fd5b8135818111156120c1575f80fd5b8660208285010111156120d2575f80fd5b60209290920196919550909350505050565b5f602082840312156120f4575f80fd5b8135611f5181611fce565b602080825282518282018190525f9190848201906040850190845b818110156121365783518352928401929184019160010161211a565b50909695505050505050565b5f8060408385031215612153575f80fd5b823561215e81611fce565b91506020830135801515811461206d575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f8060808587031215612199575f80fd5b84356121a481611fce565b935060208501356121b481611fce565b925060408501359150606085013567ffffffffffffffff808211156121d7575f80fd5b818701915087601f8301126121ea575f80fd5b8135818111156121fc576121fc612172565b604051601f8201601f19908116603f0116810190838211818310171561222457612224612172565b816040528281528a602084870101111561223c575f80fd5b826020860160208301375f60208483010152809550505050505092959194509250565b5f8060408385031215612270575f80fd5b823561227b81611fce565b9150602083013561206d81611fce565b600181811c9082168061229f57607f821691505b602082108103610f5357634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f600182016122e2576122e26122bd565b5060010190565b8082018082111561069f5761069f6122bd565b601f8211156108f2575f81815260208120601f850160051c810160208610156123225750805b601f850160051c820191505b818110156117af5782815560010161232e565b67ffffffffffffffff83111561235957612359612172565b61236d83612367835461228b565b836122fc565b5f601f84116001811461239e575f85156123875750838201355b5f19600387901b1c1916600186901b1783556123f6565b5f83815260209020601f19861690835b828110156123ce57868501358255602094850194600190920191016123ae565b50868210156123ea575f1960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b634e487b7160e01b5f52603260045260245ffd5b808202811582820484141761069f5761069f6122bd565b5f8084546124358161228b565b6001828116801561244d57600181146124625761248e565b60ff198416875282151583028701945061248e565b885f526020805f205f5b858110156124855781548a82015290840190820161246c565b50505082870194505b50602f60f81b8452865192506124aa8382860160208a01611f58565b919092010195945050505050565b634e487b7160e01b5f52601260045260245ffd5b5f826124da576124da6124b8565b500490565b8181038181111561069f5761069f6122bd565b5f82612500576125006124b8565b500690565b5f6001600160a01b038087168352808616602084015250836040830152608060608301526125366080830184611f7a565b9695505050505050565b5f60208284031215612550575f80fd5b8151611f5181611f2156fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212209db8230f0ebb807710d03508e16e7354e929c6db1b017d22968d29451cdb92cc64736f6c63430008140033
Deployed Bytecode
0x60806040526004361061020f575f3560e01c806370a0823111610117578063b6b6f0c3116100ac578063d5abeb011161007c578063f0293fd311610062578063f0293fd3146105d0578063f2fde38b146105fb578063f4a0a5281461061a575f80fd5b8063d5abeb0114610574578063e985e9c514610589575f80fd5b8063b6b6f0c31461050c578063b88d4fde14610521578063c87b56dd14610540578063ca0dcf161461055f575f80fd5b80638da5cb5b116100e75780638da5cb5b146104a957806395d89b41146104c6578063a0712d68146104da578063a22cb465146104ed575f80fd5b806370a082311461042b578063715018a61461044a5780638353ffca1461045e5780638462151c1461047d575f80fd5b80632f745c59116101a75780634f6ccce7116101775780635d0044ca1161015d5780635d0044ca146103d95780636352211e146103f85780636c0360eb14610417575f80fd5b80634f6ccce71461039b57806355f804b3146103ba575f80fd5b80632f745c591461032a5780633ccfd60b1461034957806342842e0e1461035d578063468d83591461037c575f80fd5b8063095ea7b3116101e2578063095ea7b3146102b55780631348bcc1146102d457806318160ddd146102ed57806323b872dd1461030b575f80fd5b806301ffc9a71461021357806304c46ed91461024757806306fdde031461025d578063081812fc1461027e575b5f80fd5b34801561021e575f80fd5b5061023261022d366004611f36565b610639565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b5061025b6106a5565b005b348015610268575f80fd5b506102716106c1565b60405161023e9190611fa5565b348015610289575f80fd5b5061029d610298366004611fb7565b610751565b6040516001600160a01b03909116815260200161023e565b3480156102c0575f80fd5b5061025b6102cf366004611fe2565b6107e1565b3480156102df575f80fd5b50600b546102329060ff1681565b3480156102f8575f80fd5b506004545b60405190815260200161023e565b348015610316575f80fd5b5061025b61032536600461200c565b6108f7565b348015610335575f80fd5b506102fd610344366004611fe2565b61097e565b348015610354575f80fd5b5061025b610a46565b348015610368575f80fd5b5061025b61037736600461200c565b610a87565b348015610387575f80fd5b5061025b61039636600461204a565b610aa1565b3480156103a6575f80fd5b506102fd6103b5366004611fb7565b610b1c565b3480156103c5575f80fd5b5061025b6103d4366004612078565b610bec565b3480156103e4575f80fd5b5061025b6103f3366004611fb7565b610c01565b348015610403575f80fd5b5061029d610412366004611fb7565b610c0e565b348015610422575f80fd5b50610271610c21565b348015610436575f80fd5b506102fd6104453660046120e4565b610cad565b348015610455575f80fd5b5061025b610d8b565b348015610469575f80fd5b5061025b61047836600461204a565b610d9e565b348015610488575f80fd5b5061049c6104973660046120e4565b610ea0565b60405161023e91906120ff565b3480156104b4575f80fd5b506007546001600160a01b031661029d565b3480156104d1575f80fd5b50610271610f59565b61025b6104e8366004611fb7565b610f68565b3480156104f8575f80fd5b5061025b610507366004612142565b61113b565b348015610517575f80fd5b506102fd600a5481565b34801561052c575f80fd5b5061025b61053b366004612186565b6111fe565b34801561054b575f80fd5b5061027161055a366004611fb7565b61128c565b34801561056a575f80fd5b506102fd60095481565b34801561057f575f80fd5b506102fd60085481565b348015610594575f80fd5b506102326105a336600461225f565b6001600160a01b039182165f90815260066020908152604080832093909416825291909152205460ff1690565b3480156105db575f80fd5b506102fd6105ea3660046120e4565b600d6020525f908152604090205481565b348015610606575f80fd5b5061025b6106153660046120e4565b61132f565b348015610625575f80fd5b5061025b610634366004611fb7565b6113bc565b5f6001600160e01b031982166380ac58cd60e01b148061066957506001600160e01b03198216635b5e139f60e01b145b8061068457506001600160e01b0319821663780e9d6360e01b145b8061069f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6106ad6113c9565b600b805460ff19811660ff90911615179055565b6060600180546106d09061228b565b80601f01602080910402602001604051908101604052809291908181526020018280546106fc9061228b565b80156107475780601f1061071e57610100808354040283529160200191610747565b820191905f5260205f20905b81548152906001019060200180831161072a57829003601f168201915b5050505050905090565b5f61075d826004541190565b6107c65760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b505f908152600560205260409020546001600160a01b031690565b5f6107eb82610c0e565b9050806001600160a01b0316836001600160a01b03160361085a5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b60648201526084016107bd565b336001600160a01b0382161480610876575061087681336105a3565b6108e85760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c000000000060648201526084016107bd565b6108f28383611423565b505050565b6109013382611490565b6109735760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f76656400000000000000000000000060648201526084016107bd565b6108f283838361157c565b5f805f5b6004548110156109f157610997816004541190565b80156109bc57506109a781610c0e565b6001600160a01b0316856001600160a01b0316145b156109df578382036109d157915061069f9050565b816109db816122d1565b9250505b806109e9816122d1565b915050610982565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b60648201526084016107bd565b610a4e6113c9565b6007546040516001600160a01b03909116904780156108fc02915f818181858888f19350505050158015610a84573d5f803e3d5ffd5b50565b6108f283838360405180602001604052805f8152506111fe565b610aa96113c9565b60085482610ab660045490565b610ac091906122e9565b1115610b0e5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e465473206c65667420746f204d696e740000000060448201526064016107bd565b610b1881836117b7565b5050565b5f610b2660045490565b8210610b9a5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f66206260448201527f6f756e647300000000000000000000000000000000000000000000000000000060648201526084016107bd565b5f805b600454811015610be557610bb2816004541190565b15610bd357838203610bc5579392505050565b81610bcf816122d1565b9250505b80610bdd816122d1565b915050610b9d565b5050919050565b610bf46113c9565b600c6108f2828483612341565b610c096113c9565b600a55565b5f80610c19836117d0565b509392505050565b600c8054610c2e9061228b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5a9061228b565b8015610ca55780601f10610c7c57610100808354040283529160200191610ca5565b820191905f5260205f20905b815481529060010190602001808311610c8857829003601f168201915b505050505081565b5f6001600160a01b038216610d2a5760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f20616464726573730000000000000000000000000000000000000060648201526084016107bd565b5f805b600454811015610d8457610d42816004541190565b15610d7457610d5081610c0e565b6001600160a01b0316846001600160a01b031603610d7457610d71826122d1565b91505b610d7d816122d1565b9050610d2d565b5092915050565b610d936113c9565b610d9c5f611878565b565b610da66113c9565b5f8211610df55760405162461bcd60e51b815260206004820152601f60248201527f5769746864726177206d7573742062652067726561746572207468616e20300060448201526064016107bd565b47821115610e455760405162461bcd60e51b815260206004820152600f60248201527f416d6f756e7420746f6f2068696768000000000000000000000000000000000060448201526064016107bd565b5f816001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610e8e576040519150601f19603f3d011682016040523d82523d5f602084013e610e93565b606091505b50509050806108f2575f80fd5b60605f610eac83610cad565b9050805f03610eca57604080515f8082526020820190925290610c19565b5f8167ffffffffffffffff811115610ee457610ee4612172565b604051908082528060200260200182016040528015610f0d578160200160208202803683370190505b5090505f5b82811015610c1957610f24858261097e565b828281518110610f3657610f366123fd565b602090810291909101015280610f4b816122d1565b915050610f12565b50919050565b6060600280546106d09061228b565b600b5460ff16610fba5760405162461bcd60e51b815260206004820152601c60248201527f53616c6573206d7573742062652061637469766520746f206d696e740000000060448201526064016107bd565b60085481610fc760045490565b610fd191906122e9565b111561101f5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e465473206c65667420746f204d696e740000000060448201526064016107bd565b348160095461102e9190612411565b111561107c5760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420656e6f7567682045746800000000000000000000000000000000000060448201526064016107bd565b600a54335f908152600d60205260409020546110999083906122e9565b111561110d5760405162461bcd60e51b815260206004820152602560248201527f4578636565647320746865206d6178696d756d204e46547320796f752063616e60448201527f206d696e7400000000000000000000000000000000000000000000000000000060648201526084016107bd565b335f908152600d60205260408120805483929061112b9084906122e9565b90915550610a84905033826117b7565b336001600160a01b038316036111935760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c65720000000060448201526064016107bd565b335f8181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112083383611490565b61127a5760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f76656400000000000000000000000060648201526084016107bd565b611286848484846118c9565b50505050565b6060611299826004541190565b6112fd5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107bd565b600c61130883611954565b604051602001611319929190612428565b6040516020818303038152906040529050919050565b6113376113c9565b6001600160a01b0381166113b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107bd565b610a8481611878565b6113c46113c9565b600955565b6007546001600160a01b03163314610d9c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b5f81815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061145782610c0e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5f61149c826004541190565b6115005760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107bd565b5f61150a83610c0e565b9050806001600160a01b0316846001600160a01b031614806115455750836001600160a01b031661153a84610751565b6001600160a01b0316145b8061157457506001600160a01b038082165f9081526006602090815260408083209388168352929052205460ff165b949350505050565b5f80611587836117d0565b91509150846001600160a01b0316826001600160a01b0316146116125760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b03841661168e5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f616464726573730000000000000000000000000000000000000000000000000060648201526084016107bd565b6116985f84611423565b5f6116a48460016122e9565b600881901c5f90815260208190526040902054909150600160ff1b60ff83161c161580156116d3575060045481105b1561171e575f81815260036020908152604080832080546001600160a01b0319166001600160a01b038b16179055600884901c83529082905290208054600160ff1b60ff84161c1790555b5f84815260036020526040902080546001600160a01b0319166001600160a01b03871617905581841461176d57600884901c5f9081526020819052604090208054600160ff1b60ff87161c1790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610b18828260405180602001604052805f815250611a69565b5f806117dd836004541190565b61184f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016107bd565b61185883611a83565b5f818152600360205260409020546001600160a01b031694909350915050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6118d484848461157c565b6118e2848484600185611a8e565b6112865760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e746572000000000000000000000060648201526084016107bd565b6060815f0361197a5750506040805180820190915260018152600360fc1b602082015290565b815f5b81156119a3578061198d816122d1565b915061199c9050600a836124cc565b915061197d565b5f8167ffffffffffffffff8111156119bd576119bd612172565b6040519080825280601f01601f1916602001820160405280156119e7576020820181803683370190505b5090505b8415611574576119fc6001836124df565b9150611a09600a866124f2565b611a149060306122e9565b60f81b818381518110611a2957611a296123fd565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350611a62600a866124cc565b94506119eb565b600454611a768484611c17565b6118e25f85838686611a8e565b5f61069f8183611da6565b5f6001600160a01b0385163b15611c0a57506001835b611aae84866122e9565b811015611c0457604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290611ae79033908b9086908990600401612505565b6020604051808303815f875af1925050508015611b21575060408051601f3d908101601f19168201909252611b1e91810190612540565b60015b611bd2573d808015611b4e576040519150601f19603f3d011682016040523d82523d5f602084013e611b53565b606091505b5080515f03611bca5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e746572000000000000000000000060648201526084016107bd565b805181602001fd5b828015611bef57506001600160e01b03198116630a85bd0160e11b145b92505080611bfc816122d1565b915050611aa4565b50611c0e565b5060015b95945050505050565b60045481611c8d5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f746572203000000000000000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b038316611cef5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107bd565b8160045f828254611d0091906122e9565b90915550505f81815260036020908152604080832080546001600160a01b0319166001600160a01b038816179055600884901c83529082905290208054600160ff1b60ff84161c179055805b611d5683836122e9565b8110156112865760405181906001600160a01b038616905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480611d9e816122d1565b915050611d4c565b600881901c5f8181526020849052604081205490919060ff808516919082181c8015611de757611dd581611ea3565b60ff168203600884901b179350611e9a565b5f8311611e5c5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e00000000000000000000000060648201526084016107bd565b505f199091015f818152602086905260409020549091908015611e9557611e8281611ea3565b60ff0360ff16600884901b179350611e9a565b611de7565b50505092915050565b5f604051806101200160405280610100815260200161255c610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff611eeb85611f0c565b02901c81518110611efe57611efe6123fd565b016020015160f81c92915050565b5f808211611f18575f80fd5b505f8190031690565b6001600160e01b031981168114610a84575f80fd5b5f60208284031215611f46575f80fd5b8135611f5181611f21565b9392505050565b5f5b83811015611f72578181015183820152602001611f5a565b50505f910152565b5f8151808452611f91816020860160208601611f58565b601f01601f19169290920160200192915050565b602081525f611f516020830184611f7a565b5f60208284031215611fc7575f80fd5b5035919050565b6001600160a01b0381168114610a84575f80fd5b5f8060408385031215611ff3575f80fd5b8235611ffe81611fce565b946020939093013593505050565b5f805f6060848603121561201e575f80fd5b833561202981611fce565b9250602084013561203981611fce565b929592945050506040919091013590565b5f806040838503121561205b575f80fd5b82359150602083013561206d81611fce565b809150509250929050565b5f8060208385031215612089575f80fd5b823567ffffffffffffffff808211156120a0575f80fd5b818501915085601f8301126120b3575f80fd5b8135818111156120c1575f80fd5b8660208285010111156120d2575f80fd5b60209290920196919550909350505050565b5f602082840312156120f4575f80fd5b8135611f5181611fce565b602080825282518282018190525f9190848201906040850190845b818110156121365783518352928401929184019160010161211a565b50909695505050505050565b5f8060408385031215612153575f80fd5b823561215e81611fce565b91506020830135801515811461206d575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f8060808587031215612199575f80fd5b84356121a481611fce565b935060208501356121b481611fce565b925060408501359150606085013567ffffffffffffffff808211156121d7575f80fd5b818701915087601f8301126121ea575f80fd5b8135818111156121fc576121fc612172565b604051601f8201601f19908116603f0116810190838211818310171561222457612224612172565b816040528281528a602084870101111561223c575f80fd5b826020860160208301375f60208483010152809550505050505092959194509250565b5f8060408385031215612270575f80fd5b823561227b81611fce565b9150602083013561206d81611fce565b600181811c9082168061229f57607f821691505b602082108103610f5357634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f600182016122e2576122e26122bd565b5060010190565b8082018082111561069f5761069f6122bd565b601f8211156108f2575f81815260208120601f850160051c810160208610156123225750805b601f850160051c820191505b818110156117af5782815560010161232e565b67ffffffffffffffff83111561235957612359612172565b61236d83612367835461228b565b836122fc565b5f601f84116001811461239e575f85156123875750838201355b5f19600387901b1c1916600186901b1783556123f6565b5f83815260209020601f19861690835b828110156123ce57868501358255602094850194600190920191016123ae565b50868210156123ea575f1960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b634e487b7160e01b5f52603260045260245ffd5b808202811582820484141761069f5761069f6122bd565b5f8084546124358161228b565b6001828116801561244d57600181146124625761248e565b60ff198416875282151583028701945061248e565b885f526020805f205f5b858110156124855781548a82015290840190820161246c565b50505082870194505b50602f60f81b8452865192506124aa8382860160208a01611f58565b919092010195945050505050565b634e487b7160e01b5f52601260045260245ffd5b5f826124da576124da6124b8565b500490565b8181038181111561069f5761069f6122bd565b5f82612500576125006124b8565b500690565b5f6001600160a01b038087168352808616602084015250836040830152608060608301526125366080830184611f7a565b9695505050505050565b5f60208284031215612550575f80fd5b8151611f5181611f2156fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212209db8230f0ebb807710d03508e16e7354e929c6db1b017d22968d29451cdb92cc64736f6c63430008140033
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.