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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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 | name | function name() external view returns (string memory);
| /**
* @dev Returns the token collection name.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
106,
165
]
} | 8,500 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
236,
297
]
} | 8,501 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
398,
476
]
} | 8,502 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
606,
998
]
} | 8,503 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1928,
2250
]
} | 8,504 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3007,
3187
]
} | 8,505 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3412,
3646
]
} | 8,506 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4016,
4281
]
} | 8,507 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4532,
5048
]
} | 8,508 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
5228,
5432
]
} | 8,509 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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 _verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
5619,
6020
]
} | 8,510 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
6202,
6407
]
} | 8,511 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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 _verifyCall... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
6596,
6998
]
} | 8,512 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
103,
265
]
} | 8,513 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
971,
1281
]
} | 8,514 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1340,
1553
]
} | 8,515 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1610,
1854
]
} | 8,516 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1916,
2021
]
} | 8,517 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2085,
2194
]
} | 8,518 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2260,
2599
]
} | 8,519 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2842,
2941
]
} | 8,520 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2998,
3414
]
} | 8,521 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3475,
3701
]
} | 8,522 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3768,
4068
]
} | 8,523 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4134,
4303
]
} | 8,524 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4365,
4709
]
} | 8,525 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4775,
4965
]
} | 8,526 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
5031,
5364
]
} | 8,527 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
6241,
6561
]
} | 8,528 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
6869,
7001
]
} | 8,529 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
7163,
7516
]
} | 8,530 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
7853,
7968
]
} | 8,531 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
8190,
8516
]
} | 8,532 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
8847,
9234
]
} | 8,533 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
9458,
9823
]
} | 8,534 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
10155,
10738
]
} | 8,535 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
10851,
11030
]
} | 8,536 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
11590,
12398
]
} | 8,537 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
12965,
13096
]
} | 8,538 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
132,
192
]
} | 8,539 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
375,
479
]
} | 8,540 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
655,
729
]
} | 8,541 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
605,
834
]
} | 8,542 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
913,
1174
]
} | 8,543 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1245,
1363
]
} | 8,544 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1435,
1673
]
} | 8,545 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2281,
2875
]
} | 8,546 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3171,
3397
]
} | 8,547 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3593,
3762
]
} | 8,548 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4384,
5377
]
} | 8,549 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | 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.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
5667,
6751
]
} | 8,550 |
LinguaFranca | @openzeppelin/contracts/access/Ownable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
399,
491
]
} | 8,551 | ||
LinguaFranca | @openzeppelin/contracts/access/Ownable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | LinguaFranca | contract LinguaFranca is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 2022;
uint256 public maxMintAmount = 20;
bool public paused = false;
constructor(
string me... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
476,
581
]
} | 8,552 | ||
LinguaFranca | @openzeppelin/contracts/access/Ownable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | LinguaFranca | contract LinguaFranca is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 2022;
uint256 public maxMintAmount = 20;
bool public paused = false;
constructor(
string me... | mint | function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);
if (msg.sender != owner()) {
require(msg.value >= cost * _mintAmount);
}
for... | // public | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
597,
1033
]
} | 8,553 | ||
LinguaFranca | @openzeppelin/contracts/access/Ownable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | LinguaFranca | contract LinguaFranca is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 2022;
uint256 public maxMintAmount = 20;
bool public paused = false;
constructor(
string me... | setCost | function setCost(uint256 _newCost) public onlyOwner() {
cost = _newCost;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
1839,
1924
]
} | 8,554 | ||
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | SafeMath | library SafeMath
{
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://g... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
c ... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
91,
485
]
} | 8,555 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | SafeMath | library SafeMath
{
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://g... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
// assert(_b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = _a / _b;
// assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
return _a / _b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
569,
860
]
} | 8,556 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | SafeMath | library SafeMath
{
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://g... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
987,
1103
]
} | 8,557 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | SafeMath | library SafeMath
{
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://g... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
1169,
1299
]
} | 8,558 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | Ownable | contract Ownable
{
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.send... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
649,
757
]
} | 8,559 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | Ownable | contract Ownable
{
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.send... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
895,
1073
]
} | 8,560 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | Pausable | contract Pausable is Ownable
{
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
513,
609
]
} | 8,561 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | Pausable | contract Pausable is Ownable
{
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
| /**
* @dev called by the owner to unpauseunpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
700,
798
]
} | 8,562 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | BasicToken | contract BasicToken is ERC20Basic
{
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer tok... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
201,
289
]
} | 8,563 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | BasicToken | contract BasicToken is ERC20Basic
{
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer tok... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
447,
779
]
} | 8,564 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | BasicToken | contract BasicToken is ERC20Basic
{
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer tok... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
985,
1089
]
} | 8,565 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken
{
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
401,
858
]
} | 8,566 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken
{
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
require((_value == 0) || (allowed[msg.sender][_spender] == 0));
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
1490,
1754
]
} | 8,567 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken
{
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
2078,
2209
]
} | 8,568 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken
{
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = (allowed[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
2675,
2949
]
} | 8,569 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken
{
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) {
uint256 oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit A... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
3420,
3841
]
} | 8,570 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | GUESSToken | contract GUESSToken is PausableToken, FrozenableToken
{
string public name = "GUSS.ONE";
string public symbol = "GUESS";
uint256 public decimals = 18;
uint256 INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals));
/**
* @dev Initializes the total release
*/
constructor(... | /**
* @title ATCX Token
* @dev Global digital painting asset platform token.
* @author atcx.org
*/ | NatSpecMultiLine | function() public payable {
revert();
}
| /**
* if ether is sent to this address, send it back.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
563,
621
]
} | 8,571 | |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | GUESSToken | contract GUESSToken is PausableToken, FrozenableToken
{
string public name = "GUSS.ONE";
string public symbol = "GUESS";
uint256 public decimals = 18;
uint256 INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals));
/**
* @dev Initializes the total release
*/
constructor(... | /**
* @title ATCX Token
* @dev Global digital painting asset platform token.
* @author atcx.org
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public whenNotFrozen(_to) returns (bool) {
return super.transfer(_to, _value);
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
793,
939
]
} | 8,572 |
GUESSToken | GUESSToken.sol | 0x49d2b7568eeea849d6d1799c83e8590dae55fa4c | Solidity | GUESSToken | contract GUESSToken is PausableToken, FrozenableToken
{
string public name = "GUSS.ONE";
string public symbol = "GUESS";
uint256 public decimals = 18;
uint256 INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals));
/**
* @dev Initializes the total release
*/
constructor(... | /**
* @title ATCX Token
* @dev Global digital painting asset platform token.
* @author atcx.org
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public whenNotFrozen(_from) returns (bool) {
return super.transferFrom(_from, _to, _value);
}
| /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | MIT | bzzr://2d61d7a00840fef0c6bef727ad115c18126d0e0a34c3916e7f6d5ebf1d549f41 | {
"func_code_index": [
1231,
1417
]
} | 8,573 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
94,
154
]
} | 8,574 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
237,
310
]
} | 8,575 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
534,
616
]
} | 8,576 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
895,
983
]
} | 8,577 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
1647,
1726
]
} | 8,578 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
2039,
2141
]
} | 8,579 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
259,
445
]
} | 8,580 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
723,
864
]
} | 8,581 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
1162,
1359
]
} | 8,582 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
1613,
2089
]
} | 8,583 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
2560,
2697
]
} | 8,584 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
3188,
3471
]
} | 8,585 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
3931,
4066
]
} | 8,586 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
4546,
4717
]
} | 8,587 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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 in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
606,
1033
]
} | 8,588 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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");
// 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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
1963,
2365
]
} | 8,589 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
3121,
3299
]
} | 8,590 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
3524,
3725
]
} | 8,591 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
4095,
4326
]
} | 8,592 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | 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");
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 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
4577,
4898
]
} | 8,593 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
747,
1374
]
} | 8,594 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
2393,
3159
]
} | 8,595 |
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | Solidity | ICompositeVault | interface ICompositeVault {
function cap() external view returns (uint);
function getConverter() external view returns (address);
function getVaultMaster() external view returns (address);
function balance() external view returns (uint);
function tvl() external view returns (uint); // total dol... | token | function token() external view returns (address);
| // total dollar value | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
331,
385
]
} | 8,596 | ||
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | Solidity | ICompositeVault | interface ICompositeVault {
function cap() external view returns (uint);
function getConverter() external view returns (address);
function getVaultMaster() external view returns (address);
function balance() external view returns (uint);
function tvl() external view returns (uint); // total dol... | deposit | function deposit(address _input, uint _amount, uint _min_mint_amount) external returns (uint);
| // average dollar value of vault share token | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
1309,
1408
]
} | 8,597 | ||
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | Solidity | CompositeVaultController | contract CompositeVaultController {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint;
address public governance;
address public strategist;
struct StrategyInfo {
address strategy;
uint quota; // set = 0 to disable
uint percent;
... | setStrategyInfo | function setStrategyInfo(uint _sid, address _strategy, uint _quota, uint _percent) external onlyStrategist {
require(approvedStrategies[_strategy], "!approved");
strategies[_sid].strategy = _strategy;
strategies[_sid].quota = _quota;
strategies[_sid].percent = _percent;
}
| // stratId => StrategyInfo | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
2218,
2536
]
} | 8,598 | ||
CompositeVaultController | CompositeVaultController.sol | 0x3e67c27d14032304c0e8c3af8214ecf102641dbb | Solidity | CompositeVaultController | contract CompositeVaultController {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint;
address public governance;
address public strategist;
struct StrategyInfo {
address strategy;
uint quota; // set = 0 to disable
uint percent;
... | harvestStrategy | function harvestStrategy(address _strategy) external onlyAuthorized {
ILpPairStrategy(_strategy).harvest(address(0));
}
| // note that some strategies do not allow controller to harvest | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://9f2fb03e525277e79f1a77335f223d81e32ac35fb225aadebfd528f4f1192ea6 | {
"func_code_index": [
5825,
5963
]
} | 8,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.