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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipien... | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
460,
560
]
} | 25,100 | ||
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipien... | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
839,
954
]
} | 25,101 | ||
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipien... | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
1618,
1697
]
} | 25,102 | ||
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipien... | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
2010,
2146
]
} | 25,103 | ||
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
259,
445
]
} | 25,104 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
723,
864
]
} | 25,105 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
1162,
1393
]
} | 25,106 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
1647,
2123
]
} | 25,107 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
2594,
2731
]
} | 25,108 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
3222,
3539
]
} | 25,109 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
3999,
4134
]
} | 25,110 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
4614,
4819
]
} | 25,111 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
606,
1270
]
} | 25,112 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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}("");
re... | /**
* @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://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
2200,
2674
]
} | 25,113 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
3430,
3633
]
} | 25,114 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
3858,
4093
]
} | 25,115 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
4463,
4824
]
} | 25,116 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | 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... | /**
* @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://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
5075,
5476
]
} | 25,117 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as th... | /**
* @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.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
590,
674
]
} | 25,118 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as th... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
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 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
1232,
1385
]
} | 25,119 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as th... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
1535,
1821
]
} | 25,120 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as th... | /**
* @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 | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
1989,
2208
]
} | 25,121 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as th... | /**
* @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 | unlock | function unlock() public virtual {
require(
_previousOwner == msg.sender,
"You don't have permission to unlock"
);
require(now > _lockTime, "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
2275,
2609
]
} | 25,122 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Mo... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | pause | function pause() public onlyOwner whenNotPaused {
paused = true;
emit Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
559,
667
]
} | 25,123 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Mo... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | unpause | function unpause() public onlyOwner whenPaused {
paused = false;
emit Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
757,
867
]
} | 25,124 |
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | MilkCrate | contract MilkCrate is Context, IERC20, Ownable, Pausable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(addre... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
10813,
10847
]
} | 25,125 | ||||
MilkCrate | MilkCrate.sol | 0x672309b435ae53604d4a8a67b963d9b8f96f4dfa | Solidity | MilkCrate | contract MilkCrate is Context, IERC20, Ownable, Pausable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(addre... | _tokenTransfer | function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
if (!takeFee) removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _is... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.6.12+commit.27d51765 | None | ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8 | {
"func_code_index": [
19380,
20223
]
} | 25,126 | ||
CRPFactory | contracts/test/BNum.sol | 0xed52d8e202401645edad1c0aa21e872498ce47d0 | Solidity | BNum | contract BNum is BConst {
function btoi(uint a)
internal pure
returns (uint)
{
return a / BONE;
}
function bfloor(uint a)
internal pure
returns (uint)
{
return btoi(a) * BONE;
}
function badd(uint a, uint b)
internal pure
ret... | /* solhint-disable private-vars-leading-underscore */ | Comment | bpowi | function bpowi(uint a, uint n)
internal pure
returns (uint)
{
uint z = n % 2 != 0 ? a : BONE;
for (n /= 2; n != 0; n /= 2) {
a = bmul(a, a);
if (n % 2 != 0) {
z = bmul(z, a);
}
}
return z;
}
| // DSMath.wpow | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
1561,
1865
]
} | 25,127 | ||
CRPFactory | contracts/test/BNum.sol | 0xed52d8e202401645edad1c0aa21e872498ce47d0 | Solidity | BNum | contract BNum is BConst {
function btoi(uint a)
internal pure
returns (uint)
{
return a / BONE;
}
function bfloor(uint a)
internal pure
returns (uint)
{
return btoi(a) * BONE;
}
function badd(uint a, uint b)
internal pure
ret... | /* solhint-disable private-vars-leading-underscore */ | Comment | bpow | function bpow(uint base, uint exp)
internal pure
returns (uint)
{
require(base >= MIN_BPOW_BASE, "ERR_BPOW_BASE_TOO_LOW");
require(base <= MAX_BPOW_BASE, "ERR_BPOW_BASE_TOO_HIGH");
uint whole = bfloor(exp);
uint remain = bsub(exp, whole);
uint wholePow = bpowi(base, btoi(whole));
... | // Compute b^(e.w) by splitting it into (b^e)*(b^0.w).
// Use `bpowi` for `b^e` and `bpowK` for k iterations
// of approximation of b^0.w | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
2017,
2558
]
} | 25,128 | ||
CRPFactory | contracts/test/TToken.sol | 0xed52d8e202401645edad1c0aa21e872498ce47d0 | Solidity | TToken | contract TToken {
string private _name;
string private _symbol;
uint8 private _decimals;
address private _owner;
uint internal _totalSupply;
mapping(address => uint) private _balance;
mapping(address => mapping(address=>uint)) private _allowance;
modifier _onlyOw... | // Test Token | LineComment | add | function add(uint a, uint b) internal pure returns (uint c) {
require((c = a + b) >= a);
}
| // Math | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
560,
666
]
} | 25,129 | ||
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | IMigratorToyodaSwap | interface IMigratorToyodaSwap {
// Perform LP token migration from legacy UniswapV2 to yodaSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator mu... | migrate | function migrate(IERC20 token) external returns (IERC20);
| // Perform LP token migration from legacy UniswapV2 to yodaSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// yodaSwap m... | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
548,
610
]
} | 25,130 | ||
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
require(poolId1[address(_lpToken)] == 0, "yodaMasterFarmer::add: lp is already in pool");
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > START_BLOCK ? block.number : STA... | // Add a new lp to the pool. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
3925,
4606
]
} | 25,131 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
| // Update the given pool's yoda allocation point. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
4697,
5006
]
} | 25,132 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | setMigrator | function setMigrator(IMigratorToyodaSwap _migrator) public onlyOwner {
migrator = _migrator;
}
| // Set the migrator contract. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
5077,
5190
]
} | 25,133 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | migrate | function migrate(uint256 _pid) public {
require(address(migrator) != address(0), "migrate: no migrator");
PoolInfo storage pool = poolInfo[_pid];
IERC20 lpToken = pool.lpToken;
uint256 bal = lpToken.balanceOf(address(this));
lpToken.safeApprove(address(migrator), bal);
IERC20 newLpToken = ... | // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
5308,
5804
]
} | 25,134 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward variables for all pools. Be careful of gas spending! | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
5882,
6067
]
} | 25,135 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
6138,
7208
]
} | 25,136 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | getMultiplier | function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
uint256 result = 0;
if (_from < START_BLOCK) return 0;
for (uint256 i = 0; i < HALVING_AT_BLOCK.length; i++) {
uint256 endBlock = HALVING_AT_BLOCK[i];
if (_to <= endBlock) {
uint256 m = _... | // |--------------------------------------|
// [20, 30, 40, 50, 60, 70, 80, 99999999]
// Return reward multiplier over the given _from to _to block. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
7375,
8068
]
} | 25,137 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | pendingReward | function pendingReward(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accyodaPerShare = pool.accyodaPerShare;
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (block.number... | // View function to see pending yodas on frontend. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
8726,
9442
]
} | 25,138 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | _harvest | function _harvest(uint256 _pid) internal {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accyodaPerShare).div(1e12).sub(user.rewardDebt);
uint256 masterBal = yoda.balanceOf(addr... | // lock 75% of reward if it come from bounus time | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
9610,
10682
]
} | 25,139 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | deposit | function deposit(uint256 _pid, uint256 _amount) public {
require(_amount > 0, "yodaMasterFarmer::deposit: amount must be greater than 0");
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
_harvest(_pid);
pool.lpToken.safeTransf... | // Deposit LP tokens to yodaMasterFarmer for yoda allocation. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
10752,
11431
]
} | 25,140 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "yodaMasterFarmer::withdraw: not good");
updatePool(_pid);
_harvest(_pid);
if(_amount > 0) {
... | // Withdraw LP tokens from yodaMasterFarmer. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
11484,
12097
]
} | 25,141 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
pool.lpToken.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(msg.sender, _pid, user.amount);
user.amount = 0;
user.rewardDebt... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
12163,
12524
]
} | 25,142 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | safeyodaTransfer | function safeyodaTransfer(address _to, uint256 _amount) internal {
uint256 yodaBal = yoda.balanceOf(address(this));
if (_amount > yodaBal) {
yoda.transfer(_to, yodaBal);
} else {
yoda.transfer(_to, _amount);
}
}
| // Safe yoda transfer function, just in case if rounding error causes pool to not have enough yodas. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
12633,
12916
]
} | 25,143 |
yodaMasterFarmer | contracts/yodaMasterFarmer.sol | 0xdf2f810a103ec0b184841862d69326799b720aec | Solidity | yodaMasterFarmer | contract yodaMasterFarmer is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewa... | // yodaMasterFarmer is the master of yoda. He can make yoda and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once yoda is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun r... | LineComment | dev | function dev(address _devaddr) public {
require(msg.sender == devaddr, "dev: wut?");
devaddr = _devaddr;
}
| // Update dev address by the previous dev. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://360215d19d25bf0f27e526950b5faeb82a8f1e227fc3399e8496880c8371e13e | {
"func_code_index": [
12967,
13101
]
} | 25,144 |
ShinjiCapital | ShinjiCapital.sol | 0xe92ed7382df37439c3c2ea9759fcc37c488824dc | Solidity | ShinjiCapital | contract ShinjiCapital is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
mapping (address => bool) public isSniper;
bool private _swapping;
uint256 private _launchTime;
address public feeW... | enableTrading | function enableTrading() external onlyOwner {
tradingActive = true;
}
| // once enabled, can never be turned off | LineComment | v0.8.11+commit.d7f03943 | MIT | ipfs://3fbf3bb761fdb659c4e2f5400a28423762facefa161332a7e065d489069af038 | {
"func_code_index": [
4231,
4319
]
} | 25,145 | ||
ShinjiCapital | ShinjiCapital.sol | 0xe92ed7382df37439c3c2ea9759fcc37c488824dc | Solidity | ShinjiCapital | contract ShinjiCapital is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
mapping (address => bool) public isSniper;
bool private _swapping;
uint256 private _launchTime;
address public feeW... | removeLimits | function removeLimits() external onlyOwner returns (bool) {
limitsInEffect = false;
dynamicFeesInEffect = true;
fireSaleTimer = block.timestamp + 1 days;
return true;
}
| // remove limits after token is stable | LineComment | v0.8.11+commit.d7f03943 | MIT | ipfs://3fbf3bb761fdb659c4e2f5400a28423762facefa161332a7e065d489069af038 | {
"func_code_index": [
4370,
4584
]
} | 25,146 | ||
ShinjiCapital | ShinjiCapital.sol | 0xe92ed7382df37439c3c2ea9759fcc37c488824dc | Solidity | ShinjiCapital | contract ShinjiCapital is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
mapping (address => bool) public isSniper;
bool private _swapping;
uint256 private _launchTime;
address public feeW... | updateSwapTokensAtAmount | function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) {
require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");
require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply.");
swapToke... | // change the minimum amount of tokens to sell from fees | LineComment | v0.8.11+commit.d7f03943 | MIT | ipfs://3fbf3bb761fdb659c4e2f5400a28423762facefa161332a7e065d489069af038 | {
"func_code_index": [
4654,
5041
]
} | 25,147 | ||
EchoLockupFund | EchoLockupFund.sol | 0x650e9246a8480e84e6a2048c226e692f67e7745b | Solidity | ERC20Interface | contract ERC20Interface {
// Send _value amount of tokens to address _to
function transfer(address _to, uint256 _value) returns (bool success);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
} | transfer | function transfer(address _to, uint256 _value) returns (bool success);
| // Send _value amount of tokens to address _to | LineComment | v0.4.18+commit.9cf6e910 | bzzr://9520159aa65cfc6589d20f3f89e568b48abf0813aa415a2d61b95716b20c9e9c | {
"func_code_index": [
79,
154
]
} | 25,148 | |||
EchoLockupFund | EchoLockupFund.sol | 0x650e9246a8480e84e6a2048c226e692f67e7745b | Solidity | ERC20Interface | contract ERC20Interface {
// Send _value amount of tokens to address _to
function transfer(address _to, uint256 _value) returns (bool success);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
} | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance);
| // Get the account balance of another account with address _owner | LineComment | v0.4.18+commit.9cf6e910 | bzzr://9520159aa65cfc6589d20f3f89e568b48abf0813aa415a2d61b95716b20c9e9c | {
"func_code_index": [
226,
301
]
} | 25,149 | |||
CodexCoin | contracts/library/SafeMath.sol | 0xf226e38c3007b3d974fc79bcf5a77750035436ee | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://00b8f87c12c7ee39be25557c384332b6030187048f3f4326576421274e54c95e | {
"func_code_index": [
89,
266
]
} | 25,150 | |
CodexCoin | contracts/library/SafeMath.sol | 0xf226e38c3007b3d974fc79bcf5a77750035436ee | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://00b8f87c12c7ee39be25557c384332b6030187048f3f4326576421274e54c95e | {
"func_code_index": [
350,
623
]
} | 25,151 | |
CodexCoin | contracts/library/SafeMath.sol | 0xf226e38c3007b3d974fc79bcf5a77750035436ee | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://00b8f87c12c7ee39be25557c384332b6030187048f3f4326576421274e54c95e | {
"func_code_index": [
737,
853
]
} | 25,152 | |
CodexCoin | contracts/library/SafeMath.sol | 0xf226e38c3007b3d974fc79bcf5a77750035436ee | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://00b8f87c12c7ee39be25557c384332b6030187048f3f4326576421274e54c95e | {
"func_code_index": [
917,
1047
]
} | 25,153 | |
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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);
/**
... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
94,
154
]
} | 25,154 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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);
/**
... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
235,
308
]
} | 25,155 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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);
/**
... | 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 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
530,
612
]
} | 25,156 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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);
/**
... | 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 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
889,
977
]
} | 25,157 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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);
/**
... | 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 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
1639,
1718
]
} | 25,158 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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);
/**
... | 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 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
2029,
2131
]
} | 25,159 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
259,
445
]
} | 25,160 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
721,
862
]
} | 25,161 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
1158,
1353
]
} | 25,162 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
1605,
2077
]
} | 25,163 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
2546,
2683
]
} | 25,164 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
3172,
3453
]
} | 25,165 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
3911,
4046
]
} | 25,166 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
4524,
4695
]
} | 25,167 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
606,
1230
]
} | 25,168 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
2158,
2560
]
} | 25,169 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
3314,
3492
]
} | 25,170 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
3715,
3916
]
} | 25,171 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
4284,
4515
]
} | 25,172 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 ... | 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://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
4764,
5085
]
} | 25,173 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 = _msgSender... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
493,
577
]
} | 25,174 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 = _msgSender... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
1131,
1284
]
} | 25,175 | ||
SOKI | SOKI.sol | 0x1c831a0d77be98e6039aab0d9e0a89fca7db9e39 | 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 = _msgSender... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://09d26b06e42d7140dadc9eeb12ef02cbf418c985f48cc50524338243406b55a0 | {
"func_code_index": [
1432,
1681
]
} | 25,176 | ||
CodexCoin | contracts/CodexCoin.sol | 0xf226e38c3007b3d974fc79bcf5a77750035436ee | Solidity | CodexCoin | contract CodexCoin is PausableToken {
/* solium-disable uppercase */
uint8 constant public decimals = 18;
string constant public name = "CodexCoin";
string constant public symbol = "CODX";
/* solium-enable */
constructor(uint256 _totalSupply) public {
totalSupply_ = _totalSupply;
bal... | reclaimToken | function reclaimToken(ERC20Basic token) external onlyOwner {
uint256 balance = token.balanceOf(this);
token.transfer(owner, balance);
}
| /**
* @dev Reclaim all ERC20Basic compatible tokens
* @param token ERC20Basic The address of the token contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://00b8f87c12c7ee39be25557c384332b6030187048f3f4326576421274e54c95e | {
"func_code_index": [
492,
643
]
} | 25,177 | |||
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| //Returns decimals that this token uses. | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
860,
948
]
} | 25,178 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | name | function name() public view returns (string memory) {
return _name;
}
| //Returns the token name | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
983,
1071
]
} | 25,179 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| //Returns the symbol | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
1102,
1194
]
} | 25,180 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public override view returns (uint) {
return _totalSupply;
}
| // Return total supply | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
1227,
1329
]
} | 25,181 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address _token_owner) public override view returns (uint balance) {
return balances[_token_owner];
}
| // Return the token balance for account tokenOwner | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
1390,
1528
]
} | 25,182 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address _to, uint _num_tokens) public override returns (bool success) {
require(_num_tokens <= balances[msg.sender], "You are trying to transfer more tokens than you have");
balances[msg.sender] = safemath.sub(balances[msg.sender], _num_tokens);
balances[_to] = safemath.add(balances[_... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
1872,
2310
]
} | 25,183 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public override returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
2817,
3039
]
} | 25,184 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | increaseAllowance | function increaseAllowance(address _spender, uint256 _addedValue) external returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
allowed[msg.sender][_spender] = safemath.add(oldValue, _addedValue);
emit Approval(msg.sender, _spender, safemath.add(oldValue, _addedValue));
return tru... | // Non-standard approval function that takes care of the potential double-spend issue
// If a user wants to ensure that the double spend issue doesn't become a problem, they can choose
// to use this function instead of the standard approve function. | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
3310,
3660
]
} | 25,185 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | decreaseAllowance | function decreaseAllowance(address _spender, uint256 _subtractedValue) external returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
allowed[msg.sender][_spender] = safemath.sub(oldValue, _subtractedValue);
emit Approval(msg.sender, _spender, safemath.sub(oldValue, _subtractedValue));
... | // Non-standard approval function that takes care of the potential double-spend issue
// If a user wants to ensure that the double spend issue doesn't become a problem, they can choose
// to use this function instead of the standard approve function. | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
3931,
4296
]
} | 25,186 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public override returns (bool success) {
balances[from] = safemath.sub(balances[from], tokens);
allowed[from][msg.sender] = safemath.sub(allowed[from][msg.sender], tokens);
balances[to] = safemath.add(balances[to], tokens);
emit Transfer(f... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - Sp... | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
4826,
5213
]
} | 25,187 |
ChainlinkReceiver | ERC20.sol | 0xd6adce6d6049fb7d9ded629a7dfa34984310fcb0 | Solidity | ERC20 | contract ERC20 is IERC20 {
string public _symbol;
string public _name;
uint8 public _decimals;
uint public _totalSupply;
// For each person map between their address and the number of tokens they have
mapping(address => uint) balances;
// To transfer erc20 token, give contract permi... | // ----------------------------------------------------------------------------
// Implementation of ERC20 Standard
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public override view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.7.3+commit.9bfce1f6 | None | ipfs://f2c287e64a52349e9a690f2b544b78d710907037e80c1f2cc8b07282c1792e72 | {
"func_code_index": [
5496,
5657
]
} | 25,188 |
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
94,
154
]
} | 25,189 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
237,
310
]
} | 25,190 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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);
/**... | 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 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
534,
616
]
} | 25,191 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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);
/**... | 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 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
895,
983
]
} | 25,192 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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);
/**... | 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 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
1647,
1726
]
} | 25,193 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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);
/**... | 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 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
2039,
2141
]
} | 25,194 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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 ... | 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://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
259,
445
]
} | 25,195 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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 ... | 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://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
723,
864
]
} | 25,196 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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 ... | 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 | None | ipfs://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
1162,
1359
]
} | 25,197 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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 ... | 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://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
1613,
2089
]
} | 25,198 | ||
ZeepyNetwork | ZeepyNetwork.sol | 0x9078f955b8c262382ef28592488916f4f6b58b07 | 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 ... | 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://b46052f49ff05ac6bf9702a1cd07ec46100afc6f10acdf22ed105dd5fc95f1ec | {
"func_code_index": [
2560,
2697
]
} | 25,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.