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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
METAS | METAS.sol | 0xddad0f29454cc9788a022f5d9db2fe335ffaea6d | Solidity | METAS | contract METAS is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
m... | /**
* @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) public {
require(msg.sender == _owner, "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[_owner] = _balances[_owner].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://f99d3ac202fa058f3be6eee0fbbbc9afc15b3d0c4ff2ea2fa6d3aec518b9073b | {
"func_code_index": [
8395,
8701
]
} | 4,207 |
METAS | METAS.sol | 0xddad0f29454cc9788a022f5d9db2fe335ffaea6d | Solidity | METAS | contract METAS is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
m... | /**
* @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);
_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.6+commit.6c089d02 | None | ipfs://f99d3ac202fa058f3be6eee0fbbbc9afc15b3d0c4ff2ea2fa6d3aec518b9073b | {
"func_code_index": [
9028,
9451
]
} | 4,208 |
METAS | METAS.sol | 0xddad0f29454cc9788a022f5d9db2fe335ffaea6d | Solidity | METAS | contract METAS is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
m... | /**
* @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(owner, spender, amount)... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://f99d3ac202fa058f3be6eee0fbbbc9afc15b3d0c4ff2ea2fa6d3aec518b9073b | {
"func_code_index": [
9886,
10235
]
} | 4,209 |
METAS | METAS.sol | 0xddad0f29454cc9788a022f5d9db2fe335ffaea6d | Solidity | METAS | contract METAS is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
m... | /**
* @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 | _approveCheck | function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(send... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://f99d3ac202fa058f3be6eee0fbbbc9afc15b3d0c4ff2ea2fa6d3aec518b9073b | {
"func_code_index": [
10680,
11272
]
} | 4,210 |
METAS | METAS.sol | 0xddad0f29454cc9788a022f5d9db2fe335ffaea6d | Solidity | METAS | contract METAS is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
m... | /**
* @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 | _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.6+commit.6c089d02 | None | ipfs://f99d3ac202fa058f3be6eee0fbbbc9afc15b3d0c4ff2ea2fa6d3aec518b9073b | {
"func_code_index": [
12991,
13086
]
} | 4,211 |
METAS | METAS.sol | 0xddad0f29454cc9788a022f5d9db2fe335ffaea6d | Solidity | METAS | contract METAS is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
m... | /**
* @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 to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://f99d3ac202fa058f3be6eee0fbbbc9afc15b3d0c4ff2ea2fa6d3aec518b9073b | {
"func_code_index": [
13684,
13781
]
} | 4,212 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
94,
154
]
} | 4,213 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
237,
310
]
} | 4,214 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
534,
616
]
} | 4,215 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
895,
983
]
} | 4,216 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
1647,
1726
]
} | 4,217 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
2039,
2141
]
} | 4,218 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
259,
445
]
} | 4,219 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
723,
864
]
} | 4,220 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
1162,
1359
]
} | 4,221 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also ested.
// 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.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
1613,
2088
]
} | 4,222 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
2559,
2696
]
} | 4,223 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
3187,
3470
]
} | 4,224 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
3930,
4065
]
} | 4,225 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
4545,
4716
]
} | 4,226 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
606,
1230
]
} | 4,227 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
2160,
2562
]
} | 4,228 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
3318,
3496
]
} | 4,229 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
3721,
3922
]
} | 4,230 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
4292,
4523
]
} | 4,231 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
4774,
5095
]
} | 4,232 |
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
566,
650
]
} | 4,233 | ||
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | 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.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
1209,
1362
]
} | 4,234 | ||
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | 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.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
1512,
1761
]
} | 4,235 | ||
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
1929,
2148
]
} | 4,236 | ||
NUTINU | NUTINU.sol | 0x754abd2f872698087aadd39ce0ee697e32d0b570 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.2+commit.bacdbe57 | None | ipfs://73d7b72160574bc5bbb7a31f397ed2d54b203980c6511aca954d913e0f743100 | {
"func_code_index": [
2219,
2517
]
} | 4,237 | ||
DELTAToken | contracts/v076/Token/Handlers/pre_first_rebasing/OVLLPRebasingHandler.sol | 0x9ea3b5b4ec044b70375236a281986106457b20ef | Solidity | OVLLPRebasingHandler | contract OVLLPRebasingHandler is OVLBase, IOVLTransferHandler {
using SafeMath for uint256;
using Address for address;
address private constant DEPLOYER = 0x5A16552f59ea34E44ec81E58b3817833E9fD5436;
address private constant DELTA_LIMITED_STAKING_WINDOW = 0xdaFCE5670d3F67da9A3A44FE6bc36992e5E2beaB;
... | handleTransfer | function handleTransfer(address sender, address recipient, uint256 amount) external override {
// Mature sure its the deployer
require(tx.origin == DEPLOYER, "!authorised");
// require(sender == DELTA_LIMITED_STAKING_WINDOW || sender == UNI_DELTA_WETH_PAIR || recipient == UNI_DELTA_WETH_PAIR, "Transfers not... | // This function does not need authentication, because this is EXCLUSIVELY
// ever meant to be called using delegatecall() from the main token.
// The memory it modifies in DELTAToken is what effects user balances.
// Calling it here with a malicious ethPairAddress is not going to have
// any impact on the memory of th... | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
893,
2032
]
} | 4,238 | ||||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
94,
154
]
} | 4,239 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
237,
310
]
} | 4,240 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
534,
616
]
} | 4,241 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
895,
983
]
} | 4,242 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1647,
1726
]
} | 4,243 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2039,
2141
]
} | 4,244 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
259,
445
]
} | 4,245 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
723,
864
]
} | 4,246 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1162,
1359
]
} | 4,247 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1613,
2089
]
} | 4,248 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2560,
2697
]
} | 4,249 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3188,
3471
]
} | 4,250 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3931,
4066
]
} | 4,251 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4546,
4717
]
} | 4,252 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
606,
1228
]
} | 4,253 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success,) = recipient.call{value : amount}("");
require(success, "Address: ... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2158,
2558
]
} | 4,254 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3314,
3494
]
} | 4,255 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3719,
3920
]
} | 4,256 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4290,
4521
]
} | 4,257 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4772,
5093
]
} | 4,258 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
497,
581
]
} | 4,259 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1139,
1292
]
} | 4,260 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1442,
1691
]
} | 4,261 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
899,
987
]
} | 4,262 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1101,
1193
]
} | 4,263 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1826,
1914
]
} | 4,264 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1974,
2079
]
} | 4,265 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2137,
2261
]
} | 4,266 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2469,
2649
]
} | 4,267 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2707,
2863
]
} | 4,268 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3005,
3179
]
} | 4,269 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3648,
3974
]
} | 4,270 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4378,
4601
]
} | 4,271 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | 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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
5099,
5373
]
} | 4,272 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | _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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
5858,
6402
]
} | 4,273 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | _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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
6678,
7061
]
} | 4,274 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | _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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
7388,
7811
]
} | 4,275 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | _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 is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
8246,
8597
]
} | 4,276 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | _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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
8924,
9019
]
} | 4,277 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | 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;
uint256 private _totalSupply;
string private _name;
string private _sy... | _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 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
9617,
9713
]
} | 4,278 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
// check address
bool isBurnable = IsBurnable(_msgSender(), recipient);
// check if transfer is enabled
require(isTransferable || !isBurnable, "PiranhasToken: Transfer disabled");
if (isTransferabl... | // override of default function | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
580,
1407
]
} | 4,279 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
// check address
bool isBurnable = IsBurnable(sender, recipient);
// check if transfer is enabled
require(isTransferable || !isBurnable, "PiranhasToken: Transfer disabled");
... | // override of default function | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
1449,
2353
]
} | 4,280 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | _transferWithBurn | function _transferWithBurn(address sender, address recipient, uint256 amount, bool isTransferFrom) private returns (bool) {
// divide amount in different parts
uint256 burnPart = amount.div(100).mul(5);
uint256 rewardPart = amount.div(100).mul(5);
uint256 newAmount = amount.sub(burnPart).sub(rewardP... | // function for transfer with burn | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2401,
3366
]
} | 4,281 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | withdrawMoney | function withdrawMoney(address from, address to, uint256 amount) public virtual returns (bool) {
bool isInList = false;
for (uint i = 0; i < canTransfer.length; i++) {
if (canTransfer[i] == _msgSender()) {
isInList = true;
}
}
require(isInList, "PiranhasToken: Forbid a... | // function for PiranhasGame which canWithdrawMoney | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3426,
3871
]
} | 4,282 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | IsBurnable | function IsBurnable(address sender, address recipient) public view returns (bool) {
bool isBurnable = true;
for (uint i = 0; i < WithoutBurn.length; i++) {
if (WithoutBurn[i] == sender || WithoutBurn[i] == recipient) {
isBurnable = false;
}
}
return isBurnable;
}
| // read function which return if addres is in WithoutBurnList | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
3941,
4293
]
} | 4,283 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | isUniswapPair | function isUniswapPair(address sender) public view returns (bool) {
bool isUniswap = false;
for (uint i = 0; i < UniswapPairs.length; i++) {
if (UniswapPairs[i] == sender) {
isUniswap = true;
}
}
return isUniswap;
}
| // read function which return if addres is in WithoutBurnList | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4367,
4671
]
} | 4,284 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | addCanTransfer | function addCanTransfer(address account) public onlyOwner {
canTransfer.push(account);
}
| // add address to CanTransferList which can call withdrawMoney | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4812,
4919
]
} | 4,285 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | removeCanTransfer | function removeCanTransfer(address account) public onlyOwner {
address[] memory OldcanTransfer = canTransfer;
delete canTransfer;
for (uint256 i = 0; i < OldcanTransfer.length; i++) {
if (OldcanTransfer[i] != account) {
canTransfer.push(OldcanTransfer[i]);
}
}
}
| // remover address from CanTransferList which can call withdrawMoney | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4996,
5349
]
} | 4,286 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | addWithoutBurn | function addWithoutBurn(address account) public onlyOwner {
WithoutBurn.push(account);
}
| // add address to WithoutBurn list | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
5392,
5499
]
} | 4,287 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | removeWithoutBurn | function removeWithoutBurn(address account) public onlyOwner {
address[] memory OldWithoutBurn = WithoutBurn;
delete WithoutBurn;
for (uint256 i = 0; i < OldWithoutBurn.length; i++) {
if (OldWithoutBurn[i] != account) {
WithoutBurn.push(OldWithoutBurn[i]);
}
}
}
| // remove address to WithoutBurn list | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
5545,
5896
]
} | 4,288 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | enableTransfer | function enableTransfer(bool state) public onlyOwner {
isTransferable = state;
}
| //enable/disable transfer | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
5930,
6029
]
} | 4,289 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | addPair | function addPair(address account) public onlyOwner {
UniswapPairs.push(account);
}
| // add address to UniswapPairs list | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
6079,
6180
]
} | 4,290 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasToken | contract PiranhasToken is ERC20("Piranhas", "$PIR"), Ownable {
bool public isTransferable = false;
uint256 public minTotalSupply = 10000;
// lists of addresses
address[] public canTransfer;
address[] public WithoutBurn;
address[] public UniswapPairs;
constructor (uint256 total... | removePair | function removePair(address account) public onlyOwner {
address[] memory OldUniswapPairs = UniswapPairs;
delete UniswapPairs;
for (uint256 i = 0; i < OldUniswapPairs.length; i++) {
if (OldUniswapPairs[i] != account) {
UniswapPairs.push(OldUniswapPairs[i]);
}
}
}
| // remove address to UniswapPairs list | LineComment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
6227,
6578
]
} | 4,291 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasGame | contract PiranhasGame is Ownable {
using SafeMath for uint256;
PiranhasToken public pir;
address public pirAddress;
// white list of addresses
address[] public WhiteList;
address[] public AttacksContracts;
// Game Stats
uint256 public totalAttacks;
uint256 public total... | IsInWhiteList | function IsInWhiteList(address recipient) public view returns (bool) {
bool isInWhiteList = false;
for (uint i = 0; i < WhiteList.length; i++) {
if (WhiteList[i] == recipient) {
isInWhiteList = true;
i = WhiteList.length;
}
}
return isInWhiteList;
}
| /*
All read functions
*/ | Comment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
977,
1332
]
} | 4,292 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasGame | contract PiranhasGame is Ownable {
using SafeMath for uint256;
PiranhasToken public pir;
address public pirAddress;
// white list of addresses
address[] public WhiteList;
address[] public AttacksContracts;
// Game Stats
uint256 public totalAttacks;
uint256 public total... | AddNewAttack | function AddNewAttack(address user, uint256 amount, uint256 reward, uint256 timeLock, bool isKiller) public {
require(!IsInWhiteList(msg.sender), "PiranhasGame: Not in WhiteList");
UserInfo storage userInfo = usersInfo[user];
UserStats storage userStats = usersStats[user];
userInfo.totalLocked = use... | /*
Attack function which save info from different AttacksContracts
*/ | Comment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
2821,
3963
]
} | 4,293 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasGame | contract PiranhasGame is Ownable {
using SafeMath for uint256;
PiranhasToken public pir;
address public pirAddress;
// white list of addresses
address[] public WhiteList;
address[] public AttacksContracts;
// Game Stats
uint256 public totalAttacks;
uint256 public total... | claimPir | function claimPir() public {
uint unlockedAmount = unlockedPir(msg.sender);
require(unlockedAmount > 0, "PiranhasGame: Amount must be bigger than zero");
UserInfo storage user = usersInfo[msg.sender];
uint256[] memory OldAmount = user.amount;
uint256[] memory OldUnlockDate = user.unlockDate;
... | /*
Claim function that returned unlockedPir
*/ | Comment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4033,
4818
]
} | 4,294 | ||
PiranhasGame | PiranhasGame.sol | 0x2cf44288f96532bed4a08b37e079165c9abaffb2 | Solidity | PiranhasGame | contract PiranhasGame is Ownable {
using SafeMath for uint256;
PiranhasToken public pir;
address public pirAddress;
// white list of addresses
address[] public WhiteList;
address[] public AttacksContracts;
// Game Stats
uint256 public totalAttacks;
uint256 public total... | addWhiteList | function addWhiteList(address account) public onlyOwner {
WhiteList.push(account);
}
| /*
Owner function for managing game
*/ | Comment | v0.6.12+commit.27d51765 | None | ipfs://8a0c97b4de8acb628c2164f079a69a62817c9d5ac201177924b9f57e5b5ee512 | {
"func_code_index": [
4885,
4988
]
} | 4,295 | ||
DropPresaleShop721 | contracts/interfaces/ITiny721.sol | 0xe182af6be923b29f6a53855d5571fdd96b21d93a | Solidity | ITiny721 | interface ITiny721 {
/**
Return whether or not the transfer of a particular token ID `_id` is locked.
@param _id The ID of the token to check the lock status of.
@return Whether or not the particular token ID `_id` has transfers locked.
*/
function transferLocks (
uint256 _id
) ext... | /**
@title A minimalistic, gas-efficient ERC-721 implementation forked from the
`Super721` ERC-721 implementation used by SuperFarm.
@author Tim Clancy
@author 0xthrpw
@author Qazawat Zirak
@author Rostislav Khlebnikov
Compared to the original `Super721` implementation that this contract forked
from,... | NatSpecMultiLine | transferLocks | function transferLocks (
uint256 _id
) external returns (bool);
| /**
Return whether or not the transfer of a particular token ID `_id` is locked.
@param _id The ID of the token to check the lock status of.
@return Whether or not the particular token ID `_id` has transfers locked.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
268,
342
]
} | 4,296 | ||
DropPresaleShop721 | contracts/interfaces/ITiny721.sol | 0xe182af6be923b29f6a53855d5571fdd96b21d93a | Solidity | ITiny721 | interface ITiny721 {
/**
Return whether or not the transfer of a particular token ID `_id` is locked.
@param _id The ID of the token to check the lock status of.
@return Whether or not the particular token ID `_id` has transfers locked.
*/
function transferLocks (
uint256 _id
) ext... | /**
@title A minimalistic, gas-efficient ERC-721 implementation forked from the
`Super721` ERC-721 implementation used by SuperFarm.
@author Tim Clancy
@author 0xthrpw
@author Qazawat Zirak
@author Rostislav Khlebnikov
Compared to the original `Super721` implementation that this contract forked
from,... | NatSpecMultiLine | balanceOf | function balanceOf (
address _owner
) external returns ( uint256 );
| /**
Provided with an address parameter, this function returns the number of all
tokens in this collection that are owned by the specified address.
@param _owner The address of the account for which we are checking balances
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
594,
672
]
} | 4,297 | ||
DropPresaleShop721 | contracts/interfaces/ITiny721.sol | 0xe182af6be923b29f6a53855d5571fdd96b21d93a | Solidity | ITiny721 | interface ITiny721 {
/**
Return whether or not the transfer of a particular token ID `_id` is locked.
@param _id The ID of the token to check the lock status of.
@return Whether or not the particular token ID `_id` has transfers locked.
*/
function transferLocks (
uint256 _id
) ext... | /**
@title A minimalistic, gas-efficient ERC-721 implementation forked from the
`Super721` ERC-721 implementation used by SuperFarm.
@author Tim Clancy
@author 0xthrpw
@author Qazawat Zirak
@author Rostislav Khlebnikov
Compared to the original `Super721` implementation that this contract forked
from,... | NatSpecMultiLine | ownerOf | function ownerOf (
uint256 _id
) external returns (address);
| /**
Return the address that holds a particular token ID.
@param _id The token ID to check for the holding address of.
@return The address that holds the token with ID of `_id`.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
880,
951
]
} | 4,298 | ||
DropPresaleShop721 | contracts/interfaces/ITiny721.sol | 0xe182af6be923b29f6a53855d5571fdd96b21d93a | Solidity | ITiny721 | interface ITiny721 {
/**
Return whether or not the transfer of a particular token ID `_id` is locked.
@param _id The ID of the token to check the lock status of.
@return Whether or not the particular token ID `_id` has transfers locked.
*/
function transferLocks (
uint256 _id
) ext... | /**
@title A minimalistic, gas-efficient ERC-721 implementation forked from the
`Super721` ERC-721 implementation used by SuperFarm.
@author Tim Clancy
@author 0xthrpw
@author Qazawat Zirak
@author Rostislav Khlebnikov
Compared to the original `Super721` implementation that this contract forked
from,... | NatSpecMultiLine | mint_Qgo | function mint_Qgo (
address _recipient,
uint256 _amount
) external;
| /**
This function allows permissioned minters of this contract to mint one or
more tokens dictated by the `_amount` parameter. Any minted tokens are sent
to the `_recipient` address.
Note that tokens are always minted sequentially starting at one. That is,
the list of token IDs is always increasing and loo... | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1726,
1809
]
} | 4,299 | ||
DropPresaleShop721 | contracts/interfaces/ITiny721.sol | 0xe182af6be923b29f6a53855d5571fdd96b21d93a | Solidity | ITiny721 | interface ITiny721 {
/**
Return whether or not the transfer of a particular token ID `_id` is locked.
@param _id The ID of the token to check the lock status of.
@return Whether or not the particular token ID `_id` has transfers locked.
*/
function transferLocks (
uint256 _id
) ext... | /**
@title A minimalistic, gas-efficient ERC-721 implementation forked from the
`Super721` ERC-721 implementation used by SuperFarm.
@author Tim Clancy
@author 0xthrpw
@author Qazawat Zirak
@author Rostislav Khlebnikov
Compared to the original `Super721` implementation that this contract forked
from,... | NatSpecMultiLine | lockTransfer | function lockTransfer (
uint256 _id,
bool _locked
) external;
| /**
This function allows an administrative caller to lock the transfer of
particular token IDs. This is designed for a non-escrow staking contract
that comes later to lock a user's NFT while still letting them keep it in
their wallet.
@param _id The ID of the token to lock.
@param _locked The status of t... | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
2198,
2275
]
} | 4,300 | ||
MultiSender | MultiSender.sol | 0x70e8536fd02cd8d01430a82332b14336a6c9c2d0 | Solidity | MultiSender | contract MultiSender is Ownable {
using SafeMath for uint256;
event LogTokenMultiSent(address token, uint256 total);
event LogGetToken(address token, address receiver, uint256 balance);
address public receiverAddress;
/*
* get balance
*/
function getBalance(address _toke... | getBalance | function getBalance(address _tokenAddress) public onlyOwner {
address _receiverAddress = getReceiverAddress();
if (_tokenAddress == address(0)) {
require(_receiverAddress.send(address(this).balance));
return;
}
StandardToken token = StandardToken(_tokenAddress);
uint256 balanc... | /*
* get balance
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://67c496235754466cdd281bbf68e3678280b964fc6cbf29490be8a355db115d7c | {
"func_code_index": [
283,
790
]
} | 4,301 | ||
MultiSender | MultiSender.sol | 0x70e8536fd02cd8d01430a82332b14336a6c9c2d0 | Solidity | MultiSender | contract MultiSender is Ownable {
using SafeMath for uint256;
event LogTokenMultiSent(address token, uint256 total);
event LogGetToken(address token, address receiver, uint256 balance);
address public receiverAddress;
/*
* get balance
*/
function getBalance(address _toke... | setReceiverAddress | function setReceiverAddress(address _addr) public onlyOwner {
require(_addr != address(0));
receiverAddress = _addr;
}
| /*
* set receiver address
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://67c496235754466cdd281bbf68e3678280b964fc6cbf29490be8a355db115d7c | {
"func_code_index": [
843,
989
]
} | 4,302 | ||
MultiSender | MultiSender.sol | 0x70e8536fd02cd8d01430a82332b14336a6c9c2d0 | Solidity | MultiSender | contract MultiSender is Ownable {
using SafeMath for uint256;
event LogTokenMultiSent(address token, uint256 total);
event LogGetToken(address token, address receiver, uint256 balance);
address public receiverAddress;
/*
* get balance
*/
function getBalance(address _toke... | getReceiverAddress | function getReceiverAddress() public view returns (address) {
if (receiverAddress == address(0)) {
return owner;
}
return receiverAddress;
}
| /*
* get receiver address
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://67c496235754466cdd281bbf68e3678280b964fc6cbf29490be8a355db115d7c | {
"func_code_index": [
1038,
1230
]
} | 4,303 | ||
NimbusPair | NimbusPair.sol | 0xdb4a372c113df57e8b15c9f67bc7c74bf887644e | Solidity | Math | library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x < y ? x : y;
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
... | sqrt | function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
| // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://09efbdfdcf59ab0458bca530ac4494d67402d03a2b29e6e342b085575633b976 | {
"func_code_index": [
230,
538
]
} | 4,304 | ||
NimbusPair | NimbusPair.sol | 0xdb4a372c113df57e8b15c9f67bc7c74bf887644e | Solidity | UQ112x112 | library UQ112x112 {
uint224 constant Q112 = 2**112;
// encode a uint112 as a UQ112x112
function encode(uint112 y) internal pure returns (uint224 z) {
z = uint224(y) * Q112; // never overflows
}
// divide a UQ112x112 by a uint112, returning a UQ112x112
function uqdiv(uint224 x,... | encode | function encode(uint112 y) internal pure returns (uint224 z) {
z = uint224(y) * Q112; // never overflows
}
| // encode a uint112 as a UQ112x112 | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://09efbdfdcf59ab0458bca530ac4494d67402d03a2b29e6e342b085575633b976 | {
"func_code_index": [
100,
225
]
} | 4,305 | ||
NimbusPair | NimbusPair.sol | 0xdb4a372c113df57e8b15c9f67bc7c74bf887644e | Solidity | UQ112x112 | library UQ112x112 {
uint224 constant Q112 = 2**112;
// encode a uint112 as a UQ112x112
function encode(uint112 y) internal pure returns (uint224 z) {
z = uint224(y) * Q112; // never overflows
}
// divide a UQ112x112 by a uint112, returning a UQ112x112
function uqdiv(uint224 x,... | uqdiv | function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
z = x / uint224(y);
}
| // divide a UQ112x112 by a uint112, returning a UQ112x112 | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://09efbdfdcf59ab0458bca530ac4494d67402d03a2b29e6e342b085575633b976 | {
"func_code_index": [
291,
404
]
} | 4,306 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.