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
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 3188, 3471 ] }
5,907
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 3931, 4066 ] }
5,908
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 4546, 4717 ] }
5,909
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 94, 154 ] }
5,910
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 237, 310 ] }
5,911
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 534, 616 ] }
5,912
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 895, 983 ] }
5,913
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 1647, 1726 ] }
5,914
tokenCustody
tokenCustody.sol
0x5456ceeafed34dd82231f73610155f90f467377f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://b5e33be562957b6c8fc64c00bbdf31f13085800605a600d627d38a23e7249c3e
{ "func_code_index": [ 2039, 2141 ] }
5,915
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
totalSupply
function totalSupply() constant returns (uint supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 60, 121 ] }
5,916
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
balanceOf
function balanceOf(address _owner) constant returns (uint balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 229, 303 ] }
5,917
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
transfer
function transfer(address _to, uint _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.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 540, 614 ] }
5,918
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
transferFrom
function transferFrom(address _from, address _to, uint _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.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 937, 1030 ] }
5,919
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
approve
function approve(address _spender, uint _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.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 1314, 1392 ] }
5,920
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
allowance
function allowance(address _owner, address _spender) constant returns (uint 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.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 1600, 1694 ] }
5,921
MDULUCKYToken
MDULUCKYToken.sol
0x5ebfaa7d023ed9bd71bb5349e3a5c5767aadf349
Solidity
UnboundedRegularToken
contract UnboundedRegularToken is RegularToken { uint constant MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _va...
transferFrom
function transferFrom(address _from, address _to, uint _value) public returns (bool) { uint allowance = allowed[_from][msg.sender]; if (balances[_from] >= _value && allowance >= _value && balances[_to] + _value >= balances[_to] ) { balances[_to] += _value; b...
/// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://57baa2c11a247097f088e9d8e395cfd676f446624c913e5438b9355724da13fe
{ "func_code_index": [ 383, 1016 ] }
5,922
XChainTrade
IXChainTrade.sol
0x3091008cdca6e6482698e8d34e5e543f6932eb4c
Solidity
IERC1155Receiver
interface IERC1155Receiver is IERC165 { /** * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred *...
onERC1155Received
function onERC1155Received(address operator, address from, uint256 id, uint256 value, bytes calldata data) external returns (bytes4);
/** * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://8655bf97d399c1d95fba1b4db00c4af77576c87f62540e0be317af025b4557f5
{ "func_code_index": [ 503, 641 ] }
5,923
XChainTrade
IXChainTrade.sol
0x3091008cdca6e6482698e8d34e5e543f6932eb4c
Solidity
IERC1155Receiver
interface IERC1155Receiver is IERC165 { /** * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred *...
onERC1155BatchReceived
function onERC1155BatchReceived(address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data) external returns (bytes4);
/** * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each to...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://8655bf97d399c1d95fba1b4db00c4af77576c87f62540e0be317af025b4557f5
{ "func_code_index": [ 1245, 1412 ] }
5,924
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
totalSupply
function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }
// ************************************************************************ // Total supply // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 1671, 1790 ] }
5,925
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
balanceOf
function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; }
// ************************************************************************ // Get the token balance for account `tokenOwner` // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 2010, 2135 ] }
5,926
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
transfer
function transfer(address to, uint tokens) public whenNotPaused returns (bool success) { require(address(0) != to && tokens <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return t...
// ************************************************************************ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 2479, 2835 ] }
5,927
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
approve
function approve(address spender, uint tokens) public whenNotPaused returns (bool success) { require(address(0) != spender && 0 <= tokens); allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ************************************************************************ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 3115, 3398 ] }
5,928
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public whenNotPaused returns (bool success) { require(address(0) != to && tokens <= balances[msg.sender] && tokens <= allowed[from][msg.sender]); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender]...
// ************************************************************************ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfe...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 3937, 4408 ] }
5,929
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
batchTransfer
function batchTransfer(address[] toAddresses, uint tokens) public onlyOwner whenNotPaused returns (bool success) { nt len = toAddresses.length; quire(0 < len); nt amount = tokens.mul(len); quire(amount <= balances[msg.sender]); for (uint i = 0; i < len; i++) { address _to = toAddresses[i]; re...
// ************************************************************************ // Batch transfer for owner. // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 4607, 5204 ] }
5,930
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
allowance
function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ************************************************************************ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 5485, 5637 ] }
5,931
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public whenNotPaused returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ************************************************************************ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ************************************************************...
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 5998, 6334 ] }
5,932
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
function () public payable { revert(); }
// ************************************************************************ // Don't accept ETH // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 6524, 6583 ] }
5,933
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
pause
function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); }
// ************************************************************************ // called by the owner to pause, triggers stopped state // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 6809, 6917 ] }
5,934
AIC20Token
AIC20Token.sol
0x7e6eb33d0dc079e249ab0df29be1a35117d1ba4a
Solidity
AIC20Token
contract AIC20Token is ERC20, Owned { using SafeMath for uint; event Pause(); event Unpause(); bool public paused = false; string public symbol; string public name; uint8 public decimals; uint private _totalSupply; mapping(address => uint) balances; mapping(ad...
// **************************************************************************** // BECC Token, with the addition of symbol, name and decimals and a fixed supply // ****************************************************************************
LineComment
unpause
function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); }
// ************************************************************************ // called by the owner to unpause, returns to normal state // ************************************************************************
LineComment
v0.4.25+commit.59dbf8f1
bzzr://19a9ba28f46c3c85d842e4a439c8549ab35be9a1f0780d997755a2c8a1f92a25
{ "func_code_index": [ 7146, 7256 ] }
5,935
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 273, 341 ] }
5,936
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 690, 882 ] }
5,937
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
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, uin...
/** * @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]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_va...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 282, 705 ] }
5,938
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
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, uin...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 921, 1041 ] }
5,939
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
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...
/** * @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(_value); ...
/** * @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.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 415, 903 ] }
5,940
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
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...
/** * @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; 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.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 1555, 1761 ] }
5,941
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
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...
/** * @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.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 2097, 2236 ] }
5,942
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
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...
/** * @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); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 2493, 2774 ] }
5,943
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
BurnableToken
contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); ...
/** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */
NatSpecMultiLine
burn
function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = ba...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 225, 683 ] }
5,944
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
UniversalManager
contract UniversalManager is Ownable { using SafeMath for uint256; uint256 public constant ADDRESS_LIMIT = 300; uint256 public constant TRANSFERS_PER_TRANSACTION = 150; uint256 public airdrop; UniversalCoin public token; uint256 private currentPool = 0; uint256 private index = 0...
setCurrentWeekPool
function setCurrentWeekPool(uint256 _currentPool) public onlyOwner { require(_currentPool > 0); currentPool = _currentPool; }
// Set size of current week tokens pool
LineComment
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 663, 816 ] }
5,945
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
UniversalManager
contract UniversalManager is Ownable { using SafeMath for uint256; uint256 public constant ADDRESS_LIMIT = 300; uint256 public constant TRANSFERS_PER_TRANSACTION = 150; uint256 public airdrop; UniversalCoin public token; uint256 private currentPool = 0; uint256 private index = 0...
addParticipants
function addParticipants(address[] _participants) external onlyOwner { require(_participants.length != 0 && _participants.length <= ADDRESS_LIMIT); participants = _participants; }
// Adds participant for the current week
LineComment
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 865, 1072 ] }
5,946
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
UniversalManager
contract UniversalManager is Ownable { using SafeMath for uint256; uint256 public constant ADDRESS_LIMIT = 300; uint256 public constant TRANSFERS_PER_TRANSACTION = 150; uint256 public airdrop; UniversalCoin public token; uint256 private currentPool = 0; uint256 private index = 0...
addAirdropParticipants
function addAirdropParticipants(address[] _airdropParticipants) public onlyOwner { require(_airdropParticipants.length != 0 && _airdropParticipants.length <= ADDRESS_LIMIT); airdropParticipants = _airdropParticipants; }
// Add all unique participants for receiving airdrop
LineComment
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 1133, 1380 ] }
5,947
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
UniversalManager
contract UniversalManager is Ownable { using SafeMath for uint256; uint256 public constant ADDRESS_LIMIT = 300; uint256 public constant TRANSFERS_PER_TRANSACTION = 150; uint256 public airdrop; UniversalCoin public token; uint256 private currentPool = 0; uint256 private index = 0...
transfer
function transfer(uint256 _amount) public onlyOwner { uint256 max; uint256 length = participants.length; if ((index + TRANSFERS_PER_TRANSACTION) >= length) { max = length; } else { max = index + TRANSFERS_PER_TRANSACTION; } for (uint i = index; i < max; i++) { to...
// Transfer tokens to current week participants
LineComment
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 1436, 1986 ] }
5,948
UniversalManager
UniversalManager.sol
0xde871faadf05a39aa3a871525696ff4c87ecd550
Solidity
UniversalManager
contract UniversalManager is Ownable { using SafeMath for uint256; uint256 public constant ADDRESS_LIMIT = 300; uint256 public constant TRANSFERS_PER_TRANSACTION = 150; uint256 public airdrop; UniversalCoin public token; uint256 private currentPool = 0; uint256 private index = 0...
transferAidrop
function transferAidrop() public onlyOwner { uint256 max; uint256 length = airdropParticipants.length; if ((airdropIndex + TRANSFERS_PER_TRANSACTION) >= length) { max = length; } else { max = airdropIndex + TRANSFERS_PER_TRANSACTION; } uint256 share; for (uint i = ai...
// Transfer airdrop tokens to all registered participants
LineComment
v0.4.18+commit.9cf6e910
bzzr://5ad898504699f47b2ac00309768645e031a3d2b97205469e9bc41cd670085d9e
{ "func_code_index": [ 2052, 2839 ] }
5,949
DanmarksNationalbank
DanmarksNationalbank.sol
0x44dac0d5235a0b4b84d0bd1d5f25ef027a0d33b4
Solidity
DanmarksNationalbank
contract DanmarksNationalbank is ERC20 {using SafeMath for uint256; string public constant symbol = ",000.DKK.DanishKrone"; string public constant name = "Danmarks Nationalbank"; uint public constant decimals = 18; uint256 _totalSupply = 999000000000000000000 * 10 ** 18; // 999 Trillion Total Sup...
totalSupply
function totalSupply() public view returns (uint256 total_Supply) { total_Supply = _totalSupply; }
// what is the total supply of the ech tokens
LineComment
v0.4.24+commit.e67f0147
bzzr://71ba33fc4decfb4d672bd7d5c8e9a1c8145312fc1fa62b8142afbf0fb02cd2e9
{ "func_code_index": [ 1210, 1330 ] }
5,950
DanmarksNationalbank
DanmarksNationalbank.sol
0x44dac0d5235a0b4b84d0bd1d5f25ef027a0d33b4
Solidity
DanmarksNationalbank
contract DanmarksNationalbank is ERC20 {using SafeMath for uint256; string public constant symbol = ",000.DKK.DanishKrone"; string public constant name = "Danmarks Nationalbank"; uint public constant decimals = 18; uint256 _totalSupply = 999000000000000000000 * 10 ** 18; // 999 Trillion Total Sup...
balanceOf
function balanceOf(address _owner)public view returns (uint256 balance) { return balances[_owner]; }
// What is the balance of a particular account?
LineComment
v0.4.24+commit.e67f0147
bzzr://71ba33fc4decfb4d672bd7d5c8e9a1c8145312fc1fa62b8142afbf0fb02cd2e9
{ "func_code_index": [ 1387, 1509 ] }
5,951
DanmarksNationalbank
DanmarksNationalbank.sol
0x44dac0d5235a0b4b84d0bd1d5f25ef027a0d33b4
Solidity
DanmarksNationalbank
contract DanmarksNationalbank is ERC20 {using SafeMath for uint256; string public constant symbol = ",000.DKK.DanishKrone"; string public constant name = "Danmarks Nationalbank"; uint public constant decimals = 18; uint256 _totalSupply = 999000000000000000000 * 10 ** 18; // 999 Trillion Total Sup...
transfer
function transfer(address _to, uint256 _amount)public returns (bool ok) { require( _to != 0x0); require(balances[msg.sender] >= _amount && _amount >= 0); balances[msg.sender] = (balances[msg.sender]).sub(_amount); balances[_to] = (balances[_to]).add(_amount); emit Transfer(msg.sender, _to, _amount);...
// Transfer the balance from owner's account to another account
LineComment
v0.4.24+commit.e67f0147
bzzr://71ba33fc4decfb4d672bd7d5c8e9a1c8145312fc1fa62b8142afbf0fb02cd2e9
{ "func_code_index": [ 1584, 1974 ] }
5,952
DanmarksNationalbank
DanmarksNationalbank.sol
0x44dac0d5235a0b4b84d0bd1d5f25ef027a0d33b4
Solidity
DanmarksNationalbank
contract DanmarksNationalbank is ERC20 {using SafeMath for uint256; string public constant symbol = ",000.DKK.DanishKrone"; string public constant name = "Danmarks Nationalbank"; uint public constant decimals = 18; uint256 _totalSupply = 999000000000000000000 * 10 ** 18; // 999 Trillion Total Sup...
transferFrom
function transferFrom( address _from, address _to, uint256 _amount )public returns (bool ok) { require( _to != 0x0); require(balances[_from] >= _amount && allowed[_from][msg.sender] >= _amount && _amount >= 0); balances[_from] = (balances[_from]).sub(_amount); allowed[_from][msg.sender] = (allowed[_from][msg.sender...
// Send _value amount of tokens from address _from to address _to // The transferFrom method is used for a withdraw workflow, allowing contracts to send // tokens on your behalf, for example to "deposit" to a contract address and/or to charge // fees in sub-currencies; the command should fail unless the _from account h...
LineComment
v0.4.24+commit.e67f0147
bzzr://71ba33fc4decfb4d672bd7d5c8e9a1c8145312fc1fa62b8142afbf0fb02cd2e9
{ "func_code_index": [ 2469, 2956 ] }
5,953
DanmarksNationalbank
DanmarksNationalbank.sol
0x44dac0d5235a0b4b84d0bd1d5f25ef027a0d33b4
Solidity
DanmarksNationalbank
contract DanmarksNationalbank is ERC20 {using SafeMath for uint256; string public constant symbol = ",000.DKK.DanishKrone"; string public constant name = "Danmarks Nationalbank"; uint public constant decimals = 18; uint256 _totalSupply = 999000000000000000000 * 10 ** 18; // 999 Trillion Total Sup...
approve
function approve(address _spender, uint256 _amount)public returns (bool ok) { require( _spender != 0x0); allowed[msg.sender][_spender] = _amount; emit Approval(msg.sender, _spender, _amount); return true; }
// Allow _spender to withdraw from your account, multiple times, up to the _value amount. // If this function is called again it overwrites the current allowance with _value.
LineComment
v0.4.24+commit.e67f0147
bzzr://71ba33fc4decfb4d672bd7d5c8e9a1c8145312fc1fa62b8142afbf0fb02cd2e9
{ "func_code_index": [ 3147, 3405 ] }
5,954
DanmarksNationalbank
DanmarksNationalbank.sol
0x44dac0d5235a0b4b84d0bd1d5f25ef027a0d33b4
Solidity
DanmarksNationalbank
contract DanmarksNationalbank is ERC20 {using SafeMath for uint256; string public constant symbol = ",000.DKK.DanishKrone"; string public constant name = "Danmarks Nationalbank"; uint public constant decimals = 18; uint256 _totalSupply = 999000000000000000000 * 10 ** 18; // 999 Trillion Total Sup...
transferOwnership
function transferOwnership(address newOwner) external onlyOwner { uint256 x = balances[owner]; require( newOwner != 0x0); balances[newOwner] = (balances[newOwner]).add(balances[owner]); balances[owner] = 0; owner = newOwner; emit Transfer(msg.sender, newOwner, x); }
//In case the ownership needs to be transferred
LineComment
v0.4.24+commit.e67f0147
bzzr://71ba33fc4decfb4d672bd7d5c8e9a1c8145312fc1fa62b8142afbf0fb02cd2e9
{ "func_code_index": [ 3677, 3985 ] }
5,955
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.beare...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
add
function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; }
/** * @dev give an account access to this role */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 155, 346 ] }
5,956
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.beare...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
remove
function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; }
/** * @dev remove an account's access to this role */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 420, 614 ] }
5,957
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.beare...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; }
/** * @dev check if an account has this role * @return bool */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 703, 873 ] }
5,958
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 106, 544 ] }
5,959
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 674, 982 ] }
5,960
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 1115, 1270 ] }
5,961
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 1353, 1508 ] }
5,962
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 1664, 1793 ] }
5,963
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 297, 393 ] }
5,964
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
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 balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 608, 719 ] }
5,965
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
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.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 1053, 1189 ] }
5,966
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
transfer
function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token to a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 1358, 1503 ] }
5,967
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
approve
function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 2145, 2298 ] }
5,968
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 value) public returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowed[from][msg.sender].sub(value)); return true; }
/** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address...
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 2766, 2999 ] }
5,969
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when _allowed[msg.sender][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 * Emits...
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 3520, 3728 ] }
5,970
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue)); return true; }
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when _allowed[msg.sender][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 * Emits...
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 4254, 4472 ] }
5,971
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 4694, 4961 ] }
5,972
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_mint
function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 5308, 5582 ] }
5,973
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_burn
function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 5811, 6085 ] }
5,974
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 value) internal { require(spender != address(0)); require(owner != address(0)); _allowed[owner][spender] = value; emit Approval(owner, spender, value); }
/** * @dev Approve an address to spend another addresses' tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 6353, 6612 ] }
5,975
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowed[account][msg.sender].sub(value)); }
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param valu...
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 7006, 7193 ] }
5,976
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20Mintable
contract ERC20Mintable is ERC20, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address ...
/** * @title ERC20Mintable * @dev ERC20 minting logic */
NatSpecMultiLine
mint
function mint(address to, uint256 value) public onlyMinter returns (bool) { _mint(to, value); return true; }
/** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 294, 430 ] }
5,977
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @return the name of the token. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 356, 444 ] }
5,978
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @return the symbol of the token. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 506, 598 ] }
5,979
YearnYinanceBeta2
YearnYinanceBeta2.sol
0x8ed045c13375477bff384ddd30575aacb6c4110b
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @return the number of decimals of the token. */
NatSpecMultiLine
v0.5.2+commit.1df8f40c
MIT
bzzr://39a8ec03a9b910b022c7d915768abcfd8745ad759c5dbd5b3c95e75a3ce2a19c
{ "func_code_index": [ 672, 760 ] }
5,980
SolidStampRegister
SolidStampRegister.sol
0xffe73766ed803769cdaea47470e66fdfa5308c22
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. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4eb466182666e995dfc10998ef4f664acd65ec46fb96148f4e720774e86d1df0
{ "func_code_index": [ 638, 755 ] }
5,981
SolidStampRegister
SolidStampRegister.sol
0xffe73766ed803769cdaea47470e66fdfa5308c22
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://4eb466182666e995dfc10998ef4f664acd65ec46fb96148f4e720774e86d1df0
{ "func_code_index": [ 920, 1028 ] }
5,982
SolidStampRegister
SolidStampRegister.sol
0xffe73766ed803769cdaea47470e66fdfa5308c22
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://4eb466182666e995dfc10998ef4f664acd65ec46fb96148f4e720774e86d1df0
{ "func_code_index": [ 1166, 1344 ] }
5,983
SolidStampRegister
SolidStampRegister.sol
0xffe73766ed803769cdaea47470e66fdfa5308c22
Solidity
SolidStampRegister
contract SolidStampRegister is Ownable { /// @dev address of the current SolidStamp contract which can add audits address public contractSolidStamp; /// @dev const value to indicate the contract is audited and approved uint8 public constant NOT_AUDITED = 0x00; /// @dev const value to indicate ...
changeSolidStampContract
function changeSolidStampContract(address _newSolidStamp) public onlyOwner { require(_newSolidStamp != address(0), "SolidStamp contract cannot be 0x0"); emit SolidStampContractChanged(_newSolidStamp); contractSolidStamp = _newSolidStamp; }
/** * @dev Transfers control of the registry to a _newSolidStamp. * @param _newSolidStamp The address to transfer control registry to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4eb466182666e995dfc10998ef4f664acd65ec46fb96148f4e720774e86d1df0
{ "func_code_index": [ 3452, 3722 ] }
5,984
Mingoes
contracts/src/ERC721/extensions/ERC721Tradable.sol
0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0
Solidity
ERC721Tradable
abstract contract ERC721Tradable is ERC721 { /* -------------------------------------------------------------------------- */ /* IMMUTABLE STORAGE */ /* -------------------------------------------------------------------------- */ /// @notice The OpenSea Pro...
setMarketplaceApprovalForAll
function setMarketplaceApprovalForAll(bool approved) public virtual;
/// @notice Enables or disables the marketplace whitelist in {isApprovedForAll}. /// @dev Must be implemented in inheriting contracts. /// Recommended to use in combination with an access control contract (e.g. OpenZeppelin's Ownable).
NatSpecSingleLine
v0.8.11+commit.d7f03943
{ "func_code_index": [ 2510, 2579 ] }
5,985
Mingoes
contracts/src/ERC721/extensions/ERC721Tradable.sol
0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0
Solidity
ERC721Tradable
abstract contract ERC721Tradable is ERC721 { /* -------------------------------------------------------------------------- */ /* IMMUTABLE STORAGE */ /* -------------------------------------------------------------------------- */ /// @notice The OpenSea Pro...
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { if (marketPlaceApprovalForAll && (operator == IProxyRegistry(openSeaProxyRegistry).proxies(owner) || operator == looksRareTransferManager)) return true; return super.isApprovedForAll(owner, operator); }
/// @return True if `operator` is a whitelisted marketplace contract or if it was approved by `owner` with {ERC721A.setApprovalForAll}. /// @inheritdoc ERC721
NatSpecSingleLine
v0.8.11+commit.d7f03943
{ "func_code_index": [ 2742, 3055 ] }
5,986
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
ExtendedMath
library ExtendedMath { //return the smaller of the two inputs (a or b) function limitLessThan(uint a, uint b) internal pure returns (uint c) { if(a > b) return b; return a; } }
limitLessThan
function limitLessThan(uint a, uint b) internal pure returns (uint c) { if(a > b) return b; return a; }
//return the smaller of the two inputs (a or b)
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 81, 218 ] }
5,987
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
SedoPoWToken
function SedoPoWToken() public onlyOwner{ symbol = "SEDO"; name = "SEDO PoW Token"; decimals = 8; _totalSupply = 50000000 * 10**uint(decimals); if(locked) revert(); locked = true; tokensMinted = 1000000 * 10**uint(decimals); miningReward = 25; //initial Min...
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 1546, 2530 ] }
5,988
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
ParentCoinAddress
function ParentCoinAddress(address parent) public onlyOwner{ parentAddress = parent; }
// ------------------------------------------------------------------------ // Parent contract changing (it can be useful if parent will make a swap or in some other cases) // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 2819, 2924 ] }
5,989
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
mint
function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success) { //the PoW must contain work that includes a recent ethereum block hash (challenge number) and the msg.sender's address to prevent MITM attacks bytes32 digest = keccak256(challengeNumber, msg.sender, nonce ); ...
// ------------------------------------------------------------------------ // Main mint function // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 3124, 4779 ] }
5,990
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
merge
function merge() public returns (bool success) { // Function for the Merge mining (0xbitcoin as a parent coin) // original idea by 0xbitcoin developers // the idea is that the miner uses https://github.com/0xbitcoin/mint-helper/blob/master/contracts/MintHelper.sol // to call mint(...
// ------------------------------------------------------------------------ // merge mint function // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 4984, 9932 ] }
5,991
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
_startNewMiningEpoch
function _startNewMiningEpoch() internal { //if max supply for the era will be exceeded next reward round then enter the new era before that happens //40 is the final reward era, almost all tokens minted //once the final era is reached, more tokens will not be given out because the assert function if( t...
//a new 'block' to be mined
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 9976, 11155 ] }
5,992
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
_reAdjustDifficulty
function _reAdjustDifficulty() internal { uint ethBlocksSinceLastDifficultyPeriod = block.number - latestDifficultyPeriodStarted; uint epochsMined = _BLOCKS_PER_READJUSTMENT; //256 uint targetEthBlocksPerDiffPeriod = epochsMined * 60; //should be 60 times slower than ethereum //if there we...
//https://en.bitcoin.it/wiki/Difficulty#What_is_the_formula_for_difficulty.3F //as of 2017 the bitcoin difficulty was up to 17 zeroes, it was only 8 in the early days //readjust the target by 5 percent
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 11385, 13116 ] }
5,993
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
getChallengeNumber
function getChallengeNumber() public constant returns (bytes32) { return challengeNumber; }
//this is a recent ethereum block hash, used to prevent pre-mining future blocks
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 13207, 13317 ] }
5,994
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
getMiningDifficulty
function getMiningDifficulty() public constant returns (uint) { return _MAXIMUM_TARGET.div(miningTarget);
//the number of zeroes the digest of the PoW solution requires. Auto adjusts
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 13403, 13530 ] }
5,995
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
getMiningReward
function getMiningReward() public constant returns (uint) { //once we get half way thru the coins, only get 25 per block //every reward era, the reward amount halves. return (miningReward * 10**uint(decimals) ).div( 2**rewardEra ) ; }
//50m coins total //reward begins at miningReward and is cut in half every reward era (as tokens are mined)
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 13755, 14034 ] }
5,996
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
getMintDigest
function getMintDigest(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number) public view returns (bytes32 digesttest) { bytes32 digest = keccak256(challenge_number,msg.sender,nonce); return digest; }
//help debug mining software
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 14071, 14317 ] }
5,997
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
checkMintSolution
function checkMintSolution(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number, uint testTarget) public view returns (bool success) { bytes32 digest = keccak256(challenge_number,msg.sender,nonce); if(uint256(digest) > testTarget) revert(); return (digest == challenge_digest); ...
//help debug mining software
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 14358, 14701 ] }
5,998
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 14895, 15020 ] }
5,999
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 15248, 15381 ] }
6,000
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 15737, 16014 ] }
6,001
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 16541, 16757 ] }
6,002
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); Transfer(from, to, tokens); return true...
// ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer...
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 17313, 17668 ] }
6,003
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 17961, 18121 ] }
6,004
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 18494, 18821 ] }
6,005
SedoPoWToken
SedoPoWToken.sol
0x0f00f1696218eaefa2d2330df3d6d1f94813b38f
Solidity
SedoPoWToken
contract SedoPoWToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;/...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://c4774b9768b3b751f21d10c61fa3e0c71800beaa69e1672013c69d5ace49c9fb
{ "func_code_index": [ 19017, 19080 ] }
6,006