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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | average | function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
| /**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
491,
689
]
} | 14,000 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
259,
445
]
} | 14,001 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
723,
864
]
} | 14,002 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1162,
1359
]
} | 14,003 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1613,
2089
]
} | 14,004 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
2560,
2697
]
} | 14,005 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
3188,
3471
]
} | 14,006 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
3931,
4066
]
} | 14,007 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
4546,
4717
]
} | 14,008 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | 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 (ad... | /*
* @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.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
269,
372
]
} | 14,009 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
497,
581
]
} | 14,010 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public 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.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1139,
1284
]
} | 14,011 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1434,
1675
]
} | 14,012 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
94,
154
]
} | 14,013 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
237,
310
]
} | 14,014 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
534,
616
]
} | 14,015 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
895,
983
]
} | 14,016 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1647,
1726
]
} | 14,017 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
2039,
2141
]
} | 14,018 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | 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) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @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.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
606,
1033
]
} | 14,019 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | 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-low-level-calls, avoid-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: u... | /**
* @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.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1963,
2362
]
} | 14,020 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | 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));
}
function safeTransferFrom(IERC20 token, add... | /**
* @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 | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
747,
1374
]
} | 14,021 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | 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));
}
function safeTransferFrom(IERC20 token, add... | /**
* @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 check... | /**
* @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.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
2393,
3513
]
} | 14,022 |
Unipool | Unipool.sol | 0xc4d94b0aa01367ee160c481a70b59bcc23978509 | Solidity | Unipool | contract Unipool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public dos = IERC20(0x0A913beaD80F321E7Ac35285Ee10d9d922659cB7);
uint256 public constant DURATION = 7 days;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 pub... | stake | function stake(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
super.stake(amount);
emit Staked(msg.sender, amount);
}
| // stake visibility is public as overriding LPTokenWrapper's stake() function | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://515ca46c4194e518df6e11a224cc917e823a084eee210cf8a6cb8ffa80c29568 | {
"func_code_index": [
1943,
2139
]
} | 14,023 | ||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | Solidity | Ownable | contract Ownable {
//Variables
address public owner;
address public newOwner;
// Modifiers
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev The O... | 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.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
422,
490
]
} | 14,024 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | Solidity | Ownable | contract Ownable {
//Variables
address public owner;
address public newOwner;
// Modifiers
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev The O... | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0));
newOwner = _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.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
665,
815
]
} | 14,025 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uin... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_va... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
282,
705
]
} | 14,026 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uin... | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
921,
1045
]
} | 14,027 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | 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... | 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.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
401,
853
]
} | 14,028 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | 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... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
1485,
1675
]
} | 14,029 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | 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... | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
1999,
2144
]
} | 14,030 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | 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... | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
2389,
2662
]
} | 14,031 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that wi... | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(0x0, _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
481,
745
]
} | 14,032 | |||
PrivateSale | PrivateSale.sol | 0xe20ed4b3633bea0103807257f2982d0f3e314d60 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that wi... | finishMinting | function finishMinting() onlyOwner public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://6bf2c9d6400d8d435a452df9e889e0cba9703c0f69f711dd11be96c79c974a29 | {
"func_code_index": [
862,
996
]
} | 14,033 | |||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | Chargeable | contract Chargeable {
function sendFee(uint256 kind) internal {
sendFee(msg.sig, kind);
}
function sendFee(bytes4 func, uint256 kind) internal {
address cashier = _getCashier();
if (address(cashier) == address(0x0)) {
return;
}
address payable... | _setCashier | function _setCashier(address addr) internal {
bytes32 slot = _CASHIER_SLOT;
// solhint-disable-next-line no-inline-assembly
assembly {
sstore(slot, addr)
}
}
| /**
* @dev Stores a new address in the cashier slot.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
1292,
1508
]
} | 14,034 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
259,
445
]
} | 14,035 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
723,
864
]
} | 14,036 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
1162,
1359
]
} | 14,037 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
1613,
2089
]
} | 14,038 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
2560,
2697
]
} | 14,039 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
3188,
3471
]
} | 14,040 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
3931,
4066
]
} | 14,041 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
4546,
4717
]
} | 14,042 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
94,
154
]
} | 14,043 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
237,
310
]
} | 14,044 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
534,
616
]
} | 14,045 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
895,
983
]
} | 14,046 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
1647,
1726
]
} | 14,047 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
2039,
2141
]
} | 14,048 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | AddressUtils | library AddressUtils {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param addr address to check
* @return wh... | /**
* Utility library of inline functions on addresses
*/ | NatSpecMultiLine | isContract | function isContract(address addr) internal view returns (bool) {
uint256 size;
// XXX Currently there is no better way to check if there is a contract in an address
// than to check the size of the code at that address.
// See https://ethereum.stackexchange.com/a/14016/36603
// for more details... | /**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param addr address to check
* @return whether the target address is a contract
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
369,
1025
]
} | 14,049 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using AddressUtils for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
func... | /**
* @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 check... | /**
* @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.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
951,
2084
]
} | 14,050 |
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | renounceOwnership | function renounceOwnership() public virtual payable onlyOwner {
sendFee(CONTRACT_KIND);
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
3227,
3421
]
} | 14,051 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | unpause | function unpause() public payable whenPaused onlyOwner {
require(isPausable(), "Contract is not pausable");
sendFee(CONTRACT_KIND);
_paused = false;
emit Unpaused(msg.sender);
}
| /**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
4527,
4750
]
} | 14,052 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
9182,
9270
]
} | 14,053 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
9384,
9476
]
} | 14,054 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
10109,
10197
]
} | 14,055 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | totalSupply | function totalSupply() public override view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
10257,
10362
]
} | 14,056 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | balanceOf | function balanceOf(address account) public override view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
10420,
10544
]
} | 14,057 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
10752,
10930
]
} | 14,058 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | allowance | function allowance(address from, address spender) public virtual override view returns (uint256) {
return _allowances[from][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
10988,
11142
]
} | 14,059 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
11284,
11456
]
} | 14,060 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "Transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
11925,
12274
]
} | 14,061 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
12678,
12897
]
} | 14,062 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(
msg.sender,
spender,
_allowances[msg.sender][spender].sub(subtractedValue, "Decreased allowance below zero")
);
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
13395,
13708
]
} | 14,063 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | _transfer | function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "Transfer from the zero address");
require(recipient != address(0), "Transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
14193,
14757
]
} | 14,064 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "Mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(addre... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
15033,
15409
]
} | 14,065 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "Burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "Burn amount exceeds balance");
_totalSupply = _totalSupply.sub(... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
15736,
16145
]
} | 14,066 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | _approve | function _approve(
address from,
address spender,
uint256 amount
) internal virtual {
require(from != address(0), "Approve from the zero address");
require(spender != address(0), "Approve to the zero address");
_allowances[from][spender] = amount;
emit Approval(from, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `from` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `from` cannot be the zero add... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
16576,
16943
]
} | 14,067 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
17270,
17365
]
} | 14,068 | ||
DirectTokenV2 | DirectTokenV2.sol | 0x8e88c88d570c330190c5420199b25a7e7b402005 | Solidity | BaseTokenChild | contract BaseTokenChild is IERC20, Chargeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 internal constant CONTRACT_KIND = 1;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
string internal _na... | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 /*amount*/
) internal view whenNotPaused {
if (isBlacklistable()) {
require(!isInBlacklist(from), "From is blacklisted");
require(!isInBlacklist(to), "To is blacklisted");
}
}
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9b94fdb85acb638140dc483fcfdbbf0aeabfa189d6d23fb4f8894ab4e11572cf | {
"func_code_index": [
17963,
18289
]
} | 14,069 | ||
FishPoolTwo | @openzeppelin/contracts/ownership/Ownable.sol | 0x27b9b53e0dbff7debe2d1923747648d5ad6b09b0 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() ... | /**
* @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 functions to... | 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.8.4+commit.c7e474f2 | {
"func_code_index": [
750,
889
]
} | 14,070 | ||
FishPoolTwo | @openzeppelin/contracts/ownership/Ownable.sol | 0x27b9b53e0dbff7debe2d1923747648d5ad6b09b0 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() ... | /**
* @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 functions to... | NatSpecMultiLine | transferOwnership | function transferOwnership(address 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.8.4+commit.c7e474f2 | {
"func_code_index": [
1034,
1145
]
} | 14,071 | ||
FishPoolTwo | @openzeppelin/contracts/ownership/Ownable.sol | 0x27b9b53e0dbff7debe2d1923747648d5ad6b09b0 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() ... | /**
* @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 functions to... | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address 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.8.4+commit.c7e474f2 | {
"func_code_index": [
1242,
1503
]
} | 14,072 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | tryAdd | function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
161,
368
]
} | 14,073 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | trySub | function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
496,
647
]
} | 14,074 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | tryMul | function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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 (true, 0);
... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
777,
1177
]
} | 14,075 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | tryDiv | function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
1308,
1460
]
} | 14,076 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | tryMod | function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
1601,
1753
]
} | 14,077 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
1955,
2042
]
} | 14,078 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
2280,
2367
]
} | 14,079 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
2581,
2668
]
} | 14,080 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
2924,
3011
]
} | 14,081 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 (consu... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
3425,
3512
]
} | 14,082 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterp... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
3934,
4097
]
} | 14,083 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invali... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
4753,
4915
]
} | 14,084 | ||
Token | SafeMath.sol | 0xa328b83cb84e1979179723ed5f17158a7cbe63a3 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://0c2742d4e7048c7870e37f0bf9830fb6160a93e9e7491c8c62030cde064e4564 | {
"func_code_index": [
5513,
5675
]
} | 14,085 | ||
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
251,
437
]
} | 14,086 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
707,
848
]
} | 14,087 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
1180,
1377
]
} | 14,088 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
1623,
2099
]
} | 14,089 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
2562,
2699
]
} | 14,090 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
3224,
3574
]
} | 14,091 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
4026,
4161
]
} | 14,092 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
4675,
4846
]
} | 14,093 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
606,
1230
]
} | 14,094 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
2160,
2562
]
} | 14,095 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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 | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
3318,
3496
]
} | 14,096 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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 | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
3721,
3922
]
} | 14,097 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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 | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
4292,
4523
]
} | 14,098 |
BRNG | BRNG.sol | 0xcf89258b3aeda18e8182f36800e0ab05de9408c4 | 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 | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e67e79d5d9259859a53dadd2ba5a58bc268df1ec21a3f7cd86d66ed054484d37 | {
"func_code_index": [
4774,
5095
]
} | 14,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.