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
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 7853, 7968 ] }
26,100
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 8190, 8516 ] }
26,101
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Tra...
/** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 8847, 9234 ] }
26,102
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), toke...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 9458, 9823 ] }
26,103
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 10155, 10738 ] }
26,104
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 10851, 11030 ] }
26,105
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param to...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 11590, 12398 ] }
26,106
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 12965, 13096 ] }
26,107
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the total amount of tokens stored by the contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 132, 192 ] }
26,108
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 375, 479 ] }
26,109
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) external view returns (uint256);
/** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 655, 729 ] }
26,110
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 605, 834 ] }
26,111
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 913, 1174 ] }
26,112
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 1245, 1363 ] }
26,113
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 1435, 1673 ] }
26,114
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnume...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 2281, 2875 ] }
26,115
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 3171, 3397 ] }
26,116
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 3593, 3762 ] }
26,117
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 4384, 5377 ] }
26,118
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 5667, 6751 ] }
26,119
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 161, 388 ] }
26,120
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 536, 735 ] }
26,121
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 885, 1393 ] }
26,122
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 1544, 1744 ] }
26,123
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 1905, 2105 ] }
26,124
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 2347, 2450 ] }
26,125
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 2728, 2831 ] }
26,126
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 3085, 3188 ] }
26,127
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 3484, 3587 ] }
26,128
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 4049, 4152 ] }
26,129
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 4626, 4871 ] }
26,130
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 5364, 5608 ] }
26,131
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 6266, 6510 ] }
26,132
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
LootIslands
contract LootIslands is ERC721Enumerable, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 0.02 ether; string public baseURI; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; ...
mintWithLoot
function mintWithLoot(uint lootId) public payable nonReentrant { require(lootId > 0 && lootId <= 8000, "Token ID invalid"); require(lootContract.ownerOf(lootId) == msg.sender, "Not the owner of this loot"); _safeMint(msg.sender, lootId); }
//Private sale minting (reserved for Loot owners)
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 1105, 1383 ] }
26,133
LootIslands
LootIslands.sol
0x60c22337afb8ac5bab1580e385cc002e6b296384
Solidity
LootIslands
contract LootIslands is ERC721Enumerable, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 0.02 ether; string public baseURI; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; ...
mint
function mint(uint lootId) public payable nonReentrant { require(publicPrice <= msg.value, "Ether value sent is not correct"); require(lootId > 8000 && lootId <= 12000, "Token ID invalid"); _safeMint(msg.sender, lootId); }
//Public sale minting
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://6d15b2b6636613e7ebd8fbaa78b87c64f127f34eabf0e55bd283e9a5f75cd6dd
{ "func_code_index": [ 1727, 1986 ] }
26,134
HeritageProperty
contracts\hre.sol
0x39c16ea9602e62b31312a6984949752228647cb4
Solidity
strings
library strings { struct slice { uint _len; uint _ptr; } function memcpy(uint dest, uint src, uint len) private pure { // Copy word-length chunks while possible for (; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) ...
toSlice
function toSlice(string memory self) internal pure returns (slice memory) { uint ptr; assembly { ptr := add(self, 0x20) } return slice(bytes(self).length, ptr); }
/* * @dev Returns a slice containing the entire string. * @param self The string to make a slice from. * @return A newly allocated slice containing the entire string. */
Comment
v0.5.0+commit.1d4f565a
None
bzzr://84ebd817f7bdd34ee8beba16733e31760cae3ee1f3b4531557700d0194ad3954
{ "func_code_index": [ 861, 1082 ] }
26,135
HeritageProperty
contracts\hre.sol
0x39c16ea9602e62b31312a6984949752228647cb4
Solidity
strings
library strings { struct slice { uint _len; uint _ptr; } function memcpy(uint dest, uint src, uint len) private pure { // Copy word-length chunks while possible for (; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) ...
concat
function concat(slice memory self, slice memory other) internal pure returns (string memory) { string memory ret = new string(self._len + other._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); memcpy(retptr + self._len, other._ptr, othe...
/* * @dev Returns a newly allocated string containing the concatenation of * `self` and `other`. * @param self The first slice to concatenate. * @param other The second slice to concatenate. * @return The concatenation of the two strings. */
Comment
v0.5.0+commit.1d4f565a
None
bzzr://84ebd817f7bdd34ee8beba16733e31760cae3ee1f3b4531557700d0194ad3954
{ "func_code_index": [ 1373, 1762 ] }
26,136
DaiMigrator
contracts/external/traders/DaiMigrator.sol
0xabe234e0d2d518bdb1d5a655014de18b1cfffbea
Solidity
DaiMigrator
contract DaiMigrator is Ownable, IAutoTrader { using Types for Types.Wei; using Types for Types.Par; // ============ Constants ============ bytes32 constant FILE = "DaiMigrator"; uint256 constant SAI_MARKET = 1; uint256 constant DAI_MARKET = 3; // ============ Eve...
/** * @title DaiMigrator * @author dYdX * * Allows for moving SAI positions to DAI positions. */
NatSpecMultiLine
addMigrator
function addMigrator( address migrator ) external onlyOwner { emit LogMigratorAdded(migrator); g_migrators[migrator] = true; }
// ============ Admin Functions ============
LineComment
v0.5.7+commit.6da8b019
None
bzzr://8e57297d4be61c5f6463bcf42479893e0bb2a33e6c2c3778f0c4748d218efd8c
{ "func_code_index": [ 936, 1127 ] }
26,137
DaiMigrator
contracts/external/traders/DaiMigrator.sol
0xabe234e0d2d518bdb1d5a655014de18b1cfffbea
Solidity
DaiMigrator
contract DaiMigrator is Ownable, IAutoTrader { using Types for Types.Wei; using Types for Types.Par; // ============ Constants ============ bytes32 constant FILE = "DaiMigrator"; uint256 constant SAI_MARKET = 1; uint256 constant DAI_MARKET = 3; // ============ Eve...
/** * @title DaiMigrator * @author dYdX * * Allows for moving SAI positions to DAI positions. */
NatSpecMultiLine
getTradeCost
function getTradeCost( uint256 inputMarketId, uint256 outputMarketId, Account.Info memory /* makerAccount */, Account.Info memory takerAccount, Types.Par memory oldInputPar, Types.Par memory newInputPar, Types.Wei memory inputWei, bytes memory /* data */ ) public /* vi...
// ============ Only-Solo Functions ============
LineComment
v0.5.7+commit.6da8b019
None
bzzr://8e57297d4be61c5f6463bcf42479893e0bb2a33e6c2c3778f0c4748d218efd8c
{ "func_code_index": [ 1386, 3416 ] }
26,138
ApexCoin
ApexCoin.sol
0x975ea07461c985d0971f8d9bd31cad49ddde33dc
Solidity
ApexCoin
contract ApexCoin is owned,IERC20{ using SafeMath for uint256; uint256 public constant _totalSupply = 28000000000000000000000000; string public symbol = 'APC'; string public name = 'Apex Coin'; uint8 public constant decimals = 18; // 1 ether equels to 1000 toke...
ApexCoin
function ApexCoin() { // owner = msg.sender; balances[msg.sender] = _totalSupply; }
/* function () payable { createTokens(); }*/
Comment
v0.4.11+commit.68ef5810
bzzr://d96d739a62da6e51316095f73e10cec3fc165d185e89911b08814ae959605e3b
{ "func_code_index": [ 575, 685 ] }
26,139
ApexCoin
ApexCoin.sol
0x975ea07461c985d0971f8d9bd31cad49ddde33dc
Solidity
ApexCoin
contract ApexCoin is owned,IERC20{ using SafeMath for uint256; uint256 public constant _totalSupply = 28000000000000000000000000; string public symbol = 'APC'; string public name = 'Apex Coin'; uint8 public constant decimals = 18; // 1 ether equels to 1000 toke...
totalSupply
function totalSupply() constant returns (uint256 totalSupply) { return _totalSupply; }
/* function createTokens() payable { require( msg.value > 0 ); uint256 baseTokens = msg.value.mul(tokensPerEther); balances[msg.sender] = balances[msg.sender].add(baseTokens); _totalSupply = _totalSupply.add(baseTokens); owner.transfer(msg.value); } */
Comment
v0.4.11+commit.68ef5810
bzzr://d96d739a62da6e51316095f73e10cec3fc165d185e89911b08814ae959605e3b
{ "func_code_index": [ 1175, 1280 ] }
26,140
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 94, 154 ] }
26,141
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 237, 310 ] }
26,142
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 534, 616 ] }
26,143
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 895, 983 ] }
26,144
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1647, 1726 ] }
26,145
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 2039, 2141 ] }
26,146
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is un...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // According to EIP-1052, 0x0 is the value returned for not-yet crea...
/** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to assume that an address for which this * f...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 472, 1287 ] }
26,147
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is un...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
toPayable
function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); }
/** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1499, 1631 ] }
26,148
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is un...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, re...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 2603, 2979 ] }
26,149
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 251, 437 ] }
26,150
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 707, 848 ] }
26,151
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1180, 1377 ] }
26,152
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1623, 2099 ] }
26,153
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 2562, 2699 ] }
26,154
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; ...
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 3224, 3574 ] }
26,155
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 4026, 4161 ] }
26,156
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 4675, 4846 ] }
26,157
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, addr...
callOptionalReturn
function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checke...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 2127, 3246 ] }
26,158
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; // generator of the...
token
function token() public view returns (IERC20) { return _token; }
/** * @return the token being held. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 666, 741 ] }
26,159
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; // generator of the...
beneficiary
function beneficiary() public view returns (address) { return _beneficiary; }
/** * @return the beneficiary of the tokens. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 803, 891 ] }
26,160
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; // generator of the...
releaseTime
function releaseTime() public view returns (uint256) { return _releaseTime; }
/** * @return the time when the tokens are released. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 961, 1049 ] }
26,161
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; // generator of the...
release
function release() public { require(block.timestamp >= _releaseTime); uint256 amount = _token.balanceOf(address(this)); require(amount > 0); _token.safeTransfer(_beneficiary, amount); emit UnLock(_beneficiary, amount); }
/** * @notice Transfers tokens held by timelock to beneficiary. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1130, 1385 ] }
26,162
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Context
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (addres...
/* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending ...
Comment
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 265, 368 ] }
26,163
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 299, 395 ] }
26,164
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 453, 568 ] }
26,165
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 776, 939 ] }
26,166
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 997, 1136 ] }
26,167
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1278, 1435 ] }
26,168
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1902, 2211 ] }
26,169
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 2615, 2830 ] }
26,170
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 3328, 3594 ] }
26,171
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 4079, 4555 ] }
26,172
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 4831, 5144 ] }
26,173
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amo...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 5471, 5824 ] }
26,174
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 6259, 6602 ] }
26,175
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); }
/** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 6783, 7020 ] }
26,176
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 497, 581 ] }
26,177
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
isOwner
function isOwner() public view returns (bool) { return _msgSender() == _owner; }
/** * @dev Returns true if the caller is the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 863, 962 ] }
26,178
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1308, 1453 ] }
26,179
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1603, 1717 ] }
26,180
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1818, 2052 ] }
26,181
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[accou...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
add
function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; }
/** * @dev Give an account access to this role. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 156, 339 ] }
26,182
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[accou...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
remove
function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; }
/** * @dev Remove an account's access to this role. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 414, 602 ] }
26,183
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[accou...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; }
/** * @dev Check if an account has this role. * @return bool */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 692, 900 ] }
26,184
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Pausable
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
paused
function paused() public view returns (bool) { return _paused; }
/** * @dev Returns true if the contract is paused, and false otherwise. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 614, 697 ] }
26,185
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Pausable
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
pause
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(_msgSender()); }
/** * @dev Called by a pauser to pause, triggers stopped state. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1194, 1317 ] }
26,186
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
Pausable
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
unpause
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(_msgSender()); }
/** * @dev Called by a pauser to unpause, returns to normal state. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 1407, 1532 ] }
26,187
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20Burnable
contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public { _burn(_msgSender(), amount); } /** * @dev See {ERC20-_burnFrom}. */ function burnFrom(a...
/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burn
function burn(uint256 amount) public { _burn(_msgSender(), amount); }
/** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 152, 240 ] }
26,188
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20Burnable
contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public { _burn(_msgSender(), amount); } /** * @dev See {ERC20-_burnFrom}. */ function burnFrom(a...
/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burnFrom
function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); }
/** * @dev See {ERC20-_burnFrom}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 297, 405 ] }
26,189
XGOLD
XGOLD.sol
0xa91e0828a4300dc45d6abf2a8e82c71b68ce7ac3
Solidity
ERC20Mintable
contract ERC20Mintable is ERC20, MinterRole { /** * @dev See {ERC20-_mint}. * * Requirements: * * - the caller must have the {MinterRole}. */ function mint(address account, uint256 amount) public onlyMinter returns (bool) { _mint(account, amount); return t...
/** * @dev Extension of {ERC20} that adds a set of accounts with the {MinterRole}, * which have permission to mint (create) new tokens as they see fit. * * At construction, the deployer of the contract is the only minter. */
NatSpecMultiLine
mint
function mint(address account, uint256 amount) public onlyMinter returns (bool) { _mint(account, amount); return true; }
/** * @dev See {ERC20-_mint}. * * Requirements: * * - the caller must have the {MinterRole}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://597670fb68f21d3b43c4dbcee0883477156c9a7f5861a34eff45c2d87e27e5f3
{ "func_code_index": [ 184, 332 ] }
26,190
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 94, 154 ] }
26,191
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 237, 310 ] }
26,192
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 534, 616 ] }
26,193
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 895, 983 ] }
26,194
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 1647, 1726 ] }
26,195
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 2039, 2141 ] }
26,196
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
stake
function stake(uint256 _amount) external;
/** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 170, 216 ] }
26,197
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
stake
function stake(address _beneficiary, uint256 _amount) external;
/** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param _beneficiary Staked tokens are credited to this address * @param _amount Units of StakingToken */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 437, 505 ] }
26,198
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
exit
function exit() external;
/** * @dev Withdraws stake from pool and claims any unlocked rewards. * Note, this function is costly - the args for _claimRewards * should be determined off chain and then passed to other fn */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 732, 762 ] }
26,199