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
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 2260, 2599 ] }
6,700
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ""; }
/** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 2842, 2941 ] }
6,701
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 2998, 3414 ] }
6,702
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 3475, 3701 ] }
6,703
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 3768, 4068 ] }
6,704
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 4134, 4303 ] }
6,705
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 4365, 4709 ] }
6,706
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 4775, 4965 ] }
6,707
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 5031, 5364 ] }
6,708
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeTransfer
function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is eq...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 6241, 6561 ] }
6,709
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 6869, 7001 ] }
6,710
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, s...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 7163, 7516 ] }
6,711
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 7853, 7968 ] }
6,712
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 8190, 8516 ] }
6,713
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Tra...
/** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 8847, 9234 ] }
6,714
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), toke...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 9458, 9823 ] }
6,715
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 10155, 10738 ] }
6,716
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 10851, 11030 ] }
6,717
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param to...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 11590, 12398 ] }
6,718
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 12965, 13096 ] }
6,719
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the total amount of tokens stored by the contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 132, 192 ] }
6,720
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 375, 479 ] }
6,721
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) external view returns (uint256);
/** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 655, 729 ] }
6,722
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 605, 834 ] }
6,723
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 913, 1174 ] }
6,724
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 1245, 1363 ] }
6,725
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 1435, 1673 ] }
6,726
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnume...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 2281, 2875 ] }
6,727
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 3171, 3397 ] }
6,728
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 3593, 3762 ] }
6,729
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 4384, 5377 ] }
6,730
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 5667, 6751 ] }
6,731
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
Base64
library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; ...
/// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <brecht@loopring.org>
NatSpecSingleLine
encode
function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); ...
/// @notice Encodes some bytes to the base64 representation
NatSpecSingleLine
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 199, 1994 ] }
6,732
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
PrimeNumberLoot
contract PrimeNumberLoot is ERC721Enumerable, ReentrancyGuard, Ownable { using SafeMath for uint256; uint256 max_num = 100000; constructor() ERC721("PrimeNumberLoot", "PrimeNumberLoot") Ownable() {} function changeLimit(uint256 limit) external onlyOwner{ max_num = limit; } /...
isPrime
function isPrime(uint256 query) internal view returns (bool) { require( query <= max_num && query >= 0, "This number is not supported." ); return probablyPrime(query,2); }
//prime number or not
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 342, 576 ] }
6,733
PrimeNumberLoot
PrimeNumberLoot.sol
0x896fdefd39a41d29c01e0bb2dc1a21529b81f42b
Solidity
PrimeNumberLoot
contract PrimeNumberLoot is ERC721Enumerable, ReentrancyGuard, Ownable { using SafeMath for uint256; uint256 max_num = 100000; constructor() ERC721("PrimeNumberLoot", "PrimeNumberLoot") Ownable() {} function changeLimit(uint256 limit) external onlyOwner{ max_num = limit; } /...
getValues
function getValues(uint256 n) public pure returns (uint256[2] memory) { uint256 s = 0; uint256 d = n - 1; while (d % 2 == 0) { d = d / 2; s++; } uint256[2] memory ret; ret[0] = s; ret[1] = d; return ret; }
// Write (n - 1) as 2^s * d
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://dc7fcdfe72aa9443f6450aafb560b74c985df75cc52faae739d2ea561294c8d6
{ "func_code_index": [ 4524, 4838 ] }
6,734
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721Receiver
contract ERC721Receiver { /** * @dev Magic value to be returned upon successful reception of an NFT * Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`, * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` */ bytes4 constant ERC721_RECE...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4);
/** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safetransfer`. This function MAY throw to revert and reject the * transfer. This function MUST use 50,000 gas or less. Return of other * than the magic value MUST result in the transa...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 1035, 1135 ] }
6,735
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { require(_owner != address(0)); return ownedTokensCount[_owner]; }
/** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 1533, 1693 ] }
6,736
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 _tokenId) public view returns (address) { address owner = tokenOwner[_tokenId]; require(owner != address(0)); return owner; }
/** * @dev Gets the owner of the specified token ID * @param _tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 1916, 2103 ] }
6,737
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
exists
function exists(uint256 _tokenId) public view returns (bool) { address owner = tokenOwner[_tokenId]; return owner != address(0); }
/** * @dev Returns whether the specified token exists * @param _tokenId uint256 ID of the token to query the existance of * @return whether the token exists */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 2291, 2449 ] }
6,738
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
approve
function approve(address _to, uint256 _tokenId) public { address owner = ownerOf(_tokenId); require(_to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); if (getApproved(_tokenId) != address(0) || _to != address(0)) { tokenApprovals[_tokenId] = _to; ...
/** * @dev Approves another address to transfer the given token ID * @dev The zero address indicates there is no approved address. * @dev There can only be one approved address per token at a given time. * @dev Can only be called by the token owner or an approved operator. * @param _to address to be approved ...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 2885, 3288 ] }
6,739
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
getApproved
function getApproved(uint256 _tokenId) public view returns (address) { return tokenApprovals[_tokenId]; }
/** * @dev Gets the approved address for a token ID, or zero if no address set * @param _tokenId uint256 ID of the token to query the approval of * @return address currently approved for a the given token ID */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 3531, 3655 ] }
6,740
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address _to, bool _approved) public { require(_to != msg.sender); operatorApprovals[msg.sender][_to] = _approved; emit ApprovalForAll(msg.sender, _to, _approved); }
/** * @dev Sets or unsets the approval of a given operator * @dev An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 3952, 4180 ] }
6,741
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address _owner, address _operator) public view returns (bool) { return operatorApprovals[_owner][_operator]; }
/** * @dev Tells whether an operator is approved by a given owner * @param _owner owner address which you want to query the approval of * @param _operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 4506, 4661 ] }
6,742
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId) { require(_from != address(0)); require(_to != address(0)); clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(_from, _to, _tokenId);...
/** * @dev Transfers the ownership of a given token ID to another address * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible * @dev Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the own...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 5106, 5462 ] }
6,743
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId ) public canTransfer(_tokenId) { safeTransferFrom(_from, _to, _tokenId, ""); }
/** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, *...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 6101, 6325 ] }
6,744
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public canTransfer(_tokenId) { transferFrom(_from, _to, _tokenId); require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data)); }
/** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, *...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 7036, 7347 ] }
6,745
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
isApprovedOrOwner
function isApprovedOrOwner(address _spender, uint256 _tokenId) internal view returns (bool) { address owner = ownerOf(_tokenId); return _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender); }
/** * @dev Returns whether the given spender can transfer a given token ID * @param _spender address of the spender to query * @param _tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of ...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 7714, 7972 ] }
6,746
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_mint
function _mint(address _to, uint256 _tokenId) internal { require(_to != address(0)); addTokenTo(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); }
/** * @dev Internal function to mint a new token * @dev Reverts if the given token ID already exists * @param _to The address that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 8238, 8430 ] }
6,747
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_burn
function _burn(address _owner, uint256 _tokenId) internal { clearApproval(_owner, _tokenId); removeTokenFrom(_owner, _tokenId); emit Transfer(_owner, address(0), _tokenId); }
/** * @dev Internal function to burn a specific token * @dev Reverts if the token does not exist * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 8631, 8842 ] }
6,748
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
clearApproval
function clearApproval(address _owner, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _owner); if (tokenApprovals[_tokenId] != address(0)) { tokenApprovals[_tokenId] = address(0); emit Approval(_owner, address(0), _tokenId); } }
/** * @dev Internal function to clear current approval of a given token ID * @dev Reverts if the given address is not indeed the owner of the token * @param _owner owner of the token * @param _tokenId uint256 ID of the token to be transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 9121, 9423 ] }
6,749
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal { require(tokenOwner[_tokenId] == address(0)); tokenOwner[_tokenId] = _to; ownedTokensCount[_to] = ownedTokensCount[_to].add(1); }
/** * @dev Internal function to add a token ID to the list of a given address * @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.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 9696, 9923 ] }
6,750
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _from); ownedTokensCount[_from] = ownedTokensCount[_from].sub(1); tokenOwner[_tokenId] = address(0); }
/** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 10212, 10449 ] }
6,751
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_isContract
function _isContract(address _user) internal view returns (bool) { uint size; assembly { size := extcodesize(_user) } return size > 0; }
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param _user address to check * @return whether the target address is a contract */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 10799, 10972 ] }
6,752
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from tok...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
checkAndCallSafeTransfer
function checkAndCallSafeTransfer( address _from, address _to, uint256 _tokenId, bytes _data ) internal returns (bool) { if (!_isContract(_to)) { return true; } bytes4 retval = ERC721Receiver(_to).onERC721Received(_from, _tokenId, _data); return (retval == ER...
/** * @dev Internal function to invoke `onERC721Received` on a target address * @dev The call is not executed if the target address is not a contract * @param _from address representing the previous owner of the given token ID * @param _to target address that will receive the tokens * @param _tokenId uint256 ...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 11501, 11900 ] }
6,753
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
Owned
contract Owned { address owner; modifier onlyOwner { require(msg.sender == owner); _; } /// @dev Contract constructor function Owned() public { owner = msg.sender; } }
Owned
function Owned() public { owner = msg.sender; }
/// @dev Contract constructor
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 161, 227 ] }
6,754
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
ETHero
function ETHero() public { name_ = "ETH.TOWN Hero"; symbol_ = "HERO"; }
/** * @dev Constructor function */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 1612, 1711 ] }
6,755
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setLogicContract
function setLogicContract(address _logicContract) external onlyOwner { logicContract = _logicContract; }
/** * @dev Sets the token's interchangeable logic contract */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 1791, 1914 ] }
6,756
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
name
function name() public view returns (string) { return name_; }
/** * @dev Gets the token name * @return string representing the token name */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 2016, 2097 ] }
6,757
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
symbol
function symbol() public view returns (string) { return symbol_; }
/** * @dev Gets the token symbol * @return string representing the token symbol */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 2203, 2288 ] }
6,758
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
_isTransferAllowed
function _isTransferAllowed(address _from, address _to, uint256 _tokenId) internal view returns (bool) { if (logicContract == address(0)) { return true; } HeroLogicInterface logic = HeroLogicInterface(logicContract); return logic.isTransferAllowed(_from, _to, _tokenId); }
/** * @dev Internal function to check if transferring a specific token is allowed * @param _from transfer from * @param _to transfer to * @param _tokenId token to transfer */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 2496, 2829 ] }
6,759
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
_appendUintToString
function _appendUintToString(string _str, uint _value) internal pure returns (string) { uint maxLength = 100; bytes memory reversed = new bytes(maxLength); uint i = 0; while (_value != 0) { uint remainder = _value % 10; _value = _value / 10; reversed[i++] = byte(48 + remai...
/** * @dev Appends uint (in decimal) to a string * @param _str The prefix string * @param _value The uint to append * @return resulting string */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 3008, 3738 ] }
6,760
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
tokenURI
function tokenURI(uint256 _tokenId) public view returns (string) { require(exists(_tokenId)); return _appendUintToString(tokenUriPrefix, genome[_tokenId]); }
/** * @dev Returns an URI for a given token ID * @dev Throws if the token ID does not exist * @param _tokenId uint256 ID of the token to query */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 3912, 4097 ] }
6,761
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { require(_index < balanceOf(_owner)); return ownedTokens[_owner][_index]; }
/** * @dev Gets the token ID at a given index of the tokens list of the requested owner * @param _owner address owning the tokens list to be accessed * @param _index uint256 representing the index to be accessed of the requested tokens list * @return uint256 token ID at the given index of the tokens list owned ...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 4470, 4665 ] }
6,762
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
totalSupply
function totalSupply() public view returns (uint256) { return allTokens.length; }
/** * @dev Gets the total amount of tokens stored by the contract * @return uint256 representing the total amount of tokens */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 4815, 4915 ] }
6,763
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
tokenByIndex
function tokenByIndex(uint256 _index) public view returns (uint256) { require(_index < totalSupply()); return allTokens[_index]; }
/** * @dev Gets the token ID at a given index of all the tokens in this contract * @dev Reverts if the index is greater or equal to the total number of tokens * @param _index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 5256, 5414 ] }
6,764
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal { super.addTokenTo(_to, _tokenId); uint256 length = ownedTokens[_to].length; ownedTokens[_to].push(_tokenId); ownedTokensIndex[_tokenId] = length; if (activeHero[_to] == 0) { activeHero[_to] = _tokenId; emit ActiveH...
/** * @dev Internal function to add a token ID to the list of a given address * @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.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 5687, 6084 ] }
6,765
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal { super.removeTokenFrom(_from, _tokenId); uint256 tokenIndex = ownedTokensIndex[_tokenId]; uint256 lastTokenIndex = ownedTokens[_from].length.sub(1); uint256 lastToken = ownedTokens[_from][lastTokenIndex]; ownedTokens[_from]...
/** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 6373, 7529 ] }
6,766
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
_mint
function _mint(address _to, uint256 _tokenId) internal { require(_to != address(0)); addTokenTo(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); allTokensIndex[_tokenId] = allTokens.length; allTokens.push(_tokenId); }
/** * @dev Internal function to mint a new token * @dev Reverts if the given token ID already exists * @param _to address the beneficiary that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 7807, 8090 ] }
6,767
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
mint
function mint(address _to, uint256 _tokenId) external onlyLogicContract { _mint(_to, _tokenId); }
/** * @dev External function to mint a new token * @dev Reverts if the given token ID already exists * @param _to address the beneficiary that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 8368, 8484 ] }
6,768
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
_burn
function _burn(address _owner, uint256 _tokenId) internal { clearApproval(_owner, _tokenId); removeTokenFrom(_owner, _tokenId); emit Transfer(_owner, address(0), _tokenId); // Reorg all tokens array uint256 tokenIndex = allTokensIndex[_tokenId]; uint256 lastTokenIndex = allTokens.length....
/** * @dev Internal function to burn a specific token * @dev Reverts if the token does not exist * @param _owner owner of the token to burn * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 8733, 9473 ] }
6,769
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
burn
function burn(address _owner, uint256 _tokenId) external onlyLogicContract { _burn(_owner, _tokenId); }
/** * @dev External function to burn a specific token * @dev Reverts if the token does not exist * @param _owner owner of the token to burn * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 9722, 9844 ] }
6,770
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
transferFrom
function transferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId) { require(_isTransferAllowed(_from, _to, _tokenId)); super.transferFrom(_from, _to, _tokenId); }
/** * @dev Transfers the ownership of a given token ID to another address * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible * @dev Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the own...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 10289, 10510 ] }
6,771
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
safeTransferFrom
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId) { require(_isTransferAllowed(_from, _to, _tokenId)); super.safeTransferFrom(_from, _to, _tokenId); }
/** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, *...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 11149, 11401 ] }
6,772
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
safeTransferFrom
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes _data) public canTransfer(_tokenId) { require(_isTransferAllowed(_from, _to, _tokenId)); super.safeTransferFrom(_from, _to, _tokenId, _data); }
/** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, *...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 12112, 12384 ] }
6,773
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
transfer
function transfer(address _to, uint256 _tokenId) external onlyOwnerOf(_tokenId) { require(_isTransferAllowed(msg.sender, _to, _tokenId)); require(_to != address(0)); clearApproval(msg.sender, _tokenId); removeTokenFrom(msg.sender, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(msg...
/** * @dev Allows to transfer a token to another owner * @param _to transfer to * @param _tokenId token to transfer */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 12531, 12911 ] }
6,774
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setActiveHero
function setActiveHero(uint256 _tokenId) external onlyOwnerOf(_tokenId) { activeHero[msg.sender] = _tokenId; emit ActiveHeroChanged(msg.sender, _tokenId); }
/** * @dev Sets the specified token as user's active Hero * @param _tokenId the hero token to set as active */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 13045, 13229 ] }
6,775
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
tokensOfOwner
function tokensOfOwner(address _owner) external view returns (uint256[]) { return ownedTokens[_owner]; }
/** * @dev Queries list of tokens owned by a specific address * @param _owner the address to get tokens of */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 13362, 13485 ] }
6,776
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
activeHeroGenome
function activeHeroGenome(address _owner) public view returns (uint256) { uint256 tokenId = activeHero[_owner]; if (tokenId == 0) { return 0; } return genome[tokenId]; }
/** * @dev Gets the genome of the active hero * @param _owner the address to get hero of */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 13600, 13830 ] }
6,777
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
incrementUniquenessIndex
function incrementUniquenessIndex() external onlyLogicContract { uniquenessIndex ++; }
/** * @dev Increments uniqueness index. Overflow intentionally allowed. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 13923, 14028 ] }
6,778
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
incrementLastTokenId
function incrementLastTokenId() external onlyLogicContract { lastTokenId ++; }
/** * @dev Increments lastTokenId */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 14083, 14180 ] }
6,779
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setUniquenessIndex
function setUniquenessIndex(uint32 _uniquenessIndex) external onlyOwner { uniquenessIndex = _uniquenessIndex; }
/** * @dev Allows (re-)setting the uniqueness index * @param _uniquenessIndex new value */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 14294, 14424 ] }
6,780
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setLastTokenId
function setLastTokenId(uint256 _lastTokenId) external onlyOwner { lastTokenId = _lastTokenId; }
/** * @dev Allows (re-)setting lastTokenId * @param _lastTokenId new value */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 14525, 14640 ] }
6,781
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setHeroData
function setHeroData( uint256 _tokenId, uint16 _fieldA, uint16 _fieldB, uint32 _fieldC, uint32 _fieldD, uint32 _fieldE, uint64 _fieldF, uint64 _fieldG ) external onlyLogicContract { heroData[_tokenId] = HeroData( _fieldA, _fieldB, _fieldC, ...
/** * @dev Allows setting hero data for a hero * @param _tokenId hero to set data for * @param _fieldA data to set * @param _fieldB data to set * @param _fieldC data to set * @param _fieldD data to set * @param _fieldE data to set * @param _fieldF data to set * @param _fieldG data to set */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 14990, 15465 ] }
6,782
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setGenome
function setGenome(uint256 _tokenId, uint256 _genome) external onlyLogicContract { genome[_tokenId] = _genome; }
/** * @dev Allows setting hero genome * @param _tokenId token to set data for * @param _genome genome data to set */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 15610, 15741 ] }
6,783
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
forceTransfer
function forceTransfer(address _from, address _to, uint256 _tokenId) external onlyLogicContract { require(_from != address(0)); require(_to != address(0)); clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(_from, _to, _tokenId); ...
/** * @dev Allows the admin to forcefully transfer a token from one address to another * @param _from transfer from * @param _to transfer to * @param _tokenId token to transfer */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 15954, 16309 ] }
6,784
ETHero
ETHero.sol
0x4fece400c0d3db0937162ab44bab34445626ecfe
Solidity
ETHero
contract ETHero is Owned, ERC721, ERC721BasicToken { struct HeroData { uint16 fieldA; uint16 fieldB; uint32 fieldC; uint32 fieldD; uint32 fieldE; uint64 fieldF; uint64 fieldG; } // Token name string internal name_; // Token sy...
setTokenUriPrefix
function setTokenUriPrefix(string _uriPrefix) external onlyOwner { tokenUriPrefix = _uriPrefix; }
/** * @dev External function to set the token URI prefix for all tokens * @param _uriPrefix prefix string to assign */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17bfcef20c0dcc7aa0b7d98abedad0970445dcced96cd76799df1f4fc0358e93
{ "func_code_index": [ 16451, 16567 ] }
6,785
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
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. */ function Ownable() public { owner...
/** * @title Ownable */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the * sender account. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 274, 342 ] }
6,786
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
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. */ function Ownable() public { owner...
/** * @title Ownable */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); 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.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 687, 879 ] }
6,787
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
ERC223
contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function trans...
/** * @title ERC223 */
NatSpecMultiLine
balanceOf
function balanceOf(address who) public view returns (uint);
// ERC223 and ERC20 functions and events
LineComment
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 97, 161 ] }
6,788
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
ERC223
contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function trans...
/** * @title ERC223 */
NatSpecMultiLine
name
function name() public view returns (string _name);
// ERC223 functions
LineComment
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 617, 673 ] }
6,789
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
ERC223
contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function trans...
/** * @title ERC223 */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
// ERC20 functions and events
LineComment
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 836, 937 ] }
6,790
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime...
/** * @dev Function that is called when a user or another contract wants to transfer funds */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 2326, 3225 ] }
6,791
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); bytes memory empty; ...
/** * @dev Standard function transfer similar to ERC20 transfer with no _data * Added due to backwards compatibility reasons */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 3904, 4436 ] }
6,792
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
isContract
function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); }
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
LineComment
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 4533, 4830 ] }
6,793
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0) && _value > 0 && balanceOf[_from] >= _value && allowance[_from][msg.sender] >= _value && frozenAccount[_from] == false && fro...
/** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @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.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 6110, 6844 ] }
6,794
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Allows _spender to spend no more than _value tokens in your behalf * Added due to backwards compatibility with ERC20 * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 7114, 7330 ] }
6,795
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowance[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender * Added due to backwards compatibility with ERC20 * @param _owner address The address which owns the funds * @param _spender address The address which will spend the funds */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 7633, 7784 ] }
6,796
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
burn
function burn(address _from, uint256 _unitAmount) onlyOwner public { require(_unitAmount > 0 && balanceOf[_from] >= _unitAmount); balanceOf[_from] = balanceOf[_from].sub(_unitAmount); totalSupply = totalSupply.sub(_unitAmount); Burn(_from, _unitAmount); }
/** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 7974, 8294 ] }
6,797
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
mint
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { require(_unitAmount > 0); totalSupply = totalSupply.add(_unitAmount); balanceOf[_to] = balanceOf[_to].add(_unitAmount); Mint(_to, _unitAmount); Transfer(address(0), _to, _unitAmount); return...
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 8560, 8922 ] }
6,798
BERTCLUBCOIN
BERTCLUBCOIN.sol
0x1a057180e7d092427289d9dd22bc6afb2188a9b8
Solidity
BERTCLUBCOIN
contract BERTCLUBCOIN is ERC223, Ownable { using SafeMath for uint256; string public name = "BERT CLUB COIN"; string public symbol = "BCC"; uint8 public decimals = 18; uint256 public totalSupply = 8e9 * 1e18; uint256 public distributeAmount = 0; bool public mintingFinished = false; ...
/** * @title BERT CLUB COIN */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d
{ "func_code_index": [ 8993, 9151 ] }
6,799