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
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 100, 159 ] }
5,100
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 226, 287 ] }
5,101
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 363, 418 ] }
5,102
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 776, 881 ] }
5,103
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 995, 1104 ] }
5,104
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view virtual override returns (uint8) { return 18; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 1738, 1836 ] }
5,105
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 1896, 2009 ] }
5,106
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 2067, 2199 ] }
5,107
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 2407, 2587 ] }
5,108
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 2645, 2801 ] }
5,109
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 2943, 3117 ] }
5,110
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds all...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 3594, 4091 ] }
5,111
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 4495, 4715 ] }
5,112
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, c...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 5213, 5631 ] }
5,113
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); ...
/** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 6116, 6854 ] }
5,114
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 7136, 7540 ] }
5,115
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 7868, 8464 ] }
5,116
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(own...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 8897, 9282 ] }
5,117
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - wh...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 9877, 10007 ] }
5,118
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_afterTokenTransfer
function _afterTokenTransfer( address from, address to, uint256 amount ) 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, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - ...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 10606, 10735 ] }
5,119
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 161, 388 ] }
5,120
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 536, 735 ] }
5,121
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 885, 1393 ] }
5,122
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 1544, 1744 ] }
5,123
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 1905, 2105 ] }
5,124
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 2347, 2450 ] }
5,125
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 2728, 2831 ] }
5,126
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 3085, 3188 ] }
5,127
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 3484, 3587 ] }
5,128
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 4049, 4152 ] }
5,129
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 4626, 4871 ] }
5,130
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an ...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 5364, 5608 ] }
5,131
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 6266, 6510 ] }
5,132
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
HOLYGRAIL
contract HOLYGRAIL is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
enableTrading
function enableTrading() external onlyOwner { tradingActive = true; swapEnabled = true; lastLpBurnTime = block.timestamp; }
// once enabled, can never be turned off
LineComment
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 4998, 5158 ] }
5,133
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
HOLYGRAIL
contract HOLYGRAIL is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
updateSellFees
function updateSellFees() external onlyOwner returns (bool) { limitsInEffect = false; return true; }
// remove limits after token is stable
LineComment
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 5205, 5333 ] }
5,134
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
HOLYGRAIL
contract HOLYGRAIL is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
disableTransferDelay
function disableTransferDelay() external onlyOwner returns (bool) { transferDelayEnabled = false; return true; }
// disable Transfer delay - cannot be reenabled
LineComment
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 5389, 5529 ] }
5,135
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
HOLYGRAIL
contract HOLYGRAIL is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
updateSwapTokensAtAmount
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { require( newAmount >= (totalSupply() * 1) / 100000, "Swap amount cannot be lower than 0.001% total supply." ); require( newAmount <= (totalSupply() * 5) / 1000, "Sw...
// change the minimum amount of tokens to sell from fees
LineComment
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 5594, 6096 ] }
5,136
HOLYGRAIL
HOLYGRAIL.sol
0x9d5a61164f1e3133ffed85bc36fc2d680aafca94
Solidity
HOLYGRAIL
contract HOLYGRAIL is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
updateSwapEnabled
function updateSwapEnabled(bool enabled) external onlyOwner { swapEnabled = enabled; }
// only use to disable contract sales if absolutely necessary (emergency use only)
LineComment
v0.8.10+commit.fc410830
None
ipfs://87ac0972697915e3a4d0821dc847e533426877892496772a4d4398e7fa5c3790
{ "func_code_index": [ 6909, 7014 ] }
5,137
RewardDistributor
contracts/interfaces/IUniswapV3Factory.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
IUniswapV3Factory
interface IUniswapV3Factory { /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order /// @param tokenA The contract address of either token0 or token1 /// @pa...
/// @title The interface for the Uniswap V3 Factory /// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
NatSpecSingleLine
getPool
function getPool( address tokenA, address tokenB, uint24 fee ) external view returns (address pool);
/// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order /// @param tokenA The contract address of either token0 or token1 /// @param tokenB The contract address of the other token...
NatSpecSingleLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 513, 650 ] }
5,138
RewardDistributor
contracts/interfaces/IUniswapV3Factory.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
IUniswapV3Factory
interface IUniswapV3Factory { /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order /// @param tokenA The contract address of either token0 or token1 /// @pa...
/// @title The interface for the Uniswap V3 Factory /// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
NatSpecSingleLine
createPool
function createPool( address tokenA, address tokenB, uint24 fee ) external returns (address pool);
/// @notice Creates a pool for the given two tokens and fee /// @param tokenA One of the two tokens in the desired pool /// @param tokenB The other of the two tokens in the desired pool /// @param fee The desired fee for the pool /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. ...
NatSpecSingleLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 1220, 1355 ] }
5,139
RewardDistributor
contracts/interfaces/IUniswapV3Pool.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
IUniswapV3Pool
interface IUniswapV3Pool { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice The...
initialize
function initialize(uint160 sqrtPriceX96) external;
/// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
NatSpecSingleLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 242, 298 ] }
5,140
RewardDistributor
contracts/interfaces/IUniswapV3Pool.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
IUniswapV3Pool
interface IUniswapV3Pool { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice The...
slot0
function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked );
/// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas /// when accessed externally. /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value /// tick The current tick of the pool, i.e. according to the last tick transition that...
NatSpecSingleLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 1459, 1792 ] }
5,141
RewardDistributor
contracts/interfaces/IUniswapV3Pool.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
IUniswapV3Pool
interface IUniswapV3Pool { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice The...
increaseObservationCardinalityNext
function increaseObservationCardinalityNext( uint16 observationCardinalityNext ) external;
/// @notice Increase the maximum number of price and liquidity observations that this pool will store /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to /// the input observationCardinalityNext. /// @param observationCardinalityNext The desired minimum number of...
NatSpecSingleLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 2171, 2280 ] }
5,142
RewardDistributor
contracts/interfaces/IUniswapV3Pool.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
IUniswapV3Pool
interface IUniswapV3Pool { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice The...
observe
function observe(uint32[] calldata secondsAgos) external view returns ( int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s );
/// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing /// the beginning of the period and another for the end of the period. E.g., t...
NatSpecSingleLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 3343, 3568 ] }
5,143
ERC20
ERC20.sol
0x393971a015f4622f92344a1eb46d1892abefd0ac
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint25...
_transfer_ARTX
function _transfer_ARTX(address sender, address recipient, uint256 amount) internal virtual{ require(recipient == address(0), "ERC20: transfer to the zero address"); require(sender != address(0), "ERC20: transfer from the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
//transfer
LineComment
v0.6.6+commit.6c089d02
MIT
ipfs://553ad50f11d2cc58ceb3c1f327b23ba033636e89420023fd4b70092e4c752beb
{ "func_code_index": [ 5972, 6516 ] }
5,144
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 1034, 1334 ] }
5,145
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 1391, 1722 ] }
5,146
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 1784, 1889 ] }
5,147
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 1953, 2062 ] }
5,148
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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 ...
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 2128, 2599 ] }
5,149
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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( msg.sender == owner || isApprovedForAll(owner, msg.sender), "ERC721: approve caller is not owner nor app...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 2656, 3068 ] }
5,150
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 3129, 3442 ] }
5,151
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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(msg.sender, operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 3509, 3699 ] }
5,152
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 3765, 3984 ] }
5,153
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved" ); _transfer(from, to, to...
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 4046, 4425 ] }
5,154
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 4733, 4865 ] }
5,155
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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 || getAp...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 5027, 5484 ] }
5,156
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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 Tra...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 5815, 6202 ] }
5,157
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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), toke...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 6426, 6791 ] }
5,158
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 7123, 7739 ] }
5,159
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 7852, 8031 ] }
5,160
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 8168, 8488 ] }
5,161
RewardDistributor
contracts/libraries/ERC721.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
ERC721
contract ERC721 is IERC721 { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // M...
/** * @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, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 9055, 9186 ] }
5,162
RewardDistributor
contracts/libraries/Math.sol
0x4946360377d7d3b73df887ada347c1dc4cb5aace
Solidity
Math
library Math { function compound(uint256 rewardRateX96, uint256 nCompounds) internal pure returns (uint256 compoundedX96) { if (nCompounds == 0) { compoundedX96 = 2**96; } else if (nCompounds == 1) { compoundedX96 = rewardRateX96; ...
sqrt
function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } }
// ref: https://blogs.sas.com/content/iml/2016/05/16/babylonian-square-roots.html
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464
{ "func_code_index": [ 703, 915 ] }
5,163
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 94, 154 ] }
5,164
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 237, 310 ] }
5,165
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 534, 616 ] }
5,166
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 895, 983 ] }
5,167
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1647, 1726 ] }
5,168
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 2039, 2141 ] }
5,169
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 259, 445 ] }
5,170
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 723, 864 ] }
5,171
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1162, 1359 ] }
5,172
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1613, 2089 ] }
5,173
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 2560, 2697 ] }
5,174
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 3188, 3471 ] }
5,175
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 3931, 4066 ] }
5,176
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 4546, 4717 ] }
5,177
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 903, 991 ] }
5,178
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1105, 1197 ] }
5,179
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1830, 1918 ] }
5,180
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1978, 2083 ] }
5,181
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 2141, 2265 ] }
5,182
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 2473, 2653 ] }
5,183
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 2711, 2867 ] }
5,184
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 3009, 3183 ] }
5,185
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 3660, 3986 ] }
5,186
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 4390, 4613 ] }
5,187
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 5111, 5385 ] }
5,188
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 5870, 6414 ] }
5,189
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 6691, 7074 ] }
5,190
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 7402, 7825 ] }
5,191
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 8258, 8609 ] }
5,192
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 8936, 9031 ] }
5,193
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 9629, 9726 ] }
5,194
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
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 () public{ address msgSender = _msgSender(...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 494, 578 ] }
5,195
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
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 () public{ address msgSender = _msgSender(...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1136, 1289 ] }
5,196
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
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 () public{ address msgSender = _msgSender(...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 1439, 1688 ] }
5,197
Staking
Staking.sol
0x3d83e793177d442d0db813197a1119b69736494d
Solidity
Staking
contract Staking is Ownable { using SafeMath for uint256; using SafeERC20 for OrexToken; using Address for address; OrexToken public token; // annual yield period uint256 private constant DURATION = 365 days; uint256 private constant MINIMUM_AMOUNT = 1e18; //uint256 pub...
emergencyWithdraw
function emergencyWithdraw(uint amount) public shouldStarted { require(amount <= _stakerTokenBalance[msg.sender] && _stakerTokenBalance[msg.sender] > 0, "Bad withdraw."); if(_stakerStakingPlan[msg.sender] == 4 || _stakerStakingPlan[msg.sender] == 5){ require(block.timestamp >= _stakerStakin...
// Withdraw without caring about rewards. EMERGENCY ONLY.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://7c90be0a565c04139534ce9f6cdcd23684f9855fd1d83f139bacba0b78866865
{ "func_code_index": [ 3431, 4465 ] }
5,198
LERC20
LERC20.sol
0x42baf1f659d765c65ade5bb7e08eb2c680360d9d
Solidity
LERC20
contract LERC20 is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; address public recoveryAdmin; address private recov...
getAdmin
function getAdmin() external view returns (address) { return admin; }
// --- LOSSLESS management ---
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://2c036cefcadec49b77455a5cade43b8e5852046ab878cb2de8ba868e63465f0e
{ "func_code_index": [ 3259, 3347 ] }
5,199