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
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If th...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 2376, 2489 ] }
21,100
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) external;
/** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 2962, 3022 ] }
21,101
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) external view returns (address operator);
/** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3176, 3260 ] }
21,102
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool _approved) external;
/** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3587, 3662 ] }
21,103
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) external view returns (bool);
/** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3813, 3906 ] }
21,104
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {appro...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 4483, 4630 ] }
21,105
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 132, 192 ] }
21,106
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 375, 479 ] }
21,107
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 655, 729 ] }
21,108
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 106, 165 ] }
21,109
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 236, 297 ] }
21,110
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 398, 476 ] }
21,111
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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 () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 497, 589 ] }
21,112
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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 () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1297, 1494 ] }
21,113
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1002, 1312 ] }
21,114
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1371, 1584 ] }
21,115
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1641, 1885 ] }
21,116
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1947, 2052 ] }
21,117
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 2116, 2225 ] }
21,118
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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 base = baseURI(); return bytes(base).length > 0 ? string(abi.encodePacked(base, tokenId.toString())) : ""; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 2291, 2620 ] }
21,119
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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 _baseURI; }
/** * @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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 2863, 2967 ] }
21,120
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3024, 3440 ] }
21,121
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3501, 3727 ] }
21,122
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3794, 4094 ] }
21,123
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 4160, 4329 ] }
21,124
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 4391, 4735 ] }
21,125
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 4801, 4991 ] }
21,126
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 5057, 5390 ] }
21,127
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 6267, 6587 ] }
21,128
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 6895, 7027 ] }
21,129
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 7189, 7542 ] }
21,130
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 7879, 7994 ] }
21,131
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 8216, 8542 ] }
21,132
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 8873, 9260 ] }
21,133
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 9484, 9849 ] }
21,134
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 10181, 10764 ] }
21,135
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 10877, 11056 ] }
21,136
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 11616, 12424 ] }
21,137
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 12991, 13122 ] }
21,138
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 605, 834 ] }
21,139
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 913, 1174 ] }
21,140
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1245, 1363 ] }
21,141
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 1435, 1673 ] }
21,142
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 2281, 2875 ] }
21,143
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3171, 3397 ] }
21,144
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 3593, 3762 ] }
21,145
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 4384, 5377 ] }
21,146
DegenReindeer
DegenReindeer.sol
0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d
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.10+commit.fc410830
None
ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99
{ "func_code_index": [ 5667, 6751 ] }
21,147
MLTOKEN
MLTOKEN.sol
0x6bb927406368da6fd83a8a09130d3597c5ebcb68
Solidity
token
contract token { string public standard = ''; string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transf...
token
function token(uint256 initialSupply, string tokenName, string tokenSymbol) public { totalSupply = initialSupply * 10 ** uint256(decimals); //以太币是10^18,后面18个0,所以默认decimals是18 balanceOf[this] = totalSupply; name = tokenName; symbol = tokenSymbol; }
//减去用户余额事件
LineComment
v0.4.20+commit.3155dd80
None
bzzr://627b804b38813bd1ccb407ff966051db60856fb27c8c232fe51e8332bae4277c
{ "func_code_index": [ 460, 764 ] }
21,148
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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:...
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-solidity/pull/522 if (a == 0) { return 0; } uint2...
/** * @dev Multiplies two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 98, 496 ] }
21,149
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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:...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 618, 902 ] }
21,150
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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:...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 1027, 1166 ] }
21,151
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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:...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 1241, 1380 ] }
21,152
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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:...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 1525, 1642 ] }
21,153
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
ShabuOpenSale
contract ShabuOpenSale { using SafeMath for uint256; uint256 public totalSold; address payable public owner; uint256 public collectedETH; uint256 public startDate; bool public status = false; mapping (address => uint256) private _contributions; uint256 LIMIT_BUY = 5 ether; ERC20 public Toke...
// Converts ETH to Tokens and sends new Tokens to the sender
LineComment
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 501, 554 ] }
21,154
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
ShabuOpenSale
contract ShabuOpenSale { using SafeMath for uint256; uint256 public totalSold; address payable public owner; uint256 public collectedETH; uint256 public startDate; bool public status = false; mapping (address => uint256) private _contributions; uint256 LIMIT_BUY = 5 ether; ERC20 public Toke...
availableTokens
function availableTokens() public view returns(uint256) { return Token.balanceOf(address(this)); }
// Function to query the supply of Tokens in the contract
LineComment
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 1412, 1521 ] }
21,155
ShabuOpenSale
ShabuOpenSale.sol
0x916e9919345395f758182d485be4b8b61d27cf28
Solidity
ShabuOpenSale
contract ShabuOpenSale { using SafeMath for uint256; uint256 public totalSold; address payable public owner; uint256 public collectedETH; uint256 public startDate; bool public status = false; mapping (address => uint256) private _contributions; uint256 LIMIT_BUY = 5 ether; ERC20 public Toke...
statusPresale
function statusPresale(bool _status) public { require(msg.sender == owner); status = _status; }
// OWNER FEATURE
LineComment
v0.6.8+commit.0bbfe453
None
ipfs://187dac66a1a6c4a40012b2c6e3b225f5fdb8f0d946cdbb86562d84fc58217102
{ "func_code_index": [ 1544, 1655 ] }
21,156
PoolProd
contracts\abstract\TimeMachine\TimeMachineP.sol
0x39c8b48da570f52efd62870f7e7fce84ee0cff64
Solidity
TimeMachineP
contract TimeMachineP { /** * @dev get current real timestamp * @return current real timestamp */ function getTimestamp_() internal view returns(uint) { return block.timestamp; } }
/** * @dev TimeMachine implementation for production */
NatSpecMultiLine
getTimestamp_
function getTimestamp_() internal view returns(uint) { return block.timestamp; }
/** * @dev get current real timestamp * @return current real timestamp */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4
{ "func_code_index": [ 115, 206 ] }
21,157
PoolProd
contracts\abstract\Pool\RoleModel.sol
0x39c8b48da570f52efd62870f7e7fce84ee0cff64
Solidity
RoleModel
contract RoleModel is IRoleModel{ mapping (address => uint8) internal role_; mapping (uint8 => address) internal roleAddress_; function setRole_(uint8 _for, address _afor) internal returns(bool) { require((role_[_afor] == 0) && (roleAddress_[_for] == address(0))); role_[_afor] = _for; roleAd...
getRole
function getRole(address _targetAddress) external view returns(uint8){ return role_[_targetAddress]; }
/** * @dev It returns role in pooling of account address that you sent via param * @param _targetAddress is an address of account to return account's role * @return role of account (0 if RL_DEFAULT, 1 if RL_POOL_MANAGER, 2 if RL_ICO_MANAGER, 4 if RL_ADMIN, 8 if RL_PAYBOT) */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4
{ "func_code_index": [ 945, 1058 ] }
21,158
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 922, 1041 ] }
21,159
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 1261, 1386 ] }
21,160
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 1730, 2002 ] }
21,161
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 2512, 2725 ] }
21,162
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } ...
// ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfe...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 3262, 3610 ] }
21,163
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 3891, 4043 ] }
21,164
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 4404, 4726 ] }
21,165
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 4916, 4975 ] }
21,166
Nacreous
Nacreous.sol
0x2774b5771f607938d4e9197b3a5ca9f21110cf11
Solidity
Nacreous
contract Nacreous is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://0c62739831ccadf36ee62dbbe5c67766420bb696132177c399f39a743b4dbbac
{ "func_code_index": [ 5206, 5395 ] }
21,167
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeAgent
contract UpgradeAgent { uint public originalSupply; /** Interface marker */ function isUpgradeAgent() public constant returns (bool) { return true; } function upgradeFrom(address _from, uint256 _value) public; }
/** * Upgrade agent interface inspired by Lunyr. * * Upgrade agent transfers tokens to a new contract. * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting. */
NatSpecMultiLine
isUpgradeAgent
function isUpgradeAgent() public constant returns (bool) { return true; }
/** Interface marker */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 87, 171 ] }
21,168
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeableToken
contract UpgradeableToken is StandardToken { using SafeMathLib for uint; /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ ...
/** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */
NatSpecMultiLine
UpgradeAgentEnabledToken
function UpgradeAgentEnabledToken(address _upgradeMaster) { upgradeMaster = _upgradeMaster; }
/** * Do not allow construction without upgrade master set. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 1129, 1233 ] }
21,169
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeableToken
contract UpgradeableToken is StandardToken { using SafeMathLib for uint; /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ ...
/** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */
NatSpecMultiLine
upgrade
function upgrade(uint256 value) public { UpgradeState state = getUpgradeState(); if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) { // Called in a bad state throw; } // Validate input value. if (value == 0) throw; balances[msg.sender] = bal...
/** * Allow the token holder to upgrade some of their tokens to a new contract. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 1330, 1994 ] }
21,170
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeableToken
contract UpgradeableToken is StandardToken { using SafeMathLib for uint; /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ ...
/** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */
NatSpecMultiLine
setUpgradeAgent
function setUpgradeAgent(address agent) external { if(!canUpgrade()) { // The token is not yet in a state that we could think upgrading throw; } if (agent == 0x0) throw; // Only a master can designate the next agent if (msg.sender != upgradeMaster) throw; // Upgrade has a...
/** * Set an upgrade agent that handles */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 2051, 2776 ] }
21,171
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeableToken
contract UpgradeableToken is StandardToken { using SafeMathLib for uint; /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ ...
/** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */
NatSpecMultiLine
getUpgradeState
function getUpgradeState() public constant returns(UpgradeState) { if(!canUpgrade()) return UpgradeState.NotAllowed; else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent; else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade; else return UpgradeState.Upgrading; }
/** * Get the state of the token upgrade. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 2835, 3155 ] }
21,172
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeableToken
contract UpgradeableToken is StandardToken { using SafeMathLib for uint; /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ ...
/** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */
NatSpecMultiLine
setUpgradeMaster
function setUpgradeMaster(address master) external { if (master == 0x0) throw; if (msg.sender != upgradeMaster) throw; upgradeMaster = master; }
/** * Change the upgrade master. * * This allows us to set a new owner for the upgrade mechanism. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 3278, 3449 ] }
21,173
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
UpgradeableToken
contract UpgradeableToken is StandardToken { using SafeMathLib for uint; /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ ...
/** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */
NatSpecMultiLine
canUpgrade
function canUpgrade() public constant returns(bool) { return true; }
/** * Child contract can enable to provide the condition when the upgrade can begun. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 3551, 3631 ] }
21,174
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
TransferableToken
contract TransferableToken is ERC20 { // Checks whether it can transfer or otherwise throws. modifier canTransfer(address _sender, uint _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } // Checks modifier and allows transfer if tokens are not locked. function transfer...
/* TransferableToken defines the generic interface and the implementation to limit token transferability for different events. It is intended to be used as a base class for other token contracts. Over-writting transferableTokens(address holder, uint64 time) is the way to provide the specific logic fo...
Comment
transfer
function transfer(address _to, uint _value) canTransfer(msg.sender, _value) returns (bool success) { return super.transfer(_to, _value); }
// Checks modifier and allows transfer if tokens are not locked.
LineComment
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 301, 449 ] }
21,175
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
TransferableToken
contract TransferableToken is ERC20 { // Checks whether it can transfer or otherwise throws. modifier canTransfer(address _sender, uint _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } // Checks modifier and allows transfer if tokens are not locked. function transfer...
/* TransferableToken defines the generic interface and the implementation to limit token transferability for different events. It is intended to be used as a base class for other token contracts. Over-writting transferableTokens(address holder, uint64 time) is the way to provide the specific logic fo...
Comment
transferFrom
function transferFrom(address _from, address _to, uint _value) canTransfer(_from, _value) returns (bool success) { return super.transferFrom(_from, _to, _value); }
// Checks modifier and allows transfer if tokens are not locked.
LineComment
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 520, 693 ] }
21,176
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
TransferableToken
contract TransferableToken is ERC20 { // Checks whether it can transfer or otherwise throws. modifier canTransfer(address _sender, uint _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } // Checks modifier and allows transfer if tokens are not locked. function transfer...
/* TransferableToken defines the generic interface and the implementation to limit token transferability for different events. It is intended to be used as a base class for other token contracts. Over-writting transferableTokens(address holder, uint64 time) is the way to provide the specific logic fo...
Comment
transferableTokens
function transferableTokens(address holder, uint64 time) constant public returns (uint256) { return balanceOf(holder); }
// Default transferable tokens function returns all tokens for a holder (no limit).
LineComment
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 783, 914 ] }
21,177
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
ReleasableToken
contract ReleasableToken is ERC20, Ownable { /* The finalizer contract that allows unlift the transfer limits on this token */ address public releaseAgent; /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/ bool public released = false; ...
/** * Define interface for releasing the token transfer after a successful crowdsale. */
NatSpecMultiLine
setReleaseAgent
function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public { // Already set if(releaseAgent != 0) { throw; } // We don't do interface check here as we might want to a normal wallet address to act as a release agent releaseAgent = addr; }
/** * Set the contract that can call release and make the token transferable. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 871, 1169 ] }
21,178
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
ReleasableToken
contract ReleasableToken is ERC20, Ownable { /* The finalizer contract that allows unlift the transfer limits on this token */ address public releaseAgent; /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/ bool public released = false; ...
/** * Define interface for releasing the token transfer after a successful crowdsale. */
NatSpecMultiLine
setTransferAgent
function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public { transferAgents[addr] = state; }
/** * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 1299, 1434 ] }
21,179
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
ReleasableToken
contract ReleasableToken is ERC20, Ownable { /* The finalizer contract that allows unlift the transfer limits on this token */ address public releaseAgent; /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/ bool public released = false; ...
/** * Define interface for releasing the token transfer after a successful crowdsale. */
NatSpecMultiLine
releaseTokenTransfer
function releaseTokenTransfer() public onlyReleaseAgent { released = true; }
/** * One way function to release the tokens to the wild. * * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached). */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 1674, 1761 ] }
21,180
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { using SafeMathLib for uint; bool public mintingFinished = false; /** List of agents that are allowed to create new tokens */ mapping (address => bool) public mintAgents; /** * Create new tokens and allocate them to an address.. * * On...
/** * A token that can increase its supply by another contract. * * This allows uncapped crowdsale by dynamically increasing the supply when money pours in. * Only mint agents, contracts whitelisted by owner, can mint new tokens. * */
NatSpecMultiLine
mint
function mint(address receiver, uint amount) onlyMintAgent canMint public { totalSupply = totalSupply.plus(amount); balances[receiver] = balances[receiver].plus(amount); Transfer(0, receiver, amount); }
/** * Create new tokens and allocate them to an address.. * * Only callably by a crowdsale contract (mint agent). */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 378, 601 ] }
21,181
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { using SafeMathLib for uint; bool public mintingFinished = false; /** List of agents that are allowed to create new tokens */ mapping (address => bool) public mintAgents; /** * Create new tokens and allocate them to an address.. * * On...
/** * A token that can increase its supply by another contract. * * This allows uncapped crowdsale by dynamically increasing the supply when money pours in. * Only mint agents, contracts whitelisted by owner, can mint new tokens. * */
NatSpecMultiLine
setMintAgent
function setMintAgent(address addr, bool state) onlyOwner canMint public { mintAgents[addr] = state; }
/** * Owner can allow a crowdsale contract to mint new tokens. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 681, 794 ] }
21,182
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
CrowdsaleToken
contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken { string public name; string public symbol; /** We don't want to support decimal places as it's not very well handled by different wallets */ uint public decimals = 0; /** * Construct the token. * * This token...
/** * A crowdsaled token. * * An ERC-20 token designed specifically for crowdsales with investor protection and further development path. * * - The token transfer() is disabled until the crowdsale is over * - The token contract gives an opt-in upgrade path to a new contract * - The same token can be part ...
NatSpecMultiLine
CrowdsaleToken
function CrowdsaleToken(string _name, string _symbol, uint _initialSupply) { // Create from team multisig owner = msg.sender; // Initially set the upgrade master same as owner upgradeMaster = owner; name = _name; symbol = _symbol; totalSupply = _initialSupply; // Create initially all b...
/** * Construct the token. * * This token must be created through a team multisig wallet, so that it is owned by that wallet. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 413, 825 ] }
21,183
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
CrowdsaleToken
contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken { string public name; string public symbol; /** We don't want to support decimal places as it's not very well handled by different wallets */ uint public decimals = 0; /** * Construct the token. * * This token...
/** * A crowdsaled token. * * An ERC-20 token designed specifically for crowdsales with investor protection and further development path. * * - The token transfer() is disabled until the crowdsale is over * - The token contract gives an opt-in upgrade path to a new contract * - The same token can be part ...
NatSpecMultiLine
releaseTokenTransfer
function releaseTokenTransfer() public onlyReleaseAgent { mintingFinished = true; super.releaseTokenTransfer(); }
/** * When token is released to be transferable, enforce no new tokens can be created. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 929, 1058 ] }
21,184
CrowdsaleToken
CrowdsaleToken.sol
0xc2921ea1c150405ef952f73952f37fa2746168d8
Solidity
CrowdsaleToken
contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken { string public name; string public symbol; /** We don't want to support decimal places as it's not very well handled by different wallets */ uint public decimals = 0; /** * Construct the token. * * This token...
/** * A crowdsaled token. * * An ERC-20 token designed specifically for crowdsales with investor protection and further development path. * * - The token transfer() is disabled until the crowdsale is over * - The token contract gives an opt-in upgrade path to a new contract * - The same token can be part ...
NatSpecMultiLine
canUpgrade
function canUpgrade() public constant returns(bool) { return released; }
/** * Allow upgrade agent functionality kick in only if the crowdsale was success. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://a8785e459c7eb669323583bedc40603ac66780f2fcf40b5edab7086a9b30a914
{ "func_code_index": [ 1158, 1241 ] }
21,185
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. **/
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 96, 303 ] }
21,186
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ // uint256 c = a / b; // assert(a == b * c + a % b); // ...
/** * @dev Integer division of two numbers, truncating the quotient. **/
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 396, 822 ] }
21,187
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 945, 1073 ] }
21,188
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 1146, 1292 ] }
21,189
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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.sender; ...
/** * @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 { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = 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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 672, 869 ] }
21,190
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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_; } /** ...
/** * @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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 210, 306 ] }
21,191
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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_; } /** ...
/** * @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 t...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. **/
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 479, 839 ] }
21,192
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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_; } /** ...
/** * @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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 1060, 1172 ] }
21,193
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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 tran...
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); ...
/** * @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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 408, 903 ] }
21,194
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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 tran...
approve
function approve(address _spender, uint256 _value) public returns (bool) { 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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 1556, 1767 ] }
21,195
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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 tran...
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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 2104, 2243 ] }
21,196
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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 tran...
increaseApproval
function increaseApproval(address _spender, uint _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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 2730, 3015 ] }
21,197
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
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 tran...
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @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.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 3507, 3962 ] }
21,198
CoinallyToken
CoinallyToken.sol
0x7cff7d6881e6d318e7fe01533f01dad78d9128a0
Solidity
CrowdsaleToken
contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ constructor() pu...
/** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/
NatSpecMultiLine
function() public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); uint256 weiAmount = msg.value; // Calculate tokens to sell uint256 tokens = weiAmount.mul(basePrice).div(1 ether); uint256 returnWei = 0; if (tokensSo...
/** * @dev fallback function to send ether to for Crowd sale **/
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://506497210e554dea6cebccfb4f3e131b31a6c1ee29a095a4ca609a8ec742973c
{ "func_code_index": [ 666, 1830 ] }
21,199