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
FRUT
FRUT.sol
0x5adf3e3ba4a8f3f4cf80f9c3bd0eea7cc562877e
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://0002bb33a515b19eac5c8cf7fd7240e7d60de6ed1de4c5be794d39e8a28d22b7
{ "func_code_index": [ 1615, 1712 ] }
28,800
FRUT
FRUT.sol
0x5adf3e3ba4a8f3f4cf80f9c3bd0eea7cc562877e
Solidity
FRUT
contract FRUT is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise ...
//name this contract whatever you'd like
LineComment
FRUT
function FRUT( ) { balances[msg.sender] = 10000000000000000; totalSupply = 10000000000000000; name = "FRUTCOIN"; // Set the name for display purposes decimals = 8; // Amount of decimals for display purposes symbol = "FRUT"; ...
//human 0.1 standard. Just an arbitrary versioning scheme.
LineComment
v0.4.21+commit.dfe3193c
bzzr://0002bb33a515b19eac5c8cf7fd7240e7d60de6ed1de4c5be794d39e8a28d22b7
{ "func_code_index": [ 915, 1334 ] }
28,801
FRUT
FRUT.sol
0x5adf3e3ba4a8f3f4cf80f9c3bd0eea7cc562877e
Solidity
FRUT
contract FRUT is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise ...
//name this contract whatever you'd like
LineComment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.21+commit.dfe3193c
bzzr://0002bb33a515b19eac5c8cf7fd7240e7d60de6ed1de4c5be794d39e8a28d22b7
{ "func_code_index": [ 1395, 2200 ] }
28,802
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
IERC165
interface IERC165 { /** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(b...
/** * @title IERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */
NatSpecMultiLine
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 288, 369 ] }
28,803
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
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.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 106, 544 ] }
28,804
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
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.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 674, 982 ] }
28,805
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
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.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 1115, 1270 ] }
28,806
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
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.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 1353, 1508 ] }
28,807
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
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.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 1664, 1793 ] }
28,808
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
VitalikSteward
contract VitalikSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the asset token if the patron can't pay anymore. Harberger Tax (COST): - Asset is always on sale. - You have to have a price set. - T...
patronageOwed
function patronageOwed() public view returns (uint256 patronageDue) { return price.mul(now.sub(timeLastCollected)).mul(patronageNumerator) .div(patronageDenominator).div(365 days); }
/* public view functions */
Comment
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 2254, 2468 ] }
28,809
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
VitalikSteward
contract VitalikSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the asset token if the patron can't pay anymore. Harberger Tax (COST): - Asset is always on sale. - You have to have a price set. - T...
depositAbleToWithdraw
function depositAbleToWithdraw() public view returns (uint256) { uint256 collection = patronageOwed(); if(collection >= deposit) { return 0; } else { return deposit.sub(collection); } }
// same function as above, basically
LineComment
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 3122, 3379 ] }
28,810
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
VitalikSteward
contract VitalikSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the asset token if the patron can't pay anymore. Harberger Tax (COST): - Asset is always on sale. - You have to have a price set. - T...
foreclosureTime
function foreclosureTime() public view returns (uint256) { // patronage per second uint256 pps = price.mul(patronageNumerator).div(patronageDenominator).div(365 days); return now + depositAbleToWithdraw().div(pps); // zero division if price is zero. }
/* now + deposit/patronage per second now + depositAbleToWithdraw/(price*nume/denom/365). */
Comment
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 3496, 3784 ] }
28,811
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
VitalikSteward
contract VitalikSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the asset token if the patron can't pay anymore. Harberger Tax (COST): - Asset is always on sale. - You have to have a price set. - T...
_collectPatronage
function _collectPatronage() public { // determine patronage to pay if (state == StewardState.Owned) { uint256 collection = patronageOwed(); // should foreclose and stake stewardship if (collection >= deposit) { // up to when was it actually paid for? ...
/* actions */
Comment
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 3806, 4812 ] }
28,812
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
VitalikSteward
contract VitalikSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the asset token if the patron can't pay anymore. Harberger Tax (COST): - Asset is always on sale. - You have to have a price set. - T...
depositWei
function depositWei() public payable collectPatronage { require(state != StewardState.Foreclosed, "Foreclosed"); deposit = deposit.add(msg.value); }
// note: anyone can deposit
LineComment
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 4852, 5028 ] }
28,813
VitalikSteward
VitalikSteward.sol
0x803445597c2a42114a527b0b6191936bc61b492f
Solidity
VitalikSteward
contract VitalikSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the asset token if the patron can't pay anymore. Harberger Tax (COST): - Asset is always on sale. - You have to have a price set. - T...
_withdrawDeposit
function _withdrawDeposit(uint256 _wei) internal { // note: can withdraw whole deposit, which puts it in immediate to be foreclosed state. require(deposit >= _wei, 'Withdrawing too much'); deposit = deposit.sub(_wei); msg.sender.transfer(_wei); // msg.sender == patron if(deposit == 0) { ...
/* internal */
Comment
v0.5.8+commit.23d335f2
bzzr://3b20d297b6c6df5f2e8ebd8d96df59c6ffbb87b4b1dcb4ee70d72710c53a1b75
{ "func_code_index": [ 6810, 7196 ] }
28,814
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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 r...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 104, 168 ] }
28,815
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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 r...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 261, 338 ] }
28,816
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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 r...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 584, 670 ] }
28,817
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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 r...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 971, 1063 ] }
28,818
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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 r...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 1770, 1853 ] }
28,819
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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 r...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 2194, 2300 ] }
28,820
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 290, 496 ] }
28,821
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 805, 958 ] }
28,822
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 1287, 1504 ] }
28,823
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 1789, 2309 ] }
28,824
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 2817, 2966 ] }
28,825
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 3494, 3801 ] }
28,826
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 4298, 4445 ] }
28,827
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
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...
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 4962, 5149 ] }
28,828
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Amon...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 658, 1322 ] }
28,829
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Amon...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 2301, 2727 ] }
28,830
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Amon...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 3538, 3726 ] }
28,831
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Amon...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 3970, 4183 ] }
28,832
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Amon...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 4587, 4830 ] }
28,833
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Amon...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 5100, 5437 ] }
28,834
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ ...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 586, 682 ] }
28,835
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ ...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 1288, 1457 ] }
28,836
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ ...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 1620, 1889 ] }
28,837
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
ZILL
contract ZILL is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; ...
// Contract implementation
LineComment
manualSwap
function manualSwap() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); }
// We are exposing these functions to be able to manual swap and send // in case the token is highly valued and 5M becomes too much
LineComment
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 12085, 12262 ] }
28,838
ZILL
ZILL.sol
0x972bab7a581ef98312386ab42470acff11b09b88
Solidity
ZILL
contract ZILL is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; ...
// Contract implementation
LineComment
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
Unlicense
ipfs://594ef382e3133d0226fe56085c30bd9d9b88b4a214379dc675f0dbb409f81f83
{ "func_code_index": [ 16633, 16671 ] }
28,839
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 251, 437 ] }
28,840
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 707, 896 ] }
28,841
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 1142, 1617 ] }
28,842
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 2080, 2418 ] }
28,843
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 2870, 3027 ] }
28,844
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
TrustlinesNetworkToken
contract TrustlinesNetworkToken { using SafeMath for uint256; // We use MAX_UINT value for an approval of infinite value uint constant MAX_UINT = 2 ** 256 - 1; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; mapping(address...
/* This file incorporates code covered by the following terms: The MIT License (MIT) Copyright (c) 2016-2019 zOS Global Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
Comment
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 1027, 1142 ] }
28,845
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
TrustlinesNetworkToken
contract TrustlinesNetworkToken { using SafeMath for uint256; // We use MAX_UINT value for an approval of infinite value uint constant MAX_UINT = 2 ** 256 - 1; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; mapping(address...
/* This file incorporates code covered by the following terms: The MIT License (MIT) Copyright (c) 2016-2019 zOS Global Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
Comment
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @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.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 1415, 1586 ] }
28,846
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
TrustlinesNetworkToken
contract TrustlinesNetworkToken { using SafeMath for uint256; // We use MAX_UINT value for an approval of infinite value uint constant MAX_UINT = 2 ** 256 - 1; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; mapping(address...
/* This file incorporates code covered by the following terms: The MIT License (MIT) Copyright (c) 2016-2019 zOS Global Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
Comment
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 1938, 2034 ] }
28,847
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
TrustlinesNetworkToken
contract TrustlinesNetworkToken { using SafeMath for uint256; // We use MAX_UINT value for an approval of infinite value uint constant MAX_UINT = 2 ** 256 - 1; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; mapping(address...
/* This file incorporates code covered by the following terms: The MIT License (MIT) Copyright (c) 2016-2019 zOS Global Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
Comment
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, recipient, amount); return true; }
/** * @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.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 2252, 2413 ] }
28,848
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
TrustlinesNetworkToken
contract TrustlinesNetworkToken { using SafeMath for uint256; // We use MAX_UINT value for an approval of infinite value uint constant MAX_UINT = 2 ** 256 - 1; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; mapping(address...
/* This file incorporates code covered by the following terms: The MIT License (MIT) Copyright (c) 2016-2019 zOS Global Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
Comment
approve
function approve(address spender, uint256 value) public returns (bool) { require( value == 0 || _allowances[msg.sender][spender] == 0, "ERC20: approve only to or from 0 value" ); _approve(msg.sender, spender, value); return true; }
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * Approve with a value of `MAX_UINT = 2 ** 256 - 1` will symbolize * an approval of infinite value. * * IMPORTANT:to prevent the risk that someone ma...
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 3085, 3388 ] }
28,849
TrustlinesNetworkToken
TrustlinesNetworkToken.sol
0x679131f591b4f369acb8cd8c51e68596806c3916
Solidity
TrustlinesNetworkToken
contract TrustlinesNetworkToken { using SafeMath for uint256; // We use MAX_UINT value for an approval of infinite value uint constant MAX_UINT = 2 ** 256 - 1; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; mapping(address...
/* This file incorporates code covered by the following terms: The MIT License (MIT) Copyright (c) 2016-2019 zOS Global Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
Comment
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); uint _allowance = _allowances[sender][msg.sender]; if (_allowance < MAX_UINT) { uint updatedAllowance = _allowance.sub(amount); _approve(se...
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance unless the allowance is `MAX_UINT = 2 ** 256 - 1`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. ...
NatSpecMultiLine
v0.5.8+commit.23d335f2
MIT
bzzr://f56f74b3f386b29bcbfa5f1114da3d3e3d43f988c13ac77d86c83a829067047a
{ "func_code_index": [ 3743, 4176 ] }
28,850
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
dividendsOwing
function dividendsOwing(address account) public view returns (uint256) { uint256 newDividendPoints = totalDividendPoints.sub(lastDividendPoints[account]); return depositedWaTokens[account].mul(newDividendPoints).div(pointMultiplier); }
///@return displays the user's share of the pooled waTokens.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 1931, 2194 ] }
28,851
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
setTransmutationPeriod
function setTransmutationPeriod(uint256 newTransmutationPeriod) public onlyGov() { TRANSMUTATION_PERIOD = newTransmutationPeriod; emit TransmuterPeriodUpdated(TRANSMUTATION_PERIOD); }
///@dev set the TRANSMUTATION_PERIOD variable /// /// sets the length (in blocks) of one full distribution phase
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 5045, 5256 ] }
28,852
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
claim
function claim() public { address sender = msg.sender; require(realisedTokens[sender] > 0); uint256 value = realisedTokens[sender]; realisedTokens[sender] = 0; IERC20Burnable(Token).safeTransfer(sender, value); }
///@dev claims the base token after it has been transmuted /// ///This function reverts if there is no realisedToken balance
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 5399, 5666 ] }
28,853
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
unstake
function unstake(uint256 amount) public updateAccount(msg.sender) { // by calling this function before transmuting you forfeit your gained allocation address sender = msg.sender; require(depositedWaTokens[sender] >= amount,"TransmuterD8: unstake amount exceeds deposited amount"); depositedWaTokens[s...
///@dev Withdraws staked waTokens from the transmuter /// /// This function reverts if you try to draw more tokens than you deposited /// ///@param amount the amount of waTokens to unstake
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 5883, 6405 ] }
28,854
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
stake
function stake(uint256 amount) public runPhasedDistribution() updateAccount(msg.sender) checkIfNewUser() { // requires approval of waToken first address sender = msg.sender; //require tokens transferred in; IERC20Burnable(WaToken).safeTransferFrom(sender, address(this), amount);...
///@dev Deposits waTokens into the transmuter /// ///@param amount the amount of waTokens to stake
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 6520, 7028 ] }
28,855
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
transmute
function transmute() public runPhasedDistribution() updateAccount(msg.sender) { address sender = msg.sender; uint256 pendingz = tokensInBucket[sender]; uint256 diff; require(pendingz > 0, "need to have pending in bucket"); tokensInBucket[sender] = 0; // check bucket overflow if ...
/// @dev Converts the staked waTokens to the base tokens in amount of the sum of pendingdivs and tokensInBucket /// /// once the waToken has been converted, it is burned, and the base token becomes realisedTokens which can be recieved using claim() /// /// reverts if there are no pendingdivs or tokensInBucket
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 7365, 8369 ] }
28,856
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
forceTransmute
function forceTransmute(address toTransmute) public runPhasedDistribution() updateAccount(msg.sender) updateAccount(toTransmute) { //load into memory address sender = msg.sender; uint256 pendingz = tokensInBucket[toTransmute]; // check restrictions require( pending...
/// @dev Executes transmute() on another account that has had more base tokens allocated to it than waTokens staked. /// /// The caller of this function will have the surlus base tokens credited to their tokensInBucket balance, rewarding them for performing this action /// /// This function reverts if the address to tr...
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 8831, 10310 ] }
28,857
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
exit
function exit() public { transmute(); uint256 toWithdraw = depositedWaTokens[msg.sender]; unstake(toWithdraw); }
/// @dev Transmutes and unstakes all waTokens /// /// This function combines the transmute and unstake functions for ease of use
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 10457, 10606 ] }
28,858
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
transmuteAndClaim
function transmuteAndClaim() public { transmute(); claim(); }
/// @dev Transmutes and claims all converted base tokens. /// /// This function combines the transmute and claim functions while leaving your remaining WaTokens staked.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 10793, 10882 ] }
28,859
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
transmuteClaimAndWithdraw
function transmuteClaimAndWithdraw() public { transmute(); claim(); uint256 toWithdraw = depositedWaTokens[msg.sender]; unstake(toWithdraw); }
/// @dev Transmutes, claims base tokens, and withdraws waTokens. /// /// This function helps users to exit the transmuter contract completely after converting their WaTokens to the base pair.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 11092, 11280 ] }
28,860
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
distribute
function distribute(address origin, uint256 amount) public onlyWhitelisted() runPhasedDistribution() { IERC20Burnable(Token).safeTransferFrom(origin, address(this), amount); buffer = buffer.add(amount); }
/// @dev Distributes the base token proportionally to all waToken stakers. /// /// This function is meant to be called by the Alchemist contract for when it is sending yield to the transmuter. /// Anyone can call this and add funds, idk why they would do that though... /// /// @param origin the account that is sending ...
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 11749, 11981 ] }
28,861
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
increaseAllocations
function increaseAllocations(uint256 amount) internal { if(totalSupplyWaTokens > 0 && amount > 0) { totalDividendPoints = totalDividendPoints.add( amount.mul(pointMultiplier).div(totalSupplyWaTokens) ); unclaimedDividends = unclaimedDividends.add(amount); } else { ...
/// @dev Allocates the incoming yield proportionally to all waToken stakers. /// /// @param amount the amount of base tokens to be distributed in the transmuter.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 12161, 12564 ] }
28,862
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
userInfo
function userInfo(address user) public view returns ( uint256 depositedAl, uint256 pendingdivs, uint256 inbucket, uint256 realised ) { uint256 _depositedAl = depositedWaTokens[user]; uint256 _toDistribute = buffer.mul(block.number.sub(lastDepositBlock))...
/// @dev Gets the status of a user's staking position. /// /// The total amount allocated to a user is the sum of pendingdivs and inbucket. /// /// @param user the address of the user you wish to query. /// /// returns user status
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 12835, 13655 ] }
28,863
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
getMultipleUserInfo
function getMultipleUserInfo(uint256 from, uint256 to) public view returns (address[] memory theUserList, uint256[] memory theUserData) { uint256 i = from; uint256 delta = to - from; address[] memory _theUserList = new address[](delta); //user uint256[] memory _theUserData = new uint...
/// @dev Gets the status of multiple users in one call /// /// This function is used to query the contract to check for /// accounts that have overfilled positions in order to check /// who can be force transmuted. /// /// @param from the first index of the userList /// @param to the last index of the userList /// /// ...
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 14094, 15178 ] }
28,864
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
bufferInfo
function bufferInfo() public view returns (uint256 _toDistribute, uint256 _deltaBlocks, uint256 _buffer){ _deltaBlocks = block.number.sub(lastDepositBlock); _buffer = buffer; _toDistribute = _buffer.mul(_deltaBlocks).div(TRANSMUTATION_PERIOD); }
/// @dev Gets info on the buffer /// /// This function is used to query the contract to get the /// latest state of the buffer /// /// @return _toDistribute the amount ready to be distributed /// @return _deltaBlocks the amount of time since the last phased distribution /// @return _buffer the amount in the buffer
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 15537, 15819 ] }
28,865
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
setPendingGovernance
function setPendingGovernance(address _pendingGovernance) external onlyGov { require(_pendingGovernance != ZERO_ADDRESS, "TransmuterD8: 0 gov"); pendingGovernance = _pendingGovernance; emit PendingGovernanceUpdated(_pendingGovernance); }
/// @dev Sets the pending governance. /// /// This function reverts if the new pending governance is the zero address or the caller is not the current /// governance. This is to prevent the contract governance being set to the zero address which would deadlock /// privileged contract functionality. /// /// @param _pend...
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 16219, 16497 ] }
28,866
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
acceptGovernance
function acceptGovernance() external { require(msg.sender == pendingGovernance,"!pendingGovernance"); address _pendingGovernance = pendingGovernance; governance = _pendingGovernance; emit GovernanceUpdated(_pendingGovernance); }
/// @dev Accepts the role as governance. /// /// This function reverts if the caller is not the new pending governance.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 16635, 16912 ] }
28,867
TransmuterD8
contracts/TransmuterD8.sol
0x68e91df501ab66a0796d0fd164b907acf5f89ad0
Solidity
TransmuterD8
contract TransmuterD8 is Context { using SafeMath for uint256; using SafeERC20 for IERC20Burnable; using Address for address; address public constant ZERO_ADDRESS = address(0); uint256 public TRANSMUTATION_PERIOD; address public WaToken; address public Token; mapping(addres...
/** * @dev Implementation of the {IERC20Burnable} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup...
NatSpecMultiLine
setWhitelist
function setWhitelist(address _toWhitelist, bool _state) external onlyGov { whiteList[_toWhitelist] = _state; }
/// This function reverts if the caller is not governance /// /// @param _toWhitelist the account to mint tokens to. /// @param _state the whitelist state.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://d948efd5c76c13a3c34e9756967c683be59edfa8d3fe40b899a7cce73022399e
{ "func_code_index": [ 17093, 17223 ] }
28,868
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
function() { revert(); }
// Throw on default handler to prevent direct transactions of Ether
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 1882, 1917 ] }
28,869
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
changeFee
function changeFee(uint _fee) onlyOwner { require(_fee <= fee); fee = _fee; }
// Fee can only be decreased!
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 2534, 2627 ] }
28,870
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
getAccountModifiers
function getAccountModifiers() constant returns(uint takeFeeDiscount, uint rebatePercentage) { if (accountModifiers != address(0)) { return AccountModifiersInterface(accountModifiers).accountModifiers(msg.sender); } else { return (0, 0); } }
// Allows a user to get her current discount/rebate
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 2685, 2961 ] }
28,871
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
deposit
function deposit() payable deprecable { tokens[0][msg.sender] = safeAdd(tokens[0][msg.sender], msg.value); Deposit(0, msg.sender, msg.value, tokens[0][msg.sender]); }
////////////////////////////////////////////////////////////////////////////////
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 3172, 3354 ] }
28,872
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
trade
function trade(address _tokenGet, uint _amountGet, address _tokenGive, uint _amountGive, uint _expires, uint _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s, uint _amount) { bytes32 hash = sha256(this, _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce); // Check order signatures and ex...
// Note: Order creation happens off-chain but the orders are signed by creators, // we validate the contents and the creator address in the logic below
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 4980, 5844 ] }
28,873
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
migrateFunds
function migrateFunds(address[] _tokens) { // Get the latest successor in the chain require(successor != address(0)); TokenStore newExchange = TokenStore(successor); for (uint16 n = 0; n < 20; n++) { // We will look past 20 contracts in the future address nextSuccessor = newExchange.successor(); ...
// User-triggered (!) fund migrations in case contract got updated // Similar to withdraw but we use a successor account instead // As we don't store user tokens list on chain, it has to be passed from the outside
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 9949, 11250 ] }
28,874
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
TokenStore
contract TokenStore is SafeMath, Ownable { // The account that will receive fees address feeAccount; // The account that stores fee discounts/rebates address accountModifiers; // Trade tracker account address tradeTracker; // We charge only the takers and this is the fee, percentage times 1...
// Exchange contract
LineComment
depositForUser
function depositForUser(address _user) payable deprecable { require(_user != address(0)); require(msg.value > 0); TokenStore caller = TokenStore(msg.sender); require(caller.version() > 0); // Make sure it's an exchange account tokens[0][_user] = safeAdd(tokens[0][_user], msg.value); }
// This is used for migrations only. To be called by previous exchange only, // user-triggered, on behalf of the user called the migrateFunds method. // Note that it does exactly the same as depositToken, but as this is called // by a previous generation of exchange itself, we credit internally not the // previous exch...
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 11626, 11942 ] }
28,875
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
InstantTrade
contract InstantTrade is SafeMath, Ownable { // This is needed so we can withdraw funds from other smart contracts function() payable { } // End to end trading in a single call function instantTrade(address _tokenGet, uint _amountGet, address _tokenGive, uint _amountGive, uint _expires, uint...
function() payable { }
// This is needed so we can withdraw funds from other smart contracts
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 121, 149 ] }
28,876
InstantTrade
InstantTrade.sol
0xe17dbb844ba602e189889d941d1297184ce63664
Solidity
InstantTrade
contract InstantTrade is SafeMath, Ownable { // This is needed so we can withdraw funds from other smart contracts function() payable { } // End to end trading in a single call function instantTrade(address _tokenGet, uint _amountGet, address _tokenGive, uint _amountGive, uint _expires, uint...
instantTrade
function instantTrade(address _tokenGet, uint _amountGet, address _tokenGive, uint _amountGive, uint _expires, uint _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s, uint _amount, address _store) payable { // Fix max fee (0.4%) and always reserve it uint totalValue = safeMul(_amount, 1004) / 100...
// End to end trading in a single call
LineComment
v0.4.24+commit.e67f0147
bzzr://81a354272428a9b8d3f961d3793825f26e08c07debe709d8815e1c110f5698c2
{ "func_code_index": [ 196, 1985 ] }
28,877
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
totalBalance
function totalBalance() public view returns(uint256) { return address(this).balance + bitx.myDividends(true); }
// Contract's total ETH balance including divs
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 431, 549 ] }
28,878
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
buyTokens
function buyTokens(address referrer) public payable onlyParent { bitx.buy.value(msg.value)(referrer); }
// Buy BITX from given ether
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 583, 693 ] }
28,879
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
buyTokensFromBalance
function buyTokensFromBalance(address referrer, uint256 amount) public onlyParent { if (address(this).balance < amount) { bitx.withdraw(); } bitx.buy.value(amount)(referrer); }
// Buy BITX from own ether balance
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 733, 926 ] }
28,880
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
sellTokens
function sellTokens(uint256 amount) public onlyParent { if (amount > 0) { bitx.sell(amount); } }
// Sell a specified amount of BITX for ether
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 976, 1086 ] }
28,881
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
withdrawDivs
function withdrawDivs() public onlyParent { bitx.withdraw(); }
// Withdraw outstanding divs to internal balance
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 1140, 1209 ] }
28,882
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
sendETH
function sendETH(address payable to, uint256 amount) public onlyParent { if (address(this).balance < amount) { bitx.withdraw(); } to.transfer(amount); }
// Send eth from internal balance to a specified account
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 1271, 1440 ] }
28,883
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
function() payable external { require(msg.sender == address(bitx) || msg.sender == parent, "No, I don't accept donations"); }
// Only allow ETH from our master or from the bitx.
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 1497, 1629 ] }
28,884
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
tokenFallback
function tokenFallback(address from, uint value, bytes memory data) public pure { revert("I don't want your shitcoins!"); }
// Reject possible accidental sendin of higher-tech shitcoins.
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 1697, 1827 ] }
28,885
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGoldReferralHandler
contract BitGoldReferralHandler { using SafeMath for uint256; using SafeMath for uint; address internal parent; BITX internal bitx; constructor(BITX h) public { bitx = h; parent = msg.sender; } // Don't expose this account to literally everyone modifier onlyParent { require(msg.sender == pa...
// This contract is intended to only be used by BitGold. Think of this as BitGold's second account (or child slave with its own account)
LineComment
takeShitcoin
function takeShitcoin(address shitCoin) public { require(shitCoin != address(bitx), "BITX isn't a shitcoin"); ERC20interface s = ERC20interface(shitCoin); s.transfer(msg.sender, s.balanceOf(address(this))); }
// Allow anyone else to take forcefully sent low-tech shitcoins. (I sure as hell don't want them)
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 1930, 2151 ] }
28,886
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
setNewOwner
function setNewOwner(address o) public onlyOwner { newOwner = o; }
// --Events-- // --Owner only functions
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 3617, 3690 ] }
28,887
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
rebrand
function rebrand(string memory n, string memory s) public onlyOwner { name = n; symbol = s; }
// BXTG allows re-branding.
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 3825, 3928 ] }
28,888
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
setReferralRequirement
function setReferralRequirement(uint256 r) public onlyOwner { referralRequirement = r; }
// BXTG selling point: _lower staking requirement than BITX!!_
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 3996, 4091 ] }
28,889
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
allowIgnoreTokenFallback
function allowIgnoreTokenFallback() public onlyOwner { ignoreTokenFallbackEnable = true; }
// Enables the function defined below.
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 4135, 4232 ] }
28,890
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
ignoreTokenFallback
function ignoreTokenFallback(address to, bool ignore) public { require(ignoreTokenFallbackEnable, "This function is disabled"); ignoreTokenFallbackList[msg.sender][to] = ignore; }
// --Owner only functions-- // --Public write functions // Ethereum _might_ implement something where every address, including ones controlled by humans, is a smart contract. // Obviously transfering BXTG to other people with no fee is one of its selling points. // A somewhat future-proofing fix is for the sender to sp...
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 4714, 4903 ] }
28,891
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
transfer
function transfer(address payable to, uint value, bytes memory data, string memory func) public returns(bool) { actualTransfer(msg.sender, to, value, data, func, true); return true; }
// Transfer tokens to the specified address, call the specified function, and pass the specified data
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 5010, 5203 ] }
28,892
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
transfer
function transfer(address payable to, uint value, bytes memory data) public returns(bool) { actualTransfer(msg.sender, to, value, data, "", true); return true; }
// Transfer tokens to the specified address, call tokenFallback, and pass the specified data
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 5301, 5472 ] }
28,893
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
transfer
function transfer(address payable to, uint value) public returns(bool) { actualTransfer(msg.sender, to, value, "", "", !ignoreTokenFallbackList[msg.sender][to]); return true; }
// Transfer tokens to the specified address, call tokenFallback if applicable
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 5555, 5741 ] }
28,894
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
approve
function approve(address spender, uint value) public returns(bool) { require(updateUsableBalanceOf(msg.sender) >= value, "Insufficient balance to approve"); allowances[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
// Allow someone else to spend your tokens
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 5789, 6060 ] }
28,895
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
transferFrom
function transferFrom(address payable from, address payable to, uint value) public returns(bool success) { uint256 allowance = allowances[from][msg.sender]; require(allowance > 0, "Not approved"); require(allowance >= value, "Over spending limit"); allowances[from][msg.sender] = allowance.sub(value); actualTr...
// Have that someone else spend your tokens
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 6109, 6495 ] }
28,896
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
function() payable external{ // Only accept free ETH from the bitx and from our child slave. if (msg.sender != address(bitx) && msg.sender != address(refHandler)) { // Now, sending ETH increases the balance _before_ the transaction has been fully processed. // We don't want to distribute the entire purchase o...
// The fallback function
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 6525, 7086 ] }
28,897
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
acquireGauntlet
function acquireGauntlet(uint256 amount, uint8 gType, uint256 end) public{ require(amount <= balances[msg.sender], "Insufficient balance"); // We need to apply the data first in order to prevent re-entry attacks. // ExternalGauntletInterface.gauntletRequirement _is_ a function which can change the state, after ...
// Worried about having weak hands? Put on an optional gauntlet. // Prevents you from selling or transfering a specified amount of tokens
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 7231, 9461 ] }
28,898
BitGold
BitGold.sol
0xe3d9c7bf38a77215d215b1eef8acb1d01a6ec99b
Solidity
BitGold
contract BitGold { using SafeMath for uint256; using SafeMath for uint; using SafeMath for int256; modifier onlyOwner { require(msg.sender == owner); _; } // Make the thing constructor(address h) public { // Set up ERC20 values name = "BitX Gold"; symbol = "BXTG"; decimals = 18; t...
buy
function buy(address referrerAddress) payable public returns(uint256) { // Now, sending ETH increases the balance _before_ the transaction has been fully processed. // We don't want to distribute the entire purchase order as dividends. if (msg.value > 0) { lastTotalBalance += msg.value; distributeDividends(...
// Throw your money at this thing with a referrer specified by their Ethereum address. // Returns the amount of tokens created.
LineComment
v0.5.1+commit.c8a2cb62
None
bzzr://1f3aca5d091a9bf9aa242606e6cef2be07f377d81f6a263da2c3bd3cf62de4ce
{ "func_code_index": [ 9735, 10194 ] }
28,899