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
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 4365, 4709 ] }
57,761
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 4775, 4965 ] }
57,762
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 5031, 5364 ] }
57,763
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeTransfer
function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is eq...
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 6241, 6561 ] }
57,764
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 6869, 7001 ] }
57,765
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, s...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 7163, 7516 ] }
57,766
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 7853, 7968 ] }
57,767
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 8190, 8516 ] }
57,768
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 8847, 9234 ] }
57,769
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 9458, 9823 ] }
57,770
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 10155, 10738 ] }
57,771
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 10851, 11030 ] }
57,772
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 11590, 12394 ] }
57,773
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 12961, 13092 ] }
57,774
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 132, 192 ] }
57,775
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 375, 479 ] }
57,776
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 655, 729 ] }
57,777
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 605, 834 ] }
57,778
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 913, 1174 ] }
57,779
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 1245, 1363 ] }
57,780
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 1435, 1673 ] }
57,781
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 2281, 2875 ] }
57,782
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 3171, 3397 ] }
57,783
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 3593, 3762 ] }
57,784
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 4384, 5377 ] }
57,785
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
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.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 5667, 6751 ] }
57,786
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 399, 491 ] }
57,787
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _setOwner(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.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 1050, 1149 ] }
57,788
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 1299, 1496 ] }
57,789
SlammaJamma
SlammaJamma.sol
0x2aa1c5306f0212e23f2950ecb8464eefb169456d
Solidity
Base64
library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (le...
encode
function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); ...
/// @notice Encodes some bytes to the base64 representation
NatSpecSingleLine
v0.8.3+commit.8d00100c
MIT
ipfs://1f710d8bcd8966b315557e51d40efc2bd775afde93afea26f8386cf10b49aa6f
{ "func_code_index": [ 190, 1802 ] }
57,790
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 978, 1099 ] }
57,791
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 1319, 1448 ] }
57,792
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 1792, 2074 ] }
57,793
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 2582, 2795 ] }
57,794
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 3326, 3689 ] }
57,795
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 3972, 4128 ] }
57,796
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 4483, 4805 ] }
57,797
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 4997, 5056 ] }
57,798
Gunthy
Gunthy.sol
0x3684b581db1f94b721ee0022624329feb16ab653
Solidity
Gunthy
contract Gunthy is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://039e1fbefffe932473ce9383ec417630ebe2ed793632ef33ff6d59c2cd272310
{ "func_code_index": [ 5289, 5478 ] }
57,799
BentBasePool
contracts/curve/BentBasePoolUpgradeable.sol
0x1c4f9f3cd557a21604cb5831eddd7023a3c63371
Solidity
BentBasePoolUpgradeable
contract BentBasePoolUpgradeable is BentBaseMasterchef, ReentrancyGuardUpgradeable, IBentPool { using SafeERC20Upgradeable for IERC20Upgradeable; event Deposit(address indexed user, uint256 amount); event Withdraw(address indexed user, uint256 amount); event Harvest(address indexed user); ...
_updateAccPerShare
function _updateAccPerShare(bool withdrawReward) internal { uint256[] memory addedRewards = _calcAddedRewards(); uint256 _rewardPoolsCount = rewardPoolsCount; for (uint256 i = 0; i < _rewardPoolsCount; i++) { super.updateAccPerShare(i, addedRewards[i]); if (withdrawReward) { supe...
// Internal Functions
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 7006, 7457 ] }
57,800
BentBasePool
contracts/curve/BentBasePoolUpgradeable.sol
0x1c4f9f3cd557a21604cb5831eddd7023a3c63371
Solidity
BentBasePoolUpgradeable
contract BentBasePoolUpgradeable is BentBaseMasterchef, ReentrancyGuardUpgradeable, IBentPool { using SafeERC20Upgradeable for IERC20Upgradeable; event Deposit(address indexed user, uint256 amount); event Withdraw(address indexed user, uint256 amount); event Harvest(address indexed user); ...
_getBentEarned
function _getBentEarned(uint256 cvxEarned) internal view returns (uint256) { uint256 supply = IConvexToken(bent).totalSupply(); if (supply == 0) { return cvxEarned; } uint256 totalCliffs = IConvexToken(bent).totalCliffs(); uint256 cliff = supply / IConvexToken(bent).reductionPerCliff(); ...
/** * @notice from bent token contract */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 9459, 10259 ] }
57,801
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 497, 589 ] }
57,802
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual 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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1148, 1301 ] }
57,803
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1451, 1700 ] }
57,804
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 94, 154 ] }
57,805
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 237, 310 ] }
57,806
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 534, 616 ] }
57,807
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 895, 983 ] }
57,808
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1647, 1726 ] }
57,809
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2039, 2141 ] }
57,810
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view virtual returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 867, 963 ] }
57,811
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view virtual returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1077, 1177 ] }
57,812
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view virtual returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1810, 1906 ] }
57,813
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1966, 2079 ] }
57,814
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2137, 2269 ] }
57,815
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override 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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2477, 2657 ] }
57,816
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2715, 2871 ] }
57,817
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 3013, 3187 ] }
57,818
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override 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 `...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 3664, 3990 ] }
57,819
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual 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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 4394, 4617 ] }
57,820
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual 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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 5115, 5389 ] }
57,821
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 5874, 6418 ] }
57,822
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 6695, 7078 ] }
57,823
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 7406, 7829 ] }
57,824
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { 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, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This 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 a...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 8262, 8613 ] }
57,825
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 8940, 9043 ] }
57,826
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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; string private _name; string private _symbol; uint8 private _dec...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 9641, 9738 ] }
57,827
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
IDividendPayingToken
interface IDividendPayingToken { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) external view returns(uint256); /// @n...
/* @title Dividend-Paying Token Interface @author Roger Wu (https://github.com/roger-wu) @dev An interface for a dividend-paying token contract. */
Comment
dividendOf
function dividendOf(address _owner) external view returns(uint256);
/// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 239, 309 ] }
57,828
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
IDividendPayingToken
interface IDividendPayingToken { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) external view returns(uint256); /// @n...
/* @title Dividend-Paying Token Interface @author Roger Wu (https://github.com/roger-wu) @dev An interface for a dividend-paying token contract. */
Comment
distributeDividends
function distributeDividends() external payable;
/// @notice Distributes ether to token holders as dividends. /// @dev SHOULD distribute the paid ether to token holders as dividends. /// SHOULD NOT directly transfer ether to token holders in this function. /// MUST emit a `DividendsDistributed` event when the amount of distributed ether is greater than 0.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 635, 686 ] }
57,829
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
IDividendPayingToken
interface IDividendPayingToken { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) external view returns(uint256); /// @n...
/* @title Dividend-Paying Token Interface @author Roger Wu (https://github.com/roger-wu) @dev An interface for a dividend-paying token contract. */
Comment
withdrawDividend
function withdrawDividend() external;
/// @notice Withdraws the ether distributed to the sender. /// @dev SHOULD transfer `dividendOf(msg.sender)` wei to `msg.sender`, and `dividendOf(msg.sender)` SHOULD be 0 after the transfer. /// MUST emit a `DividendWithdrawn` event if the amount of ether transferred is greater than 0.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 986, 1026 ] }
57,830
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
IDividendPayingTokenOptional
interface IDividendPayingTokenOptional { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf(address _owner) external view returns(u...
/* @title Dividend-Paying Token Optional Interface @author Roger Wu (https://github.com/roger-wu) @dev OPTIONAL functions for a dividend-paying token contract. */
Comment
withdrawableDividendOf
function withdrawableDividendOf(address _owner) external view returns(uint256);
/// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 247, 329 ] }
57,831
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
IDividendPayingTokenOptional
interface IDividendPayingTokenOptional { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf(address _owner) external view returns(u...
/* @title Dividend-Paying Token Optional Interface @author Roger Wu (https://github.com/roger-wu) @dev OPTIONAL functions for a dividend-paying token contract. */
Comment
withdrawnDividendOf
function withdrawnDividendOf(address _owner) external view returns(uint256);
/// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 539, 618 ] }
57,832
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
IDividendPayingTokenOptional
interface IDividendPayingTokenOptional { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf(address _owner) external view returns(u...
/* @title Dividend-Paying Token Optional Interface @author Roger Wu (https://github.com/roger-wu) @dev OPTIONAL functions for a dividend-paying token contract. */
Comment
accumulativeDividendOf
function accumulativeDividendOf(address _owner) external view returns(uint256);
/// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has earned in total.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 946, 1028 ] }
57,833
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
distributeDividends
function distributeDividends() public override payable { require(totalSupply() > 0); if (msg.value > 0) { magnifiedDividendPerShare = magnifiedDividendPerShare.add( (msg.value).mul(magnitude) / totalSupply() ); emit DividendsDistributed(msg.sender, msg.value); totalDividendsDistribu...
/// @notice Distributes ether to token holders as dividends. /// @dev It reverts if the total supply of tokens is 0. /// It emits the `DividendsDistributed` event if the amount of received ether is greater than 0. /// About undistributed ether: /// In each distribution, there is a small amount of ether not distribute...
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2783, 3179 ] }
57,834
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
withdrawDividend
function withdrawDividend() public virtual override { _withdrawDividendOfUser(payable(msg.sender)); }
/// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 3733, 3845 ] }
57,835
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
_withdrawDividendOfUser
function _withdrawDividendOfUser(address payable user) internal returns (uint256) { uint256 _withdrawableDividend = withdrawableDividendOf(user); if (_withdrawableDividend > 0) { withdrawnDividends[user] = withdrawnDividends[user].add(_withdrawableDividend); emit DividendWithdrawn(user, _withdrawableDiv...
/// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 4116, 4746 ] }
57,836
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
dividendOf
function dividendOf(address _owner) public view override returns(uint256) { return withdrawableDividendOf(_owner); }
/// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 4956, 5083 ] }
57,837
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
withdrawableDividendOf
function withdrawableDividendOf(address _owner) public view override returns(uint256) { return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]); }
/// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 5291, 5462 ] }
57,838
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
withdrawnDividendOf
function withdrawnDividendOf(address _owner) public view override returns(uint256) { return withdrawnDividends[_owner]; }
/// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 5672, 5804 ] }
57,839
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
accumulativeDividendOf
function accumulativeDividendOf(address _owner) public view override returns(uint256) { return magnifiedDividendPerShare.mul(balanceOf(_owner)).toInt256Safe() .add(magnifiedDividendCorrections[_owner]).toUint256Safe() / magnitude; }
/// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude /// @param _owner The addres...
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 6242, 6492 ] }
57,840
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
_transfer
function _transfer(address from, address to, uint256 value) internal virtual override { require(false); int256 _magCorrection = magnifiedDividendPerShare.mul(value).toInt256Safe(); magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from].add(_magCorrection); magnifiedDividendCorrections[to]...
/// @dev Internal function that transfer tokens from one address to another. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param from The address to transfer from. /// @param to The address to transfer to. /// @param value The amount to be transferred.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 6791, 7183 ] }
57,841
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
_mint
function _mint(address account, uint256 value) internal override { super._mint(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account] .sub( (magnifiedDividendPerShare.mul(value)).toInt256Safe() ); }
/// @dev Internal function that mints tokens to an account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account that will receive the created tokens. /// @param value The amount that will be created.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 7446, 7709 ] }
57,842
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
Solidity
DividendPayingToken
contract DividendPayingToken is ERC20, IDividendPayingToken, IDividendPayingTokenOptional { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more disc...
/* @title Dividend-Paying Token @author Roger Wu (https://github.com/roger-wu) @dev A mintable ERC20 token that allows anyone to pay and distribute ether to token holders as dividends and allows token holders to withdraw their dividends. Reference: the source code of PoWH3D: https://etherscan.io/address/0xB37...
Comment
_burn
function _burn(address account, uint256 value) internal override { super._burn(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account] .add( (magnifiedDividendPerShare.mul(value)).toInt256Safe() ); }
/// @dev Internal function that burns an amount of the token of a given account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account whose tokens will be burnt. /// @param value The amount that will be burnt.
NatSpecSingleLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 7981, 8244 ] }
57,843
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 161, 344 ] }
57,844
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 492, 651 ] }
57,845
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0)...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 801, 1249 ] }
57,846
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1400, 1560 ] }
57,847
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 1721, 1881 ] }
57,848
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2123, 2307 ] }
57,849
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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) { require(b <= a, "SafeMath: subtraction overflow"); 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 2585, 2748 ] }
57,850
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 3002, 3227 ] }
57,851
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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) { require(b > 0, "SafeMath: division by zero"); 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. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to re...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 3700, 3858 ] }
57,852
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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) { require(b > 0, "SafeMath: modulo by zero"); 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 4320, 4476 ] }
57,853
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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); 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 4950, 5121 ] }
57,854
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 5790, 5960 ] }
57,855
eVAULT
eVAULT.sol
0x1d15a70f1c8c2a9938ba8036f5a46021146d8c15
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) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @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), * 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.4+commit.c7e474f2
MIT
ipfs://4ae3db7679aab0c02330100588886fad979aae08829b63dba1f8c5e98037d9f7
{ "func_code_index": [ 6618, 6788 ] }
57,856
PoolTogetherEVMBridgeRoot
contracts/libraries/MultiSend.sol
0xfe6c5ae087366a7119f12946d07e04c94bb7a048
Solidity
MultiSend
library MultiSend{ /// credit: gnosis-safe devs (https://github.com/gnosis/safe-contracts/blob/186a21a74b327f17fc41217a927dea7064f74604/contracts/libraries/MultiSend.sol) /// @dev Sends multiple transactions and reverts all if one fails. /// @param transactions Encoded transactions. Each transaction is enc...
multiSend
function multiSend(bytes memory transactions) internal { // solhint-disable-next-line no-inline-assembly assembly { let length := mload(transactions) let i := 0x20 for { // Pre block is not used in "while mode" } lt(i, length) { // Post block is not used i...
/// credit: gnosis-safe devs (https://github.com/gnosis/safe-contracts/blob/186a21a74b327f17fc41217a927dea7064f74604/contracts/libraries/MultiSend.sol) /// @dev Sends multiple transactions and reverts all if one fails. /// @param transactions Encoded transactions. Each transaction is encoded as a packed bytes of /// ...
NatSpecSingleLine
v0.7.3+commit.9bfce1f6
MIT
{ "func_code_index": [ 971, 3047 ] }
57,857
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeMapping
function changeMapping(address voteFactory) public onlyOwner { Nest_3_VoteFactory voteFactoryMap = Nest_3_VoteFactory(address(voteFactory)); _voteFactory = voteFactoryMap; _nestContract = ERC20(address(voteFactoryMap.checkAddress("nest"))); _tokenSave = Nest_3_TokenSave(address(voteFactoryMap.check...
/** * @dev Modify voting contract * @param voteFactory Voting contract address */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 4789, 5580 ] }
57,858
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
depositIn
function depositIn(uint256 amount, address token) public { uint256 nowTime = now; uint256 nextTime = _nextTime; uint256 timeLimit = _timeLimit; if (nowTime < nextTime) { // Bonus triggered require(!(nowTime >= nextTime.sub(timeLimit) && nowTime <= nextTime.sub(timeLimit).add(_getA...
/** * @dev Deposit * @param amount Deposited amount * @param token Locked token address */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 5704, 6708 ] }
57,859
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
takeOut
function takeOut(uint256 amount, address token) public { require(amount > 0, "Parameter needs to be greater than 0"); require(amount <= _tokenSave.checkAmount(address(msg.sender), token), "Insufficient storage balance"); if (token == address...
/** * @dev Withdrawing * @param amount Withdrawing amount * @param token Token address */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 6830, 9948 ] }
57,860