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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 r... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
104,
168
]
} | 700 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 r... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
261,
338
]
} | 701 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 r... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
584,
670
]
} | 702 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 r... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
971,
1063
]
} | 703 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 r... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
1770,
1853
]
} | 704 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 r... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
2194,
2300
]
} | 705 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
290,
496
]
} | 706 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
805,
958
]
} | 707 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
1287,
1504
]
} | 708 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
1789,
2309
]
} | 709 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
2817,
2966
]
} | 710 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
3494,
3801
]
} | 711 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
4298,
4445
]
} | 712 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
4962,
5149
]
} | 713 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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.
*
* Amon... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
658,
1322
]
} | 714 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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.
*
* Amon... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
2301,
2727
]
} | 715 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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.
*
* Amon... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
3538,
3726
]
} | 716 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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.
*
* Amon... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
3970,
4183
]
} | 717 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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.
*
* Amon... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
4587,
4830
]
} | 718 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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.
*
* Amon... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
5100,
5437
]
} | 719 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 the ... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
622,
718
]
} | 720 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 the ... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
1324,
1493
]
} | 721 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 the ... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
1656,
1925
]
} | 722 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 the ... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
2109,
2352
]
} | 723 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | 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 the ... | 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 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
2431,
2753
]
} | 724 | ||
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | Solidity | RangikuInu | contract RangikuInu is Context, IERC20, Ownable {
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;
... | // Contract implementation | LineComment | manualSwap | function manualSwap() external onlyOwner() {
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
| // We are exposing these functions to be able to manual swap and send
// in case the token is highly valued and 5M becomes too much | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
11714,
11891
]
} | 725 |
RangikuInu | RangikuInu.sol | 0x8608deb942ca8dfaf02f0e3a152224f2b9bb1c3b | Solidity | RangikuInu | contract RangikuInu is Context, IERC20, Ownable {
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;
... | // Contract implementation | LineComment | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://c5e7269e0826b349706b321a902fde15dbc22b9e5af4bf5e2575db812f66f9c8 | {
"func_code_index": [
16214,
16252
]
} | 726 | ||
PhunkyFungi | PhunkyFungi.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | PhunkyFungi | contract PhunkyFungi is ERC721A, MultisigOwnable {
using Strings for uint256;
address private immutable _revenueRecipient;
bytes32 private _presaleMerkleRoot;
bytes32 private _collabMerkleRoot;
mapping(address=>uint) private _presaleClaimed;
mapping(address=>bool) private _collabClaimed;
... | airdrop | function airdrop(address to, uint quantity) external onlyOwner {
require(airdropped == false, "ALREADY_AIRDROPPED");
require(quantity <= TEAM_AIRDROP_LIMIT, "EXCEEDS_AIRDROP_LIMIT");
airdropped = true;
_safeMint(to, quantity);
}
| /// @notice the initial 100 tokens will be minted to the team vault for use in giveaways and collaborations. | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1901,
2169
]
} | 727 | ||||
PhunkyFungi | PhunkyFungi.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | PhunkyFungi | contract PhunkyFungi is ERC721A, MultisigOwnable {
using Strings for uint256;
address private immutable _revenueRecipient;
bytes32 private _presaleMerkleRoot;
bytes32 private _collabMerkleRoot;
mapping(address=>uint) private _presaleClaimed;
mapping(address=>bool) private _collabClaimed;
... | _baseURI | function _baseURI() internal view override returns (string memory) {
return _baseUri;
}
| /// @dev override base uri. It will be combined with token ID | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5377,
5480
]
} | 728 | ||||
PhunkyFungi | PhunkyFungi.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | PhunkyFungi | contract PhunkyFungi is ERC721A, MultisigOwnable {
using Strings for uint256;
address private immutable _revenueRecipient;
bytes32 private _presaleMerkleRoot;
bytes32 private _collabMerkleRoot;
mapping(address=>uint) private _presaleClaimed;
mapping(address=>bool) private _collabClaimed;
... | withdraw | function withdraw() external {
uint256 balance = address(this).balance;
require(balance > 0, "NO_BALANCE");
(bool success, ) = payable(_revenueRecipient).call{ value: balance }("");
require(success, "WITHDRAW_FAILED");
}
| /// @notice Withdraw's contract's balance to the withdrawal address | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5554,
5815
]
} | 729 | ||||
PhunkyFungi | PhunkyFungi.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | PhunkyFungi | contract PhunkyFungi is ERC721A, MultisigOwnable {
using Strings for uint256;
address private immutable _revenueRecipient;
bytes32 private _presaleMerkleRoot;
bytes32 private _collabMerkleRoot;
mapping(address=>uint) private _presaleClaimed;
mapping(address=>bool) private _collabClaimed;
... | collabMint | function collabMint(bytes32[] calldata _merkleProof) external payable {
require(isCollabSaleActive(), "COLLAB_SALE_INACTIVE");
require(_collabClaimed[msg.sender] == false, "1_TOKEN_LIMIT");
require(totalSupply() < COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE");
require(verifyCollab(_merkleProof, msg.sender... | /// @notice each address on the collaboration list may mint 1 token at the collab sale price | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6491,
7003
]
} | 730 | ||||
PhunkyFungi | PhunkyFungi.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | PhunkyFungi | contract PhunkyFungi is ERC721A, MultisigOwnable {
using Strings for uint256;
address private immutable _revenueRecipient;
bytes32 private _presaleMerkleRoot;
bytes32 private _collabMerkleRoot;
mapping(address=>uint) private _presaleClaimed;
mapping(address=>bool) private _collabClaimed;
... | presaleMint | function presaleMint(bytes32[] calldata _merkleProof, uint quantity) external payable {
require(isPresaleActive(), "PRESALE_INACTIVE");
require(verifyPresale(_merkleProof, msg.sender), "PRESALE_NOT_VERIFIED");
require(totalSupply() + quantity <= COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE");
require(_pres... | /// @notice each address on the presale list may mint up to 3 tokens at the presale price | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7103,
7722
]
} | 731 | ||||
PhunkyFungi | PhunkyFungi.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | PhunkyFungi | contract PhunkyFungi is ERC721A, MultisigOwnable {
using Strings for uint256;
address private immutable _revenueRecipient;
bytes32 private _presaleMerkleRoot;
bytes32 private _collabMerkleRoot;
mapping(address=>uint) private _presaleClaimed;
mapping(address=>bool) private _collabClaimed;
... | mint | function mint(uint quantity) external payable {
require(isPublicSaleActive(), "PUBLIC_SALE_INACTIVE");
require(quantity <= PUBLIC_LIMIT, "5_TOKEN_LIMIT");
require(totalSupply() + quantity <= COLLECTION_SIZE, "EXCEEDS_COLLECTION_SIZE");
uint cost;
cost = quantity * PUBLIC_PRICE;
require(msg.value... | /// @notice may mint up to 5 tokens per transaction at the public sale price. | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7806,
8229
]
} | 732 | ||||
CVXStrategy | /contracts/main/strategies/CVXStrategy.sol | 0x228ef81476fa6eeb48be28a35bb11e9282f31c89 | Solidity | CVXStrategy | contract CVXStrategy is ClaimableStrategy {
ICVXRewards public cvxRewards;
function configure(
address _wantAddress,
address _controllerAddress,
address _governance,
address _cvxRewards
) public onlyOwner initializer {
_configure(_wantAddress, _controllerAddress, _go... | /// @title CVXStrategy
/// @notice CVXVault strategy: in CVX out cvxCRV | NatSpecSingleLine | deposit | function deposit() external override onlyController {
IERC20 wantToken = IERC20(_want);
uint256 _amount = wantToken.balanceOf(address(this));
if (wantToken.allowance(address(this), address(cvxRewards)) == 0) {
wantToken.approve(address(cvxRewards), uint256(-1));
}
cvxRewards.stake(_amount);
... | /// @dev Function that controller calls | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
429,
782
]
} | 733 | ||
GrowthLockContract | GrowthLockContract.sol | 0x33729ec887c974cc6f692646c28137d22517b03f | Solidity | GrowthLockContract | contract GrowthLockContract {
address private owner;
address private safe;
address private mike;
address private ghost;
address private dev;
uint256 public time;
uint private constant devAmount = 4166.66 * 1 ether;
uint private constant managementAmount = 1388.88 * 1 eth... | ///Contract that vests 200K GRO then payout after every month for the next 24 months. | NatSpecSingleLine | depositToken | function depositToken(uint amount) public onlyOwner {
require(amount > 0, "Amount must be greater than zero");
require(token.transferFrom(msg.sender, address(this), amount) == true, "Inefficient balance or Unauthorized to pay. ");
}
| //Admin can deposit the initial vested amount. You can only use this function once. | LineComment | v0.7.1+commit.f4a555be | MIT | ipfs://7be7aab06df9eea6ee52941d5a089f2daa3fa716cbffcaa4f8025405372d76cf | {
"func_code_index": [
1267,
1539
]
} | 734 |
GrowthLockContract | GrowthLockContract.sol | 0x33729ec887c974cc6f692646c28137d22517b03f | Solidity | GrowthLockContract | contract GrowthLockContract {
address private owner;
address private safe;
address private mike;
address private ghost;
address private dev;
uint256 public time;
uint private constant devAmount = 4166.66 * 1 ether;
uint private constant managementAmount = 1388.88 * 1 eth... | ///Contract that vests 200K GRO then payout after every month for the next 24 months. | NatSpecSingleLine | payToken | function payToken() public onlyOwner {
//check if it's past the next payperiod.
require(block.timestamp >= (time + locktime), "Period not reached yet. ");
//Sends dev payment.
require(token.transfer(dev, devAmount) == true, "You don't have enough in balance. ");
//sends... | //Admin pays dev and management team. | LineComment | v0.7.1+commit.f4a555be | MIT | ipfs://7be7aab06df9eea6ee52941d5a089f2daa3fa716cbffcaa4f8025405372d76cf | {
"func_code_index": [
1595,
2329
]
} | 735 |
GrowthLockContract | GrowthLockContract.sol | 0x33729ec887c974cc6f692646c28137d22517b03f | Solidity | GrowthLockContract | contract GrowthLockContract {
address private owner;
address private safe;
address private mike;
address private ghost;
address private dev;
uint256 public time;
uint private constant devAmount = 4166.66 * 1 ether;
uint private constant managementAmount = 1388.88 * 1 eth... | ///Contract that vests 200K GRO then payout after every month for the next 24 months. | NatSpecSingleLine | getBalance | function getBalance() view public returns (uint) {
return token.balanceOf(address(this));
}
| //Used to check contract balance. | LineComment | v0.7.1+commit.f4a555be | MIT | ipfs://7be7aab06df9eea6ee52941d5a089f2daa3fa716cbffcaa4f8025405372d76cf | {
"func_code_index": [
2382,
2492
]
} | 736 |
GrowthLockContract | GrowthLockContract.sol | 0x33729ec887c974cc6f692646c28137d22517b03f | Solidity | GrowthLockContract | contract GrowthLockContract {
address private owner;
address private safe;
address private mike;
address private ghost;
address private dev;
uint256 public time;
uint private constant devAmount = 4166.66 * 1 ether;
uint private constant managementAmount = 1388.88 * 1 eth... | ///Contract that vests 200K GRO then payout after every month for the next 24 months. | NatSpecSingleLine | updateOwner | function updateOwner(address newOwner) public onlyOwner {
owner = newOwner;
}
| ///Updates the owner of the contract | NatSpecSingleLine | v0.7.1+commit.f4a555be | MIT | ipfs://7be7aab06df9eea6ee52941d5a089f2daa3fa716cbffcaa4f8025405372d76cf | {
"func_code_index": [
2541,
2640
]
} | 737 |
GrowthLockContract | GrowthLockContract.sol | 0x33729ec887c974cc6f692646c28137d22517b03f | Solidity | GrowthLockContract | contract GrowthLockContract {
address private owner;
address private safe;
address private mike;
address private ghost;
address private dev;
uint256 public time;
uint private constant devAmount = 4166.66 * 1 ether;
uint private constant managementAmount = 1388.88 * 1 eth... | ///Contract that vests 200K GRO then payout after every month for the next 24 months. | NatSpecSingleLine | updateManagement | function updateManagement(address _mike, address _ghost, address _safe, address _dev) public onlyOwner {
mike = _mike;
ghost = _ghost;
safe = _safe;
dev = _dev;
}
| //Used incase management teams lost their wallet and needs to updated. | LineComment | v0.7.1+commit.f4a555be | MIT | ipfs://7be7aab06df9eea6ee52941d5a089f2daa3fa716cbffcaa4f8025405372d76cf | {
"func_code_index": [
2725,
2935
]
} | 738 |
GrowthLockContract | GrowthLockContract.sol | 0x33729ec887c974cc6f692646c28137d22517b03f | Solidity | GrowthLockContract | contract GrowthLockContract {
address private owner;
address private safe;
address private mike;
address private ghost;
address private dev;
uint256 public time;
uint private constant devAmount = 4166.66 * 1 ether;
uint private constant managementAmount = 1388.88 * 1 eth... | ///Contract that vests 200K GRO then payout after every month for the next 24 months. | NatSpecSingleLine | getOwner | function getOwner() view public returns (address) {
return owner;
}
| //Check who owner is. | LineComment | v0.7.1+commit.f4a555be | MIT | ipfs://7be7aab06df9eea6ee52941d5a089f2daa3fa716cbffcaa4f8025405372d76cf | {
"func_code_index": [
2970,
3057
]
} | 739 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/utils/supports-interface.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | SupportsInterface | contract SupportsInterface is
ERC165
{
/**
* @dev Mapping of supported intefraces.
* @notice You must not set element 0xffffffff to true.
*/
mapping(bytes4 => bool) internal supportedInterfaces;
/**
* @dev Contract constructor.
*/
constructor()
public
{
supportedInte... | /**
* @dev Implementation of standard for detect smart contract interfaces.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(
bytes4 _interfaceID
)
external
override
view
returns (bool)
{
return supportedInterfaces[_interfaceID];
}
| /**
* @dev Function to check which interfaces are suported by this contract.
* @param _interfaceID Id of the interface.
* @return True if _interfaceID is supported, false otherwise.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
569,
744
]
} | 740 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/erc721-token-receiver.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | ERC721TokenReceiver | interface ERC721TokenReceiver
{
/**
* @dev Handle the receipt of a NFT. The ERC721 smart contract calls this function on the
* recipient after a `transfer`. This function MAY throw to revert and reject the transfer. Return
* of other than the magic value MUST result in the transaction being reverted.
... | /**
* @dev ERC-721 interface for accepting safe transfers.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address _operator,
address _from,
uint256 _tokenId,
bytes calldata _data
)
external
returns(bytes4);
| /**
* @dev Handle the receipt of a NFT. The ERC721 smart contract calls this function on the
* recipient after a `transfer`. This function MAY throw to revert and reject the transfer. Return
* of other than the magic value MUST result in the transaction being reverted.
* Returns `bytes4(keccak256("onERC721Recei... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
973,
1136
]
} | 741 |
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
60,
124
]
} | 742 | |||
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
232,
309
]
} | 743 | |||
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
546,
623
]
} | 744 | |||
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
946,
1042
]
} | 745 | |||
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
1326,
1407
]
} | 746 | |||
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
1615,
1712
]
} | 747 | |||
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | BoxTrade | contract BoxTrade is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to custom... | //name this contract whatever you'd like | LineComment | BoxTrade | function BoxTrade(
) {
balances[msg.sender] = 100000000000000000;
totalSupply = 100000000000000000;
name = "BoxTrade"; // Set the name for display purposes
decimals = 5; // Amount of decimals for display purposes
symbol = "BOXY";... | //human 0.1 standard. Just an arbitrary versioning scheme. | LineComment | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
919,
1344
]
} | 748 | |
BoxTrade | BoxTrade.sol | 0xa64ea8089a4b0253edcae9c71ffcdb576988044a | Solidity | BoxTrade | contract BoxTrade is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to custom... | //name this contract whatever you'd like | LineComment | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.23+commit.124ca40d | bzzr://6ee808c1f3f66dd83e1917ab6984026984a6adfa57bca627495e144d8fac79c2 | {
"func_code_index": [
1405,
2210
]
} | 749 | |
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Router02 | contract UniswapV2Router02 is IUniswapV2Router02 {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
_;
}
con... | _addLiquidity | function _addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin
) internal virtual returns (uint amountA, uint amountB) {
// create the pair if it doesn't exist yet
if (IUniswapV2Factory(factory).getPair(tokenA, ... | // **** ADD LIQUIDITY **** | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
600,
1995
]
} | 750 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Router02 | contract UniswapV2Router02 is IUniswapV2Router02 {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
_;
}
con... | removeLiquidity | function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB... | // **** REMOVE LIQUIDITY **** | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
3757,
4627
]
} | 751 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Router02 | contract UniswapV2Router02 is IUniswapV2Router02 {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
_;
}
con... | removeLiquidityETHSupportingFeeOnTransferTokens | function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) public virtual override ensure(deadline) returns (uint amountETH) {
(, amountETH) = removeLiquidity(
token,
W... | // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
6738,
7443
]
} | 752 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Router02 | contract UniswapV2Router02 is IUniswapV2Router02 {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
_;
}
con... | _swap | function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
for (uint i; i < path.length - 1; i++) {
(address input, address output) = (path[i], path[i + 1]);
(address token0,) = UniswapV2Library.sortTokens(input, output);
uint amountOut = amounts[i + 1];... | // **** SWAP ****
// requires the initial amount to have already been sent to the first pair | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
8273,
9013
]
} | 753 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Router02 | contract UniswapV2Router02 is IUniswapV2Router02 {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
_;
}
con... | _swapSupportingFeeOnTransferTokens | function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
for (uint i; i < path.length - 1; i++) {
(address input, address output) = (path[i], path[i + 1]);
(address token0,) = UniswapV2Library.sortTokens(input, output);
IUniswapV2Pair pair = IUni... | // **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
13610,
14829
]
} | 754 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Router02 | contract UniswapV2Router02 is IUniswapV2Router02 {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
_;
}
con... | quote | function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) {
return UniswapV2Library.quote(amountA, reserveA, reserveB);
}
| // **** LIBRARY FUNCTIONS **** | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
17293,
17486
]
} | 755 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | sortTokens | function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'UniswapV2Library: ZERO_... | // returns sorted token addresses, used to handle return values from pairs sorted in this order | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
161,
515
]
} | 756 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | pairFor | function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(uint(keccak256(abi.encodePacked(
hex'ff',
factory,
keccak256(abi.encodePacked(token0, to... | // calculates the CREATE2 address for a pair without making any external calls | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
602,
1085
]
} | 757 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getReserves | function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == t... | // fetches and sorts the reserves for a pair | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
1138,
1534
]
} | 758 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | quote | function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
amountB = amountA.mul(reserveB) / reserveA;
}
| // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
1642,
1968
]
} | 759 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountOut | function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint amountInWithFee = amountIn.mul(99... | // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
2085,
2607
]
} | 760 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountIn | function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint numerator = reserveIn.mul(amount... | // given an output amount of an asset and pair reserves, returns a required input amount of the other asset | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
2723,
3200
]
} | 761 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountsOut | function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[0] = amountIn;
for (uint i; i < path.length - 1; i++) {
(uint... | // performs chained getAmountOut calculations on any number of pairs | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
3277,
3793
]
} | 762 | ||
UinswapTaxedRouter | contracts/uniswap_routerV2.sol | 0xaf688dc793e75ba61694ce3e6167ab6072fbf7bd | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountsIn | function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint i = path.length - 1; i > 0;... | // performs chained getAmountIn calculations on any number of pairs | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://b585757671d7273483129a977dcee7ec3d83292d8f01e8594c04b1ae6045d497 | {
"func_code_index": [
3869,
4406
]
} | 763 | ||
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | SafeMath | library SafeMath {
//multiply
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
//divide
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); /... | //Math operations with safety checks that throw on error | LineComment | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
| //multiply | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
38,
204
]
} | 764 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | SafeMath | library SafeMath {
//multiply
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
//divide
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); /... | //Math operations with safety checks that throw on error | LineComment | 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;
}
| //divide | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
219,
512
]
} | 765 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | SafeMath | library SafeMath {
//multiply
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
//divide
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); /... | //Math operations with safety checks that throw on error | LineComment | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| //subtract | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
531,
659
]
} | 766 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | SafeMath | library SafeMath {
//multiply
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
//divide
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); /... | //Math operations with safety checks that throw on error | LineComment | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| //addition | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
678,
830
]
} | 767 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | name | function name() public view returns (string) {
return _name;
}
| // Returns the _name of the token | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
632,
721
]
} | 768 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | symbol | function symbol() public view returns (string) {
return _symbol;
}
| // Returns the _symbol of the token | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
765,
850
]
} | 769 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | standard | function standard() public view returns (string) {
return _standard;
}
| // Returns the _standard of the token | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
896,
985
]
} | 770 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | decimals | function decimals() public view returns (uint256) {
return _decimals;
}
| // Returns the _decimals of the token | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
1031,
1121
]
} | 771 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| // Function to return the total supply of the token | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
1181,
1277
]
} | 772 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | balanceOf | function balanceOf(address _user) public view returns (uint256 balance){
return balances[_user];
}
| // Function to return the balance of a specified address | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
1342,
1462
]
} | 773 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | transfer | function transfer(address _to, uint256 _value) public returns (bool success){
bytes memory _empty;
if(isContract(_to)){
return transferToContract(_to, _value, _empty);
}else{
return transferToAddress(_to, _value, _empty);
}
}
| // Transfer function to be compatable with ERC20 Standard | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
1528,
1825
]
} | 774 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | transfer | function transfer(address _to, uint256 _value, bytes _data) public returns (bool success) {
if(isContract(_to)){
return transferToContract(_to, _value, _data);
}else{
return transferToAddress(_to, _value, _data);
}
}
| // Transfer function to be compatable with ERC223 Standard | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
1892,
2171
]
} | 775 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | isContract | function isContract(address _to) internal view returns (bool) {
uint256 _codeLength;
assembly {
_codeLength := extcodesize(_to)
}
return _codeLength > 0;
}
| // This function checks if the address is a contract or wallet
// If the codeLength is greater than 0, it is a contract | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
2304,
2522
]
} | 776 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | transferToContract | function transferToContract(address _to, uint256 _value, bytes _data) internal returns (bool) {
require(balances[msg.sender] >= _value);
require(vestingEnded(msg.sender));
// This will override settings and allow contract owner to send to contract
if(msg.sender != contractOwner){
... | // This function to be used if the target is a contract address | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
2594,
3346
]
} | 777 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | transferToAddress | function transferToAddress(address _to, uint256 _value, bytes _data) internal returns (bool) {
require(balances[msg.sender] >= _value);
require(vestingEnded(msg.sender));
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.se... | // This function to be used if the target is a normal eth/wallet address | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
3428,
3877
]
} | 778 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success){
require(_value <= allowed[_from][msg.sender]);
require(_value <= balances[_from]);
require(vestingEnded(_from));
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_v... | // ERC20 standard function | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
3912,
4418
]
} | 779 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | approve | function approve(address _spender, uint256 _value) public returns (bool success){
allowed[msg.sender][_spender] = 0;
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| // ERC20 standard function | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
4453,
4719
]
} | 780 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining){
return allowed[_owner][_spender];
}
| // ERC20 standard function | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
4754,
4902
]
} | 781 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | function () public {
revert();
}
| // Stops any attempt from sending Ether to this contract | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
4967,
5018
]
} | 782 | ||
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | burn | function burn(uint256 _value) public ownerOnly {
_burn(msg.sender, _value);
}
| // public function to call the _burn function | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
5073,
5169
]
} | 783 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | _burn | function _burn(address _user, uint256 _value) internal ownerOnly {
require(balances[_user] >= _value);
balances[_user] = balances[_user].sub(_value);
_totalSupply = _totalSupply.sub(_value);
emit Burn(_user, _value);
emit Transfer(_user, address(0), _value);
bytes memory _emp... | // Burn the specified amount of tokens by the owner | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
5229,
5647
]
} | 784 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | addVesting | function addVesting(address _user, uint256 _amount) public ownerOnly {
vestings[_user].amount = _amount;
vestings[_user].endTime = now + 180 days;
}
| // Create a vesting entry for the specified user | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
5704,
5880
]
} | 785 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | getVestedAmount | function getVestedAmount(address _user) public view returns (uint256 _amount) {
_amount = vestings[_user].amount;
return _amount;
}
| // Returns the vested amount for a specified user | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
5938,
6097
]
} | 786 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | getVestingEndTime | function getVestingEndTime(address _user) public view returns (uint256 _endTime) {
_endTime = vestings[_user].endTime;
return _endTime;
}
| // Returns the vested end time for a specified user | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
6157,
6322
]
} | 787 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | vestingEnded | function vestingEnded(address _user) public view returns (bool) {
if(vestings[_user].endTime <= now) {
return true;
}
else {
return false;
}
}
| // Checks if the venting period is over for a specified user | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
6391,
6605
]
} | 788 | |
NatminToken | NatminToken.sol | 0x4afea0f1252335e5e6be870139de87725e16560b | Solidity | NatminToken | contract NatminToken is ERC20Standard, ERC223Standard, Ownable, NatminVesting, BurnToken {
using SafeMath for uint256;
string _name = "Natmin";
string _symbol = "NAT";
string _standard = "ERC20 / ERC223";
uint256 _decimals = 18; // same value as wei
uint256 _totalSupply;
mapping(a... | //NatminToken implements the ERC20, ERC223 standard methods | LineComment | endVesting | function endVesting(address _user) public ownerOnly {
vestings[_user].endTime = now;
}
| // Manual end vested time | LineComment | v0.4.24+commit.e67f0147 | bzzr://d3b6d4fbdfe9a9e2b9830828b19ebc9c394b1189b9577697fa8cf5e8a6808b3e | {
"func_code_index": [
6640,
6745
]
} | 789 | |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/math/safe-math.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | SafeMath | library SafeMath
{
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant OVERFLOW = "008001";
string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
string constant DIVISION_BY_ZERO = "00... | /**
* @dev Math operations with safety checks that throw on error. This contract is based on the
* source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
*/ | NatSpecMultiLine | mul | function mul(
uint256 _factor1,
uint256 _factor2
)
internal
pure
returns (uint256 product)
{
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_... | /**
* @dev Multiplies two numbers, reverts on overflow.
* @param _factor1 Factor number.
* @param _factor2 Factor number.
* @return product The product of the two factors.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
528,
1016
]
} | 790 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/math/safe-math.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | SafeMath | library SafeMath
{
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant OVERFLOW = "008001";
string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
string constant DIVISION_BY_ZERO = "00... | /**
* @dev Math operations with safety checks that throw on error. This contract is based on the
* source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
*/ | NatSpecMultiLine | div | function div(
uint256 _dividend,
uint256 _divisor
)
internal
pure
returns (uint256 quotient)
{
// Solidity automatically asserts when dividing by 0, using all gas.
require(_divisor > 0, DIVISION_BY_ZERO);
quotient = _dividend / _divisor;
// assert(_dividend == _divisor * quotient + _dividen... | /**
* @dev Integer division of two numbers, truncating the quotient, reverts on division by zero.
* @param _dividend Dividend number.
* @param _divisor Divisor number.
* @return quotient The quotient.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
1246,
1658
]
} | 791 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/math/safe-math.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | SafeMath | library SafeMath
{
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant OVERFLOW = "008001";
string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
string constant DIVISION_BY_ZERO = "00... | /**
* @dev Math operations with safety checks that throw on error. This contract is based on the
* source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
*/ | NatSpecMultiLine | sub | function sub(
uint256 _minuend,
uint256 _subtrahend
)
internal
pure
returns (uint256 difference)
{
require(_subtrahend <= _minuend, SUBTRAHEND_GREATER_THEN_MINUEND);
difference = _minuend - _subtrahend;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
* @param _minuend Minuend number.
* @param _subtrahend Subtrahend number.
* @return difference Difference.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
1894,
2145
]
} | 792 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/math/safe-math.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | SafeMath | library SafeMath
{
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant OVERFLOW = "008001";
string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
string constant DIVISION_BY_ZERO = "00... | /**
* @dev Math operations with safety checks that throw on error. This contract is based on the
* source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
*/ | NatSpecMultiLine | add | function add(
uint256 _addend1,
uint256 _addend2
)
internal
pure
returns (uint256 sum)
{
sum = _addend1 + _addend2;
require(sum >= _addend1, OVERFLOW);
}
| /**
* @dev Adds two numbers, reverts on overflow.
* @param _addend1 Number.
* @param _addend2 Number.
* @return sum Sum.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
2295,
2495
]
} | 793 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/math/safe-math.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | SafeMath | library SafeMath
{
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant OVERFLOW = "008001";
string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
string constant DIVISION_BY_ZERO = "00... | /**
* @dev Math operations with safety checks that throw on error. This contract is based on the
* source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
*/ | NatSpecMultiLine | mod | function mod(
uint256 _dividend,
uint256 _divisor
)
internal
pure
returns (uint256 remainder)
{
require(_divisor != 0, DIVISION_BY_ZERO);
remainder = _dividend % _divisor;
}
| /**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo), reverts when
* dividing by zero.
* @param _dividend Number.
* @param _divisor Number.
* @return remainder Remainder.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
2735,
2955
]
} | 794 |
UniV3LiquidityAMO_V2 | contracts/Misc_AMOs/UniV3LiquidityAMO_V2.sol | 0xc91bb4b0696e3b48c0c501b4ce8e7244fc363a79 | Solidity | UniV3LiquidityAMO_V2 | contract UniV3LiquidityAMO_V2 is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20;
/* ========== STATE VARIABLES ========== */
// Core
FRAXStablecoin private FRAX;
FRAXShares private FXS;
IFraxAMOMinter private amo_minter;
ERC20 private giveback_collateral;
address pub... | showAllocations | function showAllocations() public view returns (uint256[4] memory allocations) {
// All numbers given are in FRAX unless otherwise stated
// Unallocated FRAX
allocations[0] = FRAX.balanceOf(address(this));
// Unallocated Collateral Dollar Value (E18)
allocations[1] = freeColDolVal();
// Sum o... | /* ========== VIEWS ========== */ | Comment | v0.8.6+commit.11564f7e | {
"func_code_index": [
3351,
3908
]
} | 795 | ||||
UniV3LiquidityAMO_V2 | contracts/Misc_AMOs/UniV3LiquidityAMO_V2.sol | 0xc91bb4b0696e3b48c0c501b4ce8e7244fc363a79 | Solidity | UniV3LiquidityAMO_V2 | contract UniV3LiquidityAMO_V2 is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20;
/* ========== STATE VARIABLES ========== */
// Core
FRAXStablecoin private FRAX;
FRAXShares private FXS;
IFraxAMOMinter private amo_minter;
ERC20 private giveback_collateral;
address pub... | freeColDolVal | function freeColDolVal() public view returns (uint256) {
uint256 value_tally_e18 = 0;
for (uint i = 0; i < collateral_addresses.length; i++){
ERC20 thisCollateral = ERC20(collateral_addresses[i]);
uint256 missing_decs = uint256(18).sub(thisCollateral.decimals());
uint256 col_bal_e18 = th... | // E18 Collateral dollar value | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
3945,
4574
]
} | 796 | ||||
UniV3LiquidityAMO_V2 | contracts/Misc_AMOs/UniV3LiquidityAMO_V2.sol | 0xc91bb4b0696e3b48c0c501b4ce8e7244fc363a79 | Solidity | UniV3LiquidityAMO_V2 | contract UniV3LiquidityAMO_V2 is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20;
/* ========== STATE VARIABLES ========== */
// Core
FRAXStablecoin private FRAX;
FRAXShares private FXS;
IFraxAMOMinter private amo_minter;
ERC20 private giveback_collateral;
address pub... | collatDolarValue | function collatDolarValue(OracleLike oracle, uint256 balance) public view returns (uint256) {
if (address(oracle) == address(0)) return balance;
return balance.mul(oracle.read()).div(1 ether);
}
| // Convert collateral to dolar. If no oracle assumes pegged to 1USD. Both oracle, balance and return are E18 | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
4689,
4907
]
} | 797 | ||||
UniV3LiquidityAMO_V2 | contracts/Misc_AMOs/UniV3LiquidityAMO_V2.sol | 0xc91bb4b0696e3b48c0c501b4ce8e7244fc363a79 | Solidity | UniV3LiquidityAMO_V2 | contract UniV3LiquidityAMO_V2 is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20;
/* ========== STATE VARIABLES ========== */
// Core
FRAXStablecoin private FRAX;
FRAXShares private FXS;
IFraxAMOMinter private amo_minter;
ERC20 private giveback_collateral;
address pub... | collatDollarBalance | function collatDollarBalance() public view returns (uint256) {
// Get the allocations
uint256[4] memory allocations = showAllocations();
// Get the collateral and FRAX portions
uint256 collat_portion = allocations[1];
uint256 frax_portion = (allocations[0]).add(allocations[2]);
// Assumes wors... | // Needed for the Frax contract to function | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
4957,
5572
]
} | 798 | ||||
UniV3LiquidityAMO_V2 | contracts/Misc_AMOs/UniV3LiquidityAMO_V2.sol | 0xc91bb4b0696e3b48c0c501b4ce8e7244fc363a79 | Solidity | UniV3LiquidityAMO_V2 | contract UniV3LiquidityAMO_V2 is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20;
/* ========== STATE VARIABLES ========== */
// Core
FRAXStablecoin private FRAX;
FRAXShares private FXS;
IFraxAMOMinter private amo_minter;
ERC20 private giveback_collateral;
address pub... | liquidityInPool | function liquidityInPool(address _collateral_address, int24 _tickLower, int24 _tickUpper, uint24 _fee) public view returns (uint128) {
IUniswapV3Pool get_pool = IUniswapV3Pool(univ3_factory.getPool(address(FRAX), _collateral_address, _fee));
// goes into the pool's positions mapping, and grabs this address's l... | // Returns this contract's liquidity in a specific [FRAX]-[collateral] uni v3 pool | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
7033,
7531
]
} | 799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.