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
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 3546, 3781 ] }
407
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 4151, 4416 ] }
408
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessa...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 4667, 5031 ] }
409
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
BaseFallback
contract BaseFallback is Fallback { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function ...
/** * @title BaseFallback * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */
NatSpecMultiLine
_implementation
function _implementation() internal view override returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } }
/** * @dev Returns the current implementation. * @return impl Address of the current implementation */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 1601, 1796 ] }
410
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
BaseFallback
contract BaseFallback is Fallback { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function ...
/** * @title BaseFallback * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */
NatSpecMultiLine
_upgradeTo
function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); }
/** * @dev Upgrades the to a new implementation. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 1936, 2096 ] }
411
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
BaseFallback
contract BaseFallback is Fallback { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function ...
/** * @title BaseFallback * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */
NatSpecMultiLine
_setImplementation
function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } }
/** * @dev Sets the implementation address of the. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 2238, 2554 ] }
412
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
admin
function admin() external ifAdmin returns (address addr) { addr = _admin(); }
/** * @return addr The address of the admin. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 1889, 1985 ] }
413
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
implementation
function implementation() external ifAdmin returns (address addr) { addr = _implementation(); }
/** * @return addr The address of the implementation. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 2062, 2176 ] }
414
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
changeAdmin
function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); }
/** * @dev Changes the admin of the. * Only the current admin can call this function. * @param newAdmin Address to transfer administration to. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 2354, 2601 ] }
415
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
upgradeTo
function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); }
/** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 2799, 2915 ] }
416
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
upgradeToAndCall
function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); }
/** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 3458, 3703 ] }
417
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
_admin
function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } }
/** * @return adm The admin slot. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 3760, 3926 ] }
418
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
_setAdmin
function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } }
/** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 4053, 4217 ] }
419
VaultRouter
VaultRouter.sol
0x9e9f4b105e10a66b27c771811ce4defbd44567d2
Solidity
VaultRouter
contract VaultRouter is BaseFallback { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin_ Address of the administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should includ...
/** * @title VaultRouter * @dev This contract combines an upgradeability with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to b...
NatSpecMultiLine
_willFallback
function _willFallback() internal virtual override { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); }
/** * @dev Only fall back when the sender is not the admin. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588
{ "func_code_index": [ 4300, 4492 ] }
420
Creature
contracts/Strings.sol
0xda396a2fc5f0e3a87a874757f1317102f49da5b0
Solidity
Strings
library Strings { // via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) { bytes memory _ba = bytes(_a); bytes memory _bb = byte...
strConcat
function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) { bytes memory _ba = bytes(_a); bytes memory _bb = bytes(_b); bytes memory _bc = bytes(_c); bytes memory _bd = bytes(_d); bytes memory _be = bytes(_...
// via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol
LineComment
v0.5.12+commit.7709ece9
None
bzzr://f67c4a3b52bfc13e940ea61d0409c8ac3aedf1b9704cc9b99e361d7fc7a469e2
{ "func_code_index": [ 102, 977 ] }
421
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 94, 154 ] }
422
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 237, 310 ] }
423
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 534, 616 ] }
424
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 895, 983 ] }
425
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 1647, 1726 ] }
426
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 2039, 2141 ] }
427
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 259, 445 ] }
428
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 723, 864 ] }
429
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 1162, 1359 ] }
430
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 1613, 2089 ] }
431
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 2560, 2697 ] }
432
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 3188, 3471 ] }
433
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 3931, 4066 ] }
434
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 4546, 4717 ] }
435
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 606, 1230 ] }
436
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 2160, 2562 ] }
437
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 3318, 3496 ] }
438
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 3721, 3922 ] }
439
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 4292, 4523 ] }
440
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 4774, 5095 ] }
441
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 497, 581 ] }
442
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 1139, 1292 ] }
443
PuppyToken
PuppyToken.sol
0xd326b9965f4ba85878d115f535167dd2305c8eb5
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
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.6.12+commit.27d51765
MIT
ipfs://ab18968b15b54a1237ca5750c8eaffc645d40798a62a5441626e6241ea7a2f8e
{ "func_code_index": [ 1442, 1691 ] }
444
idoFactory
tokenVesting.sol
0xb9f4fcc06b48cd072aa3dd62b9287f28eb35c13b
Solidity
PostDeliveryCrowdsale
contract PostDeliveryCrowdsale is TimedCrowdsale { using SafeMath for uint256; uint contractCreationTime; uint monthTime = 2592000; uint public timeToWait; uint public initialEmission; uint public months; uint public lastFunctioncalled; mapping(address => uint256) private _bal...
/** * @title PostDeliveryCrowdsale * @dev Crowdsale that locks tokens from withdrawal until it ends. */
NatSpecMultiLine
withdrawTokens
function withdrawTokens(address beneficiary) public { require(hasClosed(), "PostDeliveryCrowdsale: not closed"); uint256 amount = _balances[beneficiary]; uint realAmount; require(amount > 0, "PostDeliveryCrowdsale: beneficiary is not due any tokens"); uint since = block.timestamp - contractCrea...
/** * @dev Withdraw tokens only after crowdsale ends. * @param beneficiary Whose tokens will be withdrawn. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
GNU GPLv3
bzzr://710c3fd9dd1e5dbde5ea7c504730f3a39f4e4d99d3d5f7d78df96d15723a33ee
{ "func_code_index": [ 2165, 4036 ] }
445
idoFactory
tokenVesting.sol
0xb9f4fcc06b48cd072aa3dd62b9287f28eb35c13b
Solidity
PostDeliveryCrowdsale
contract PostDeliveryCrowdsale is TimedCrowdsale { using SafeMath for uint256; uint contractCreationTime; uint monthTime = 2592000; uint public timeToWait; uint public initialEmission; uint public months; uint public lastFunctioncalled; mapping(address => uint256) private _bal...
/** * @title PostDeliveryCrowdsale * @dev Crowdsale that locks tokens from withdrawal until it ends. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @return the balance of an account. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
GNU GPLv3
bzzr://710c3fd9dd1e5dbde5ea7c504730f3a39f4e4d99d3d5f7d78df96d15723a33ee
{ "func_code_index": [ 4100, 4215 ] }
446
idoFactory
tokenVesting.sol
0xb9f4fcc06b48cd072aa3dd62b9287f28eb35c13b
Solidity
PostDeliveryCrowdsale
contract PostDeliveryCrowdsale is TimedCrowdsale { using SafeMath for uint256; uint contractCreationTime; uint monthTime = 2592000; uint public timeToWait; uint public initialEmission; uint public months; uint public lastFunctioncalled; mapping(address => uint256) private _bal...
/** * @title PostDeliveryCrowdsale * @dev Crowdsale that locks tokens from withdrawal until it ends. */
NatSpecMultiLine
_processPurchase
function _processPurchase(address beneficiary, uint256 tokenAmount) internal { _balances[beneficiary] = _balances[beneficiary].add(tokenAmount); _deliverTokens(address(_vault), tokenAmount); }
/** * @dev Overrides parent by storing due balances, and delivering tokens to the vault instead of the end user. This * ensures that the tokens will be available by the time they are withdrawn (which may not be the case if * `_deliverTokens` was called later). * @param beneficiary Token purchaser * @param tok...
NatSpecMultiLine
v0.5.17+commit.d19bba13
GNU GPLv3
bzzr://710c3fd9dd1e5dbde5ea7c504730f3a39f4e4d99d3d5f7d78df96d15723a33ee
{ "func_code_index": [ 4608, 4828 ] }
447
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "multiplication constrain...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 94, 486 ] }
448
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "division constraint voilated"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 604, 942 ] }
449
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "substracts constraint voilated"); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 1063, 1250 ] }
450
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "addition constraint voilated"); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 1321, 1506 ] }
451
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "divides contraint voilated"); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 1649, 1808 ] }
452
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public{ owner = msg.sender; } /** * ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0), "Ownable: new owner should not empty"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 657, 877 ] }
453
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused, "Pausable: contract not paused"); _; } /** * @dev modifier to all...
pause
function pause() public onlyOwner whenNotPaused returns (bool) { paused = true; emit Pause(); return true; }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 543, 672 ] }
454
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused, "Pausable: contract not paused"); _; } /** * @dev modifier to all...
unpause
function unpause() public onlyOwner whenPaused returns (bool) { paused = false; emit Unpause(); return true; }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 756, 887 ] }
455
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0), "BasicToken: require to address"); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 264, 646 ] }
456
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 850, 962 ] }
457
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0), "StandardToken: receiver address empty"); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 386, 975 ] }
458
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { require(_spender != address(0), "StandardToken: spender address empty"); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 1605, 1878 ] }
459
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 2200, 2341 ] }
460
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval (address _spender, uint256 _addedValue) public returns (bool success) { require(_spender != address(0), "StandardToken: spender address empty"); allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_...
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 2584, 2948 ] }
461
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished, "MintableToken: require minting active"); _; } /** * @dev Function to mint tokens * @param _to The address that will rec...
mint
function mint(address _to, uint256 _value) public onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_value); balances[_to] = balances[_to].add(_value); emit Transfer(address(0), _to, _value); return true; }
/** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 474, 721 ] }
462
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished, "MintableToken: require minting active"); _; } /** * @dev Function to mint tokens * @param _to The address that will rec...
finishMinting
function finishMinting() public onlyOwner returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 838, 977 ] }
463
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
BurnableToken
contract BurnableToken is StandardToken { /** * @dev Burns a specified amount of tokens. * @param _value The amount of tokens to burn. */ function burn(uint256 _value) public { require(_value > 0, "BurnableToken: value must be greterthan 0"); address burner = msg.sende...
burn
function burn(uint256 _value) public { require(_value > 0, "BurnableToken: value must be greterthan 0"); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Transfer(msg.sender, address(0), _value); }
/** * @dev Burns a specified amount of tokens. * @param _value The amount of tokens to burn. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 165, 492 ] }
464
Token
Token.sol
0xa35defddc628619ffc0ec4e6cb53990e2e07af18
Solidity
Token
contract Token is MintableToken, PausableToken, BurnableToken { string public name = "PocketBTC"; string public symbol = "PBTC"; uint8 public decimals = 8; uint256 public initialSupply = 1000000 * (10 ** uint256(decimals)); // Constructor constructor() public { totalSupply = ini...
function () external payable { }
// Don't accept ETH
LineComment
v0.5.2+commit.1df8f40c
None
bzzr://306b2738991d3879748fe11086a1d55010dc0fdbdb38181b082853584c31a3c8
{ "func_code_index": [ 505, 547 ] }
465
SquidMoon
SquidMoon.sol
0xceda54cdd2b00855b0dad4b920d38dd1289c4e61
Solidity
SquidMoon
contract SquidMoon is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Squid Moon"; string private constant _symbol = "SQM"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) priva...
setMinSwapTokensThreshold
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; }
//Set minimum tokens required to swap.
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://37fd53a0cfc7e3167523ea7477de97d21c8b3af7f4a75b489156c48b278d41e3
{ "func_code_index": [ 15222, 15366 ] }
466
SquidMoon
SquidMoon.sol
0xceda54cdd2b00855b0dad4b920d38dd1289c4e61
Solidity
SquidMoon
contract SquidMoon is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Squid Moon"; string private constant _symbol = "SQM"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) priva...
toggleSwap
function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; }
//Set minimum tokens required to swap.
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://37fd53a0cfc7e3167523ea7477de97d21c8b3af7f4a75b489156c48b278d41e3
{ "func_code_index": [ 15417, 15523 ] }
467
SquidMoon
SquidMoon.sol
0xceda54cdd2b00855b0dad4b920d38dd1289c4e61
Solidity
SquidMoon
contract SquidMoon is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Squid Moon"; string private constant _symbol = "SQM"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) priva...
setMaxTxnAmount
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; }
//Set MAx transaction
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://37fd53a0cfc7e3167523ea7477de97d21c8b3af7f4a75b489156c48b278d41e3
{ "func_code_index": [ 15557, 15670 ] }
468
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
ERC20Token
contract ERC20Token is ERC20Interface, Owned { using SafeMath for uint; uint public tokensIssuedTotal; mapping(address => uint) balances; mapping(address => mapping (address => uint)) allowed; function totalSupply() public view returns (uint) { return tokensIssuedTotal; } ...
// ---------------------------------------------------------------------------- // // ERC20 Token Standard // // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address _owner) public view returns (uint) { return balances[_owner]; }
// Includes BOTH locked AND unlocked tokens
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 370, 479 ] }
469
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
LockSlots
contract LockSlots is ERC20Token { using SafeMath for uint; uint public constant LOCK_SLOTS = 5; mapping(address => uint[LOCK_SLOTS]) public lockTerm; mapping(address => uint[LOCK_SLOTS]) public lockAmnt; mapping(address => bool) public mayHaveLockedTokens; event RegisteredLockedToke...
// ---------------------------------------------------------------------------- // // LockSlots // // ----------------------------------------------------------------------------
LineComment
lockedTokens
function lockedTokens(address _account) public view returns (uint) { if (!mayHaveLockedTokens[_account]) return 0; return pNumberOfLockedTokens(_account); }
// public view functions
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 1563, 1747 ] }
470
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
LockSlots
contract LockSlots is ERC20Token { using SafeMath for uint; uint public constant LOCK_SLOTS = 5; mapping(address => uint[LOCK_SLOTS]) public lockTerm; mapping(address => uint[LOCK_SLOTS]) public lockAmnt; mapping(address => bool) public mayHaveLockedTokens; event RegisteredLockedToke...
// ---------------------------------------------------------------------------- // // LockSlots // // ----------------------------------------------------------------------------
LineComment
unlockedTokensInternal
function unlockedTokensInternal(address _account) internal returns (uint) { // updates mayHaveLockedTokens if necessary if (!mayHaveLockedTokens[_account]) return balances[_account]; uint locked = pNumberOfLockedTokens(_account); if (locked == 0) mayHaveLockedTokens[_account] = false; return ba...
// internal and private functions
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 2344, 2725 ] }
471
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLIcoDates
contract WALLIcoDates is Owned { uint public dateMainStart = 1619859600; // 1-MAY-2021 09:00 GMT +0 uint public dateMainEnd = 1620464400; // 8-MAY-2021 09:00 GMT +0 uint public constant DATE_LIMIT = 1620464400 + 180 days; event IcoDateUpdated(uint id, uint unixts); // check dates ...
// ---------------------------------------------------------------------------- // // WALLIcoDates // // ----------------------------------------------------------------------------
LineComment
setDateMainStart
function setDateMainStart(uint _unixts) public onlyOwner checkDateOrder { require(now < _unixts && now < dateMainStart); dateMainStart = _unixts; emit IcoDateUpdated(1, _unixts); }
// set ico dates
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 584, 801 ] }
472
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLIcoDates
contract WALLIcoDates is Owned { uint public dateMainStart = 1619859600; // 1-MAY-2021 09:00 GMT +0 uint public dateMainEnd = 1620464400; // 8-MAY-2021 09:00 GMT +0 uint public constant DATE_LIMIT = 1620464400 + 180 days; event IcoDateUpdated(uint id, uint unixts); // check dates ...
// ---------------------------------------------------------------------------- // // WALLIcoDates // // ----------------------------------------------------------------------------
LineComment
isMainFirstDay
function isMainFirstDay() public view returns (bool) { if (now > dateMainStart && now <= dateMainStart + 1 days) return true; return false; }
// where are we? Passed first day or not?
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 1067, 1236 ] }
473
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
availableToMint
function availableToMint() public view returns (uint) { return MAX_TOTAL_TOKEN_SUPPLY.sub(TOKEN_MAIN_CAP).sub(tokensMinted); }
// Information functions
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 2314, 2459 ] }
474
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
addToWhitelist
function addToWhitelist(address _account) public onlyAdmin { pWhitelist(_account); }
// Admin functions
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 2867, 2970 ] }
475
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
updateTokensPerEth
function updateTokensPerEth(uint _tokens_per_eth) public onlyOwner { require(now < dateMainStart); tokensPerEth = _tokens_per_eth; emit UpdatedTokensPerEth(tokensPerEth); }
// Owner functions ------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 3479, 3688 ] }
476
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
makeTradeable
function makeTradeable() public { require(msg.sender == owner || now > dateMainEnd + 20 weeks); tokensTradeable = true; }
// Only owner can make tokens tradable at any time, or if the date is // greater than the end of the mainsale date plus 20 weeks, allow // any caller to make tokensTradeable.
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 3883, 4032 ] }
477
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
mintTokens
function mintTokens(uint _mint_type, address _account, uint _tokens) public onlyOwner { pMintTokens(_mint_type, _account, _tokens, 0); }
// Token minting --------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 4236, 4391 ] }
478
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
buyTokens
function buyTokens() private { require(isMain()); require(msg.value >= MINIMUM_CONTRIBUTION); require(whitelist[msg.sender]); uint tokens_available = TOKEN_MAIN_CAP.sub(tokensMain); // adjust tokens_available on first day, if necessary if (isMainFirstDay()) { uint tokens_ava...
// Main sale ------------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 6384, 8191 ] }
479
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
requestTokenExchangeMax
function requestTokenExchangeMax() public { requestTokenExchange(unlockedTokensInternal(msg.sender)); }
// Token exchange / migration to new platform ---------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 8257, 8379 ] }
480
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address _token_address, uint _amount) public onlyOwner returns (bool success) { return ERC20Interface(_token_address).transfer(owner, _amount); }
/* Transfer out any accidentally sent ERC20 tokens */
Comment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 8913, 9108 ] }
481
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address _to, uint _amount) public returns (bool success) { require(tokensTradeable); require(_amount <= unlockedTokensInternal(msg.sender)); return super.transfer(_to, _amount); }
/* Override "transfer" */
Comment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 9144, 9378 ] }
482
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address _from, address _to, uint _amount) public returns (bool success) { require(tokensTradeable); require(_amount <= unlockedTokensInternal(_from)); return super.transferFrom(_from, _to, _amount); }
/* Override "transferFrom" */
Comment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 9418, 9677 ] }
483
WALLToken
WALLToken.sol
0x02b6361bbec213bcc34756bbd2877831d92a6c84
Solidity
WALLToken
contract WALLToken is ERC20Token, Wallet, LockSlots, WALLIcoDates { // Utility variable uint constant E18 = 10**18; // Basic token data string public constant name = "Wall Street Decentral Token"; string public constant symbol = "WALL"; uint8 public constant decimals = 18; /...
// ---------------------------------------------------------------------------- // // WALL public token sale // // ----------------------------------------------------------------------------
LineComment
transferMultiple
function transferMultiple(address[] _addresses, uint[] _amounts) external { require(_addresses.length <= 100); require(_addresses.length == _amounts.length); // do the transfers for (uint j; j < _addresses.length; j++) { transfer(_addresses[j], _amounts[j]); } }
/* Multiple token transfers from one address to save gas */
Comment
v0.4.23+commit.124ca40d
None
bzzr://cf4e1a54ac982d46286798e77068beb9d6d9b34248c3bc96ef668b7eb7004ff3
{ "func_code_index": [ 9747, 10081 ] }
484
TornadoCash_eth
contracts/MerkleTreeWithHistory.sol
0xa160cdab225685da1d56aa342ad8841c3b53f291
Solidity
MerkleTreeWithHistory
contract MerkleTreeWithHistory { uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE uint3...
hashLeftRight
function hashLeftRight(bytes32 _left, bytes32 _right) public pure returns (bytes32) { require(uint256(_left) < FIELD_SIZE, "_left should be inside the field"); require(uint256(_right) < FIELD_SIZE, "_right should be inside the field"); uint256 R = uint256(_left); uint256 C = 0; (R, C) = Hasher.MiMCSponge...
/** @dev Hash 2 tree leaves, returns MiMC(_left, _right) */
NatSpecMultiLine
v0.5.11+commit.c082d0b4
None
bzzr://587549d2a38eba8d298e5df3a9c389827128193ddbe15c9ca5720461b16a92ac
{ "func_code_index": [ 1366, 1823 ] }
485
TornadoCash_eth
contracts/MerkleTreeWithHistory.sol
0xa160cdab225685da1d56aa342ad8841c3b53f291
Solidity
MerkleTreeWithHistory
contract MerkleTreeWithHistory { uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE uint3...
isKnownRoot
function isKnownRoot(bytes32 _root) public view returns(bool) { if (_root == 0) { return false; } uint32 i = currentRootIndex; do { if (_root == roots[i]) { return true; } if (i == 0) { i = ROOT_HISTORY_SIZE; } i--; } while (i != currentRootIndex); return fa...
/** @dev Whether the root is present in the root history */
NatSpecMultiLine
v0.5.11+commit.c082d0b4
None
bzzr://587549d2a38eba8d298e5df3a9c389827128193ddbe15c9ca5720461b16a92ac
{ "func_code_index": [ 2732, 3092 ] }
486
TornadoCash_eth
contracts/MerkleTreeWithHistory.sol
0xa160cdab225685da1d56aa342ad8841c3b53f291
Solidity
MerkleTreeWithHistory
contract MerkleTreeWithHistory { uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE uint3...
getLastRoot
function getLastRoot() public view returns(bytes32) { return roots[currentRootIndex]; }
/** @dev Returns the last root */
NatSpecMultiLine
v0.5.11+commit.c082d0b4
None
bzzr://587549d2a38eba8d298e5df3a9c389827128193ddbe15c9ca5720461b16a92ac
{ "func_code_index": [ 3140, 3238 ] }
487
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 776, 881 ] }
488
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 995, 1104 ] }
489
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 override returns (uint8) { return 18; }
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 1738, 1836 ] }
490
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 1896, 2009 ] }
491
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 2067, 2199 ] }
492
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 2407, 2587 ] }
493
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 2645, 2801 ] }
494
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 2943, 3117 ] }
495
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds all...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 3594, 4079 ] }
496
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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] + 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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 4483, 4703 ] }
497
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAl...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 5201, 5607 ] }
498
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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); ...
/** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This 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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 6092, 6818 ] }
499
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 7100, 7504 ] }
500
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 7832, 8416 ] }
501
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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(own...
/** * @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.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 8849, 9234 ] }
502
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - wh...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 9829, 9959 ] }
503
StarToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x24eb24647786135352cbb14f888b23277f0014e7
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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
_afterTokenTransfer
function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://5f0cb9e21d86cd5adb7cff989d61c2776f890af786cc12aa518a3c4db9b3e293
{ "func_code_index": [ 10558, 10687 ] }
504
FixedROwnableToken
@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
0x32a5bf1df6e98aa9b3705534e8959b29894d3156
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals ...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
{ "func_code_index": [ 96, 154 ] }
505
FixedROwnableToken
@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
0x32a5bf1df6e98aa9b3705534e8959b29894d3156
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals ...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
{ "func_code_index": [ 217, 277 ] }
506