contract_name
stringlengths
1
61
file_path
stringlengths
5
50.4k
contract_address
stringlengths
42
42
language
stringclasses
1 value
class_name
stringlengths
1
61
class_code
stringlengths
4
330k
class_documentation
stringlengths
0
29.1k
class_documentation_type
stringclasses
6 values
func_name
stringlengths
0
62
func_code
stringlengths
1
303k
func_documentation
stringlengths
2
14.9k
func_documentation_type
stringclasses
4 values
compiler_version
stringlengths
15
42
license_type
stringclasses
14 values
swarm_source
stringlengths
0
71
meta
dict
__index_level_0__
int64
0
60.4k
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Metadata
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...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the token collection symbol. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 236, 297 ] }
29,100
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Metadata
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...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) external view returns (string memory);
/** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 398, 476 ] }
29,101
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) ...
/** * @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: ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 606, 998 ] }
29,102
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
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 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 `tr...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1928, 2250 ] }
29,103
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @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...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3007, 3187 ] }
29,104
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
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 with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3412, 3646 ] }
29,105
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
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-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._ *...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4016, 4281 ] }
29,106
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
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");...
/** * @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._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4532, 5047 ] }
29,107
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
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-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 5227, 5431 ] }
29,108
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
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 verifyCallRe...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 5618, 6018 ] }
29,109
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
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-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 6200, 6405 ] }
29,110
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
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 verifyCallR...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 6594, 6995 ] }
29,111
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Address
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
verifyCallResult
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) { ...
/** * @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._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 7218, 7935 ] }
29,112
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toString
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 ...
/** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 184, 912 ] }
29,113
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toHexString
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. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1017, 1362 ] }
29,114
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toHexString
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; } ...
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1485, 1941 ] }
29,115
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @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 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 103, 265 ] }
29,116
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 971, 1281 ] }
29,117
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1340, 1553 ] }
29,118
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1610, 1854 ] }
29,119
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1916, 2021 ] }
29,120
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2085, 2194 ] }
29,121
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2260, 2599 ] }
29,122
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ""; }
/** * @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. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2842, 2941 ] }
29,123
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2998, 3414 ] }
29,124
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3475, 3701 ] }
29,125
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3768, 4068 ] }
29,126
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4134, 4303 ] }
29,127
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4365, 4709 ] }
29,128
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4775, 4965 ] }
29,129
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 5031, 5364 ] }
29,130
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeTransfer
function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev 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 eq...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 6241, 6561 ] }
29,131
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 6869, 7001 ] }
29,132
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, s...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 7163, 7516 ] }
29,133
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 7853, 7968 ] }
29,134
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 8190, 8516 ] }
29,135
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Tra...
/** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 8847, 9234 ] }
29,136
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), toke...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 9458, 9823 ] }
29,137
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @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. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 10155, 10738 ] }
29,138
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 10851, 11030 ] }
29,139
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721...
/** * @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 to...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 11590, 12394 ] }
29,140
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 12961, 13092 ] }
29,141
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Enumerable
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 {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the total amount of tokens stored by the contract. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 132, 192 ] }
29,142
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Enumerable
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 {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/** * @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. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 375, 479 ] }
29,143
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Enumerable
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 {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(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. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 655, 729 ] }
29,144
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 605, 834 ] }
29,145
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 913, 1174 ] }
29,146
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1245, 1363 ] }
29,147
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1435, 1673 ] }
29,148
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnume...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2281, 2875 ] }
29,149
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3171, 3397 ] }
29,150
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3593, 3762 ] }
29,151
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4384, 5377 ] }
29,152
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 5667, 6751 ] }
29,153
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 94, 154 ] }
29,154
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 237, 310 ] }
29,155
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 534, 616 ] }
29,156
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 895, 983 ] }
29,157
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1647, 1726 ] }
29,158
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2039, 2175 ] }
29,159
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
_tier
function _tier(uint16 id) external pure returns (uint16) { if (id == 0) return 0; return ((id - 1) / 4 ); }
/// @dev Convert an id to its tier
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 322, 457 ] }
29,160
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
rarityGen
function rarityGen(uint256 _randinput, uint8 _rarityTier, uint16[][8] storage TIERS) external view returns (string memory) { uint16 currentLowerBound = 0; for (uint8 i = 0; i < TIERS[_rarityTier].length; i++) { uint16 thisPercentage = TIERS[_rarityTier][i]; if ( ...
/** * @dev Converts a digit from 0 - 10000 into its corresponding rarity based on the given rarity tier. * @param _randinput The input from 0 - 10000 to use for rarity gen. * @param _rarityTier The tier to use. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 703, 1306 ] }
29,161
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
letterToNumber
function letterToNumber(string memory _inputLetter, string[] memory LETTERS) public pure returns (uint8) { for (uint8 i = 0; i < LETTERS.length; i++) { if ( keccak256(abi.encodePacked((LETTERS[i]))) == keccak256(abi.encodePacked((_inputLetter))) ) return ...
/** * @dev Helper function to reduce pixel size within contract */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1397, 1803 ] }
29,162
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
hashToMetadata
function hashToMetadata(string memory _hash, mapping(uint256 => Trait[]) storage traitTypes, uint8 health, uint8 accuracy, uint8 defense, uint16 level, uint16 meowModifier ) public view returns (string memory) { string memory metadataString; for (uint8 i = 0; i ...
/** * @dev Hash to metadata function */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1862, 3548 ] }
29,163
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
tokenURIData
function tokenURIData(uint256 _tokenId, string memory tokenHash, mapping(uint256 => Trait[]) storage traitTypes, string[] memory LETTERS, uint8 health, uint8 accuracy, uint8 defense, uint16 level, uint16 meowModifier ) external view returns (strin...
/** * @dev Returns the SVG and metadata for a token Id * @param _tokenId The tokenId to return the SVG and metadata for. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3700, 5478 ] }
29,164
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
hashToSVG
function hashToSVG(string memory _hash, mapping(uint256 => Trait[]) storage traitTypes, string[] memory LETTERS) public view returns (string memory) { string memory svgString; bool[24][24] memory placedPixels; for (uint8 i = 0; i < 9; i++) { uint8 thisTraitIndex = parseInt( ...
/** * @dev Hash to SVG function */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 5531, 8372 ] }
29,165
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCatsLibrary
library ZombieCatsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } /// @dev Convert an id to its tier...
//
LineComment
toString
function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { ...
/** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 10739, 11276 ] }
29,166
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
mutatedHash
function mutatedHash(string memory originalHash, uint256 _t, address _a, uint256 _c ) internal returns (string memory) { require(_c < 10); string memory currentHash = "0"; for (uint8 i = 0; i < 8; i++) { SEED_NONCE++; uint16 _randinput_keeper = u...
/** * @dev Generates a 9 digit hash from a tokenId, address, and random number. * @param _t The token id to be used within the hash. * @param _a The address to be used within the hash. * @param _c The custom nonce to be used within the hash. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 14126, 15940 ] }
29,167
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
mintInternal
function mintInternal(address _account, string memory _hash) internal { uint256 rand = _rand(); uint256 _totalSupply = totalSupply(); uint256 thisTokenId = _totalSupply; tokenIdToHash[thisTokenId] = _hash; hashToMinted[tokenIdToHash[thisTokenId]] = true; // QUESTS ...
/** * @dev Mint internal, this is to avoid code duplication. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 16024, 17586 ] }
29,168
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
mintZombie
function mintZombie(address _account, string memory _hash) public { require(msg.sender == graveyardAddress); // In the Graveyard contract, the Katz head stored in the hash in position 1 // while the character in the ZombieKatz contract is stored in position 8 // so we swap the traits. ...
/** * @dev Mints a zombie. Only the Graveyard contract can call this function. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 17692, 18741 ] }
29,169
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
mintReserve
function mintReserve(uint256 _times) public onlyOwner { for(uint256 i=0; i< _times; i++){ uint256 _totalSupply = totalSupply(); require(_totalSupply < 50); // FIXME: hash mintInternal(msg.sender, mutatedHash("011111111",_totalSupply, msg.sender, 0) ); } }
/** * @dev Developers will mint zombies for themselves. * @param _times How many zombie will be minted */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 18879, 19224 ] }
29,170
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
mutateZombie
function mutateZombie(uint256 _tokenId) public ownerOfZombieKat(_tokenId) noCheaters { // require(ownerOf(_tokenId) == msg.sender // //, "You must own this zombie to mutate" // ); IMiece(mieceAddress).burnFrom(msg.sender, 30 ether); tokenIdToHash[_tokenId] = mutatedHash(_tokenIdToHash(_tok...
/** * @dev Mutates a zombie. * @param _tokenId The token to burn. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 19325, 19777 ] }
29,171
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
tokenURI
function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId)); ZombieKat memory zombiekat = zombiekatz[_tokenId]; string memory tokenHash = _tokenIdToHash(_tokenId); return ZombieCatsLibrary.tokenURIData( ...
/** * @dev Returns the SVG and metadata for a token Id * @param _tokenId The tokenId to return the SVG and metadata for. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 20689, 21359 ] }
29,172
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
_tokenIdToHash
function _tokenIdToHash(uint256 _tokenId) public view returns (string memory) { string memory tokenHash = tokenIdToHash[_tokenId]; //If this is a burned token, override the previous hash if (ownerOf(_tokenId) == 0x000000000000000000000000000000000000dEaD) { tokenHash = string( ...
/** * @dev Returns a hash for a given tokenId * @param _tokenId The tokenId to return the hash for. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 21488, 22053 ] }
29,173
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
walletOfOwner
function walletOfOwner(address _wallet) public view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_wallet); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i; i < tokenCount; i++) { tokensId[i] = tokenOfOwnerByIndex(_wallet, i); } ret...
/** * @dev Returns the wallet of a given wallet. Mainly for ease for frontend devs. * @param _wallet The wallet to get the tokens of. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 22216, 22601 ] }
29,174
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
addTraitType
function addTraitType(uint256 _traitTypeIndex, Trait[] memory traits) public onlyOwner { for (uint256 i = 0; i < traits.length; i++) { traitTypes[_traitTypeIndex].push( ZombieCatsLibrary.Trait( traits[i].traitName, traits[i].traitType, ...
/** * @dev Add a trait type * @param _traitTypeIndex The trait type index * @param traits Array of traits to add */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 22751, 23248 ] }
29,175
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
ZombieCats
contract ZombieCats is ERC721Enumerable { using ZombieCatsLibrary for uint8; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } mapping(uint256 => ZombieCatsLibrary.Trait[]) public traitTypes; mapping(string => bo...
/* ___ ___ ______ _ _ _ __ _ | \/ | |___ / | | (_) | | / / | | ___| . . |_ _ / / ___ _ __ ___ | |__ _ ___| |/ / __ _| |_ ____ / __| |\/| | | | | / / / _ \| '_ ` _ \| '_ \| |/ _ \ \ / _` | __|_ / | (__| | | |...
Comment
setContractAddresses
function setContractAddresses( address _mieceAddress, address _graveyardAddress ) public onlyOwner { mieceAddress = _mieceAddress; graveyardAddress = _graveyardAddress; return; }
/** * @dev Sets the miece, cats and zombie contract addresses * @param _mieceAddress The miece address * @param _graveyardAddress The graveyards address */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 23441, 23679 ] }
29,176
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 92, 152 ] }
29,177
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 233, 306 ] }
29,178
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 524, 606 ] }
29,179
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 879, 967 ] }
29,180
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 1618, 1697 ] }
29,181
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 2002, 2104 ] }
29,182
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
add
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 addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 250, 436 ] }
29,183
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @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. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 705, 846 ] }
29,184
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 1135, 1332 ] }
29,185
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
mul
function mul(uint256 a, uint256 b) internal pure returns (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 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 1577, 2053 ] }
29,186
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts 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 reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 2513, 2650 ] }
29,187
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 3130, 3413 ] }
29,188
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 3862, 3997 ] }
29,189
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
SafeMath
library SafeMath { /** * @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)...
mod
function mod(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), * Reverts with custom message 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 opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 4466, 4637 ] }
29,190
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Address
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 f...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @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: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 590, 1214 ] }
29,191
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Address
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 f...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @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 `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 2129, 2531 ] }
29,192
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Address
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 f...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @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 ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 3270, 3450 ] }
29,193
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Address
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 f...
functionCall
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 with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 3670, 3871 ] }
29,194
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Address
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 f...
functionCallWithValue
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-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._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 4231, 4462 ] }
29,195
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Address
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 f...
functionCallWithValue
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"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @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._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 4708, 5029 ] }
29,196
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ ...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 562, 646 ] }
29,197
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ ...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @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. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 1196, 1349 ] }
29,198
KishuTreats
KishuTreats.sol
0x3908e68839ea86c98cee0e9586e7f256e821a764
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ ...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e
{ "func_code_index": [ 1496, 1745 ] }
29,199