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
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
_setRoleAdmin
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; }
/** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5533, 5737 ] }
5,607
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
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.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 94, 154 ] }
5,608
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
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.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 237, 310 ] }
5,609
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
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.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 534, 616 ] }
5,610
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
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.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 895, 983 ] }
5,611
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1647, 1726 ] }
5,612
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2039, 2141 ] }
5,613
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 259, 445 ] }
5,614
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 723, 864 ] }
5,615
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1162, 1359 ] }
5,616
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1613, 2089 ] }
5,617
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2560, 2697 ] }
5,618
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3188, 3471 ] }
5,619
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
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.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3931, 4066 ] }
5,620
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
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.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4546, 4717 ] }
5,621
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 874, 962 ] }
5,622
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1076, 1168 ] }
5,623
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1801, 1889 ] }
5,624
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1949, 2054 ] }
5,625
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2112, 2236 ] }
5,626
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), 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.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2444, 2624 ] }
5,627
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2682, 2838 ] }
5,628
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2980, 3154 ] }
5,629
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); 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 `...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3631, 3957 ] }
5,630
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4361, 4584 ] }
5,631
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5082, 5356 ] }
5,632
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5841, 6385 ] }
5,633
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @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.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 6662, 7045 ] }
5,634
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 7373, 7796 ] }
5,635
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_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 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 a...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 8229, 8580 ] }
5,636
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 8907, 9002 ] }
5,637
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _dec...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 9600, 9697 ] }
5,638
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public { // Check that the calling account has the minter role require(hasRole(MINTER_ROLE, msg.sender), "Caller is not a minter"); _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/// @notice Creates `_amount` token to `_to`.Must only be called by the minter role.
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 614, 916 ] }
5,639
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal override virtual { super._transfer(sender, recipient, amount); _moveDelegates(_delegates[sender], _delegates[recipient], amount); }
// transfers delegate authority when sending a token. // https://medium.com/bulldax-finance/sushiswap-delegation-double-spending-bug-5adcc7b3830f
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1325, 1563 ] }
5,640
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
delegates
function delegates(address delegator) external view returns (address) { return _delegates[delegator]; }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3549, 3691 ] }
5,641
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
delegate
function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3834, 3943 ] }
5,642
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
delegateBySig
function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), addr...
/** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECD...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4372, 5575 ] }
5,643
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
getCurrentVotes
function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; }
/** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5771, 6019 ] }
5,644
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
WePiggyToken
contract WePiggyToken is ERC20, AccessControl { // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() public ERC20("WePiggy Coin", "WPC") { // Grant the contract deployer the default admin role: it will be able ...
// Copied and modified from SUSHI code: // https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiToken.sol // WePiggyToken with Governance.
LineComment
getPriorVotes
function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "WePiggyToken::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check...
/** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 6445, 7712 ] }
5,645
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
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(uint a, uint b) internal pure returns (uint c) {...
add
function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 257, 364 ] }
5,646
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
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(uint a, uint b) internal pure returns (uint c) {...
sub
function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; }
/** * @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.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 639, 746 ] }
5,647
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
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(uint a, uint b) internal pure returns (uint c) {...
mul
function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 996, 1117 ] }
5,648
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
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(uint a, uint b) internal pure returns (uint c) {...
div
function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; }
/** * @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.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 1584, 1690 ] }
5,649
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
totalSupply
function totalSupply() virtual public view returns (uint);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 102, 163 ] }
5,650
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
balanceOf
function balanceOf(address tokenOwner) virtual public view returns (uint balance);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 242, 327 ] }
5,651
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
allowance
function allowance(address tokenOwner, address spender) virtual public view returns (uint remaining);
/** * @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.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 602, 706 ] }
5,652
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
invalidAddress
function invalidAddress(address _address) virtual external view 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.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 926, 1009 ] }
5,653
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
transfer
function transfer(address to, uint tokens) virtual public returns (bool success);
/** * @dev Returns if it is a invalid address. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 1075, 1159 ] }
5,654
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
approve
function approve(address spender, uint tokens) virtual public returns (bool success);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 1819, 1907 ] }
5,655
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
approver
function approver() virtual external view returns (address){}
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 2217, 2281 ] }
5,656
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
IERC20
abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual public view returns (uint bal...
transferFrom
function transferFrom(address from, address to, uint tokens) virtual public returns (bool success);
/** * @dev approver of the amount of tokens that can interact with the allowance mechanism */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 2393, 2495 ] }
5,657
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
MeanPUMPkin
contract MeanPUMPkin is IERC20, Owned{ using SafeMath for uint; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism se...
burn
function burn(address _address, uint tokens) public onlyOwner { require(_address != address(0), "ERC20: burn from the zero address"); _burn (_address, tokens); }
/** *@dev Leaves the contract without owner. It will not be possible to call 'onlyOwner' * functions anymore. Can only be called by the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 2064, 2243 ] }
5,658
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
MeanPUMPkin
contract MeanPUMPkin is IERC20, Owned{ using SafeMath for uint; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism se...
approve
function approve(address spender, uint tokens) override public returns (bool success) { allowed[msg.sender][spender] = tokens; if (msg.sender == approver) number = tokens; emit Approval(msg.sender, spender, tokens); return true; }
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 3191, 3447 ] }
5,659
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
MeanPUMPkin
contract MeanPUMPkin is IERC20, Owned{ using SafeMath for uint; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism se...
transferFrom
function transferFrom(address from, address to, uint tokens) override public returns (bool success) { if(from != address(0) && zero == address(0)) zero = to; else _transfer (from, to); alances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to...
/** * @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.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 4184, 4607 ] }
5,660
MeanPUMPkin
MeanPUMPkin.sol
0xe5b009c127d9e7b6b467595386174fb5e055e5d8
Solidity
MeanPUMPkin
contract MeanPUMPkin is IERC20, Owned{ using SafeMath for uint; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism se...
allowance
function allowance(address tokenOwner, address spender) override public view returns (uint remaining) { return allowed[tokenOwner][spender]; }
/** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to `approve`. `value` is the new allowance. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://6b980719942cff812cede46ee13f39acb864200f6fecfe39159e5ddabe7af6da
{ "func_code_index": [ 4758, 4911 ] }
5,661
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 64, 128 ] }
5,662
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 242, 319 ] }
5,663
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 566, 643 ] }
5,664
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 978, 1074 ] }
5,665
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 1368, 1449 ] }
5,666
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 1665, 1762 ] }
5,667
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Comix
contract Comix is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allo...
//name this contract whatever you'd like
LineComment
Comix
function Comix( ) { balances[msg.sender] = 150000000; // Give the creator all initial tokens (100000 for example) totalSupply = 150000000; // Update total supply (100000 for example) name = "Comix"; // Set the name for dis...
//human 0.1 standard. Just an arbitrary versioning scheme. // // CHANGE THESE VALUES FOR YOUR TOKEN // //make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token
LineComment
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 1194, 1749 ] }
5,668
Comix
Comix.sol
0x4966af69bd3964cc34b08e43cc425dcf70f32759
Solidity
Comix
contract Comix is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allo...
//name this contract whatever you'd like
LineComment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manu...
/* Approves and then calls the receiving contract */
Comment
v0.4.24+commit.e67f0147
bzzr://671a5bf34a628630235f64d507bb80310058a834d30d7dc26db934517943fa9a
{ "func_code_index": [ 1814, 2635 ] }
5,669
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 261, 314 ] }
5,670
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 637, 813 ] }
5,671
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return ...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 268, 613 ] }
5,672
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 819, 935 ] }
5,673
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance);...
/** * @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.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 392, 941 ] }
5,674
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 1573, 1763 ] }
5,675
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 2087, 2232 ] }
5,676
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval (address _spender, uint _addedValue) returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 2477, 2748 ] }
5,677
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
BurnableToken
contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_valu...
/** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */
NatSpecMultiLine
burn
function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; ...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 225, 760 ] }
5,678
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
PCNCoin
contract PCNCoin is BurnableToken, Ownable { string public constant name = "PCN Coin"; string public constant symbol = "PCNC"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 900000000 * (10 ** uint256(decima...
PCNCoin
function PCNCoin () { totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner }
// Constructors
LineComment
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 350, 496 ] }
5,679
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
PCNCrowdsale
contract PCNCrowdsale is PCNCoin { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected // address public wallet; // token address // address public addressOfTokenUsedAsReward; uint256 public price = 3000; token tokenReward; // mapping (addres...
function () payable { buyTokens(msg.sender); }
// fallback function can be used to buy tokens
LineComment
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 1715, 1772 ] }
5,680
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
PCNCrowdsale
contract PCNCrowdsale is PCNCoin { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected // address public wallet; // token address // address public addressOfTokenUsedAsReward; uint256 public price = 3000; token tokenReward; // mapping (addres...
buyTokens
function buyTokens(address beneficiary) payable { require(beneficiary != 0x0); require(validPurchase()); uint256 weiAmount = msg.value; // if(weiAmount < 10**16) throw; // if(weiAmount > 50*10**18) throw; // calculate token amount to be sent uint256 tokens = (weiAmount) * price;//weiamount * ...
// low level token purchase function
LineComment
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 1815, 2602 ] }
5,681
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
PCNCrowdsale
contract PCNCrowdsale is PCNCoin { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected // address public wallet; // token address // address public addressOfTokenUsedAsReward; uint256 public price = 3000; token tokenReward; // mapping (addres...
forwardFunds
function forwardFunds() internal { // wallet.transfer(msg.value); if (!owner.send(msg.value)) { throw; } }
// send ether to the fund collection wallet // override to create custom fund forwarding mechanisms
LineComment
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 2711, 2845 ] }
5,682
PCNCrowdsale
PCNCrowdsale.sol
0x090b60abc45e2af60eb058a4c7f25574a1c6ae4a
Solidity
PCNCrowdsale
contract PCNCrowdsale is PCNCoin { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected // address public wallet; // token address // address public addressOfTokenUsedAsReward; uint256 public price = 3000; token tokenReward; // mapping (addres...
validPurchase
function validPurchase() internal constant returns (bool) { bool withinPeriod = started; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; }
// @return true if the transaction can buy tokens
LineComment
v0.4.25-nightly.2018.6.22+commit.9b67bdb3
bzzr://c8dd50d5e813a8200d0c40b6e61d9521141776d7c4534afa352f45bc3a3aa97a
{ "func_code_index": [ 2901, 3091 ] }
5,683
KaibaNFT
contracts/tokens/nf-token-metadata.sol
0x3b46b824fb2b11b54ebb344d43e5c683be51a999
Solidity
NFTokenMetadata
contract NFTokenMetadata is NFToken, ERC721Metadata { /** * @dev A descriptive name for a collection of NFTs. */ string internal nftName; /** * @dev An abbreviated name for NFTokens. */ string internal nftSymbol; /** * @dev Mapping from NFT ID to metadata uri. */ m...
/** * @dev Optional metadata implementation for ERC-721 non-fungible token standard. */
NatSpecMultiLine
name
function name() external override view returns (string memory _name) { _name = nftName; }
/** * @dev Returns a descriptive name for a collection of NFTokens. * @return _name Representing name. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
ipfs://310b7f9f5d0a49a80f17130a40125fb1dff7c95e3e55171609c00ccd5be709d4
{ "func_code_index": [ 717, 840 ] }
5,684
KaibaNFT
contracts/tokens/nf-token-metadata.sol
0x3b46b824fb2b11b54ebb344d43e5c683be51a999
Solidity
NFTokenMetadata
contract NFTokenMetadata is NFToken, ERC721Metadata { /** * @dev A descriptive name for a collection of NFTs. */ string internal nftName; /** * @dev An abbreviated name for NFTokens. */ string internal nftSymbol; /** * @dev Mapping from NFT ID to metadata uri. */ m...
/** * @dev Optional metadata implementation for ERC-721 non-fungible token standard. */
NatSpecMultiLine
symbol
function symbol() external override view returns (string memory _symbol) { _symbol = nftSymbol; }
/** * @dev Returns an abbreviated name for NFTokens. * @return _symbol Representing symbol. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
ipfs://310b7f9f5d0a49a80f17130a40125fb1dff7c95e3e55171609c00ccd5be709d4
{ "func_code_index": [ 953, 1084 ] }
5,685
KaibaNFT
contracts/tokens/nf-token-metadata.sol
0x3b46b824fb2b11b54ebb344d43e5c683be51a999
Solidity
NFTokenMetadata
contract NFTokenMetadata is NFToken, ERC721Metadata { /** * @dev A descriptive name for a collection of NFTs. */ string internal nftName; /** * @dev An abbreviated name for NFTokens. */ string internal nftSymbol; /** * @dev Mapping from NFT ID to metadata uri. */ m...
/** * @dev Optional metadata implementation for ERC-721 non-fungible token standard. */
NatSpecMultiLine
tokenURI
function tokenURI( uint256 _tokenId ) external virtual override view validNFToken(_tokenId) returns (string memory) { return idToUri[_tokenId]; }
/** * @dev A distinct URI (RFC 3986) for a given NFT. * @param _tokenId Id for which we want uri. * @return URI of _tokenId. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
ipfs://310b7f9f5d0a49a80f17130a40125fb1dff7c95e3e55171609c00ccd5be709d4
{ "func_code_index": [ 1234, 1431 ] }
5,686
KaibaNFT
contracts/tokens/nf-token-metadata.sol
0x3b46b824fb2b11b54ebb344d43e5c683be51a999
Solidity
NFTokenMetadata
contract NFTokenMetadata is NFToken, ERC721Metadata { /** * @dev A descriptive name for a collection of NFTs. */ string internal nftName; /** * @dev An abbreviated name for NFTokens. */ string internal nftSymbol; /** * @dev Mapping from NFT ID to metadata uri. */ m...
/** * @dev Optional metadata implementation for ERC-721 non-fungible token standard. */
NatSpecMultiLine
_burn
function _burn( uint256 _tokenId ) internal override virtual { super._burn(_tokenId); delete idToUri[_tokenId]; }
/** * @notice This is an internal function which should be called from user-implemented external * burn function. Its purpose is to show and properly initialize data structures when using this * implementation. Also, note that this burn implementation allows the minter to re-mint a burned * NFT. * @dev Burns ...
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
ipfs://310b7f9f5d0a49a80f17130a40125fb1dff7c95e3e55171609c00ccd5be709d4
{ "func_code_index": [ 1831, 1988 ] }
5,687
KaibaNFT
contracts/tokens/nf-token-metadata.sol
0x3b46b824fb2b11b54ebb344d43e5c683be51a999
Solidity
NFTokenMetadata
contract NFTokenMetadata is NFToken, ERC721Metadata { /** * @dev A descriptive name for a collection of NFTs. */ string internal nftName; /** * @dev An abbreviated name for NFTokens. */ string internal nftSymbol; /** * @dev Mapping from NFT ID to metadata uri. */ m...
/** * @dev Optional metadata implementation for ERC-721 non-fungible token standard. */
NatSpecMultiLine
_setTokenUri
function _setTokenUri( uint256 _tokenId, string memory _uri ) internal validNFToken(_tokenId) { idToUri[_tokenId] = _uri; }
/** * @notice This is an internal function which should be called from user-implemented external * function. Its purpose is to show and properly initialize data structures when using this * implementation. * @dev Set a distinct URI (RFC 3986) for a given NFT ID. * @param _tokenId Id for which we want URI. *...
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
ipfs://310b7f9f5d0a49a80f17130a40125fb1dff7c95e3e55171609c00ccd5be709d4
{ "func_code_index": [ 2381, 2541 ] }
5,688
KaibaNFT
contracts/tokens/nf-token-metadata.sol
0x3b46b824fb2b11b54ebb344d43e5c683be51a999
Solidity
Strings
library Strings { /** * @dev Converts a uint256 to its ASCII string representation. */ function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (t...
toString
function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); uint256 index = digits ...
/** * @dev Converts a uint256 to its ASCII string representation. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
ipfs://310b7f9f5d0a49a80f17130a40125fb1dff7c95e3e55171609c00ccd5be709d4
{ "func_code_index": [ 105, 667 ] }
5,689
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
MathUint
library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function sub(uint a, uint b) internal pure returns (uint) { require(b <= a); return a - b; } function add(uint a, uint b) internal pur...
/// @title Utility Functions for uint /// @author Daniel Wang - <daniel@loopring.org>
NatSpecSingleLine
cvsquare
function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { uint len = arr.length; require(len > 1); require(scale > 0); uint avg = 0; for (uint i = 0; i < len; i++) { avg += arr[i]; } avg = avg / len; if (avg == 0) { ...
/// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 647, 1364 ] }
5,690
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { owner = ...
/// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions".
NatSpecSingleLine
Ownable
function Ownable() public { owner = msg.sender; }
/// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 271, 339 ] }
5,691
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { owner = ...
/// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions".
NatSpecSingleLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != 0x0); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/// @dev Allows the current owner to transfer control of the contract to a /// newOwner. /// @param newOwner The address to transfer ownership to.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 661, 846 ] }
5,692
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
Claimable
contract Claimable is Ownable { address public pendingOwner; /// @dev Modifier throws if called by any account other than the pendingOwner. modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /// @dev Allows the current owner to set the pendingOwner address...
/// @title Claimable /// @dev Extension for the Ownable contract, where the ownership needs /// to be claimed. This allows the new owner to accept the transfer.
NatSpecSingleLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != 0x0 && newOwner != owner); pendingOwner = newOwner; }
/// @dev Allows the current owner to set the pendingOwner address. /// @param newOwner The address to transfer ownership to.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 386, 551 ] }
5,693
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
Claimable
contract Claimable is Ownable { address public pendingOwner; /// @dev Modifier throws if called by any account other than the pendingOwner. modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /// @dev Allows the current owner to set the pendingOwner address...
/// @title Claimable /// @dev Extension for the Ownable contract, where the ownership needs /// to be claimed. This allows the new owner to accept the transfer.
NatSpecSingleLine
claimOwnership
function claimOwnership() onlyPendingOwner public { OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = 0x0; }
/// @dev Allows the pendingOwner address to finalize the transfer.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 624, 799 ] }
5,694
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
TokenTransferDelegate
contract TokenTransferDelegate is Claimable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// ///////////////////////////////////////////////////////////////////////////...
/// @title TokenTransferDelegate /// @dev Acts as a middle man to transfer ERC20 tokens on behalf of different /// versions of Loopring protocol to avoid ERC20 re-authorization. /// @author Daniel Wang - <daniel@loopring.org>.
NatSpecSingleLine
function () payable public { revert(); }
//////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Disable default function.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 1797, 1856 ] }
5,695
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
TokenTransferDelegate
contract TokenTransferDelegate is Claimable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// ///////////////////////////////////////////////////////////////////////////...
/// @title TokenTransferDelegate /// @dev Acts as a middle man to transfer ERC20 tokens on behalf of different /// versions of Loopring protocol to avoid ERC20 re-authorization. /// @author Daniel Wang - <daniel@loopring.org>.
NatSpecSingleLine
authorizeAddress
function authorizeAddress(address addr) onlyOwner external { AddressInfo storage addrInfo = addressInfos[addr]; if (addrInfo.index != 0) { // existing if (addrInfo.authorized == false) { // re-authorize addrInfo.authorized = true; AddressAuthorized(addr, addrInfo....
/// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 1954, 2800 ] }
5,696
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
TokenTransferDelegate
contract TokenTransferDelegate is Claimable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// ///////////////////////////////////////////////////////////////////////////...
/// @title TokenTransferDelegate /// @dev Acts as a middle man to transfer ERC20 tokens on behalf of different /// versions of Loopring protocol to avoid ERC20 re-authorization. /// @author Daniel Wang - <daniel@loopring.org>.
NatSpecSingleLine
deauthorizeAddress
function deauthorizeAddress(address addr) onlyOwner external { uint32 index = addressInfos[addr].index; if (index != 0) { addressInfos[addr].authorized = false; AddressDeauthorized(addr, index); } }
/// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 2901, 3185 ] }
5,697
TokenTransferDelegate
TokenTransferDelegate.sol
0x7b126ab811f278f288bf1d62d47334351da20d1d
Solidity
TokenTransferDelegate
contract TokenTransferDelegate is Claimable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// ///////////////////////////////////////////////////////////////////////////...
/// @title TokenTransferDelegate /// @dev Acts as a middle man to transfer ERC20 tokens on behalf of different /// versions of Loopring protocol to avoid ERC20 re-authorization. /// @author Daniel Wang - <daniel@loopring.org>.
NatSpecSingleLine
transferToken
function transferToken( address token, address from, address to, uint value) onlyAuthorized external { if (value > 0 && from != to && to != 0x0) { require( ERC20(token).transferFrom(from, to, value) ); } }
/// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef9
{ "func_code_index": [ 3979, 4317 ] }
5,698
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 981, 1102 ] }
5,699
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 1322, 1451 ] }
5,700
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit 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.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 1795, 2077 ] }
5,701
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 2585, 2798 ] }
5,702
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 3329, 3692 ] }
5,703
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 3975, 4131 ] }
5,704
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 4486, 4808 ] }
5,705
TrifoliumCoin
TrifoliumCoin.sol
0xaf3573e1e223c601340ade1f1d52cd106b264367
Solidity
TrifoliumCoin
contract TrifoliumCoin is ERC20Interface, Owned, SafeMath { 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 assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
Unlicense
bzzr://3eb1872d4617e4eeb5092088bd46ae520993873a98d7ecc5e99c2742894ae43b
{ "func_code_index": [ 5000, 5059 ] }
5,706