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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the BEP20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
2084,
2220
]
} | 18,700 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
259,
445
]
} | 18,701 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
723,
864
]
} | 18,702 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
1162,
1393
]
} | 18,703 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
1647,
2123
]
} | 18,704 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
2594,
2731
]
} | 18,705 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
3222,
3539
]
} | 18,706 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
3999,
4134
]
} | 18,707 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
4614,
4819
]
} | 18,708 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
606,
1270
]
} | 18,709 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
2212,
2686
]
} | 18,710 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
3442,
3645
]
} | 18,711 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
3870,
4105
]
} | 18,712 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
4475,
4836
]
} | 18,713 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
5087,
5488
]
} | 18,714 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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() {
address msgSe... | /**
* @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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
512,
596
]
} | 18,715 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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() {
address msgSe... | /**
* @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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
1154,
1307
]
} | 18,716 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | 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() {
address msgSe... | /**
* @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.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
1457,
1743
]
} | 18,717 |
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | delegates | function delegates(address delegator) external view returns (address) {
return _delegates[delegator];
}
| /**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegator The address to get delegatee for
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
11368,
11490
]
} | 18,718 | ||
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | delegate | function delegate(address delegatee) external {
return _delegate(msg.sender, delegatee);
}
| /**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
11629,
11738
]
} | 18,719 | ||
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | delegateBySig | function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) external {
bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));
bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonc... | /**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECD... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
12167,
12983
]
} | 18,720 | ||
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | getCurrentVotes | function getCurrentVotes(address account) external view returns (uint256) {
uint32 nCheckpoints = numCheckpoints[account];
return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
}
| /**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
13179,
13407
]
} | 18,721 | ||
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | getPriorVotes | function getPriorVotes(address account, uint blockNumber) external view returns (uint256) {
require(blockNumber < block.number, "CHAR::getPriorVotes: not yet determined");
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
// First check most recent... | /**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
13833,
15059
]
} | 18,722 | ||
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | TransferETH | function TransferETH(address payable recipient, uint256 amount) public onlyOwner {
recipient.transfer(amount);
}
| // function to allow admin to transfer ETH from this contract | LineComment | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
18108,
18239
]
} | 18,723 | ||
Arcadia_Token | Arcadia_Token.sol | 0x6514fe95a4823c7cbf1bb49529e41f922f6b39ef | Solidity | Arcadia_Token | contract Arcadia_Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
string private _name = "Arcadia";
string private _symbol = "ARC";
uint8 private _decimals = 8;
mapping(address => uint256) internal _reflectionBalance;
mapping(address =... | transferAnyERC20Tokens | function transferAnyERC20Tokens(address _tokenAddress, address _to, uint256 _amount) public onlyOwner {
Token(_tokenAddress).transfer(_to, _amount);
}
| // function to allow admin to transfer ERC20 tokens from this contract | LineComment | v0.8.3+commit.8d00100c | MIT | ipfs://762b5762d03da3123d8b2ec2f8cf384eaddb9b8552de139674770cb0f07ffd07 | {
"func_code_index": [
18322,
18491
]
} | 18,724 | ||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | TokenERC20 | function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
nam... | /**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
839,
1384
]
} | 18,725 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to])... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
1468,
2310
]
} | 18,726 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
2516,
2628
]
} | 18,727 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
2903,
3204
]
} | 18,728 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
3468,
3644
]
} | 18,729 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
4038,
4390
]
} | 18,730 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(msg.sender, _val... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
4560,
4934
]
} | 18,731 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
5192,
5803
]
} | 18,732 | |||
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | MMCoin | contract MMCoin is owned, TokenERC20 {
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contrac... | /******************************************/ | NatSpecMultiLine | MMCoin | function MMCoin(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
| /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
326,
501
]
} | 18,733 | |
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | MMCoin | contract MMCoin is owned, TokenERC20 {
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contrac... | /******************************************/ | NatSpecMultiLine | _transfer | function _transfer(address _from, address _to, uint _value) internal {
require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value); // Check if the sender has enough
require (balanceOf[_to] + _value > balanc... | /* Internal transfer, only can be called by this contract */ | Comment | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
570,
1352
]
} | 18,734 | |
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | MMCoin | contract MMCoin is owned, TokenERC20 {
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contrac... | /******************************************/ | NatSpecMultiLine | mintToken | function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0, this, mintedAmount);
Transfer(this, target, mintedAmount);
}
| /// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
1544,
1802
]
} | 18,735 | |
MMCoin | MMCoin.sol | 0xafaeb51b058999a84354f5e45b44a1649519bcff | Solidity | MMCoin | contract MMCoin is owned, TokenERC20 {
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contrac... | /******************************************/ | NatSpecMultiLine | freezeAccount | function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
| /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://42a0065f0c96aebb82ccc44d26848fa94c6a637af82aa4601c83521bc789262e | {
"func_code_index": [
1983,
2144
]
} | 18,736 | |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | createNewStake | function createNewStake(uint256 _amount, uint8 _lockupPeriod, bool _compound) public {
require(!paused, "New stakes are paused");
require(_isValidLockupPeriod(_lockupPeriod), "The lockup period is invalid");
require(_amount >= 5000000000000000000000, "You must stake at least 5000 LIT");
require(_can... | /**************************************************** Public Interface for Stakers **************************************************************/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
2666,
3785
]
} | 18,737 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | _accreditRewards | function _accreditRewards() public onlyOwner {
uint256 totalToAccredit = getTotalRewardsToBeAccredited();
require(IERC20(litionToken).transferFrom(msg.sender, address(this), totalToAccredit), "Couldn't take the LIT from the sender");
for (uint256 i = 0; i < stakers.length; i++) {
StakeList sto... | // Will be called monthly, at the end of each month | LineComment | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
5178,
6000
]
} | 18,738 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | _declareFinishers | function _declareFinishers() public onlyOwner {
uint256 totalForClosers = getTotalAmountsForClosers();
require(totalForClosers > 0, "There are no finishers");
require(IERC20(litionToken).transferFrom(msg.sender, address(this), totalForClosers), "Couldn't take the LIT from the sender");
for (uint25... | // Will be called monthly, at the end of each month | LineComment | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
6060,
6879
]
} | 18,739 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | _updateRewardsToBeAccredited | function _updateRewardsToBeAccredited(uint256 _fromMiningRewardBlock, uint256 _toMiningRewardBlock, uint256 _amount) public onlyOwner {
require(_fromMiningRewardBlock < _toMiningRewardBlock, "Invalid params");
require(_fromMiningRewardBlock > lastMiningRewardBlock, "Rewards already distributed");
... | // Will be called every day to distribute the accumulated new MiningReward events coming from LitionRegistry | LineComment | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
6996,
7734
]
} | 18,740 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | getTotalRewardsToBeAccredited | function getTotalRewardsToBeAccredited() public view returns (uint256) {
uint256 total = 0;
for (uint256 i = 0; i < stakers.length; i++) {
total += stakeListBySender[stakers[i]].rewardsToBeAccredited;
}
return total;
}
| /**************************************************** Pool Information **************************************************************/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
9131,
9405
]
} | 18,741 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | calculateFinishTimestamp | function calculateFinishTimestamp(uint256 _timestamp, uint8 _lockupPeriod) public pure returns (uint256) {
uint16 year = Date.getYear(_timestamp);
uint8 month = Date.getMonth(_timestamp);
month += _lockupPeriod;
if (month > 12) {
year += 1;
month = month % 12;
}
uint8 new... | /**************************************************** Internal Admin - Lockups **************************************************************/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
13408,
13866
]
} | 18,742 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | _closeStake | function _closeStake(address _staker, uint256 _index) internal returns (uint256) {
uint256 total = stakeListBySender[_staker].stakes[_index].totalStaked;
_removeStakeByIndex(_staker, _index);
if (stakeListBySender[msg.sender].stakes.length == 0) {
_removeStakerByValue(_staker);
}
... | /**************************************************** Internal Admin - Stakes and Rewards **************************************************************/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
14030,
14464
]
} | 18,743 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | _isValidLockupPeriod | function _isValidLockupPeriod(uint8 n) internal pure returns (bool) {
if (n == 1) {
return true;
}
else if (n == 3) {
return true;
}
else if (n == 6) {
return true;
}
else if (n == 12) {
return true;
}
return false;
}
| /**************************************************** Internal Admin - Validations **************************************************************/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
17770,
18130
]
} | 18,744 |
LitionPool | LitionPool.sol | 0xe5df2a30f8e48c85717b9397b9b0acaecf344ba8 | Solidity | LitionPool | contract LitionPool {
using SafeMath for uint256;
/**************************************************** Events **************************************************************/
event NewStake(address indexed staker, uint256 totalStaked, uint8 lockupPeriod, bool compound);
event StakeFinishedBy... | /**
* @title Lition Pool Contract
* @author Patricio Mosse
* @notice This contract is used for staking LIT (ERC20) tokens to support a validator running in the Lition blockchain network and distribute rewards.
**/ | NatSpecMultiLine | _addStakerIfNotExist | function _addStakerIfNotExist(address _staker) internal {
for (uint256 i = 0; i < stakers.length; i++) {
if (stakers[i] == _staker) {
return;
}
}
stakers.push(_staker);
}
| /**************************************************** Internal Admin - Arrays **************************************************************/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://0bd3669484e28913551f5c5511fbd203bf9de1582f21a5e438e065099d1ccd6b | {
"func_code_index": [
19073,
19323
]
} | 18,745 |
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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.7.0+commit.9e61f92b | {
"func_code_index": [
248,
428
]
} | 18,746 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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.7.0+commit.9e61f92b | {
"func_code_index": [
695,
833
]
} | 18,747 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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.7.0+commit.9e61f92b | {
"func_code_index": [
1120,
1311
]
} | 18,748 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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.7.0+commit.9e61f92b | {
"func_code_index": [
1554,
2017
]
} | 18,749 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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 revert (co... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
2475,
2609
]
} | 18,750 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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 invalid ... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
3087,
3363
]
} | 18,751 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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 (consuming all... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
3810,
3942
]
} | 18,752 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | 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 opcode to r... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
4409,
4576
]
} | 18,753 | ||||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
832,
917
]
} | 18,754 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
1026,
1115
]
} | 18,755 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the v... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
1734,
1819
]
} | 18,756 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
1875,
1977
]
} | 18,757 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
2031,
2152
]
} | 18,758 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
2351,
2527
]
} | 18,759 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
2581,
2734
]
} | 18,760 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
2868,
3038
]
} | 18,761 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* ... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
3494,
3815
]
} | 18,762 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
4206,
4425
]
} | 18,763 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
4908,
5178
]
} | 18,764 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
5648,
6124
]
} | 18,765 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
6390,
6704
]
} | 18,766 | ||
EGOD | contracts/EGOD.sol | 0x420af3b6495cde8873c0e74a87f77a434d71e0f2 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide
* htt... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
7126,
7470
]
} | 18,767 | ||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | CoinWindow | function CoinWindow(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
nam... | /**
* Constructor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
1015,
1560
]
} | 18,768 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
1644,
2492
]
} | 18,769 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
2698,
2855
]
} | 18,770 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
3130,
3431
]
} | 18,771 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
3695,
3925
]
} | 18,772 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
4319,
4671
]
} | 18,773 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
4841,
5220
]
} | 18,774 | |||
CoinWindow | CoinWindow.sol | 0x62f2cfa20acdd7cde34861ad7690a50247bdd47f | Solidity | CoinWindow | contract CoinWindow {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://4e588eb90ffda9bc6425d56ef24564df89c18a2b5bcb670203dcbb0ff3e405cc | {
"func_code_index": [
5478,
6094
]
} | 18,775 | |||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
606,
1033
]
} | 18,776 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
1963,
2365
]
} | 18,777 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
3121,
3301
]
} | 18,778 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
3526,
3726
]
} | 18,779 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
4096,
4327
]
} | 18,780 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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");
require(isContract(target), "Address: call to non-contract");
// solhint-disa... | /**
* @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.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
4578,
5113
]
} | 18,781 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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 ... | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
5293,
5497
]
} | 18,782 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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 ... | functionStaticCall | function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
5684,
6111
]
} | 18,783 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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 ... | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
6293,
6498
]
} | 18,784 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | 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 ... | functionDelegateCall | function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.deleg... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
6687,
7115
]
} | 18,785 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
747,
1374
]
} | 18,786 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
2348,
3114
]
} | 18,787 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | update | function update(Data storage _data, Context storage _ctx) internal {
_data.accumulatedRewardWeight = _data.getUpdatedAccumulatedRewardWeight(_ctx);
_data.lastUpdatedBlock = block.number;
}
| /// @dev Updates the pool.
///
/// @param _ctx the pool context. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
556,
760
]
} | 18,788 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | getRewardRate | function getRewardRate(Data storage _data, Context storage _ctx)
internal view
returns (uint256)
{
// console.log("get reward rate");
// console.log(uint(_data.rewardWeight));
// console.log(uint(_ctx.totalRewardWeight));
// console.log(uint(_ctx.rewardRate));
return _ctx.rewardRate.mul(_data.rewa... | /// @dev Gets the rate at which the pool will distribute rewards to stakers.
///
/// @param _ctx the pool context.
///
/// @return the reward rate of the pool in tokens per block. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
958,
1340
]
} | 18,789 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | getUpdatedAccumulatedRewardWeight | function getUpdatedAccumulatedRewardWeight(Data storage _data, Context storage _ctx)
internal view
returns (FixedPointMath.FixedDecimal memory)
{
if (_data.totalDeposited == 0) {
return _data.accumulatedRewardWeight;
}
uint256 _elapsedTime = block.number.sub(_data.lastUpdatedBlock);
if (_elaps... | /// @dev Gets the accumulated reward weight of a pool.
///
/// @param _ctx the pool context.
///
/// @return the accumulated reward weight. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
1498,
2307
]
} | 18,790 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | push | function push(List storage _self, Data memory _element) internal {
_self.elements.push(_element);
}
| /// @dev Adds an element to the list.
///
/// @param _element the element to add. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
2401,
2511
]
} | 18,791 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | get | function get(List storage _self, uint256 _index) internal view returns (Data storage) {
return _self.elements[_index];
}
| /// @dev Gets an element from the list.
///
/// @param _index the index in the list.
///
/// @return the element at the specified index. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
2666,
2797
]
} | 18,792 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | last | function last(List storage _self) internal view returns (Data storage) {
return _self.elements[_self.lastIndex()];
}
| /// @dev Gets the last element in the list.
///
/// This function will revert if there are no elements in the list.
///ck
/// @return the last element in the list. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
2979,
3106
]
} | 18,793 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | lastIndex | function lastIndex(List storage _self) internal view returns (uint256) {
uint256 _length = _self.length();
return _length.sub(1, "Pool.List: list is empty");
}
| /// @dev Gets the index of the last element in the list.
///
/// This function will revert if there are no elements in the list.
///
/// @return the index of the last element. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
3300,
3475
]
} | 18,794 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | Pool | library Pool {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeMath for uint256;
struct Context {
uint256 rewardRate;
uint256 totalRewardWeight;
}
struct Data {
IERC20 token;
uint256 totalDeposited;
uin... | length | function length(List storage _self) internal view returns (uint256) {
return _self.elements.length;
}
| /// @dev Gets the number of elements in the list.
///
/// @return the number of elements. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
3577,
3689
]
} | 18,795 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | StakingPools | contract StakingPools is ReentrancyGuard {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Stake for Stake.Data;
event PendingGovernanceUpdated(
address pendingGovernance
... | setPendingGovernance | function setPendingGovernance(address _pendingGovernance) external onlyGovernance {
require(_pendingGovernance != address(0), "StakingPools: pending governance address cannot be 0x0");
pendingGovernance = _pendingGovernance;
emit PendingGovernanceUpdated(_pendingGovernance);
}
| /// @dev Sets the governance.
///
/// This function can only called by the current governance.
///
/// @param _pendingGovernance the new pending governance. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
2496,
2796
]
} | 18,796 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | StakingPools | contract StakingPools is ReentrancyGuard {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Stake for Stake.Data;
event PendingGovernanceUpdated(
address pendingGovernance
... | setRewardRate | function setRewardRate(uint256 _rewardRate) external onlyGovernance {
_updatePools(); // 951293760000000
_ctx.rewardRate = _rewardRate;
emit RewardRateUpdated(_rewardRate);
}
| /// @dev Sets the distribution reward rate.
///
/// This will update all of the pools.
///
/// @param _rewardRate The number of tokens to distribute per second. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
3256,
3455
]
} | 18,797 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | StakingPools | contract StakingPools is ReentrancyGuard {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Stake for Stake.Data;
event PendingGovernanceUpdated(
address pendingGovernance
... | createPool | function createPool(IERC20 _token) external onlyGovernance returns (uint256) {
require(tokenPoolIds[_token] == 0, "StakingPools: token already has a pool");
uint256 _poolId = _pools.length();
_pools.push(Pool.Data({
token: _token,
totalDeposited: 0,
rewardWeight: 0,
accumulatedRewardWei... | /// @dev Creates a new pool.
///
/// The created pool will need to have its reward weight initialized before it begins generating rewards.
///
/// @param _token The token the pool will accept for staking.
///
/// @return the identifier for the newly created pool. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
3743,
4277
]
} | 18,798 | ||
XEQSwaps | XEQSwaps.sol | 0x50ceb6aa41787f45d3da5cf8432a27c451471af1 | Solidity | StakingPools | contract StakingPools is ReentrancyGuard {
using FixedPointMath for FixedPointMath.FixedDecimal;
using Pool for Pool.Data;
using Pool for Pool.List;
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Stake for Stake.Data;
event PendingGovernanceUpdated(
address pendingGovernance
... | setRewardWeights | function setRewardWeights(uint256[] calldata _rewardWeights) external onlyGovernance {
require(_rewardWeights.length == _pools.length(), "StakingPools: weights length mismatch");
_updatePools();
uint256 _totalRewardWeight = _ctx.totalRewardWeight;
for (uint256 _poolId = 0; _poolId < _pools.length(); _po... | /// @dev Sets the reward weights of all of the pools.
///
/// @param _rewardWeights The reward weights of all of the pools. | NatSpecSingleLine | v0.7.6+commit.7338295f | MIT | ipfs://1321b59adf56a161cf1528a4268aebbe82181ff1568ef52722d6521647652e4b | {
"func_code_index": [
4413,
5268
]
} | 18,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.