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
Metafam721
contracts/MetaFam721.sol
0xb53e9ff3cca6343ff7ede9414921fef19ef01c5e
Solidity
Metafam721
contract Metafam721 is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; string public baseURI; string public notRevealedUri; //Counters Counters.Counter internal _airdrops; //Inventory uint16 public maxMintAmountPerTransaction = 10; uint1...
//import "hardhat/console.sol";
LineComment
mint
function mint(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); if (msg.sender != owner()) { uint256 ownerTokenCount = balanceOf(msg.sender); require(!paused); require(_mintAmount > 0, "Mint amount should be greater than 1"); require( _mintAmount...
// public
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 732, 1623 ] }
1,000
NotifyHelper
contracts/NotifyHelper.sol
0xeeae0c791d38e1e1fc9f7989d081c9fc290716dd
Solidity
NotifyHelper
contract NotifyHelper is Controllable { constructor(address _storage) Controllable(_storage) public {} /** * Notifies all the pools, safe guarding the notification amount. */ function notifyPools(uint256[] memory amounts, address[] memory pools) public onlyGovernance { require(amounts.length ...
notifyPools
function notifyPools(uint256[] memory amounts, address[] memory pools) public onlyGovernance { require(amounts.length == pools.length, "Amounts and pools lengths mismatch"); for (uint i = 0; i < pools.length; i++) { require(amounts[i] > 0, "Notify zero"); NoMintRewardPool pool = NoMintRewardPool(pools[i...
/** * Notifies all the pools, safe guarding the notification amount. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://477a3332b348873ebd9c365e56a106de3d8a85633adcdf983bdffc53fa1abbe0
{ "func_code_index": [ 195, 764 ] }
1,001
RealAssetDepositaryBalanceView
contracts/depositary/RealAssetDepositaryBalanceView.sol
0xaa6945212acfceec06ae29d67efd21d4cb7d96e8
Solidity
RealAssetDepositaryBalanceView
contract RealAssetDepositaryBalanceView is IDepositaryBalanceView, IUpdatable, AccessControl { using SafeMath for uint256; /// @notice Signed data of asset information. struct Proof { string data; string signature; } /// @notice Asset information. struct Asset { string ...
size
function size() public view returns (uint256) { return portfolio.length; }
/** * @return Assets count of depositary. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 1267, 1357 ] }
1,002
RealAssetDepositaryBalanceView
contracts/depositary/RealAssetDepositaryBalanceView.sol
0xaa6945212acfceec06ae29d67efd21d4cb7d96e8
Solidity
RealAssetDepositaryBalanceView
contract RealAssetDepositaryBalanceView is IDepositaryBalanceView, IUpdatable, AccessControl { using SafeMath for uint256; /// @notice Signed data of asset information. struct Proof { string data; string signature; } /// @notice Asset information. struct Asset { string ...
assets
function assets() external view returns (Asset[] memory) { Asset[] memory result = new Asset[](size()); for (uint256 i = 0; i < size(); i++) { result[i] = portfolio[i]; } return result; }
/** * @return Assets list. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 1403, 1644 ] }
1,003
RealAssetDepositaryBalanceView
contracts/depositary/RealAssetDepositaryBalanceView.sol
0xaa6945212acfceec06ae29d67efd21d4cb7d96e8
Solidity
RealAssetDepositaryBalanceView
contract RealAssetDepositaryBalanceView is IDepositaryBalanceView, IUpdatable, AccessControl { using SafeMath for uint256; /// @notice Signed data of asset information. struct Proof { string data; string signature; } /// @notice Asset information. struct Asset { string ...
put
function put( string calldata id, uint256 amount, uint256 price, uint256 updatedAt, string calldata proofData, string calldata proofSignature ) external onlyAllowed { require(size() < maxSize, "RealAssetDepositaryBalanceView::put: too many assets"); uint256 valueIndex = portfolioIndex[i...
/** * @notice Update information of asset. * @param id Asset identificator. * @param amount Amount of asset. * @param price Cost of one asset in base currency. * @param updatedAt Timestamp of updated. * @param proofData Signed data. * @param proofSignature Data signature. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 2257, 2952 ] }
1,004
RealAssetDepositaryBalanceView
contracts/depositary/RealAssetDepositaryBalanceView.sol
0xaa6945212acfceec06ae29d67efd21d4cb7d96e8
Solidity
RealAssetDepositaryBalanceView
contract RealAssetDepositaryBalanceView is IDepositaryBalanceView, IUpdatable, AccessControl { using SafeMath for uint256; /// @notice Signed data of asset information. struct Proof { string data; string signature; } /// @notice Asset information. struct Asset { string ...
remove
function remove(string calldata id) external onlyAllowed { uint256 valueIndex = portfolioIndex[id]; require(valueIndex != 0, "RealAssetDepositaryBalanceView::remove: asset already removed"); uint256 toDeleteIndex = valueIndex.sub(1); uint256 lastIndex = size().sub(1); Asset memory lastValue = portf...
/** * @notice Remove information of asset. * @param id Asset identificator. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 3052, 3617 ] }
1,005
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
addKey
function addKey(bytes32 _key, uint256 _purpose, uint256 _keyType) external returns (bool success);
/** * @dev Adds a _key to the identity. The _purpose specifies the purpose of the key. * * Triggers Event: `KeyAdded` * * Specification: MUST only be done by keys of purpose 1, or the identity itself. If it's the identity itself, the approval process will determine its approval. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 2695, 2798 ] }
1,006
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(uint256 _id, bool _approve) external returns (bool success);
/** * @dev Approves an execution or claim addition. * * Triggers Event: `Approved`, `Executed` * * Specification: * This SHOULD require n of m approvals of keys purpose 1, if the _to of the execution is the identity contract itself, to successfully approve an execution. * And COULD require n of m approval...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 3263, 3345 ] }
1,007
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
execute
function execute(address _to, uint256 _value, bytes calldata _data) external payable returns (uint256 executionId);
/** * @dev Passes an execution instruction to an ERC725 identity. * * Triggers Event: `ExecutionRequested`, `Executed` * * Specification: * SHOULD require approve to be called with one or more keys of purpose 1 or 2 to approve this execution. * Execute COULD be used as the only accessor for `addKey` and `...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 3722, 3842 ] }
1,008
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
getKey
function getKey(bytes32 _key) external view returns (uint256[] memory purposes, uint256 keyType, bytes32 key);
/** * @dev Returns the full key data, if present in the identity. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 3931, 4046 ] }
1,009
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
getKeyPurposes
function getKeyPurposes(bytes32 _key) external view returns(uint256[] memory _purposes);
/** * @dev Returns the list of purposes associated with a key. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 4132, 4225 ] }
1,010
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
getKeysByPurpose
function getKeysByPurpose(uint256 _purpose) external view returns (bytes32[] memory keys);
/** * @dev Returns an array of public key bytes32 held by this identity. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 4321, 4416 ] }
1,011
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
keyHasPurpose
function keyHasPurpose(bytes32 _key, uint256 _purpose) external view returns (bool exists);
/** * @dev Returns TRUE if a key is present and has the given purpose. If the key is not present it returns FALSE. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 4554, 4650 ] }
1,012
IdentityRegistry
@onchain-id/solidity/contracts/IERC734.sol
0x28384c92af6ac686ca934ddc3874356611ff048c
Solidity
IERC734
interface IERC734 { /** * @dev Definition of the structure of a Key. * * Specification: Keys are cryptographic public keys, or contract addresses associated with this identity. * The structure should be as follows: * - key: A public key owned by this identity * - purposes...
/** * @dev Interface of the ERC734 (Key Holder) standard as defined in the EIP. */
NatSpecMultiLine
removeKey
function removeKey(bytes32 _key, uint256 _purpose) external returns (bool success);
/** * @dev Removes _purpose for _key from the identity. * * Triggers Event: `KeyRemoved` * * Specification: MUST only be done by keys of purpose 1, or the identity itself. If it's the identity itself, the approval process will determine its approval. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
GNU GPLv3
ipfs://b1c7af754b749d9d19a1cd2334d059e43862ff3e51e72d33197d9f8b78d2f9da
{ "func_code_index": [ 4948, 5036 ] }
1,013
GodviewChain
GodviewChain.sol
0xac49b4a6010e32d7a52d4e3aeaba001a0cb74321
Solidity
ContractReceiver
contract ContractReceiver { /** * @dev Standard ERC223 function that will handle incoming token transfers. * * @param _from Token sender address. * @param _value Amount of tokens. * @param _data Transaction metadata. */ function tokenFallback(address _from, uint _value, bytes _data)...
/** * @title Contract that will work with ERC223 tokens. */
NatSpecMultiLine
tokenFallback
function tokenFallback(address _from, uint _value, bytes _data) public;
/** * @dev Standard ERC223 function that will handle incoming token transfers. * * @param _from Token sender address. * @param _value Amount of tokens. * @param _data Transaction metadata. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://50a88a4d366de30fa8557f3a27ba8efd6502dd9ca8d805565f7b7d8234964661
{ "func_code_index": [ 255, 329 ] }
1,014
GodviewChain
GodviewChain.sol
0xac49b4a6010e32d7a52d4e3aeaba001a0cb74321
Solidity
GodviewChain
contract GodviewChain { using SafeMath for uint256; uint256 public totalSupply; string public name; string public symbol; uint8 public constant decimals = 4; address public owner; mapping(address => uint256) balances; // List of user balances. function GodviewChain(uint25...
/** * @title ERC223 standard token implementation. */
NatSpecMultiLine
GodviewChain
function GodviewChain(uint256 initialSupply, string tokenName, string tokenSymbol) public { owner = msg.sender; talSupply = initialSupply * 10 ** uint256(decimals); me = tokenName; mbol = tokenSymbol; balances[owner] = totalSupply; }
// List of user balances.
LineComment
v0.4.19+commit.c4cbbb05
bzzr://50a88a4d366de30fa8557f3a27ba8efd6502dd9ca8d805565f7b7d8234964661
{ "func_code_index": [ 288, 608 ] }
1,015
GodviewChain
GodviewChain.sol
0xac49b4a6010e32d7a52d4e3aeaba001a0cb74321
Solidity
GodviewChain
contract GodviewChain { using SafeMath for uint256; uint256 public totalSupply; string public name; string public symbol; uint8 public constant decimals = 4; address public owner; mapping(address => uint256) balances; // List of user balances. function GodviewChain(uint25...
/** * @title ERC223 standard token implementation. */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) public returns (bool) { bytes memory empty; ansfer(_to, _value, empty); }
/** * @dev Transfer the specified amount of tokens to the specified address. * This function works the same with the previous one * but doesn't contain `_data` param. * Added due to backwards compatibility reasons. * * @param _to Receiver address. * @param _value Amount of tokens that wi...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://50a88a4d366de30fa8557f3a27ba8efd6502dd9ca8d805565f7b7d8234964661
{ "func_code_index": [ 1265, 1406 ] }
1,016
GodviewChain
GodviewChain.sol
0xac49b4a6010e32d7a52d4e3aeaba001a0cb74321
Solidity
GodviewChain
contract GodviewChain { using SafeMath for uint256; uint256 public totalSupply; string public name; string public symbol; uint8 public constant decimals = 4; address public owner; mapping(address => uint256) balances; // List of user balances. function GodviewChain(uint25...
/** * @title ERC223 standard token implementation. */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value, bytes _data) public returns (bool) { uint codeLength; assembly { codeLength := extcodesize(_to) } balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); if(codeLength>0) { Contrac...
/** * @dev Transfer the specified amount of tokens to the specified address. * Invokes the `tokenFallback` function if the recipient is a contract. * The token transfer fails if the recipient is a contract * but does not implement the `tokenFallback` function * or the fallback function to ...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://50a88a4d366de30fa8557f3a27ba8efd6502dd9ca8d805565f7b7d8234964661
{ "func_code_index": [ 1932, 2507 ] }
1,017
GodviewChain
GodviewChain.sol
0xac49b4a6010e32d7a52d4e3aeaba001a0cb74321
Solidity
GodviewChain
contract GodviewChain { using SafeMath for uint256; uint256 public totalSupply; string public name; string public symbol; uint8 public constant decimals = 4; address public owner; mapping(address => uint256) balances; // List of user balances. function GodviewChain(uint25...
/** * @title ERC223 standard token implementation. */
NatSpecMultiLine
burn
function burn(uint256 _value, bytes _data) public returns (bool success) { lances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); Burn(msg.sender, _value, totalSupply, _data); return true; }
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn * @param _data Transaction metadata. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://50a88a4d366de30fa8557f3a27ba8efd6502dd9ca8d805565f7b7d8234964661
{ "func_code_index": [ 2716, 2987 ] }
1,018
GodviewChain
GodviewChain.sol
0xac49b4a6010e32d7a52d4e3aeaba001a0cb74321
Solidity
GodviewChain
contract GodviewChain { using SafeMath for uint256; uint256 public totalSupply; string public name; string public symbol; uint8 public constant decimals = 4; address public owner; mapping(address => uint256) balances; // List of user balances. function GodviewChain(uint25...
/** * @title ERC223 standard token implementation. */
NatSpecMultiLine
balanceOf
function balanceOf(address _address) public constant returns (uint256 balance) { return balances[_address]; }
/** * @dev Returns balance of the `_address`. * * @param _address The address whose balance will be returned. * @return balance Balance of the `_address`. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://50a88a4d366de30fa8557f3a27ba8efd6502dd9ca8d805565f7b7d8234964661
{ "func_code_index": [ 3183, 3311 ] }
1,019
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error * */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b);...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 78, 410 ] }
1,020
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error * */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 484, 738 ] }
1,021
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error * */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 841, 941 ] }
1,022
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error * */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 996, 1105 ] }
1,023
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence * */ function totalSupply() public view returns (uint256){ return totalSupply_; } /** * @dev transfer token for a specified address * @param _to Th...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256){ return totalSupply_; }
/** * @dev total number of tokens in existence * */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 177, 253 ] }
1,024
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence * */ function totalSupply() public view returns (uint256){ return totalSupply_; } /** * @dev transfer token for a specified address * @param _to Th...
/** * @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)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; //AUDIT// 返回值符合 EIP20 规范 }...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 395, 715 ] }
1,025
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence * */ function totalSupply() public view returns (uint256){ return totalSupply_; } /** * @dev transfer token for a specified address * @param _to Th...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { 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.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 906, 999 ] }
1,026
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 * @param _value ...
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender]...
/** * @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.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 370, 807 ] }
1,027
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 * @param _value ...
approve
function approve(address _spender, uint256 _value) public returns (bool) { 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 * race ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 1398, 1572 ] }
1,028
DpheToken
dphe.sol
0xc30b841e0e1613210ddff6d3241867df3a634cf3
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 * @param _value ...
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { 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.4.24+commit.e67f0147
None
bzzr://96f317a63e06cd17d7a9b71f39dcd0817d3ca314e7b517c12b6a76794989b10b
{ "func_code_index": [ 1872, 1994 ] }
1,029
BluzelleStakingRewards
BluzelleStakingRewards.sol
0x521e6682b7ff3e412b9f5a13c3173be3e30e743b
Solidity
BluzelleStakingRewards
contract BluzelleStakingRewards is ERC20Detailed { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply = 11000e18; uint256 public basePercent = 320; construct...
totalSupply
function totalSupply() public view returns(uint256) { return _totalSupply; }
/// @return Total number of tokens in circulation
NatSpecSingleLine
v0.5.17+commit.d19bba13
None
bzzr://9640a697ff548a566ae2f32bd21b90349a44e06dcb71709987b48423da4e4726
{ "func_code_index": [ 495, 590 ] }
1,030
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 261, 321 ] }
1,031
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); 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.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 644, 825 ] }
1,032
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 513, 609 ] }
1,033
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 693, 791 ] }
1,034
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
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) pub...
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); e...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 268, 664 ] }
1,035
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
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) pub...
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.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 870, 982 ] }
1,036
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); 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 * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 401, 858 ] }
1,037
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
approve
function approve(address _spender, uint256 _value) public returns (bool) { 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.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 1490, 1685 ] }
1,038
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { 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.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 2009, 2140 ] }
1,039
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * 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 * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 2606, 2875 ] }
1,040
EthereumEra
EthereumEra.sol
0xfcf2e7f0a4c91944d995083c9495c14eb58383c9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approva...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://29f33fcb8b263f31e4307cc5d2037f98ee1e15b70992edc2b3887cc0bc363562
{ "func_code_index": [ 3346, 3761 ] }
1,041
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
addInvestors
function addInvestors( address[] calldata _investors, uint256[] calldata _tokenAllocations, uint256[] calldata _withdrawnTokens ) external onlyOwner { require(_investors.length == _tokenAllocations.length, "different arrays sizes"); for (uint256 i = 0; i < _investors.length; i++) { _addInves...
/// @dev Adds investors. This function doesn't limit max gas consumption, /// so adding too many investors can cause it to reach the out-of-gas error. /// @param _investors The addresses of new investors. /// @param _tokenAllocations The amounts of the tokens that belong to each investor.
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 2764, 3266 ] }
1,042
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
withdrawTokens
function withdrawTokens() external onlyInvestor() initialized() { Investor storage investor = investorsInfo[_msgSender()]; uint256 tokensAvailable = withdrawableTokens(_msgSender()); require(tokensAvailable > 0, "no tokens available for withdrawl"); investor.withdrawnTokens = investor.withdrawnTokens...
// 25% at TGE, 75% released daily over 120 Days after 30 Days Cliff
LineComment
v0.7.4+commit.3f05b770
{ "func_code_index": [ 3340, 3835 ] }
1,043
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
setInitialTimestamp
function setInitialTimestamp(uint256 _timestamp) external onlyOwner() notInitialized() { isInitialized = true; _initialTimestamp = _timestamp; }
/// @dev The starting time of TGE /// @param _timestamp The initial timestamp, this timestap should be used for vesting
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 3965, 4133 ] }
1,044
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
withdrawableTokens
function withdrawableTokens(address _investor) public view returns (uint256 tokens) { Investor storage investor = investorsInfo[_investor]; uint256 availablePercentage = _calculateAvailablePercentage(); uint256 noOfTokens = _calculatePercentage(investor.tokensAllotment, availablePercentage); uint256 tok...
/// @dev withdrawble tokens for an address /// @param _investor whitelisted investor address
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 4236, 4671 ] }
1,045
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
_addInvestor
function _addInvestor( address _investor, uint256 _tokensAllotment, uint256 _withdrawnTokens ) internal onlyOwner { require(_investor != address(0), "Invalid address"); require(_tokensAllotment > 0, "the investor allocation must be more than 0"); Investor storage investor = investorsInfo[_invest...
/// @dev Adds investor. This function doesn't limit max gas consumption, /// so adding too many investors can cause it to reach the out-of-gas error. /// @param _investor The addresses of new investors. /// @param _tokensAllotment The amounts of the tokens that belong to each investor. /// @param _withdrawnTokens The a...
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 5070, 5829 ] }
1,046
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
removeInvestor
function removeInvestor(address _investor) external onlyOwner() { require(_investor != address(0), "invalid address"); Investor storage investor = investorsInfo[_investor]; uint256 allocation = investor.tokensAllotment; require(allocation > 0, "the investor doesn't exist"); _totalAllocatedAmount = ...
/// @dev Removes investor. This function doesn't limit max gas consumption, /// so having too many investors can cause it to reach the out-of-gas error. /// @param _investor Investor address.
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 6035, 6562 ] }
1,047
PrivateDistribution
contracts/PrivateDistribution.sol
0xb95010420cd82e58bbe38b233dbcdf49eb52af16
Solidity
PrivateDistribution
contract PrivateDistribution is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller); event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation); event InvestorRemoved...
_calculatePercentage
function _calculatePercentage(uint256 _amount, uint256 _percentage) private pure returns (uint256 percentage) { return _amount.mul(_percentage).div(100).div(1e18); }
/// @dev calculate percentage value from amount /// @param _amount amount input to find the percentage /// @param _percentage percentage for an amount
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 6727, 6908 ] }
1,048
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20Factory
contract PersonalERC20Factory { // index of created contracts mapping (address => bool) public validContracts; address[] public contracts; // useful to know the row count in contracts index function getContractCount() public view returns(uint contractCount) { return contr...
getContractCount
function getContractCount() public view returns(uint contractCount) { return contracts.length; }
// useful to know the row count in contracts index
LineComment
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 212, 338 ] }
1,049
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20Factory
contract PersonalERC20Factory { // index of created contracts mapping (address => bool) public validContracts; address[] public contracts; // useful to know the row count in contracts index function getContractCount() public view returns(uint contractCount) { return contr...
getDeployedContracts
function getDeployedContracts() public view returns (address[] memory) { return contracts; }
// get all contracts
LineComment
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 367, 473 ] }
1,050
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20Factory
contract PersonalERC20Factory { // index of created contracts mapping (address => bool) public validContracts; address[] public contracts; // useful to know the row count in contracts index function getContractCount() public view returns(uint contractCount) { return contr...
newPersonalERC20
function newPersonalERC20(string memory name, string memory symbol, uint256 init, address owner) public returns(address) { PersonalERC20 c = new PersonalERC20(name, symbol, init, owner); validContracts[c] = true; contracts.push(c); return c; }
// deploy a new contract
LineComment
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 506, 788 ] }
1,051
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 251, 437 ] }
1,052
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
/** * @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.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 707, 896 ] }
1,053
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/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.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1142, 1617 ] }
1,054
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); 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 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.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 2080, 2418 ] }
1,055
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
/** * @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.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 2870, 3027 ] }
1,056
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[accou...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
add
function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; }
/** * @dev Give an account access to this role. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 156, 339 ] }
1,057
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[accou...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
remove
function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; }
/** * @dev Remove an account's access to this role. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 414, 602 ] }
1,058
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[accou...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; }
/** * @dev Check if an account has this role. * @return bool */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 692, 900 ] }
1,059
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
Pausable
contract Pausable is PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
paused
function paused() public view returns (bool) { return _paused; }
/** * @dev Returns true if the contract is paused, and false otherwise. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 605, 688 ] }
1,060
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
Pausable
contract Pausable is PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
pause
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); }
/** * @dev Called by a pauser to pause, triggers stopped state. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1185, 1306 ] }
1,061
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
Pausable
contract Pausable is PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
unpause
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(msg.sender); }
/** * @dev Called by a pauser to unpause, returns to normal state. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1396, 1519 ] }
1,062
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 94, 154 ] }
1,063
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 237, 310 ] }
1,064
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 534, 616 ] }
1,065
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 895, 983 ] }
1,066
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * trans...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1638, 1717 ] }
1,067
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 2030, 2132 ] }
1,068
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See `IERC20.totalSupply`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 293, 389 ] }
1,069
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See `IERC20.balanceOf`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 447, 562 ] }
1,070
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, 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.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 770, 931 ] }
1,071
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See `IERC20.allowance`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 989, 1128 ] }
1,072
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
approve
function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; }
/** * @dev See `IERC20.approve`. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1270, 1423 ] }
1,073
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; }
/** * @dev See `IERC20.transferFrom`. * * Emits an `Approval` event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of `ERC20`; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `valu...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1889, 2150 ] }
1,074
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to `approve` that can be used as a mitigation for * problems described in `IERC20.approve`. * * Emits an `Approval` event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 2554, 2765 ] }
1,075
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to `approve` that can be used as a mitigation for * problems described in `IERC20.approve`. * * Emits an `Approval` event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 3263, 3484 ] }
1,076
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] ...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to `transfer`, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a `Transfer` event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 3969, 4403 ] }
1,077
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a `Transfer` event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 4679, 4992 ] }
1,078
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
_burn
function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @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.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 5320, 5631 ] }
1,079
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
_approve
function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an `Approval` event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 6066, 6406 ] }
1,080
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() ...
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); }
/** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See `_burn` and `_approve`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 6586, 6779 ] }
1,081
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20Burnable
contract ERC20Burnable is ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See `ERC20._burn`. */ function burn(uint256 amount) public { _burn(msg.sender, amount); } /** * @dev See `ERC20._burnFrom`. */ function burnFrom(address acco...
/** * @dev Extension of `ERC20` that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burn
function burn(uint256 amount) public { _burn(msg.sender, amount); }
/** * @dev Destroys `amount` tokens from the caller. * * See `ERC20._burn`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 143, 229 ] }
1,082
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
ERC20Burnable
contract ERC20Burnable is ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See `ERC20._burn`. */ function burn(uint256 amount) public { _burn(msg.sender, amount); } /** * @dev See `ERC20._burnFrom`. */ function burnFrom(address acco...
/** * @dev Extension of `ERC20` that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burnFrom
function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); }
/** * @dev See `ERC20._burnFrom`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 286, 394 ] }
1,083
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20
contract PersonalERC20 is MinterRole, ERC20Burnable, ERC20Pausable { string private _name; string private _symbol; uint8 private _decimals; address private _owner; /** * @dev Sets the values for `name`, `symbol`, 'init', 'owner'. All four of * these values are immutable: they can ...
/** * @dev Extension of ERC20 standard designed for simple 'personal token' deployments. */
NatSpecMultiLine
mint
function mint(address account, uint256 amount) public onlyMinter returns (bool) { _mint(account, amount); return true; }
/** * @dev See `ERC20._mint`. * * Requirements: * * - the caller must have the `MinterRole`. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1117, 1265 ] }
1,084
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20
contract PersonalERC20 is MinterRole, ERC20Burnable, ERC20Pausable { string private _name; string private _symbol; uint8 private _decimals; address private _owner; /** * @dev Sets the values for `name`, `symbol`, 'init', 'owner'. All four of * these values are immutable: they can ...
/** * @dev Extension of ERC20 standard designed for simple 'personal token' deployments. */
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1334, 1422 ] }
1,085
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20
contract PersonalERC20 is MinterRole, ERC20Burnable, ERC20Pausable { string private _name; string private _symbol; uint8 private _decimals; address private _owner; /** * @dev Sets the values for `name`, `symbol`, 'init', 'owner'. All four of * these values are immutable: they can ...
/** * @dev Extension of ERC20 standard designed for simple 'personal token' deployments. */
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 1536, 1628 ] }
1,086
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20
contract PersonalERC20 is MinterRole, ERC20Burnable, ERC20Pausable { string private _name; string private _symbol; uint8 private _decimals; address private _owner; /** * @dev Sets the values for `name`, `symbol`, 'init', 'owner'. All four of * these values are immutable: they can ...
/** * @dev Extension of ERC20 standard designed for simple 'personal token' deployments. */
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * *...
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 2192, 2280 ] }
1,087
PersonalERC20Factory
PersonalERC20Factory.sol
0x2cdd094120783abd27dd979de423a25ae45601ed
Solidity
PersonalERC20
contract PersonalERC20 is MinterRole, ERC20Burnable, ERC20Pausable { string private _name; string private _symbol; uint8 private _decimals; address private _owner; /** * @dev Sets the values for `name`, `symbol`, 'init', 'owner'. All four of * these values are immutable: they can ...
/** * @dev Extension of ERC20 standard designed for simple 'personal token' deployments. */
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the token's initial owner. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
bzzr://4c47716c55d6caa927fe2f18c2ba24972ce69ad9730960ea53485d41c4f67bf9
{ "func_code_index": [ 2353, 2437 ] }
1,088
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 165, 238 ] }
1,089
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 462, 544 ] }
1,090
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 823, 911 ] }
1,091
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 1575, 1654 ] }
1,092
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 1967, 2069 ] }
1,093
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 259, 445 ] }
1,094
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 723, 864 ] }
1,095
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 1162, 1359 ] }
1,096
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 1613, 2089 ] }
1,097
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 2560, 2697 ] }
1,098
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); 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
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 3188, 3471 ] }
1,099