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
OwnedProxyWithReference
OwnedProxyWithReference.sol
0x1ed460d149d48fa7d91703bf4890f97220c09437
Solidity
OwnedProxyWithReference
contract OwnedProxyWithReference { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address indexed previousOwner,...
/** * @title OwnedProxyWithReference * @dev This contract combines an upgradeability proxy with basic authorization control functionalities * Its structure makes it easy for a group of contracts alike, to share an implementation and to change it easily for all of them at once */
NatSpecMultiLine
implementation
function implementation() public view returns (address) { bytes32 position = implementationReferencePosition; address implementationReference; assembly { implementationReference := sload(position) } return ImplementationReference(implementationReference).implementation(); }
/** * @dev Get the address of current implementation. * @return Returns address of implementation contract */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://4414d87863f7493cba07450f067e5798740d25895d8a515f930224351ce21951
{ "func_code_index": [ 5135, 5477 ] }
17,300
OwnedProxyWithReference
OwnedProxyWithReference.sol
0x1ed460d149d48fa7d91703bf4890f97220c09437
Solidity
OwnedProxyWithReference
contract OwnedProxyWithReference { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address indexed previousOwner,...
/** * @title OwnedProxyWithReference * @dev This contract combines an upgradeability proxy with basic authorization control functionalities * Its structure makes it easy for a group of contracts alike, to share an implementation and to change it easily for all of them at once */
NatSpecMultiLine
/** * @dev Fallback functions allowing to perform a delegatecall to the given implementation. * This function will return whatever the implementation call returns */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://4414d87863f7493cba07450f067e5798740d25895d8a515f930224351ce21951
{ "func_code_index": [ 5669, 5732 ] }
17,301
OwnedProxyWithReference
OwnedProxyWithReference.sol
0x1ed460d149d48fa7d91703bf4890f97220c09437
Solidity
OwnedProxyWithReference
contract OwnedProxyWithReference { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address indexed previousOwner,...
/** * @title OwnedProxyWithReference * @dev This contract combines an upgradeability proxy with basic authorization control functionalities * Its structure makes it easy for a group of contracts alike, to share an implementation and to change it easily for all of them at once */
NatSpecMultiLine
/** * @dev This fallback function gets called only when this contract is called without any calldata e.g. send(), transfer() * This would also trigger receive() function on called implementation */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://4414d87863f7493cba07450f067e5798740d25895d8a515f930224351ce21951
{ "func_code_index": [ 5956, 6018 ] }
17,302
OwnedProxyWithReference
OwnedProxyWithReference.sol
0x1ed460d149d48fa7d91703bf4890f97220c09437
Solidity
OwnedProxyWithReference
contract OwnedProxyWithReference { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address indexed previousOwner,...
/** * @title OwnedProxyWithReference * @dev This contract combines an upgradeability proxy with basic authorization control functionalities * Its structure makes it easy for a group of contracts alike, to share an implementation and to change it easily for all of them at once */
NatSpecMultiLine
proxyCall
function proxyCall() internal { address impl = implementation(); assembly { let ptr := mload(0x40) calldatacopy(ptr, 0, calldatasize()) let result := delegatecall(gas(), impl, ptr, calldatasize(), 0, 0) returndatacopy(ptr, 0, returndatasize()) switch result ...
/** * @dev Performs a low level call, to the contract holding all the logic, changing state on this contract at the same time */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://4414d87863f7493cba07450f067e5798740d25895d8a515f930224351ce21951
{ "func_code_index": [ 6167, 6727 ] }
17,303
OwnedProxyWithReference
OwnedProxyWithReference.sol
0x1ed460d149d48fa7d91703bf4890f97220c09437
Solidity
OwnedProxyWithReference
contract OwnedProxyWithReference { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address indexed previousOwner,...
/** * @title OwnedProxyWithReference * @dev This contract combines an upgradeability proxy with basic authorization control functionalities * Its structure makes it easy for a group of contracts alike, to share an implementation and to change it easily for all of them at once */
NatSpecMultiLine
_changeImplementationReference
function _changeImplementationReference(address _implementationReference) internal virtual { bytes32 position = implementationReferencePosition; assembly { sstore(position, _implementationReference) } emit ImplementationReferenceChanged(address(_implementationReference)); }
/** * @dev Function to internally change the contract holding address of implementation. * @param _implementationReference representing the address contract, which holds implementation. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://4414d87863f7493cba07450f067e5798740d25895d8a515f930224351ce21951
{ "func_code_index": [ 6942, 7277 ] }
17,304
ICToken
@solv/solv-vnft-core/contracts/library/AssetLibrary.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
AssetLibrary
library AssetLibrary { using SafeMath for uint256; struct Asset { uint256 slot; //标识资产的分类 uint256 units; //资产份数 bool isValid; //是否有效 } //@notice 增加Vault的份额 //@dev //@param self 需要增加份额的Vault的引用 //@param slot function mint(Asset storage self, uint256 slot, uint256...
//@title 资产相关结构及逻辑库
LineComment
mint
function mint(Asset storage self, uint256 slot, uint256 units) internal { if (! self.isValid) { self.slot = slot; self.isValid = true; } else { require(self.slot == slot, "slot mismatch"); } self.units = self.units.add(units); }
//@notice 增加Vault的份额 //@dev //@param self 需要增加份额的Vault的引用 //@param slot
LineComment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 261, 565 ] }
17,305
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 94, 154 ] }
17,306
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 237, 310 ] }
17,307
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 534, 634 ] }
17,308
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 913, 1028 ] }
17,309
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1692, 1771 ] }
17,310
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 2084, 2220 ] }
17,311
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 251, 437 ] }
17,312
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { 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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 707, 848 ] }
17,313
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, 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. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1180, 1411 ] }
17,314
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1657, 2133 ] }
17,315
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { 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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 2596, 2733 ] }
17,316
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold ...
/** * @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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 3258, 3642 ] }
17,317
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { 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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 4094, 4229 ] }
17,318
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, 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.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 4743, 4948 ] }
17,319
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 606, 1270 ] }
17,320
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
toPayable
function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); }
/** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1482, 1646 ] }
17,321
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require( success,...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 2618, 3068 ] }
17,322
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { callOptionalReturn( token, abi.encodeWithSelector(token.transfer.selector, to, value)...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
callOptionalReturn
function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checke...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 2698, 3879 ] }
17,323
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Context
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (addres...
/* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending ...
Comment
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 265, 368 ] }
17,324
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 536, 620 ] }
17,325
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
isOwner
function isOwner() public view returns (bool) { return _msgSender() == _owner; }
/** * @dev Returns true if the caller is the current owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 902, 1001 ] }
17,326
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1347, 1492 ] }
17,327
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
transferOwnership
function transferOwnership(address payable newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1642, 1764 ] }
17,328
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address payable newOwner) internal { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1865, 2144 ] }
17,329
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
BancorV2_ZapIn_General_V1_1
contract BancorV2_ZapIn_General_V1_1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; using SafeERC20 for IERC20; bool public stopped = false; uint16 public goodwill; address private constant ETHAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeee...
ZapInSingleSided
function ZapInSingleSided( address _fromTokenAddress, address _toBanConverterAddress, address _toReserveTokenAddress, uint256 _amount, uint256 _minPoolTokens, address _allowanceTarget, address _swapTarget, bytes calldata swapData ) external payable nonReentrant ...
/** @notice This function is used to add single-sided protected liquidity to BancorV2 Pool @dev This function stakes LPT Received so the @param _fromTokenAddress The token used for investment (address(0x00) if ether) @param _toBanConverterAddress The address of pool to add liquidity to @param _toReserveToken...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 1940, 3974 ] }
17,330
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
BancorV2_ZapIn_General_V1_1
contract BancorV2_ZapIn_General_V1_1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; using SafeERC20 for IERC20; bool public stopped = false; uint16 public goodwill; address private constant ETHAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeee...
_transferGoodwill
function _transferGoodwill( address _tokenContractAddress, uint256 valueToSend ) internal returns (uint256) { if (goodwill == 0) return valueToSend; uint256 goodwillPortion = SafeMath.div( SafeMath.mul(valueToSend, goodwill), 10000 ); if (_tokenContractAddress == addre...
/** @dev This function is used to calculate and transfer goodwill @param _tokenContractAddress Token from which goodwill is deducted @param valueToSend The total value being zapped in @return The quantity of remaining tokens */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 7013, 7666 ] }
17,331
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
BancorV2_ZapIn_General_V1_1
contract BancorV2_ZapIn_General_V1_1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; using SafeERC20 for IERC20; bool public stopped = false; uint16 public goodwill; address private constant ETHAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeee...
toggleContractActive
function toggleContractActive() public onlyOwner { stopped = !stopped; }
// - to Pause the contract
LineComment
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 8199, 8290 ] }
17,332
BancorV2_ZapIn_General_V1_1
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
0xeb84f924ed6d0ccb62d8ee9b7447cffd65f999d4
Solidity
BancorV2_ZapIn_General_V1_1
contract BancorV2_ZapIn_General_V1_1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; using SafeERC20 for IERC20; bool public stopped = false; uint16 public goodwill; address private constant ETHAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeee...
withdraw
function withdraw() public onlyOwner { uint256 contractBalance = address(this).balance; address payable _to = owner().toPayable(); _to.transfer(contractBalance); }
// - to withdraw any ETH balance sitting in the contract
LineComment
v0.5.12+commit.7709ece9
GNU GPLv2
bzzr://ced2193401e0de2880ec56b4e70c4cae19da5a136d6309f475aa416e5c33ae29
{ "func_code_index": [ 8355, 8555 ] }
17,333
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = 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() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 257, 317 ] }
17,334
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = 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) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 636, 812 ] }
17,335
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 87, 270 ] }
17,336
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 354, 627 ] }
17,337
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 742, 858 ] }
17,338
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 922, 1058 ] }
17,339
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
transfer
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); ...
// Function that is called when a user or another contract wants to transfer funds .
LineComment
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 1515, 2370 ] }
17,340
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
transfer
function transfer(address _to, uint _value, bytes _data) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if(isContract(_to)) { ...
// Function that is called when a user or another contract wants to transfer funds .
LineComment
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 2463, 2937 ] }
17,341
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
transfer
function transfer(address _to, uint _value) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); //standard function transfer similar ...
// Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons .
LineComment
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 3068, 3680 ] }
17,342
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
isContract
function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { // retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length>0); }
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
LineComment
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 3775, 4039 ] }
17,343
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
transferToAddress
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = SafeMath.sub(balanceOf(msg.sender), _value); balances[_to] = SafeMath.add(balanceOf(_to), _value); Transfer(msg.sender, _to, _value, _data);...
// function that is called when transaction target is an address
LineComment
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 4110, 4504 ] }
17,344
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
transferToContract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = SafeMath.sub(balanceOf(msg.sender), _value); balances[_to] = SafeMath.add(balanceOf(_to), _value); ContractReceiver receiver = ContractRece...
//function that is called when transaction target is a contract
LineComment
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 4574, 5081 ] }
17,345
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
freezeAccounts
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { require(targets.length > 0); for (uint i = 0; i < targets.length; i++) { require(targets[i] != 0x0); frozenAccount[targets[i]] = isFrozen; FrozenFunds(targets[i], isFrozen); } }
/** * @dev Prevent targets from sending or receiving tokens * @param targets Addresses to be frozen * @param isFrozen either to freeze it or not */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 5251, 5549 ] }
17,346
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
lockupAccounts
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { require(targets.length > 0 && targets.length == unixTimes.length); for(uint i = 0; i < targets.length; i++){ require(unlockUnixTime[targets[i]] < unixTimes[i]); unlockUnixTime[targets[i]] = unixTimes[i]; Lo...
/** * @dev Prevent targets from sending or receiving tokens by setting Unix times * @param targets Addresses to be locked funds * @param unixTimes Unix times when locking up will be finished */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 5765, 6148 ] }
17,347
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
burn
function burn(address _from, uint256 _unitAmount) onlyOwner public { require(_unitAmount > 0 && balanceOf(_from) >= _unitAmount); balances[_from] = SafeMath.sub(balances[_from], _unitAmount); totalSupply = SafeMath.sub(totalSupply, _unitAmount); Burn(_from, _unitAmount); }
/** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 6328, 6642 ] }
17,348
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
mint
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { require(_unitAmount > 0); totalSupply = SafeMath.add(totalSupply, _unitAmount); balances[_to] = SafeMath.add(balances[_to], _unitAmount); Mint(_to, _unitAmount); Transfer(address(0), _to, _unitAmount); return t...
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 6886, 7230 ] }
17,349
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 7295, 7437 ] }
17,350
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
distributeTokens
function distributeTokens(address[] addresses, uint256 amount) public returns (bool) { require(amount > 0 && addresses.length > 0 && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); amount = SafeMath.mul(amount, 1e8); uint256 totalAmount = SafeMath.mul...
/** * @dev Function to distribute tokens to the list of addresses by the provided amount */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 7543, 8392 ] }
17,351
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
collectTokens
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length); uint256 totalAmount = 0; for (uint i = 0; i < addresses.length; i++) { require(amounts[i] > 0 && addresses[i] != 0x...
/** * @dev Function to collect tokens from the list of addresses */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 8474, 9331 ] }
17,352
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
autoDistribute
function autoDistribute() payable public { require(distributeAmount > 0 && balanceOf(owner) >= distributeAmount && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); if (msg.value > 0) owner.transfer(msg.value); balances[owner] = SafeMath.sub(balances[ow...
/** * @dev Function to distribute tokens to the msg.sender automatically * If distributeAmount is 0, this function doesn't work */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 9601, 10099 ] }
17,353
Seiyuu
Seiyuu.sol
0x4c54e5ee228b1c917980687a7e54876c340fed7f
Solidity
Seiyuu
contract Seiyuu is ERC223, Ownable { using SafeMath for uint256; string public name = "SeiyuuCoin"; string public symbol = "SEYU"; uint8 public decimals = 8; uint256 public initialSupply = 45e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished ...
function() payable public { autoDistribute(); }
/** * @dev token fallback function */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02402d636b2222e4ff3ec74ac6f574fce4345e8b2f93de261d57058b61e62dbc
{ "func_code_index": [ 10151, 10209 ] }
17,354
OneTwoThreeMasterChef
contracts/OneTwoThreeStakeToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeStakeToken
contract OneTwoThreeStakeToken is ERC20("OneTwoThreeStakeToken", "123s"){ using SafeMath for uint256; IERC20 public bonus; // Define the 123b token contract constructor(IERC20 _bonus) public { bonus = _bonus; } // Enter the bar. Pay some 123bs. Earn some shares. // Locks 123b and m...
// OneTwoThreeStakeToken is the coolest bar in town. You come in with some 123b, and leave with more! The longer you stay, the more 123b you get. // // This contract handles swapping to and from 123s, 123 Swap's staking token.
LineComment
enter
function enter(uint256 _amount) public { // Gets the amount of 123b locked in the contract uint256 total123b = bonus.balanceOf(address(this)); // Gets the amount of 123s in existence uint256 totalShares = totalSupply(); // If no 123s exists, mint it 1:1 to the amount put in if (totalShares == 0 ...
// Enter the bar. Pay some 123bs. Earn some shares. // Locks 123b and mints 123s
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 330, 1166 ] }
17,355
OneTwoThreeMasterChef
contracts/OneTwoThreeStakeToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeStakeToken
contract OneTwoThreeStakeToken is ERC20("OneTwoThreeStakeToken", "123s"){ using SafeMath for uint256; IERC20 public bonus; // Define the 123b token contract constructor(IERC20 _bonus) public { bonus = _bonus; } // Enter the bar. Pay some 123bs. Earn some shares. // Locks 123b and m...
// OneTwoThreeStakeToken is the coolest bar in town. You come in with some 123b, and leave with more! The longer you stay, the more 123b you get. // // This contract handles swapping to and from 123s, 123 Swap's staking token.
LineComment
leave
function leave(uint256 _share) public { // Gets the amount of 123s in existence uint256 totalShares = totalSupply(); // Calculates the amount of 123b the 123s is worth uint256 what = _share.mul(bonus.balanceOf(address(this))).div(totalShares); _burn(msg.sender, _share); bonus.transfer(msg.sender...
// Leave the bar. Claim back your 123b. // Unlocks the staked + gained 123b and burns 123s
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 1267, 1629 ] }
17,356
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_add
function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; retur...
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 908, 1327 ] }
17,357
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_remove
function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element f...
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 1498, 3047 ] }
17,358
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_contains
function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 3128, 3262 ] }
17,359
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_length
function _length(Set storage set) private view returns (uint256) { return set._values.length; }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 3343, 3457 ] }
17,360
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_at
function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 3796, 4005 ] }
17,361
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 4254, 4402 ] }
17,362
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 4573, 4727 ] }
17,363
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 4808, 4971 ] }
17,364
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values in the set. O(1). */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 5052, 5174 ] }
17,365
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 5513, 5667 ] }
17,366
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 5912, 6048 ] }
17,367
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 6219, 6361 ] }
17,368
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 6442, 6593 ] }
17,369
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 6674, 6793 ] }
17,370
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 7132, 7274 ] }
17,371
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
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. */ constructor() public { 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)); emit 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.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 639, 820 ] }
17,372
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
WSFDaiVault
contract WSFDaiVault is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); address public constant uniswapV2router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; IUniswapV2Router02 router =...
emergencyWithdraw
function emergencyWithdraw(uint amountToWithdraw) public { require(amountToWithdraw > 0, "Cannot withdraw 0 Tokens"); require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(depositTime[msg.sender]) > cliffTime, "You recently deposited!, please wait before ...
// emergency withdraw without caring about pending earnings // pending earnings will be lost / set to 0 if used emergency withdraw
LineComment
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 5360, 6417 ] }
17,373
WSFDaiVault
WSFDaiVault.sol
0xc297ab3060927347bbcce96d9e30b9b386cc2066
Solidity
WSFDaiVault
contract WSFDaiVault is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); address public constant uniswapV2router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; IUniswapV2Router02 router =...
transferAnyERC20Tokens
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { require(_tokenAddr != trustedDepositTokenAddress, "Admin cannot transfer out Deposit Tokens from this contract!"); require((_tokenAddr != trustedRewardTokenAddress) || (now > adminClaimableTime), "Admin...
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake) // Admin cannot transfer out deposit tokens from this smart contract // Admin can transfer out reward tokens from this address once adminClaimableTime has reached
LineComment
v0.6.11+commit.5ef660b1
BSD-3-Clause
ipfs://d16768e1e0b3592d447c28d927b95a854ec32e6ff31545eea2bde7359faee13c
{ "func_code_index": [ 7942, 8385 ] }
17,374
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://g...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } c ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 91, 485 ] }
17,375
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://g...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 _a, uint256 _b) internal pure returns (uint256) { // assert(_b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return _a / _b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 569, 860 ] }
17,376
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://g...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 987, 1103 ] }
17,377
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://g...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 1169, 1299 ] }
17,378
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
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. */ constructor() public { owner = msg.send...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 649, 757 ] }
17,379
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
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. */ constructor() public { owner = msg.send...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 895, 1073 ] }
17,380
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 513, 609 ] }
17,381
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpauseunpause, returns to normal state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 700, 798 ] }
17,382
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer tok...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 201, 289 ] }
17,383
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer tok...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 447, 779 ] }
17,384
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer tok...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 985, 1089 ] }
17,385
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); 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 * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 401, 858 ] }
17,386
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 1490, 1754 ] }
17,387
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 2078, 2209 ] }
17,388
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { allowed[msg.sender][_spender] = (allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 2675, 2949 ] }
17,389
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit A...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 3420, 3841 ] }
17,390
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
PlayBabyToken
contract PlayBabyToken is PausableToken, FrozenableToken { string public name = "PlayBaby"; string public symbol = "BABY"; uint256 public decimals = 18; uint256 INITIAL_SUPPLY = 192604090 * (10 ** uint256(decimals)); /** * @dev Initializes the total release */ constructor...
/** * @title PlayBaby Token * @dev Global digital painting asset platform token. * @author playbaby.org */
NatSpecMultiLine
function() public payable { revert(); }
/** * if ether is sent to this address, send it back. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 564, 622 ] }
17,391
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
PlayBabyToken
contract PlayBabyToken is PausableToken, FrozenableToken { string public name = "PlayBaby"; string public symbol = "BABY"; uint256 public decimals = 18; uint256 INITIAL_SUPPLY = 192604090 * (10 ** uint256(decimals)); /** * @dev Initializes the total release */ constructor...
/** * @title PlayBaby Token * @dev Global digital painting asset platform token. * @author playbaby.org */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public whenNotFrozen(_to) returns (bool) { return super.transfer(_to, _value); }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 794, 940 ] }
17,392
PlayBabyToken
PlayBabyToken.sol
0xe40e0799c7ed763be38d42560cd88b65c41f47a5
Solidity
PlayBabyToken
contract PlayBabyToken is PausableToken, FrozenableToken { string public name = "PlayBaby"; string public symbol = "BABY"; uint256 public decimals = 18; uint256 INITIAL_SUPPLY = 192604090 * (10 ** uint256(decimals)); /** * @dev Initializes the total release */ constructor...
/** * @title PlayBaby Token * @dev Global digital painting asset platform token. * @author playbaby.org */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public whenNotFrozen(_from) returns (bool) { return super.transferFrom(_from, _to, _value); }
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.23+commit.124ca40d
MIT
bzzr://5f7ad4ddcd17c2c29cc3b11d7e1fcaec5a211051d56eba559db4ae084b0496e4
{ "func_code_index": [ 1232, 1418 ] }
17,393
FroggiesStore
contracts/FroggiesStore.sol
0x46514090508bf63f61e55e65f0725cf475f61a1b
Solidity
FroggiesStore
contract FroggiesStore is Context, Ownable, Pausable { // Where funds should be sent to address payable public payoutAddress; constructor(address payable _payoutAddress) { payoutAddress = _payoutAddress; } // Player functions event Purchase(address indexed sender, uint256 amount, stri...
pause
function pause() external onlyOwner { _pause(); }
// Admin functions
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 493, 558 ] }
17,394
OneTwoThreeMasterChef
contracts/OneTwoThreeBonusToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeBonusToken
contract OneTwoThreeBonusToken is ERC20("123swap Bonus Token", "123b"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0),...
// OneTwoThreeBonusToken with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef).
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 190, 353 ] }
17,395
OneTwoThreeMasterChef
contracts/OneTwoThreeBonusToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeBonusToken
contract OneTwoThreeBonusToken is ERC20("123swap Bonus Token", "123b"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0),...
// OneTwoThreeBonusToken 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
{ "func_code_index": [ 2308, 2455 ] }
17,396
OneTwoThreeMasterChef
contracts/OneTwoThreeBonusToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeBonusToken
contract OneTwoThreeBonusToken is ERC20("123swap Bonus Token", "123b"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0),...
// OneTwoThreeBonusToken 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
{ "func_code_index": [ 2589, 2695 ] }
17,397
OneTwoThreeMasterChef
contracts/OneTwoThreeBonusToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeBonusToken
contract OneTwoThreeBonusToken is ERC20("123swap Bonus Token", "123b"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0),...
// OneTwoThreeBonusToken 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(), address(this) ...
/** * @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 ECDSA sig...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 3114, 4255 ] }
17,398
OneTwoThreeMasterChef
contracts/OneTwoThreeBonusToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeBonusToken
contract OneTwoThreeBonusToken is ERC20("123swap Bonus Token", "123b"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0),...
// OneTwoThreeBonusToken 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
{ "func_code_index": [ 4445, 4697 ] }
17,399