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
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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://githu...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 560, 840 ] }
7,107
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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://githu...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 954, 1070 ] }
7,108
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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://githu...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1134, 1264 ] }
7,109
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 199, 287 ] }
7,110
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @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; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 445, 777 ] }
7,111
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 983, 1087 ] }
7,112
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_v...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 401, 891 ] }
7,113
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { 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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1523, 1718 ] }
7,114
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { 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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 2042, 2207 ] }
7,115
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, 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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 2673, 2980 ] }
7,116
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
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); }...
/** * @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.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 3451, 3894 ] }
7,117
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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 ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 513, 609 ] }
7,118
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
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 ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 693, 791 ] }
7,119
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
addAdministrator
function addAdministrator(address _administrator) onlyOwner public returns (bool) { if (isAdministrator(_administrator)) { return false; } else { addRole(_administrator, ROLE_ADMINISTRATOR); return true; } }
/** * @dev Add an address that can administer the token even when paused. * @param _administrator Address of the given administrator. * @return True if the administrator has been added, false if the address was already an administrator. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 531, 814 ] }
7,120
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
removeAdministrator
function removeAdministrator(address _administrator) onlyOwner public returns (bool) { if (isAdministrator(_administrator)) { removeRole(_administrator, ROLE_ADMINISTRATOR); return true; } else { return false; } }
/** * @dev Remove an administrator. * @param _administrator Address of the administrator to be removed. * @return True if the administrator has been removed, * false if the address wasn't an administrator in the first place. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1081, 1370 ] }
7,121
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
isAdministrator
function isAdministrator(address _administrator) public view returns (bool) { return hasRole(_administrator, ROLE_ADMINISTRATOR); }
/** * @dev Determine if address is an administrator. * @param _administrator Address of the administrator to be checked. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1520, 1670 ] }
7,122
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
transfer
function transfer(address _to, uint256 _value) public whenNotPausedOrAuthorized returns (bool) { return super.transfer(_to, _value); }
/** * @dev Transfer token for a specified address with pause feature for administrator. * @dev Only applies when the transfer is allowed by the owner. * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1944, 2097 ] }
7,123
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public whenNotPausedOrAuthorized returns (bool) { return super.transferFrom(_from, _to, _value); }
/** * @dev Transfer tokens from one address to another with pause feature for administrator. * @dev Only applies when the transfer is allowed by the owner. * @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 uint2...
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 2490, 2673 ] }
7,124
Colonist
contracts/ERC721.sol
0xc799f57355677a19b91c722734743215513dece5
Solidity
ERC721
abstract contract ERC721 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ...
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) /// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC.
NatSpecSingleLine
approve
function approve(address spender, uint256 id) public virtual { address owner = ownerOf[id]; require( msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED" ); getApproved[id] = spender; emit Approval(owner, spender, id); }
/*/////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/
Comment
v0.8.11+commit.d7f03943
MIT
{ "func_code_index": [ 1808, 2127 ] }
7,125
Colonist
contracts/ERC721.sol
0xc799f57355677a19b91c722734743215513dece5
Solidity
ERC721
abstract contract ERC721 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ...
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) /// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC.
NatSpecSingleLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC72...
/*/////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/
Comment
v0.8.11+commit.d7f03943
MIT
{ "func_code_index": [ 4325, 4700 ] }
7,126
Colonist
contracts/ERC721.sol
0xc799f57355677a19b91c722734743215513dece5
Solidity
ERC721
abstract contract ERC721 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ...
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) /// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC.
NatSpecSingleLine
_mint
function _mint(address to, uint256 id) internal virtual { require(to != address(0), "INVALID_RECIPIENT"); require(ownerOf[id] == address(0), "ALREADY_MINTED"); // Counter overflow is incredibly unrealistic. unchecked { balanceOf[to]++; } ownerOf[id] = to; emit Transfer(address(0)...
/*/////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/
Comment
v0.8.11+commit.d7f03943
MIT
{ "func_code_index": [ 4890, 5262 ] }
7,127
ShibaDoge
ShibaDoge.sol
0x89f11edb933368303dc1bff346deb11abd8c0819
Solidity
ShibaDoge
contract ShibaDoge is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://df202b29710303eef6a3d1298a20f4953d61f13da501e9bff4f64150abbdb987
{ "func_code_index": [ 9925, 9959 ] }
7,128
ShibaDoge
ShibaDoge.sol
0x89f11edb933368303dc1bff346deb11abd8c0819
Solidity
ShibaDoge
contract ShibaDoge is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool...
_tokenTransfer
function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _is...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://df202b29710303eef6a3d1298a20f4953d61f13da501e9bff4f64150abbdb987
{ "func_code_index": [ 19766, 20609 ] }
7,129
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 60, 124 ] }
7,130
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 232, 309 ] }
7,131
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 546, 623 ] }
7,132
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 946, 1042 ] }
7,133
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 1326, 1407 ] }
7,134
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 1615, 1712 ] }
7,135
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Teawah
contract Teawah is StandardToken { // CHANGE THIS. Update the contract name. /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core function...
Teawah
function Teawah() { balances[msg.sender] = 10000000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000. (CHANGE THIS) totalSupply = 10000000000; // Update ...
// Where should the raised ETH go? // This is a constructor function // which means the following function name has to match the contract name declared above
LineComment
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 1194, 2174 ] }
7,136
Teawah
Teawah.sol
0x4602047d7e263866937bc8e7a452a1c39f68dd53
Solidity
Teawah
contract Teawah is StandardToken { // CHANGE THIS. Update the contract name. /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core function...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.20+commit.3155dd80
bzzr://ed11531698af41853aef9380d6a468beae1cb9d9638bf6de86f458e83109021d
{ "func_code_index": [ 2798, 3603 ] }
7,137
Mories
contracts/Mories.sol
0xbfb6e2c1116e77bdafad8a4d384a8f9f0d80ce14
Solidity
Mories
contract Mories is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string private _baseTokenURI; uint256 public constant PRICE = 10000000000000000; uint256 public constant MAX_SUPPLY = 6000; uint256 public constant FREE_SUPPLY = 1000; // Free mint is allowed until 1000 mint ...
updateMintCount
function updateMintCount(address minter, uint256 count) private { MintCountMap[minter] += count; }
/** FREE MINT **/
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://4cd1a3180fde1804b5c4e1c47499d4e25517165df031bb11b3df377ff097e168
{ "func_code_index": [ 634, 751 ] }
7,138
Mories
contracts/Mories.sol
0xbfb6e2c1116e77bdafad8a4d384a8f9f0d80ce14
Solidity
Mories
contract Mories is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string private _baseTokenURI; uint256 public constant PRICE = 10000000000000000; uint256 public constant MAX_SUPPLY = 6000; uint256 public constant FREE_SUPPLY = 1000; // Free mint is allowed until 1000 mint ...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; }
/** SETTERS **/
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://4cd1a3180fde1804b5c4e1c47499d4e25517165df031bb11b3df377ff097e168
{ "func_code_index": [ 777, 896 ] }
7,139
Mories
contracts/Mories.sol
0xbfb6e2c1116e77bdafad8a4d384a8f9f0d80ce14
Solidity
Mories
contract Mories is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string private _baseTokenURI; uint256 public constant PRICE = 10000000000000000; uint256 public constant MAX_SUPPLY = 6000; uint256 public constant FREE_SUPPLY = 1000; // Free mint is allowed until 1000 mint ...
withdraw
function withdraw(address _to) public onlyOwner nonReentrant { uint256 balance = address(this).balance; Address.sendValue(payable(_to), balance); }
/** PAYOUT **/
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://4cd1a3180fde1804b5c4e1c47499d4e25517165df031bb11b3df377ff097e168
{ "func_code_index": [ 2531, 2708 ] }
7,140
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 815, 932 ] }
7,141
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_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.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 1097, 1205 ] }
7,142
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 1343, 1521 ] }
7,143
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
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://git...
/** * @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 ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 89, 483 ] }
7,144
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
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://git...
/** * @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
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 567, 858 ] }
7,145
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
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://git...
/** * @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
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 972, 1094 ] }
7,146
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
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://git...
/** * @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
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 1158, 1293 ] }
7,147
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
Claimable
contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Allows the current owner to set the pendingOwner ad...
/** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { pendingOwner = newOwner; }
/** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 395, 496 ] }
7,148
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
Claimable
contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Allows the current owner to set the pendingOwner ad...
/** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */
NatSpecMultiLine
claimOwnership
function claimOwnership() public onlyPendingOwner { emit OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); }
/** * @dev Allows the pendingOwner address to finalize the transfer. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 582, 753 ] }
7,149
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
ClaimableEx
contract ClaimableEx is Claimable { /* * @dev Cancels the ownership transfer. */ function cancelOwnershipTransfer() onlyOwner public { pendingOwner = owner; } }
/** * @title Claimable Ex * @dev Extension for the Claimable contract, where the ownership transfer can be canceled. */
NatSpecMultiLine
cancelOwnershipTransfer
function cancelOwnershipTransfer() onlyOwner public { pendingOwner = owner; }
/* * @dev Cancels the ownership transfer. */
Comment
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 93, 181 ] }
7,150
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
AddressSet
contract AddressSet is Ownable { mapping(address => bool) exist; address[] elements; /** * @dev Adds a new address to the set. * @param _addr Address to add. * @return True if succeed, otherwise false. */ function add(address _addr) onlyOwner public returns (bool) { if (contains(_addr...
/** * @title Address Set. * @dev This contract allows to store addresses in a set and * owner can run a loop through all elements. **/
NatSpecMultiLine
add
function add(address _addr) onlyOwner public returns (bool) { if (contains(_addr)) { return false; } exist[_addr] = true; elements.push(_addr); return true; }
/** * @dev Adds a new address to the set. * @param _addr Address to add. * @return True if succeed, otherwise false. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 233, 431 ] }
7,151
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
AddressSet
contract AddressSet is Ownable { mapping(address => bool) exist; address[] elements; /** * @dev Adds a new address to the set. * @param _addr Address to add. * @return True if succeed, otherwise false. */ function add(address _addr) onlyOwner public returns (bool) { if (contains(_addr...
/** * @title Address Set. * @dev This contract allows to store addresses in a set and * owner can run a loop through all elements. **/
NatSpecMultiLine
contains
function contains(address _addr) public view returns (bool) { return exist[_addr]; }
/** * @dev Checks whether the set contains a specified address or not. * @param _addr Address to check. * @return True if the address exists in the set, otherwise false. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 626, 721 ] }
7,152
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
AddressSet
contract AddressSet is Ownable { mapping(address => bool) exist; address[] elements; /** * @dev Adds a new address to the set. * @param _addr Address to add. * @return True if succeed, otherwise false. */ function add(address _addr) onlyOwner public returns (bool) { if (contains(_addr...
/** * @title Address Set. * @dev This contract allows to store addresses in a set and * owner can run a loop through all elements. **/
NatSpecMultiLine
elementAt
function elementAt(uint256 _index) onlyOwner public view returns (address) { require(_index < elements.length); return elements[_index]; }
/** * @dev Gets an element at a specified index in the set. * @param _index Index. * @return A relevant address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 859, 1015 ] }
7,153
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
AddressSet
contract AddressSet is Ownable { mapping(address => bool) exist; address[] elements; /** * @dev Adds a new address to the set. * @param _addr Address to add. * @return True if succeed, otherwise false. */ function add(address _addr) onlyOwner public returns (bool) { if (contains(_addr...
/** * @title Address Set. * @dev This contract allows to store addresses in a set and * owner can run a loop through all elements. **/
NatSpecMultiLine
getTheNumberOfElements
function getTheNumberOfElements() onlyOwner public view returns (uint256) { return elements.length; }
/** * @dev Gets the number of elements in the set. * @return The number of elements. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 1121, 1233 ] }
7,154
BalanceSheet
BalanceSheet.sol
0x6349f72db55946871e8a4cd1f3c03923e0f8bf8c
Solidity
BalanceSheet
contract BalanceSheet is ClaimableEx { using SafeMath for uint256; mapping (address => uint256) private balances; AddressSet private holderSet; constructor() public { holderSet = new AddressSet(); } /** * @dev Gets the balance of the specified address. * @param _owner The address to...
// A wrapper around the balances mapping.
LineComment
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
bzzr://8108aa4accd959e5df68578437d8eb113022191a09766dcdd039ddcfb4e456e0
{ "func_code_index": [ 431, 535 ] }
7,155
GardenContractV2
contracts/TulipToken.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
TulipToken
contract TulipToken is MultOwnable, ERC20{ constructor (string memory name, string memory symbol, uint8 decimals) public ERC20(name, symbol, decimals) MultOwnable(){ } function contractMint(address account, uint256 amount) external isAnOwner{ _mint(account, amount); } function cont...
addOwner
function addOwner(address _newOwner) external isAnOwner { addOwnerShip(_newOwner); }
/* ========== RESTRICTED FUNCTIONS ========== */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 482, 585 ] }
7,156
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
GCCERC20
function GCCERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name ...
/** * Constructor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 1012, 1555 ] }
7,157
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value >= balanceOf[_to]...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 1639, 2487 ] }
7,158
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); return true; }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 2693, 2850 ] }
7,159
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` on behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 3125, 3426 ] }
7,160
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 3690, 3920 ] }
7,161
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 4314, 4666 ] }
7,162
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 4836, 5215 ] }
7,163
GCCERC20
GCCERC20.sol
0xa726e225a475e47faadb0586a8743f03cf0dbec5
Solidity
GCCERC20
contract GCCERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address ...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://d809f33abd13dc15abca056f8ed8b1568f8fbcb1a4d11594c991c8aa9de6a347
{ "func_code_index": [ 5473, 6089 ] }
7,164
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 558, 646 ] }
7,165
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 760, 852 ] }
7,166
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
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. This is...
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 1487, 1575 ] }
7,167
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See `IERC20.totalSupply`. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 1639, 1735 ] }
7,168
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See `IERC20.balanceOf`. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 1793, 1908 ] }
7,169
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 2116, 2277 ] }
7,170
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See `IERC20.allowance`. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 2335, 2474 ] }
7,171
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 2616, 2769 ] }
7,172
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 3235, 3496 ] }
7,173
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 3900, 4111 ] }
7,174
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 4609, 4830 ] }
7,175
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 5315, 5749 ] }
7,176
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a `Transfer` event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 6025, 6338 ] }
7,177
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_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 Destoys `amount` tokens from `account`, reducing the * total supply. * * Emits a `Transfer` event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 6665, 6976 ] }
7,178
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 7411, 7751 ] }
7,179
GardenContractV2
contracts/contracts/token/ERC20/ERC20.sol
0x1d6efde41748bc14ec13202f2fcf68a726a21c50
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; ...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_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.5.16+commit.9c3226ce
MIT
bzzr://3d4f4967b66dbf4f029b44a5b8fd6f0310cc8965cc7b2664cde35fa8aa468deb
{ "func_code_index": [ 7933, 8126 ] }
7,180
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
Context
contract Context { // describes current contract execution context (metaTX support) / openzeppelin-contracts/blob/master/contracts/GSN/Context.sol function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { ...
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// describes current contract execution context (metaTX support) / openzeppelin-contracts/blob/master/contracts/GSN/Context.sol
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 148, 251 ] }
7,181
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
SafeMath
library SafeMath { // wrappers over solidity arithmetic operations with added overflow checks function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } function sub(uint256 a, uint256 b) internal pure returns (u...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
// wrappers over solidity arithmetic operations with added overflow checks
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 95, 250 ] }
7,182
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
Address
library Address { // helper for address type / openzeppelin-contracts/blob/master/contracts/utils/Address.sol function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc70...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
// helper for address type / openzeppelin-contracts/blob/master/contracts/utils/Address.sol
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 111, 735 ] }
7,183
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
IERC20
interface IERC20 { // brief interface for erc20 token txs function transfer(address to, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); }
transfer
function transfer(address to, uint256 value) external returns (bool);
// brief interface for erc20 token txs
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 59, 133 ] }
7,184
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
IWETH
interface IWETH { // brief interface for canonical ether token wrapper contract function deposit() payable external; function transfer(address dst, uint wad) external returns (bool); }
deposit
function deposit() payable external;
// brief interface for canonical ether token wrapper contract
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 82, 123 ] }
7,185
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
LexLockerProvider
contract LexLockerProvider is Context { // *provider-side splittable digital deal lockers w/ embedded arbitration using SafeMath for uint256; using SafeERC20 for IERC20; address public wETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // canonical ether token wrapper contract reference uint256 pu...
registerLocker
function registerLocker( // register locker for token deposit & client deal confirmation address client, address[] calldata provider, address resolver, address token, uint256[] calldata amount, uint256 cap, uint256 milestones, uint256 termination, bytes32 details) external ...
/*************** LOCKER FUNCTIONS ***************/
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 1456, 2654 ] }
7,186
LexLockerProvider
LexLockerProvider.sol
0xce2d0abdb0b50ebda38c31cecd539b83e184fbcc
Solidity
LexLockerProvider
contract LexLockerProvider is Context { // *provider-side splittable digital deal lockers w/ embedded arbitration using SafeMath for uint256; using SafeERC20 for IERC20; address public wETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // canonical ether token wrapper contract reference uint256 pu...
lock
function lock(uint256 index, bytes32 details) external { // client or provider(s) can lock remainder for resolution during locker period / update request details Locker storage locker = lockers[index]; require(locker.confirmed == 1, "locker unconfirmed"); require(locker.cap > locker.released, ...
/************ ADR FUNCTIONS ************/
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://dcdb16cfb028a23aa9693e4b9f1399a1d603d882e8fa52195bab5a89799198c6
{ "func_code_index": [ 5100, 5814 ] }
7,187
BPK
BPK.sol
0xdf3a8adecd3ecefeb4484175a9a201677ba9c3c8
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) ret...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://11602b5e5cd066857cd5def234a4f07a025cd67b34ec6f5e3b7c8d99fc671e5f
{ "func_code_index": [ 268, 507 ] }
7,188
BPK
BPK.sol
0xdf3a8adecd3ecefeb4484175a9a201677ba9c3c8
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) ret...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) constant 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.26+commit.4563c3fc
Apache-2.0
bzzr://11602b5e5cd066857cd5def234a4f07a025cd67b34ec6f5e3b7c8d99fc671e5f
{ "func_code_index": [ 713, 822 ] }
7,189
BPK
BPK.sol
0xdf3a8adecd3ecefeb4484175a9a201677ba9c3c8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_to].add(_val...
/** * @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 amout of tokens to be transfered */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://11602b5e5cd066857cd5def234a4f07a025cd67b34ec6f5e3b7c8d99fc671e5f
{ "func_code_index": [ 390, 893 ] }
7,190
BPK
BPK.sol
0xdf3a8adecd3ecefeb4484175a9a201677ba9c3c8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs...
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://11602b5e5cd066857cd5def234a4f07a025cd67b34ec6f5e3b7c8d99fc671e5f
{ "func_code_index": [ 1128, 1676 ] }
7,191
BPK
BPK.sol
0xdf3a8adecd3ecefeb4484175a9a201677ba9c3c8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still avaible for the spender. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://11602b5e5cd066857cd5def234a4f07a025cd67b34ec6f5e3b7c8d99fc671e5f
{ "func_code_index": [ 1997, 2135 ] }
7,192
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 638, 755 ] }
7,193
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_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.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 920, 1028 ] }
7,194
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 1166, 1344 ] }
7,195
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Autonomy
contract Autonomy is Ownable { address public congress; bool init = false; modifier onlyCongress() { require(msg.sender == congress); _; } /** * @dev initialize a Congress contract address for this token * * @param _congress address the congress contract ...
initialCongress
function initialCongress(address _congress) onlyOwner public { require(!init); require(_congress != address(0)); congress = _congress; init = true; }
/** * @dev initialize a Congress contract address for this token * * @param _congress address the congress contract address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 338, 533 ] }
7,196
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Autonomy
contract Autonomy is Ownable { address public congress; bool init = false; modifier onlyCongress() { require(msg.sender == congress); _; } /** * @dev initialize a Congress contract address for this token * * @param _congress address the congress contract ...
changeCongress
function changeCongress(address _congress) onlyCongress public { require(_congress != address(0)); congress = _congress; }
/** * @dev set a Congress contract address for this token * must change this address by the last congress contract * * @param _congress address the congress contract address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 748, 898 ] }
7,197
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Destructible
contract Destructible is Ownable { constructor() public payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. */ function destroy() onlyOwner public { selfdestruct(owner); } function destroyAndSend(address _recipient) onlyOwner public { sel...
destroy
function destroy() onlyOwner public { selfdestruct(owner); }
/** * @dev Transfers the current balance to the owner and terminates the contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 173, 244 ] }
7,198
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Claimable
contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Allows the current owner to set the pendingOwner ad...
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { pendingOwner = newOwner; }
/** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 395, 496 ] }
7,199
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
Claimable
contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Allows the current owner to set the pendingOwner ad...
claimOwnership
function claimOwnership() onlyPendingOwner public { emit OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); }
/** * @dev Allows the pendingOwner address to finalize the transfer. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 582, 753 ] }
7,200
DRCWalletMgrParams
DRCWalletMgrParams.sol
0x0f35d82007119dc339af57b29dc8ae794b92926c
Solidity
DRCWalletMgrParams
contract DRCWalletMgrParams is Claimable, Autonomy, Destructible { uint256 public singleWithdrawMin; // min value of single withdraw uint256 public singleWithdrawMax; // Max value of single withdraw uint256 public dayWithdraw; // Max value of one day of withdraw uint256 public monthWithdraw; // Max ...
initialSingleWithdrawMax
function initialSingleWithdrawMax(uint256 _value) onlyOwner public { require(!init); singleWithdrawMax = _value; }
// the address that will get the returned charge fees.
LineComment
v0.4.25+commit.59dbf8f1
bzzr://a1cf410c5c223cb38ae194de63007e967d35327f18bbe17e115213a09b7d690b
{ "func_code_index": [ 583, 727 ] }
7,201
FutureCoinConnect
FutureCoinConnect.sol
0x5a16a5dc186d602c6a2ef13370517e014df54b4b
Solidity
FutureCoinConnect
contract FutureCoinConnect { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; //小数位 // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances ...
FutureCoinConnect
function FutureCoinConnect ( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens ...
/** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://c22d2561ab473844aaca4212ef8b414f9453a5ade9aebaff29d175833d30f1cf
{ "func_code_index": [ 854, 1407 ] }
7,202
FutureCoinConnect
FutureCoinConnect.sol
0x5a16a5dc186d602c6a2ef13370517e014df54b4b
Solidity
FutureCoinConnect
contract FutureCoinConnect { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; //小数位 // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances ...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://c22d2561ab473844aaca4212ef8b414f9453a5ade9aebaff29d175833d30f1cf
{ "func_code_index": [ 1491, 2333 ] }
7,203
FutureCoinConnect
FutureCoinConnect.sol
0x5a16a5dc186d602c6a2ef13370517e014df54b4b
Solidity
FutureCoinConnect
contract FutureCoinConnect { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; //小数位 // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances ...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://c22d2561ab473844aaca4212ef8b414f9453a5ade9aebaff29d175833d30f1cf
{ "func_code_index": [ 2539, 2651 ] }
7,204
FutureCoinConnect
FutureCoinConnect.sol
0x5a16a5dc186d602c6a2ef13370517e014df54b4b
Solidity
FutureCoinConnect
contract FutureCoinConnect { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; //小数位 // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://c22d2561ab473844aaca4212ef8b414f9453a5ade9aebaff29d175833d30f1cf
{ "func_code_index": [ 2926, 3227 ] }
7,205
FutureCoinConnect
FutureCoinConnect.sol
0x5a16a5dc186d602c6a2ef13370517e014df54b4b
Solidity
FutureCoinConnect
contract FutureCoinConnect { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; //小数位 // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances ...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://c22d2561ab473844aaca4212ef8b414f9453a5ade9aebaff29d175833d30f1cf
{ "func_code_index": [ 3491, 3667 ] }
7,206