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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
3188,
3471
]
} | 29,700 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
3931,
4066
]
} | 29,701 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
4546,
4717
]
} | 29,702 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
497,
581
]
} | 29,703 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
1139,
1292
]
} | 29,704 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
1442,
1691
]
} | 29,705 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
94,
154
]
} | 29,706 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
237,
310
]
} | 29,707 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
534,
616
]
} | 29,708 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
895,
983
]
} | 29,709 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* // importANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortuna... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
1650,
1729
]
} | 29,710 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
2042,
2144
]
} | 29,711 |
UniTradeMarketOrders | UniTradeMarketOrders.sol | 0x42dcbdf298b16394f94257bafc296fc909452cc6 | Solidity | UniTradeMarketOrders | contract UniTradeMarketOrders is Ownable, ReentrancyGuard {
using SafeMath for uint256;
uint256 constant UINT256_MAX = ~uint256(0);
IUniswapV2Router02 public immutable uniswapV2Router;
IUniswapV2Factory public immutable uniswapV2Factory;
UniTradeOrderBook public immutable orderBook;
en... | // import "@openzeppelin/contracts/math/SafeMath.sol";
// import "@openzeppelin/contracts/access/Ownable.sol";
// import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
// import "@u... | LineComment | executeOrder | function executeOrder(
OrderType orderType,
address tokenIn,
address tokenOut,
uint256 amountInOffered,
uint256 amountOutExpected
)
external
payable
nonReentrant
returns (uint256[] memory amounts)
{
address _taker = msg.sender;
address _wethAddress = unisw... | // to receive ETH from Uniswap | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://8c475e1f184b9dfb77e3dc81e3dfa5930ac305b1d97e4341ccf595952d9ae6b4 | {
"func_code_index": [
858,
6076
]
} | 29,712 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | 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` wi... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [// importANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresse... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
609,
1036
]
} | 29,713 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | 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` wi... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
1969,
2371
]
} | 29,714 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | 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` wi... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
3127,
3305
]
} | 29,715 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | 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` wi... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
3530,
3731
]
} | 29,716 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | 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` wi... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
4101,
4332
]
} | 29,717 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | 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` wi... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
4583,
4904
]
} | 29,718 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
747,
1374
]
} | 29,719 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. 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.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
2393,
3159
]
} | 29,720 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
259,
445
]
} | 29,721 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
723,
864
]
} | 29,722 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
1162,
1359
]
} | 29,723 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
1613,
2089
]
} | 29,724 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
2560,
2697
]
} | 29,725 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
3188,
3471
]
} | 29,726 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
3931,
4066
]
} | 29,727 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
4546,
4717
]
} | 29,728 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | max | function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
| /**
* @dev Returns the largest of two numbers.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
83,
195
]
} | 29,729 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | min | function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
| /**
* @dev Returns the smallest of two numbers.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
266,
377
]
} | 29,730 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | average | function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
| /**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
491,
689
]
} | 29,731 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
94,
154
]
} | 29,732 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
237,
310
]
} | 29,733 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
534,
616
]
} | 29,734 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
895,
983
]
} | 29,735 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* // importANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortuna... | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
1650,
1729
]
} | 29,736 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
2042,
2144
]
} | 29,737 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | StakingRewardsV2 | contract StakingRewardsV2 is RewardsDistributionRecipient, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish = 0;
uint256 public ... | // import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import { Math } from "@openzeppelin/contracts/math/Math.sol";
// import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
// import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
// import { ReentrancyG... | LineComment | totalSupply | function totalSupply() external view returns (uint256) {
return _totalSupply;
}
| /* ========== VIEWS ========== */ | Comment | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
1118,
1216
]
} | 29,738 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | StakingRewardsV2 | contract StakingRewardsV2 is RewardsDistributionRecipient, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish = 0;
uint256 public ... | // import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import { Math } from "@openzeppelin/contracts/math/Math.sol";
// import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
// import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
// import { ReentrancyG... | LineComment | stake | function stake(uint256 amount) external nonReentrant updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
stakingToken.safeTransferFrom(msg.sender, address(this), amount);
emit Stake... | /* ========== MUTATIVE FUNCTIONS ========== */ | Comment | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
2205,
2579
]
} | 29,739 |
StakingRewardsV2 | StakingRewardsV2.sol | 0xb93b505ed567982e2b6756177ddd23ab5745f309 | Solidity | StakingRewardsV2 | contract StakingRewardsV2 is RewardsDistributionRecipient, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish = 0;
uint256 public ... | // import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import { Math } from "@openzeppelin/contracts/math/Math.sol";
// import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
// import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
// import { ReentrancyG... | LineComment | notifyRewardAmount | function notifyRewardAmount(uint256 reward) external override onlyRewardsDistribution updateReward(address(0)) {
if (block.timestamp >= periodFinish) {
rewardRate = reward.div(rewardsDuration);
} else {
uint256 remaining = periodFinish.sub(block.timestamp);
uint256 leftover = remain... | /* ========== RESTRICTED FUNCTIONS ========== */ | Comment | v0.6.10+commit.00c0fcaf | Apache-2.0 | ipfs://790c9fad58a65efe2ffe34ef46b974a94b813884b9da0922717f6c950df59fa1 | {
"func_code_index": [
3423,
4520
]
} | 29,740 |
CopyCats | @openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol | 0x3a05f3889b71c1dbf96494f57c823499a3895319 | Solidity | UUPSUpgradeable | abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal initializer {
__ERC1967Upgrade_init_unchained();
__UUPSUpgradeable_init_unchained();
}
function __UUPSUpgradeable_init_unchained() internal initializer {
}
... | /**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, althou... | NatSpecMultiLine | upgradeTo | function upgradeTo(address newImplementation) external virtual {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallSecure(newImplementation, bytes(""), false);
}
| /**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | None | ipfs://127f61c8cbd211b5466da5addb758836fb3dfae43719ec28b6444db890d31c36 | {
"func_code_index": [
501,
695
]
} | 29,741 |
CopyCats | @openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol | 0x3a05f3889b71c1dbf96494f57c823499a3895319 | Solidity | UUPSUpgradeable | abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal initializer {
__ERC1967Upgrade_init_unchained();
__UUPSUpgradeable_init_unchained();
}
function __UUPSUpgradeable_init_unchained() internal initializer {
}
... | /**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, althou... | NatSpecMultiLine | upgradeToAndCall | function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallSecure(newImplementation, data, true);
}
| /**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | None | ipfs://127f61c8cbd211b5466da5addb758836fb3dfae43719ec28b6444db890d31c36 | {
"func_code_index": [
949,
1171
]
} | 29,742 |
CopyCats | @openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol | 0x3a05f3889b71c1dbf96494f57c823499a3895319 | Solidity | UUPSUpgradeable | abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal initializer {
__ERC1967Upgrade_init_unchained();
__UUPSUpgradeable_init_unchained();
}
function __UUPSUpgradeable_init_unchained() internal initializer {
}
... | /**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, althou... | NatSpecMultiLine | _authorizeUpgrade | function _authorizeUpgrade(address newImplementation) internal virtual;
| /**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(ad... | NatSpecMultiLine | v0.8.6+commit.11564f7e | None | ipfs://127f61c8cbd211b5466da5addb758836fb3dfae43719ec28b6444db890d31c36 | {
"func_code_index": [
1586,
1662
]
} | 29,743 |
Timelock | contracts/Timelock.sol | 0x9f5f53a68f083698a91dc78c4d9496c72fada895 | Solidity | Timelock | contract Timelock {
using SafeMath for uint;
event NewAdmin(address indexed newAdmin);
event NewPendingAdmin(address indexed newPendingAdmin);
event NewDelay(uint indexed newDelay);
event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes da... | // XXX: import "./SafeMath.sol"; | LineComment | // XXX: function() external payable { } | LineComment | v0.6.12+commit.27d51765 | None | ipfs://bc5b36c0465b06f4cae4d6ca712fef33a7aa12346f3f554ce902d81710b9149c | {
"func_code_index": [
1360,
1395
]
} | 29,744 | ||
DADBridgeWrapper | contracts/DADBridgeWrapper.sol | 0x62a65d8d5803c825096c76509d9442819e444557 | Solidity | DADBridgeWrapper | contract DADBridgeWrapper is AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ROLE_ADMIN = keccak256("ROLE_ADMIN");
IERC20 private immutable _token;
uint256 private _totalSupply;
/**
* @dev initializes the contract
*/
constructor(IERC20 initToken) {
... | token | function token() public view returns (IERC20) {
return _token;
}
| /**
* @dev returns the token contract address
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
599,
679
]
} | 29,745 | ||||
DADBridgeWrapper | contracts/DADBridgeWrapper.sol | 0x62a65d8d5803c825096c76509d9442819e444557 | Solidity | DADBridgeWrapper | contract DADBridgeWrapper is AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ROLE_ADMIN = keccak256("ROLE_ADMIN");
IERC20 private immutable _token;
uint256 private _totalSupply;
/**
* @dev initializes the contract
*/
constructor(IERC20 initToken) {
... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev returns the total amount of tokens minted
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
751,
844
]
} | 29,746 | ||||
DADBridgeWrapper | contracts/DADBridgeWrapper.sol | 0x62a65d8d5803c825096c76509d9442819e444557 | Solidity | DADBridgeWrapper | contract DADBridgeWrapper is AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ROLE_ADMIN = keccak256("ROLE_ADMIN");
IERC20 private immutable _token;
uint256 private _totalSupply;
/**
* @dev initializes the contract
*/
constructor(IERC20 initToken) {
... | pause | function pause() external onlyRole(ROLE_ADMIN) {
_pause();
}
| /**
* @dev pauses minting
*
* requirements:
*
* - the caller must have the ROLE_ADMIN privileges
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
980,
1056
]
} | 29,747 | ||||
DADBridgeWrapper | contracts/DADBridgeWrapper.sol | 0x62a65d8d5803c825096c76509d9442819e444557 | Solidity | DADBridgeWrapper | contract DADBridgeWrapper is AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ROLE_ADMIN = keccak256("ROLE_ADMIN");
IERC20 private immutable _token;
uint256 private _totalSupply;
/**
* @dev initializes the contract
*/
constructor(IERC20 initToken) {
... | unpause | function unpause() external onlyRole(ROLE_ADMIN) {
_unpause();
}
| /**
* @dev unpauses minting
*
* requirements:
*
* - the caller must have the ROLE_ADMIN privileges
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1194,
1274
]
} | 29,748 | ||||
DADBridgeWrapper | contracts/DADBridgeWrapper.sol | 0x62a65d8d5803c825096c76509d9442819e444557 | Solidity | DADBridgeWrapper | contract DADBridgeWrapper is AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ROLE_ADMIN = keccak256("ROLE_ADMIN");
IERC20 private immutable _token;
uint256 private _totalSupply;
/**
* @dev initializes the contract
*/
constructor(IERC20 initToken) {
... | mint | function mint(address recipient, uint256 amount) external onlyRole(ROLE_ADMIN) whenNotPaused {
if (recipient == address(0)) {
revert InvalidRecipient();
}
if (amount == 0) {
revert InvalidAmount();
}
_token.safeTransfer(recipient, amount);
_totalSupply += amount;
}
| /**
* @dev mints a given amount of tokens for a given recipient
*
* requirements:
*
* - the caller must have the ROLE_ADMIN privileges, and the contract must not be paused
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1485,
1830
]
} | 29,749 | ||||
SuperGlobalReferral | oraclizeAPI.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | Buffer | library Buffer {
struct buffer {
bytes buf;
uint capacity;
}
function init(buffer memory _buf, uint _capacity) internal pure {
uint capacity = _capacity;
if (capacity % 32 != 0) {
capacity += 32 - (capacity % 32);
}
_buf.capacity = capacity; // A... | /*
Begin solidity-cborutils
https://github.com/smartcontractkit/solidity-cborutils
MIT License
Copyright (c) 2018 SmartContract ChainLink, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Softwar... | Comment | append | function append(buffer memory _buf, bytes memory _data) internal pure returns (buffer memory _buffer) {
if (_data.length + _buf.buf.length > _buf.capacity) {
resize(_buf, max(_buf.capacity, _data.length) * 2);
}
uint dest;
uint src;
uint len = _data.length;
assembly {
let bufptr ... | /**
* @dev Appends a byte array to the end of the buffer. Resizes if doing so
* would exceed the capacity of the buffer.
* @param _buf The buffer to append to.
* @param _data The data to append.
* @return The original buffer.
*
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
1139,
2356
]
} | 29,750 | |
SuperGlobalReferral | oraclizeAPI.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | Buffer | library Buffer {
struct buffer {
bytes buf;
uint capacity;
}
function init(buffer memory _buf, uint _capacity) internal pure {
uint capacity = _capacity;
if (capacity % 32 != 0) {
capacity += 32 - (capacity % 32);
}
_buf.capacity = capacity; // A... | /*
Begin solidity-cborutils
https://github.com/smartcontractkit/solidity-cborutils
MIT License
Copyright (c) 2018 SmartContract ChainLink, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Softwar... | Comment | append | function append(buffer memory _buf, uint8 _data) internal pure {
if (_buf.buf.length + 1 > _buf.capacity) {
resize(_buf, _buf.capacity * 2);
}
assembly {
let bufptr := mload(_buf) // Memory address of the buffer data
let buflen := mload(bufptr) // Length of existing buffer data
... | /**
*
* @dev Appends a byte to the end of the buffer. Resizes if doing so would
* exceed the capacity of the buffer.
* @param _buf The buffer to append to.
* @param _data The data to append.
* @return The original buffer.
*
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
2636,
3215
]
} | 29,751 | |
SuperGlobalReferral | oraclizeAPI.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | Buffer | library Buffer {
struct buffer {
bytes buf;
uint capacity;
}
function init(buffer memory _buf, uint _capacity) internal pure {
uint capacity = _capacity;
if (capacity % 32 != 0) {
capacity += 32 - (capacity % 32);
}
_buf.capacity = capacity; // A... | /*
Begin solidity-cborutils
https://github.com/smartcontractkit/solidity-cborutils
MIT License
Copyright (c) 2018 SmartContract ChainLink, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Softwar... | Comment | appendInt | function appendInt(buffer memory _buf, uint _data, uint _len) internal pure returns (buffer memory _buffer) {
if (_len + _buf.buf.length > _buf.capacity) {
resize(_buf, max(_buf.capacity, _len) * 2);
}
uint mask = 256 ** _len - 1;
assembly {
let bufptr := mload(_buf) // Memory address of... | /**
*
* @dev Appends a byte to the end of the buffer. Resizes if doing so would
* exceed the capacity of the buffer.
* @param _buf The buffer to append to.
* @param _data The data to append.
* @return The original buffer.
*
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
3495,
4234
]
} | 29,752 | |
SuperGlobalReferral | oraclizeAPI.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | usingOraclize | contract usingOraclize {
using CBOR for Buffer.buffer;
OraclizeI oraclize;
OraclizeAddrResolverI OAR;
uint constant day = 60 * 60 * 24;
uint constant week = 60 * 60 * 24 * 7;
uint constant month = 60 * 60 * 24 * 30;
byte constant proofType_NONE = 0x00;
byte constant proofType_Ledger ... | /*
End solidity-cborutils
*/ | Comment | copyBytes | function copyBytes(bytes memory _from, uint _fromOffset, uint _length, bytes memory _to, uint _toOffset) internal pure returns (bytes memory _copiedBytes) {
uint minLength = _length + _toOffset;
require(_to.length >= minLength); // Buffer too small. Should be a better way?
uint i = 32 + _fromOffset; // NOTE... | /*
The following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
*/ | Comment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
42808,
43505
]
} | 29,753 | |
SuperGlobalReferral | oraclizeAPI.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | usingOraclize | contract usingOraclize {
using CBOR for Buffer.buffer;
OraclizeI oraclize;
OraclizeAddrResolverI OAR;
uint constant day = 60 * 60 * 24;
uint constant week = 60 * 60 * 24 * 7;
uint constant month = 60 * 60 * 24 * 30;
byte constant proofType_NONE = 0x00;
byte constant proofType_Ledger ... | /*
End solidity-cborutils
*/ | Comment | safer_ecrecover | function safer_ecrecover(bytes32 _hash, uint8 _v, bytes32 _r, bytes32 _s) internal returns (bool _success, address _recoveredAddress) {
/*
We do our own memory management here. Solidity uses memory offset
0x40 to store the current end of memory. We write past it (as
writes are memory extensions), but... | /*
The following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
Duplicate Solidity's ecrecover, but catching the CALL return value
*/ | Comment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
43708,
44694
]
} | 29,754 | |
SuperGlobalReferral | oraclizeAPI.sol | 0x56f55ddf886ae953dbe3623866b11a51c28dca6c | Solidity | usingOraclize | contract usingOraclize {
using CBOR for Buffer.buffer;
OraclizeI oraclize;
OraclizeAddrResolverI OAR;
uint constant day = 60 * 60 * 24;
uint constant week = 60 * 60 * 24 * 7;
uint constant month = 60 * 60 * 24 * 30;
byte constant proofType_NONE = 0x00;
byte constant proofType_Ledger ... | /*
End solidity-cborutils
*/ | Comment | ecrecovery | function ecrecovery(bytes32 _hash, bytes memory _sig) internal returns (bool _success, address _recoveredAddress) {
bytes32 r;
bytes32 s;
uint8 v;
if (_sig.length != 65) {
return (false, address(0));
}
/*
The signature format is a compact form of:
{bytes32 r}{bytes32 s}{uint8... | /*
The following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
*/ | Comment | v0.5.0+commit.1d4f565a | bzzr://b216b271bc00cdcc4e3c3e44c3fb913be0b821c40432eecc4ffd2a33956ec33d | {
"func_code_index": [
44825,
46373
]
} | 29,755 | |
GraphLinq | /mnt/f/eth/graphlinq/GraphLinq.Engine/NodeBlock.GraphLinqERC20Contract/contracts/GraphLinq.sol | 0x9f9c8ec3534c3ce16f928381372bfbfbfb9f4d24 | Solidity | GraphLinq | contract GraphLinq is ERC20 {
using SafeMath for uint256;
// GraphLinq token decimal
uint8 public constant _decimals = 18;
// Total supply for the GraphLinq token = 500M
uint256 private _totalSupply = 500000000 * (10 ** uint256(_decimals));
// Token GraphLinq deployer
address private ... | burnFuel | function burnFuel(uint256 amount) public {
_burn(msg.sender, amount);
}
| // Allow to burn own wallet funds (which should be the amount from depositor contract) | LineComment | v0.7.4+commit.3f05b770 | {
"func_code_index": [
610,
700
]
} | 29,756 | ||||
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
938,
1242
]
} | 29,757 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
1297,
1506
]
} | 29,758 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
1559,
1798
]
} | 29,759 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
1856,
1958
]
} | 29,760 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
2018,
2124
]
} | 29,761 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
| /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
2186,
2519
]
} | 29,762 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return "";
}
| /**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
2756,
2852
]
} | 29,763 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor appro... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
2905,
3310
]
} | 29,764 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
3367,
3588
]
} | 29,765 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
3651,
3808
]
} | 29,766 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
3870,
4036
]
} | 29,767 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
4094,
4428
]
} | 29,768 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
4490,
4673
]
} | 29,769 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
4735,
5059
]
} | 29,770 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _safeTransfer | function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivale... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
5917,
6228
]
} | 29,771 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
| /**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
6527,
6656
]
} | 29,772 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spen... | /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
6810,
7158
]
} | 29,773 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
7484,
7596
]
} | 29,774 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _safeMint | function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
7813,
8128
]
} | 29,775 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(add... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
8446,
8877
]
} | 29,776 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
9090,
9500
]
} | 29,777 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approva... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
9820,
10429
]
} | 29,778 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
10536,
10711
]
} | 29,779 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _setApprovalForAll | function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
| /**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
10842,
11153
]
} | 29,780 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
11702,
12484
]
} | 29,781 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
13036,
13162
]
} | 29,782 |
TailEReaper | ERC721.sol | 0x0c6ed4900cde08e67c109ca9e5d946a58c001fb9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _afterTokenTransfer | function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
| /**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://c9ece1a769ddad8013046e91372363af72e6eba5e8dc7aaf3468b398f80090bb | {
"func_code_index": [
13530,
13655
]
} | 29,783 |
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | Owned | contract Owned is Context {
address private _owner;
address private _pendingOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
add... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
522,
606
]
} | 29,784 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
94,
154
]
} | 29,785 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
237,
310
]
} | 29,786 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
534,
616
]
} | 29,787 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
895,
983
]
} | 29,788 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
1647,
1726
]
} | 29,789 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
2039,
2141
]
} | 29,790 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
908,
1327
]
} | 29,791 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
1498,
3047
]
} | 29,792 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
3128,
3262
]
} | 29,793 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
3343,
3457
]
} | 29,794 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
3796,
4005
]
} | 29,795 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | add | function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
4254,
4384
]
} | 29,796 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | remove | function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
4555,
4691
]
} | 29,797 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | contains | function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
4772,
4917
]
} | 29,798 | ||||
Dogira | Dogira.sol | 0x4b86e0295e7d32433ffa6411b82b4f4e56a581e1 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | length | function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
4998,
5120
]
} | 29,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.