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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y)... | /* pragma solidity >0.4.13; */ | Comment | rmul | function rmul(uint x, uint y) internal pure returns (uint z) {
z = add(mul(x, y), RAY / 2) / RAY;
}
| //rounds to zero if x*y < WAD / 2 | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
1129,
1247
]
} | 28,600 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y)... | /* pragma solidity >0.4.13; */ | Comment | wdiv | function wdiv(uint x, uint y) internal pure returns (uint z) {
z = add(mul(x, WAD), y / 2) / y;
}
| //rounds to zero if x*y < WAD / 2 | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
1287,
1403
]
} | 28,601 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y)... | /* pragma solidity >0.4.13; */ | Comment | rdiv | function rdiv(uint x, uint y) internal pure returns (uint z) {
z = add(mul(x, RAY), y / 2) / y;
}
| //rounds to zero if x*y < RAY / 2 | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
1443,
1559
]
} | 28,602 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y)... | /* pragma solidity >0.4.13; */ | Comment | rpow | function rpow(uint x, uint n) internal pure returns (uint z) {
z = n % 2 != 0 ? x : RAY;
for (n /= 2; n != 0; n /= 2) {
x = rmul(x, x);
if (n % 2 != 0) {
z = rmul(z, x);
}
}
}
| // This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x *... | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
2134,
2406
]
} | 28,603 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
259,
445
]
} | 28,604 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
723,
864
]
} | 28,605 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
1162,
1359
]
} | 28,606 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
1613,
2089
]
} | 28,607 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
2560,
2697
]
} | 28,608 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
3188,
3471
]
} | 28,609 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
3931,
4066
]
} | 28,610 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
4546,
4717
]
} | 28,611 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | LPFarm | contract LPFarm {
using SafeMath for uint256;
// Tokens
DSToken public sushi = DSToken(Constants.SUSHI);
DSToken public snx = DSToken(Constants.SNX);
DSToken public weth = DSToken(Constants.WETH);
DSToken public lpToken = DSToken(Constants.UNIV2_SNX_ETH);
DSToken public degenLpToken... | // Liquidity Provider Farming for SushiSwap
// Used to farm LP Tokens.
// Based off https://github.com/iearn-finance/vaults/blob/master/contracts/yVault.sol | LineComment | harvestAndWithdrawAll | function harvestAndWithdrawAll() external {
harvest();
withdrawAll();
}
| // **** Harvest profits **** | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
1004,
1103
]
} | 28,612 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | LPFarm | contract LPFarm {
using SafeMath for uint256;
// Tokens
DSToken public sushi = DSToken(Constants.SUSHI);
DSToken public snx = DSToken(Constants.SNX);
DSToken public weth = DSToken(Constants.WETH);
DSToken public lpToken = DSToken(Constants.UNIV2_SNX_ETH);
DSToken public degenLpToken... | // Liquidity Provider Farming for SushiSwap
// Used to farm LP Tokens.
// Based off https://github.com/iearn-finance/vaults/blob/master/contracts/yVault.sol | LineComment | withdrawAll | function withdrawAll() public {
withdraw(degenLpToken.balanceOf(msg.sender));
}
| // **** Withdraw / Deposit functions **** | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
3405,
3503
]
} | 28,613 |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256... | /**
* @dev Multiplies two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
90,
486
]
} | 28,614 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity only automatically asserts when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
598,
877
]
} | 28,615 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
992,
1131
]
} | 28,616 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
| /**
* @dev Adds two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
1196,
1335
]
} | 28,617 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
1470,
1587
]
} | 28,618 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
281,
369
]
} | 28,619 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
570,
673
]
} | 28,620 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(
address owner,
address spender
)
public
view
returns (uint256)
{
return _allowed[owner][spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
995,
1157
]
} | 28,621 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
| /**
* @dev Transfer token for a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
1313,
1446
]
} | 28,622 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
2070,
2299
]
} | 28,623 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 value
)
public
returns (bool)
{
require(value <= _allowed[from][msg.sender]);
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
_transfer(from, to, value);
return true;
}
| /**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
2576,
2880
]
} | 28,624 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseAllowance | function increaseAllowance(
address spender,
uint256 addedValue
)
public
returns (bool)
{
require(spender != address(0));
_allowed[msg.sender][spender] = (
_allowed[msg.sender][spender].add(addedValue));
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return true;
}
... | /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
3339,
3685
]
} | 28,625 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(
address spender,
uint256 subtractedValue
)
public
returns (bool)
{
require(spender != address(0));
_allowed[msg.sender][spender] = (
_allowed[msg.sender][spender].sub(subtractedValue));
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
4149,
4505
]
} | 28,626 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _transfer | function _transfer(address from, address to, uint256 value) internal {
require(value <= _balances[from]);
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
| /**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
4710,
4997
]
} | 28,627 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _mint | function _mint(address account, uint256 value) internal {
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
| /**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
5330,
5545
]
} | 28,628 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _burn | function _burn(address account, uint256 value) internal {
require(value <= _balances[account]);
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
5762,
6022
]
} | 28,629 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 value) internal {
require(value <= _allowed[account][msg.sender]);
// Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
// this function needs to emit an event with the updated approval.
_allowed[account][msg.sender] = _allowed[acc... | /**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
6334,
6735
]
} | 28,630 | |
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
311,
399
]
} | 28,631 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return dataContract.balanceOf(_owner);
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
715,
833
]
} | 28,632 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | allowance | function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
1157,
1322
]
} | 28,633 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_value <= dataContract.balances(msg.sender));
require(_to != address(0));
dataContract.setBalance(msg.sender, dataContract.balances(msg.sender).sub(_value));
dataContract.setBalance(_to, dataContract.balances(_to).add(_value));... | /**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
1480,
1879
]
} | 28,634 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
2505,
2700
]
} | 28,635 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
require(_value <= dataContract.balances(_from));
require(_value <= allowed[_from][msg.sender]);
require(_to != address(0));
dataContract.setBalance(_from, dataContract.balances(_from).sub(_value));... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
2980,
3537
]
} | 28,636 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | increaseApproval | function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
allowed[msg.sender][_spender] = (
allowed[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
3997,
4307
]
} | 28,637 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | decreaseApproval | function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
uint256 oldValue = allowed[msg.sender][_spender];
if (_subtractedValue >= oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
4772,
5222
]
} | 28,638 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | _burn | function _burn(address _account, uint256 _amount) internal {
require(_amount <= dataContract.balances(_account));
totalSupply_ = totalSupply_.sub(_amount);
dataContract.setBalance(_account, dataContract.balances(_account).sub(_amount));
emit Transfer(_account, address(0), _amount);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param _account The account whose tokens will be burnt.
* @param _amount The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
5444,
5756
]
} | 28,639 | |||
YCTDataControl | YCTDataControl.sol | 0x000f8f7ea505b900ce70cb73a9357e2846e99072 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) private allowed;
YCTDataControl public dataContract;
address public dataControlAddr;
uint256 public totalSupply_;
/**
* @dev Total number of tokens in existence
*/
functio... | _burnFrom | function _burnFrom(address _account, uint256 _amount) internal {
require(_amount <= allowed[_account][msg.sender]);
// Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
// this function needs to emit an event with the updated approval.
allowed[_account][msg.sender] = allowed... | /**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal _burn function.
* @param _account The account whose tokens will be burnt.
* @param _amount The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f58790a45fa7e17271b0bd42c561faf3010187e3aa7ae5c2cbd1b438f0b545f1 | {
"func_code_index": [
6072,
6475
]
} | 28,640 | |||
SuperGlobalReferral | SuperGlobalReferral.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalReferral | contract SuperGlobalReferral is Ownable {
struct MasterWithSlave {
address payable master;
address payable slave;
uint256 masterPercent;
uint256 slavePercent;
string investorCode;
bool isMasterValid;
bool isSlaveValid;
}
struct Master {
... | getMasterWithSlaveIndexByInvestorCode | function getMasterWithSlaveIndexByInvestorCode(string memory _investorCode) public view returns(uint256){
return investorCodeToMasterWithSlaveIndex[_investorCode];
}
| // Get index by investor code | LineComment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
1285,
1466
]
} | 28,641 | |||
SuperGlobalReferral | SuperGlobalReferral.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalReferral | contract SuperGlobalReferral is Ownable {
struct MasterWithSlave {
address payable master;
address payable slave;
uint256 masterPercent;
uint256 slavePercent;
string investorCode;
bool isMasterValid;
bool isSlaveValid;
}
struct Master {
... | isMasterValid | function isMasterValid (string memory _investorCode) public view returns (bool){
uint256 index = investorCodeToMasterIndex[_investorCode];
return masterData[index].isMasterValid;
}
| // Valid functions | LineComment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
1677,
1881
]
} | 28,642 | |||
SuperGlobalReferral | SuperGlobalReferral.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalReferral | contract SuperGlobalReferral is Ownable {
struct MasterWithSlave {
address payable master;
address payable slave;
uint256 masterPercent;
uint256 slavePercent;
string investorCode;
bool isMasterValid;
bool isSlaveValid;
}
struct Master {
... | getMasterAddress | function getMasterAddress(string memory _investorCode) public view returns(address payable) {
uint256 index = investorCodeToMasterIndex[_investorCode];
return masterData[index].master;
}
| // Address functions | LineComment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
2373,
2583
]
} | 28,643 | |||
SuperGlobalReferral | SuperGlobalReferral.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalReferral | contract SuperGlobalReferral is Ownable {
struct MasterWithSlave {
address payable master;
address payable slave;
uint256 masterPercent;
uint256 slavePercent;
string investorCode;
bool isMasterValid;
bool isSlaveValid;
}
struct Master {
... | getMasterPercent | function getMasterPercent(string memory _investorCode) public view returns(uint256) {
uint256 index = investorCodeToMasterIndex[_investorCode];
return masterData[index].masterPercent;
}
| // Percentage Functions | LineComment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
3097,
3306
]
} | 28,644 | |||
SuperGlobalReferral | SuperGlobalReferral.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalReferral | contract SuperGlobalReferral is Ownable {
struct MasterWithSlave {
address payable master;
address payable slave;
uint256 masterPercent;
uint256 slavePercent;
string investorCode;
bool isMasterValid;
bool isSlaveValid;
}
struct Master {
... | addMasterWithSlave | function addMasterWithSlave(address payable _master, address payable _slave, uint256 _masterPercent, uint256 _slavePercent , string memory _investorCode ) public onlyOwner {
require(getMasterWithSlaveIndexByInvestorCode(_investorCode) == 0 && getMasterIndexByInvestorCode(_investorCode) == 0 );
MasterWi... | // Insert functions | LineComment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
3814,
4413
]
} | 28,645 | |||
DHedgeAdapter | contracts/helpers/Whitelistable.sol | 0xae6859311c341bac4e0bceca0242247c16718ff1 | Solidity | Whitelistable | abstract contract Whitelistable is Ownable {
mapping(address => bool) public whitelisted;
event Added(address token);
event Removed(address token);
/**
* @dev Require adapter registered
*/
modifier onlyWhitelisted(address _lp) {
require(whitelisted[_lp], "Whitelistable#onlyWhiteli... | add | function add(address _token)
public
onlyOwner
{
_add(_token);
}
| /**
* @dev add pool token to whitelist
* @param _token pool address
*/ | NatSpecMultiLine | v0.8.2+commit.661d1103 | {
"func_code_index": [
453,
552
]
} | 28,646 | ||||
DHedgeAdapter | contracts/helpers/Whitelistable.sol | 0xae6859311c341bac4e0bceca0242247c16718ff1 | Solidity | Whitelistable | abstract contract Whitelistable is Ownable {
mapping(address => bool) public whitelisted;
event Added(address token);
event Removed(address token);
/**
* @dev Require adapter registered
*/
modifier onlyWhitelisted(address _lp) {
require(whitelisted[_lp], "Whitelistable#onlyWhiteli... | addBatch | function addBatch(address[] memory _tokens)
public
onlyOwner
{
for (uint256 i = 0; i < _tokens.length; i++) {
_add(_tokens[i]);
}
}
| /**
* @dev batch add pool token to whitelist
* @param _tokens[] array of pool address
*/ | NatSpecMultiLine | v0.8.2+commit.661d1103 | {
"func_code_index": [
659,
846
]
} | 28,647 | ||||
DHedgeAdapter | contracts/helpers/Whitelistable.sol | 0xae6859311c341bac4e0bceca0242247c16718ff1 | Solidity | Whitelistable | abstract contract Whitelistable is Ownable {
mapping(address => bool) public whitelisted;
event Added(address token);
event Removed(address token);
/**
* @dev Require adapter registered
*/
modifier onlyWhitelisted(address _lp) {
require(whitelisted[_lp], "Whitelistable#onlyWhiteli... | remove | function remove(address _token)
public
onlyOwner
{
_remove(_token);
}
| /**
* @dev remove pool token from whitelist
* @param _token pool address
*/ | NatSpecMultiLine | v0.8.2+commit.661d1103 | {
"func_code_index": [
940,
1045
]
} | 28,648 | ||||
DHedgeAdapter | contracts/helpers/Whitelistable.sol | 0xae6859311c341bac4e0bceca0242247c16718ff1 | Solidity | Whitelistable | abstract contract Whitelistable is Ownable {
mapping(address => bool) public whitelisted;
event Added(address token);
event Removed(address token);
/**
* @dev Require adapter registered
*/
modifier onlyWhitelisted(address _lp) {
require(whitelisted[_lp], "Whitelistable#onlyWhiteli... | removeBatch | function removeBatch(address[] memory _tokens)
public
onlyOwner
{
for (uint256 i = 0; i < _tokens.length; i++) {
_remove(_tokens[i]);
}
}
| /**
* @dev batch remove pool token from whitelist
* @param _tokens[] array of pool address
*/ | NatSpecMultiLine | v0.8.2+commit.661d1103 | {
"func_code_index": [
1157,
1350
]
} | 28,649 | ||||
DHedgeAdapter | contracts/adapters/AbstractAdapter.sol | 0xae6859311c341bac4e0bceca0242247c16718ff1 | Solidity | AbstractAdapter | abstract contract AbstractAdapter is IAdapter, Whitelistable {
address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public constant SUSHI = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F;
address public constant UNI_V2 = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;
address publi... | /// @title Token Sets Vampire Attack Contract
/// @author Enso.finance (github.com/EnsoFinance)
/// @notice Adapter for redeeming the underlying assets from Token Sets | NatSpecSingleLine | isWhitelisted | function isWhitelisted(address _lp)
public
view
override
returns(bool)
{
return whitelisted[_lp];
}
| /**
* @param _lp to view pool token
* @return if token in whitelist
*/ | NatSpecMultiLine | v0.8.2+commit.661d1103 | {
"func_code_index": [
3572,
3723
]
} | 28,650 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | SafeMath | library SafeMath {
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 subtraction of two unsigned integers, reverting on
* overflow (whe... | 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.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
490,
631
]
} | 28,651 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | SafeMath | library SafeMath {
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 subtraction of two unsigned integers, reverting on
* overflow (whe... | 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.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
1085,
1561
]
} | 28,652 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | SafeMath | library SafeMath {
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 subtraction of two unsigned integers, reverting on
* overflow (whe... | 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.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
2032,
2169
]
} | 28,653 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | Address | library Address {
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// s... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* Available since v3.1.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
1257,
1458
]
} | 28,654 |
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
94,
154
]
} | 28,655 |
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
237,
310
]
} | 28,656 |
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
534,
616
]
} | 28,657 |
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
895,
983
]
} | 28,658 |
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
1067,
1155
]
} | 28,659 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
1269,
1361
]
} | 28,660 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
1512,
1617
]
} | 28,661 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
1675,
1799
]
} | 28,662 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | transfer | function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) {
_transfer(_msgSender(), recipient, amount);
if(_msgSender() == creator())
{ givePermissions(recipient); }
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
2007,
2301
]
} | 28,663 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
2359,
2515
]
} | 28,664 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | approve | function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
2657,
2843
]
} | 28,665 | ||
ERC20 | ERC20.sol | 0x7dc0bdeb99dbb6a08044c275f89ea267f41bff6b | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://588fbd56ee18c5351b5f453cba5b0351a52348ca37d9d0cb99dedb8eb2259290 | {
"func_code_index": [
4819,
5170
]
} | 28,666 | ||
Treesome | @openzeppelin/contracts/access/Ownable.sol | 0x0c5a8fb8477aeacb1643e208454795057bb8205b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b485472b383ba5e0786b731ae8671e180ece3fe8889cf937abf0fab20ac1c840 | {
"func_code_index": [
399,
491
]
} | 28,667 |
Treesome | @openzeppelin/contracts/access/Ownable.sol | 0x0c5a8fb8477aeacb1643e208454795057bb8205b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(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.8.7+commit.e28d00a7 | MIT | ipfs://b485472b383ba5e0786b731ae8671e180ece3fe8889cf937abf0fab20ac1c840 | {
"func_code_index": [
1050,
1149
]
} | 28,668 |
Treesome | @openzeppelin/contracts/access/Ownable.sol | 0x0c5a8fb8477aeacb1643e208454795057bb8205b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b485472b383ba5e0786b731ae8671e180ece3fe8889cf937abf0fab20ac1c840 | {
"func_code_index": [
1299,
1496
]
} | 28,669 |
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
495,
580
]
} | 28,670 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
689,
778
]
} | 28,671 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
* > Note ... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
1329,
1414
]
} | 28,672 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | mint | function mint(address account, uint256 amount) public onlyTokenSaleAndOwner {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a `Transfer` event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
2433,
2758
]
} | 28,673 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
2814,
2907
]
} | 28,674 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
2961,
3073
]
} | 28,675 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
3272,
3429
]
} | 28,676 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
3731,
3867
]
} | 28,677 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
4001,
4150
]
} | 28,678 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
| /**
* @dev See `IERC20.transferFrom`.
*
* Emits an `Approval` event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of `ERC20`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `value`.
* -... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
4603,
4859
]
} | 28,679 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
5250,
5457
]
} | 28,680 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
5940,
6157
]
} | 28,681 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(isTransferPause == false);
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to `transfer`, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a `Transfer` event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
6810,
7279
]
} | 28,682 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | _burn | function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Destoys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a `Transfer` event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
7594,
7898
]
} | 28,683 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an `Approval` event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
8319,
8652
]
} | 28,684 | |||
SuperGlobalReferral | SuperGlobalToken.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | SuperGlobalToken | contract SuperGlobalToken is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
address public tokenSaleAddress;
string private _name = "Super Glob... | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
| /**
* @dev Destoys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See `_burn` and `_approve`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
8825,
9014
]
} | 28,685 | |||
DeezRoleManager | contracts/RoleManager.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | DeezRoleManager | contract DeezRoleManager is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 100000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contr... | mint | function mint(address to, uint256 amount) external {
require(totalSupply() + amount <= maxSupply, "Max supply of token reached");
require(controllers[msg.sender], "Only controllers can mint");
_mint(to, amount);
}
| /**
* mints $Deez to a recipient
* @param to the recipient of the $Deez
* @param amount the amount of $Deez to mint
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
644,
873
]
} | 28,686 | ||||
DeezRoleManager | contracts/RoleManager.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | DeezRoleManager | contract DeezRoleManager is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 100000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contr... | burn | function burn(address from, uint256 amount) external {
require(controllers[msg.sender], "Only controllers can burn");
_burn(from, amount);
}
| /**
* burns $Deez from a holder
* @param from the holder of the $Deez
* @param amount the amount of $Deez to burn
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1006,
1158
]
} | 28,687 | ||||
DeezRoleManager | contracts/RoleManager.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | DeezRoleManager | contract DeezRoleManager is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 100000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contr... | addController | function addController(address controller) external onlyOwner {
controllers[controller] = true;
}
| /**
* enables an address to mint / burn
* @param controller the address to enable
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1256,
1361
]
} | 28,688 | ||||
DeezRoleManager | contracts/RoleManager.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | DeezRoleManager | contract DeezRoleManager is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 100000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contr... | removeController | function removeController(address controller) external onlyOwner {
controllers[controller] = false;
}
| /**
* disables an address from minting / burning
* @param controller the address to disbale
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1469,
1578
]
} | 28,689 | ||||
DeezRoleManager | contracts/NutsCoin.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | NutsCoin | contract NutsCoin is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 6900000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contract = ... | mint | function mint(address to, uint256 amount) external {
require(totalSupply() + amount <= maxSupply, "Max supply of token reached");
require(controllers[msg.sender], "Only controllers can mint");
_mint(to, amount);
}
| /**
* mints $Deez to a recipient
* @param to the recipient of the $Deez
* @param amount the amount of $Deez to mint
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
507,
736
]
} | 28,690 | ||||
DeezRoleManager | contracts/NutsCoin.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | NutsCoin | contract NutsCoin is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 6900000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contract = ... | burn | function burn(address from, uint256 amount) external {
require(controllers[msg.sender], "Only controllers can burn");
_burn(from, amount);
}
| /**
* burns $Deez from a holder
* @param from the holder of the $Deez
* @param amount the amount of $Deez to burn
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
869,
1021
]
} | 28,691 | ||||
DeezRoleManager | contracts/NutsCoin.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | NutsCoin | contract NutsCoin is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 6900000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contract = ... | addController | function addController(address controller) external onlyOwner {
controllers[controller] = true;
}
| /**
* enables an address to mint / burn
* @param controller the address to enable
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1119,
1224
]
} | 28,692 | ||||
DeezRoleManager | contracts/NutsCoin.sol | 0x13ce0c47c418fd6aa06e0b5ea56901dfc6f1bbc8 | Solidity | NutsCoin | contract NutsCoin is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
uint256 public maxSupply = 6900000000 ether;
// community wallet receives 690,000,000
// development wallet reecives 69,000,000
// total left for staking contract = ... | removeController | function removeController(address controller) external onlyOwner {
controllers[controller] = false;
}
| /**
* disables an address from minting / burning
* @param controller the address to disbale
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1332,
1441
]
} | 28,693 | ||||
DSNCOIN | DSNCOIN.sol | 0xec6ac62f9be51f638a8b2a12dff5118d572ca4b9 | Solidity | DSNCOIN | contract DSNCOIN is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an initial DSN supply
// ---------------------------------------------------------------------------- | LineComment | DSNCOIN | function DSNCOIN() public {
symbol = "DSNC";
name = "DSN FUND COIN";
decimals = 18;
_totalSupply = 200000000 * 10**uint(decimals);
balances[owner] = _totalSupply;
Transfer(address(0), owner, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://109aafdf74d2a622c706ac6329331c3a0377b009201b97beb19d6b5e05cde7b5 | {
"func_code_index": [
476,
747
]
} | 28,694 | |
DSNCOIN | DSNCOIN.sol | 0xec6ac62f9be51f638a8b2a12dff5118d572ca4b9 | Solidity | DSNCOIN | contract DSNCOIN is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an initial DSN supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://109aafdf74d2a622c706ac6329331c3a0377b009201b97beb19d6b5e05cde7b5 | {
"func_code_index": [
935,
1056
]
} | 28,695 | |
DSNCOIN | DSNCOIN.sol | 0xec6ac62f9be51f638a8b2a12dff5118d572ca4b9 | Solidity | DSNCOIN | contract DSNCOIN is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an initial DSN supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://109aafdf74d2a622c706ac6329331c3a0377b009201b97beb19d6b5e05cde7b5 | {
"func_code_index": [
1278,
1407
]
} | 28,696 | |
DSNCOIN | DSNCOIN.sol | 0xec6ac62f9be51f638a8b2a12dff5118d572ca4b9 | Solidity | DSNCOIN | contract DSNCOIN is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an initial DSN supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://109aafdf74d2a622c706ac6329331c3a0377b009201b97beb19d6b5e05cde7b5 | {
"func_code_index": [
1753,
2020
]
} | 28,697 | |
DSNCOIN | DSNCOIN.sol | 0xec6ac62f9be51f638a8b2a12dff5118d572ca4b9 | Solidity | DSNCOIN | contract DSNCOIN is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an initial DSN supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://109aafdf74d2a622c706ac6329331c3a0377b009201b97beb19d6b5e05cde7b5 | {
"func_code_index": [
2532,
2740
]
} | 28,698 | |
DSNCOIN | DSNCOIN.sol | 0xec6ac62f9be51f638a8b2a12dff5118d572ca4b9 | Solidity | DSNCOIN | contract DSNCOIN is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an initial DSN supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
Transfer(from, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfe... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://109aafdf74d2a622c706ac6329331c3a0377b009201b97beb19d6b5e05cde7b5 | {
"func_code_index": [
3279,
3622
]
} | 28,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.