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
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address to, bool approved) public { require(to != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][to] = approved; emit ApprovalForAll(_msgSender(), to, approved); }
/** * @dev Sets or unsets the approval of a given operator * 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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 4491, 4750 ] }
7,300
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 5075, 5227 ] }
7,301
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 tokenId) public { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transferFrom(from, to, tokenId); }
/** * @dev Transfers the ownership of a given token ID to another address. * Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * Requires the msg.sender to be the owner, approved, or operator. * @param from current owner of the token * @param to address to receive the ownership of...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 5669, 5966 ] }
7,302
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received}, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 6623, 6762 ] }
7,303
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransferFrom(from, to, tokenId, _data); }
/** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received}, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 7494, 7771 ] }
7,304
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_safeTransferFrom
function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal { _transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers the ownership of a given token ID to another address * 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,address,uint256,bytes)"))`; otherwise, ...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 8485, 8762 ] }
7,305
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal 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 existence of * @return bool whether the token exists */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 8959, 9119 ] }
7,306
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); 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 th...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 9484, 9822 ] }
7,307
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); }
/** * @dev Internal function to safely mint a new token. * Reverts if the given token ID already exists. * 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,address,uint256...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 10358, 10465 ] }
7,308
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId, bytes memory _data) internal { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Internal function to safely mint a new token. * Reverts if the given token ID already exists. * 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,address,uint256...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 11074, 11321 ] }
7,309
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _tokenOwner[tokenId] = to; _ownedTokensCount[to].increment(); emit Transfer(address(0), to, tokenId); }
/** * @dev Internal function to mint a new token. * 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 */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 11569, 11909 ] }
7,310
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_burn
function _burn(address owner, uint256 tokenId) internal { require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own"); _clearApproval(tokenId); _ownedTokensCount[owner].decrement(); _tokenOwner[tokenId] = address(0); emit Transfer(owner, address(0), tokenId); }
/** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use {_burn} instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 12181, 12519 ] }
7,311
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal { _burn(ownerOf(tokenId), tokenId); }
/** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * @param tokenId uint256 ID of the token being burned */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 12702, 12799 ] }
7,312
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_transferFrom
function _transferFrom(address from, address to, uint256 tokenId) internal { require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _clearApproval(tokenId); _ownedTokensCount[from].decrement(); _owne...
/** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the ...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 13180, 13644 ] }
7,313
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) internal returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data); return (retval == _ERC721_RECEIVED); ...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * This function is deprecated. * @param from address representing the previous owner of the given token ID * @param to target address that will...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 14241, 14600 ] }
7,314
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.s...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_clearApproval
function _clearApproval(uint256 tokenId) private { if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } }
/** * @dev Private function to clear current approval of a given token ID. * @param tokenId uint256 ID of the token to be transferred */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 14763, 14943 ] }
7,315
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) { require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); 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 b...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 1527, 1764 ] }
7,316
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 1918, 2019 ] }
7,317
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view returns (uint256) { require(index < totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev Gets the token ID at a given index of all the tokens in this contract * 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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 2360, 2564 ] }
7,318
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_transferFrom
function _transferFrom(address from, address to, uint256 tokenId) internal { super._transferFrom(from, to, tokenId); _removeTokenFromOwnerEnumeration(from, tokenId); _addTokenToOwnerEnumeration(to, tokenId); }
/** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to transferFrom, this imposes no restrictions on msg.sender. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the to...
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 2943, 3193 ] }
7,319
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal { super._mint(to, tokenId); _addTokenToOwnerEnumeration(to, tokenId); _addTokenToAllTokensEnumeration(tokenId); }
/** * @dev Internal function to mint a new token. * 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 */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 3453, 3660 ] }
7,320
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_burn
function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); _removeTokenFromOwnerEnumeration(owner, tokenId); // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund _ownedTokensIndex[tokenId] = 0; _removeTokenFromAllTo...
/** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use {ERC721-_burn} instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 3939, 4316 ] }
7,321
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_tokensOfOwner
function _tokensOfOwner(address owner) internal view returns (uint256[] storage) { return _ownedTokens[owner]; }
/** * @dev Gets the list of token IDs of the requested owner. * @param owner address owning the tokens * @return uint256[] List of token IDs owned by the requested address */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 4523, 4654 ] }
7,322
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { _ownedTokensIndex[tokenId] = _ownedTokens[to].length; _ownedTokens[to].push(tokenId); }
/** * @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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 4950, 5141 ] }
7,323
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 5337, 5506 ] }
7,324
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
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 = _ownedTokens[from].length.sub(1); ui...
/** * @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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 6128, 7281 ] }
7,325
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Enumerable
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; //...
/** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */
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.sub(1); uint256 tokenIndex = _a...
/** * @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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 7571, 8658 ] }
7,326
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Metadata
contract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('name()')) == 0x06f...
name
function name() external view returns (string memory) { return _name; }
/** * @dev Gets the token name. * @return string representing the token name */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 1029, 1119 ] }
7,327
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Metadata
contract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('name()')) == 0x06f...
symbol
function symbol() external view returns (string memory) { return _symbol; }
/** * @dev Gets the token symbol. * @return string representing the token symbol */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 1229, 1323 ] }
7,328
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Metadata
contract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('name()')) == 0x06f...
tokenURI
function tokenURI(uint256 tokenId) external view returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); return _tokenURIs[tokenId]; }
/** * @dev Returns an URI for a given token ID. * Throws if the token ID does not exist. May return an empty string. * @param tokenId uint256 ID of the token to query */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 1525, 1735 ] }
7,329
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Metadata
contract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('name()')) == 0x06f...
_setTokenURI
function _setTokenURI(uint256 tokenId, string memory uri) internal { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = uri; }
/** * @dev Internal function to set the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 1977, 2177 ] }
7,330
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
Solidity
ERC721Metadata
contract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('name()')) == 0x06f...
_burn
function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } }
/** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use _burn(uint256) instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 2474, 2726 ] }
7,331
HelloWorld
HelloWorld.sol
0x7e50146002280f945daf8438b4257586375793d6
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; if (le...
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.5.7+commit.6da8b019
None
bzzr://6228aa18d252cf1610d2d9d8257d44ae8b8d8602f3e351f7ae4c4bb851cbadf2
{ "func_code_index": [ 190, 1802 ] }
7,332
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 1621, 2468 ] }
7,333
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); return true; }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 2674, 2831 ] }
7,334
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 3106, 3407 ] }
7,335
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 3671, 3901 ] }
7,336
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 4295, 4647 ] }
7,337
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 4817, 5196 ] }
7,338
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // 18 decimals is the strongly suggested default, avoid changing it // This creates an array with all balances mapping (address =>...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 5454, 6070 ] }
7,339
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
MrscChainToken
contract MrscChainToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initia...
/******************************************/
NatSpecMultiLine
_transfer
function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value >= balan...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 640, 1428 ] }
7,340
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
MrscChainToken
contract MrscChainToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initia...
/******************************************/
NatSpecMultiLine
mintToken
function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; emit Transfer(0, this, mintedAmount); emit Transfer(this, target, mintedAmount); }
/// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 1620, 1888 ] }
7,341
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
MrscChainToken
contract MrscChainToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initia...
/******************************************/
NatSpecMultiLine
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 2069, 2235 ] }
7,342
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
MrscChainToken
contract MrscChainToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initia...
/******************************************/
NatSpecMultiLine
setPrices
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; }
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 2478, 2638 ] }
7,343
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
MrscChainToken
contract MrscChainToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initia...
/******************************************/
NatSpecMultiLine
buy
function buy() payable public { uint amount = msg.value / buyPrice; // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers }
/// @notice Buy tokens from contract by sending ether
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 2700, 2909 ] }
7,344
MrscChainToken
MrscChainToken.sol
0x36f20b9b964a7d0faeab4f74ba4e445c324a427b
Solidity
MrscChainToken
contract MrscChainToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initia...
/******************************************/
NatSpecMultiLine
sell
function sell(uint256 amount) public { address myAddress = this; require(myAddress.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // send...
/// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://eee5dd3fc230d944078afb3cccc5517cc2059becc11c97d2375cfb694003b119
{ "func_code_index": [ 3013, 3441 ] }
7,345
FrogLand
contracts/token/FrogLand.sol
0xa4d5fb4ff0fa1565fb7d8f5db88e4c0f2f445046
Solidity
FrogLand
contract FrogLand is Ownable, ERC721Enumerable, ReentrancyGuard, IFrogLand, IFrogLandAdmin, IOpenSeaCompatible { using Address for address; using Strings for uint256; using SafeMath for uint256; event PresaleActive(bool state); event SaleActive(bool state); event PresaleLimitChanged(uint256 lim...
contractURI
function contractURI() public view override returns (string memory) { return _contractURI; }
// IOpenSeaCompatible
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1583, 1691 ] }
7,346
FrogLand
contracts/token/FrogLand.sol
0xa4d5fb4ff0fa1565fb7d8f5db88e4c0f2f445046
Solidity
FrogLand
contract FrogLand is Ownable, ERC721Enumerable, ReentrancyGuard, IFrogLand, IFrogLandAdmin, IOpenSeaCompatible { using Address for address; using Strings for uint256; using SafeMath for uint256; event PresaleActive(bool state); event SaleActive(bool state); event PresaleLimitChanged(uint256 lim...
tokenURI
function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), 'Token does not exist'); string memory revealedBaseURI = _tokenRevealedBaseURI; return bytes(revealedBaseURI).length > 0 ? string(abi.encodePacked(revealedBaseURI, tokenId.toStrin...
// IFrogLandMetadata
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1849, 2237 ] }
7,347
FrogLand
contracts/token/FrogLand.sol
0xa4d5fb4ff0fa1565fb7d8f5db88e4c0f2f445046
Solidity
FrogLand
contract FrogLand is Ownable, ERC721Enumerable, ReentrancyGuard, IFrogLand, IFrogLandAdmin, IOpenSeaCompatible { using Address for address; using Strings for uint256; using SafeMath for uint256; event PresaleActive(bool state); event SaleActive(bool state); event PresaleLimitChanged(uint256 lim...
canMint
function canMint(uint256 quantity) public view override returns (bool) { require(saleIsActive, "sale hasn't started"); require(!presaleIsActive, 'only presale'); require(totalSupply().add(quantity) <= MAX_TOKENS, 'quantity exceeds supply'); require(_publicMinted.add(quantity) <= maxMintableSupply, 'quan...
// IFrogLand
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2257, 2723 ] }
7,348
FrogLand
contracts/token/FrogLand.sol
0xa4d5fb4ff0fa1565fb7d8f5db88e4c0f2f445046
Solidity
FrogLand
contract FrogLand is Ownable, ERC721Enumerable, ReentrancyGuard, IFrogLand, IFrogLandAdmin, IOpenSeaCompatible { using Address for address; using Strings for uint256; using SafeMath for uint256; event PresaleActive(bool state); event SaleActive(bool state); event PresaleLimitChanged(uint256 lim...
mintToAddress
function mintToAddress(uint256 quantity, address to) external override onlyOwner { require(totalSupply().add(quantity) <= MAX_TOKENS, 'quantity exceeds supply'); require(_adminMinted.add(quantity) <= maxAdminSupply, 'quantity exceeds mintable'); for (uint256 i = 0; i < quantity; i++) { uint256 mint...
// IFrogLandAdmin
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 4602, 5117 ] }
7,349
FrogLand
contracts/token/FrogLand.sol
0xa4d5fb4ff0fa1565fb7d8f5db88e4c0f2f445046
Solidity
FrogLand
contract FrogLand is Ownable, ERC721Enumerable, ReentrancyGuard, IFrogLand, IFrogLandAdmin, IOpenSeaCompatible { using Address for address; using Strings for uint256; using SafeMath for uint256; event PresaleActive(bool state); event SaleActive(bool state); event PresaleLimitChanged(uint256 lim...
_leaf
function _leaf(address account) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account)); }
// _internal
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 6649, 6777 ] }
7,350
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
addToPresale
function addToPresale(address[] calldata addresses) external override onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(addresses[i] != address(0), "Can't add the null address"); _Presale[addresses[i]] = true; _PresaleClaimed[addresses[i]] > 0 ? _PresaleClaimed[addresses[i]] : 0; ...
//presale
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 2184, 2524 ] }
7,351
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
addToWhitelist
function addToWhitelist(address[] calldata addresses) external override onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(addresses[i] != address(0), "Can't add the null address"); _Whitelist[addresses[i]] = true; _WhitelistClaimed[addresses[i]] > 0 ? _WhitelistClaimed[addresses[i]]...
//whitelist
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 3129, 3477 ] }
7,352
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
addToFirestarter1
function addToFirestarter1(address[] calldata addresses) external override onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(addresses[i] != address(0), "Can't add the null address"); _Firestarter1[addresses[i]] = true; _Firestarter1Claimed[addresses[i]] > 0 ? _Firestarter1Claimed[a...
//firestarter tier 1
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 4090, 4450 ] }
7,353
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
addToFirestarter2
function addToFirestarter2(address[] calldata addresses) external override onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(addresses[i] != address(0), "Can't add the null address"); _Firestarter2[addresses[i]] = true; _Firestarter2Claimed[addresses[i]] > 0 ? _Firestarter2Claimed[a...
//firestarter tier 2
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 5082, 5442 ] }
7,354
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
mintwhitelist
function mintwhitelist(uint256 numberOfTokens) external payable { //check switches require(isMasterActive, 'Contract is not active'); require(isWhitelistActive, 'This portion of minting is not active'); require(_Whitelist[msg.sender]); //supply check require(totalSupply() < NFT_MAX, 'All token...
//whitelist
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 6066, 7587 ] }
7,355
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
mintpresale
function mintpresale(uint256 numberOfTokens) external payable { //check switches require(isMasterActive, 'Contract is not active'); require(isPresaleActive, 'This portion of minting is not active'); require(_Presale[msg.sender]); //supply check require(totalSupply() < NFT_MAX, 'All tokens have...
//presale
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 7607, 9118 ] }
7,356
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
mintfirestarter1
function mintfirestarter1(uint256 numberOfTokens) external payable { //check switches require(isMasterActive, 'Contract is not active'); require(isFirestarterActive, 'This portion of minting is not active'); require(_Firestarter1[msg.sender]); //supply check require(totalSupply() < NFT_MAX, 'A...
//firestarter tier 1 (presale)
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 9157, 10679 ] }
7,357
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
mintfirestarter2
function mintfirestarter2(uint256 numberOfTokens) external payable { //check switches require(isMasterActive, 'Contract is not active'); require(isFirestarterActive, 'This portion of minting is not active'); require(_Firestarter2[msg.sender]); //supply check require(totalSupply() < NFT_MAX, 'A...
//firestarter tier 2 (presale)
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 10716, 12241 ] }
7,358
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
mintadambombsquad
function mintadambombsquad(uint256 numberOfTokens) external payable { //check contract balance uint checkbalance = adambombsquad.balanceOf(msg.sender); require(checkbalance > 0); //check switches require(isMasterActive, 'Contract is not active'); require(isBombSquadActive, 'This portion of minting...
//adam bomb squad dependency mint (presale)
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 12295, 13879 ] }
7,359
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
mintpublic
function mintpublic(uint256 numberOfTokens) external payable { //check switches require(isMasterActive, 'Contract is not active'); require(isPublicActive, 'This portion of minting is not active'); //supply check require(totalSupply() < NFT_MAX, 'All tokens have been minted'); require(numberOfToken...
//public mint
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 13903, 15275 ] }
7,360
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
airdrop
function airdrop(address[] calldata to) external onlyOwner { require(totalSupply() < NFT_MAX, 'All tokens have been minted'); for(uint256 i = 0; i < to.length; i++) { uint256 tokenId = totalSupply() + 1; totalAirdropSupply += 1; _safeMint(to[i], tokenId); } }
//airdrop for original contract: 0xab20d7517e46a227d0dc7da66e06ea8b68d717e1 // no limit due to to airdrop going directly to the 447 owners
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 15433, 15741 ] }
7,361
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
reserve
function reserve(address[] calldata to) external onlyOwner { require(totalSupply() < NFT_MAX, 'All tokens have been minted'); for(uint256 i = 0; i < to.length; i++) { uint256 tokenId = totalSupply() + 1; totalReserveSupply += 1; _safeMint(to[i], tokenId); } }
//reserve // no limit due to to airdrop going directly to addresses
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 15827, 16135 ] }
7,362
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
MasterActive
function MasterActive(bool _isMasterActive) external override onlyOwner { isMasterActive = _isMasterActive; }
//switches
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 16154, 16274 ] }
7,363
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
withdraw
function withdraw() onlyOwner public { uint balance = address(this).balance; payable(Address1).transfer(balance*100/100); payable(msg.sender).transfer(address(this).balance);
//nickydiamonds.eth
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 17076, 17289 ] }
7,364
DiamondCryptoDunks
DiamondCryptoDunks.sol
0xf0b23d4738ed2c7d89a13d3391ae4e9a8ccf0e44
Solidity
DiamondCryptoDunks
contract DiamondCryptoDunks is ERC721Enumerable, Ownable, Functions, Metadata { using Strings for uint256; ADAMBOMBSQUAD private adambombsquad; //globallimits uint256 public constant AIRDROP = 871; uint256 public constant NFT_MAX = 15000; //limitsperwallet uint256 public constant PURCHASE_...
setContractURI
function setContractURI(string calldata URI) external override onlyOwner { _contractURI = URI; }
//metadata
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://4b7074c4df3a11f69759a46fd578642f878fe3632780be899ba3be766084130b
{ "func_code_index": [ 17310, 17417 ] }
7,365
MfersDeluxe
contracts/mfersdeluxe.sol
0x031f5c6873bb34abb6175b088840ca10f8a5875b
Solidity
MfersDeluxe
contract MfersDeluxe is ERC721A, Ownable, PaymentSplitter, ReentrancyGuard { uint256 public maxPerTx = 60; uint256 public cost = 0.01 ether; uint256 public totalAvailable = 6900; uint256 public nextOwnerToExplicitlySet; string public baseURI; bool public isMintActive...
_setOwnersExplicit
function _setOwnersExplicit(uint256 quantity) internal { require(quantity != 0, "quantity must be nonzero"); require(currentIndex != 0, "no tokens minted yet"); uint256 _nextOwnerToExplicitlySet = nextOwnerToExplicitlySet; require(_nextOwnerToExplicitlySet < currentIndex, "all ownerships have been set")...
/** * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). */
NatSpecMultiLine
v0.8.11+commit.d7f03943
{ "func_code_index": [ 2416, 3522 ] }
7,366
veFXSYieldDistributorV3
contracts/Curve/IveFXS.sol
0x2aaa9ae7101e0a59c52916d8db9acda311b1c296
Solidity
IveFXS
interface IveFXS { struct LockedBalance { int128 amount; uint256 end; } /* ========== VIEWS ========== */ function balanceOf(address addr) external view returns (uint256); function balanceOf(address addr, uint256 _t) external view returns (uint256); function balanceOfAt(address...
balanceOf
function balanceOf(address addr) external view returns (uint256);
/* ========== VIEWS ========== */
Comment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 136, 205 ] }
7,367
veFXSYieldDistributorV3
contracts/Curve/IveFXS.sol
0x2aaa9ae7101e0a59c52916d8db9acda311b1c296
Solidity
IveFXS
interface IveFXS { struct LockedBalance { int128 amount; uint256 end; } /* ========== VIEWS ========== */ function balanceOf(address addr) external view returns (uint256); function balanceOf(address addr, uint256 _t) external view returns (uint256); function balanceOfAt(address...
checkpoint
function checkpoint() external;
/* ========== PUBLIC FUNCTIONS ========== */
Comment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 843, 878 ] }
7,368
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
m10fanclub
function m10fanclub() public { symbol = "M10"; name = "M10 Fan Club"; decimals = 18; bonusEnds = now + 12 weeks; endDate = now + 52 weeks; }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 539, 736 ] }
7,369
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 924, 1045 ] }
7,370
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 1267, 1396 ] }
7,371
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 1742, 2019 ] }
7,372
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 2186, 2394 ] }
7,373
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer...
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 2932, 3290 ] }
7,374
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 3573, 3729 ] }
7,375
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 4092, 4409 ] }
7,376
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { require(now >= startDate && now <= endDate); uint tokens; if (now <= bonusEnds) { tokens = msg.value * 20000; } else { tokens = msg.value * 15000; } balances[msg.sender] = safeAdd(balances[msg.sender], tokens); _totalSupply = safeAdd(_tot...
// ------------------------------------------------------------------------ // 15,000 M10 Tokens per 1 ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 4610, 5083 ] }
7,377
m10fanclub
m10fanclub.sol
0x74a31dc20802cb1e41201af055ce7dfcd31d291d
Solidity
m10fanclub
contract m10fanclub is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => map...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://5c4a3f375da823a3adbb51fb97b3ca44636b9962478ef4b6d0da754666cfe9a4
{ "func_code_index": [ 5318, 5507 ] }
7,378
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
submit
function submit(uint256 _roundId, int256 _submission) external { bytes memory error = validateOracleRound(msg.sender, uint32(_roundId)); require(_submission >= minSubmissionValue, "value below minSubmissionValue"); require(_submission <= maxSubmissionValue, "value above maxSubmissionValue"); require(error.len...
/** * @notice called by oracles when they have witnessed a need to update * @param _roundId is the ID of the round this submission pertains to * @param _submission is the updated data that the oracle is submitting */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 5111, 5803 ] }
7,379
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
changeOracles
function changeOracles( address[] calldata _removed, address[] calldata _added, address[] calldata _addedAdmins, uint32 _minSubmissions, uint32 _maxSubmissions, uint32 _restartDelay ) external onlyOwner() { for (uint256 i = 0; i < _removed.length; i++) { removeOracle(_removed[i]); } require(_...
/** * @notice called by the owner to remove and add new oracles as well as * update the round related parameters that pertain to total oracle count * @param _removed is the list of addresses for the new Oracles being removed * @param _added is the list of addresses for the new Oracles being added * @param _addedAd...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 6549, 7275 ] }
7,380
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
updateFutureRounds
function updateFutureRounds( uint128 _paymentAmount, uint32 _minSubmissions, uint32 _maxSubmissions, uint32 _restartDelay, uint32 _timeout ) public onlyOwner() { uint32 oracleNum = oracleCount(); // Save on storage reads require(_maxSubmissions >= _minSubmissions, "max must equal/exceed min"); requi...
/** * @notice update the round and payment related parameters for subsequent * rounds * @param _paymentAmount is the payment amount for subsequent rounds * @param _minSubmissions is the new minimum submission count for each round * @param _maxSubmissions is the new maximum submission count for each round * @param...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 7716, 8741 ] }
7,381
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
allocatedFunds
function allocatedFunds() external view returns (uint128) { return recordedFunds.allocated; }
/** * @notice the amount of payment yet to be withdrawn by oracles */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 8821, 8936 ] }
7,382
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
availableFunds
function availableFunds() external view returns (uint128) { return recordedFunds.available; }
/** * @notice the amount of future funding available to oracles */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 9013, 9128 ] }
7,383
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
updateAvailableFunds
function updateAvailableFunds() public { Funds memory funds = recordedFunds; uint256 nowAvailable = linkToken.balanceOf(address(this)).sub(funds.allocated); if (funds.available != nowAvailable) { recordedFunds.available = uint128(nowAvailable); emit AvailableFundsUpdated(nowAvailable); } }
/** * @notice recalculate the amount of LINK available for payouts */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 9208, 9538 ] }
7,384
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
oracleCount
function oracleCount() public view returns (uint8) { return uint8(oracleAddresses.length); }
/** * @notice returns the number of oracles */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 9595, 9695 ] }
7,385
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
getOracles
function getOracles() external view returns (address[] memory) { return oracleAddresses; }
/** * @notice returns an array of addresses containing the oracles on contract */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 9787, 9885 ] }
7,386
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
latestAnswer
function latestAnswer() public view virtual override returns (int256) { return rounds[latestRoundId].answer; }
/** * @notice get the most recently reported answer * * @dev #[deprecated] Use latestRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended latestRoundData * instead which includes better veri...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 10249, 10389 ] }
7,387
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
latestTimestamp
function latestTimestamp() public view virtual override returns (uint256) { return rounds[latestRoundId].updatedAt; }
/** * @notice get the most recent updated at timestamp * * @dev #[deprecated] Use latestRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended latestRoundData * instead which includes better v...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 10756, 10903 ] }
7,388
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
latestRound
function latestRound() public view virtual override returns (uint256) { return latestRoundId; }
/** * @notice get the ID of the last updated round * * @dev #[deprecated] Use latestRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended latestRoundData * instead which includes better verif...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 11266, 11391 ] }
7,389
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
getAnswer
function getAnswer(uint256 _roundId) public view virtual override returns (int256) { if (validRoundId(_roundId)) { return rounds[uint32(_roundId)].answer; } return 0; }
/** * @notice get past rounds answers * @param _roundId the round number to retrieve the answer for * * @dev #[deprecated] Use getRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended getRoun...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 11800, 12012 ] }
7,390
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
getTimestamp
function getTimestamp(uint256 _roundId) public view virtual override returns (uint256) { if (validRoundId(_roundId)) { return rounds[uint32(_roundId)].updatedAt; } return 0; }
/** * @notice get timestamp when an answer was last updated * @param _roundId the round number to retrieve the updated timestamp for * * @dev #[deprecated] Use getRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregat...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 12454, 12673 ] }
7,391
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
getRoundData
function getRoundData(uint80 _roundId) public view virtual override returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { Round memory r = rounds[uint32(_roundId)]; require(r.answeredInRound > 0 && validRoundId(_roundId), V3_NO_DAT...
/** * @notice get data about a round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * @param _roundId the round ID to retrieve the round data for * @return roundId is the round ID for which data was retrieved * @return answer...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 13705, 14183 ] }
7,392
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
latestRoundData
function latestRoundData() public view virtual override returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) return getRoundData(latestRoundId);
/** * @notice get data about the latest round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. Consumers are encouraged to * use this more fully featured method over the "legacy" latestRound/ * latestAnswer/latestTimestamp funct...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 15445, 15709 ] }
7,393
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
withdrawablePayment
function withdrawablePayment(address _oracle) external view returns (uint256) { return oracles[_oracle].withdrawable; }
/** * @notice query the available amount of LINK for an oracle to withdraw */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 15798, 15939 ] }
7,394
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
withdrawPayment
function withdrawPayment(address _oracle, address _recipient, uint256 _amount) external { require(oracles[_oracle].admin == msg.sender, "only callable by admin"); // Safe to downcast _amount because the total amount of LINK is less than 2^128. uint128 amount = uint128(_amount); uint128 available = oracles[_o...
/** * @notice transfers the oracle's LINK to another address. Can only be called * by the oracle's admin. * @param _oracle is the oracle whose LINK is transferred * @param _recipient is the address to send the LINK to * @param _amount is the amount of LINK to send */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 16229, 16845 ] }
7,395
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
withdrawFunds
function withdrawFunds(address _recipient, uint256 _amount) external onlyOwner() { uint256 available = uint256(recordedFunds.available); require(available.sub(requiredReserve(paymentAmount)) >= _amount, "insufficient reserve funds"); require(linkToken.transfer(_recipient, _amount), "token transfer failed"); ...
/** * @notice transfers the owner's LINK to another address * @param _recipient is the address to send the LINK to * @param _amount is the amount of LINK to send */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 17026, 17390 ] }
7,396
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
getAdmin
function getAdmin(address _oracle) external view returns (address) { return oracles[_oracle].admin; }
/** * @notice get the admin address of an oracle * @param _oracle is the address of the oracle whose admin is being queried */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 17530, 17653 ] }
7,397
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
transferAdmin
function transferAdmin(address _oracle, address _newAdmin) external { require(oracles[_oracle].admin == msg.sender, "only callable by admin"); oracles[_oracle].pendingAdmin = _newAdmin; emit OracleAdminUpdateRequested(_oracle, msg.sender, _newAdmin); }
/** * @notice transfer the admin address for an oracle * @param _oracle is the address of the oracle whose admin is being transferred * @param _newAdmin is the new admin address */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 17850, 18125 ] }
7,398
AccessControlledAggregator
FluxAggregator.sol
0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4
Solidity
FluxAggregator
contract FluxAggregator is AggregatorV2V3Interface, Owned { using SafeMath for uint256; using SafeMath128 for uint128; using SafeMath64 for uint64; using SafeMath32 for uint32; struct Round { int256 answer; uint64 startedAt; uint64 updatedAt; uint32 answeredInRound; } struct RoundDetails...
/** * @title The Prepaid Aggregator contract * @notice Handles aggregating data pushed in from off-chain, and unlocks * payment for oracles as they report. Oracles' submissions are gathered in * rounds, with each round aggregating the submissions for each oracle into a * single answer. The latest aggregated answer...
NatSpecMultiLine
acceptAdmin
function acceptAdmin(address _oracle) external { require(oracles[_oracle].pendingAdmin == msg.sender, "only callable by pending admin"); oracles[_oracle].pendingAdmin = address(0); oracles[_oracle].admin = msg.sender; emit OracleAdminUpdated(_oracle, msg.sender); }
/** * @notice accept the admin address transfer for an oracle * @param _oracle is the address of the oracle whose admin is being transferred */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
{ "func_code_index": [ 18282, 18574 ] }
7,399