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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1138,
1335
]
} | 13,100 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1700,
2176
]
} | 13,101 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2639,
2776
]
} | 13,102 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @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) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
3259,
3609
]
} | 13,103 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
4061,
4196
]
} | 13,104 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
4668,
4839
]
} | 13,105 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | OpenZeppelinUpgradesAddress | library OpenZeppelinUpgradesAddress {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the ac... | /**
* Utility library of inline functions on addresses
*
* Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol
* This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts
* when the user imports a zos-lib co... | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
uint256 size;
// XXX Currently there is no better way to check if there is a contract in an address
// than to check the size of the code at that address.
// See https://ethereum.stackexchange.com/a/14016/36603
// for more deta... | /**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
402,
1034
]
} | 13,106 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | 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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
606,
1230
]
} | 13,107 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | 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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2160,
2562
]
} | 13,108 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
94,
154
]
} | 13,109 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
237,
310
]
} | 13,110 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
534,
616
]
} | 13,111 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
895,
983
]
} | 13,112 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | 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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1647,
1726
]
} | 13,113 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2039,
2141
]
} | 13,114 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | __ERC20_init | function __ERC20_init(string memory name, string memory symbol) internal initializer {
__Context_init_unchained();
__ERC20_init_unchained(name, symbol);
}
| /**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
726,
908
]
} | 13,115 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1167,
1255
]
} | 13,116 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1369,
1461
]
} | 13,117 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2094,
2182
]
} | 13,118 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2242,
2347
]
} | 13,119 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2405,
2529
]
} | 13,120 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2737,
2917
]
} | 13,121 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2975,
3131
]
} | 13,122 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
3273,
3447
]
} | 13,123 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
if(sender != _msgSender() && _allowances[sender][_msgSender()] != uint(-1))
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amou... | /**
* @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 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
3916,
4331
]
} | 13,124 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
4735,
4958
]
} | 13,125 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
5456,
5730
]
} | 13,126 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
6215,
6759
]
} | 13,127 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
7035,
7418
]
} | 13,128 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | 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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
7745,
8168
]
} | 13,129 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | 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, 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 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
8603,
8954
]
} | 13,130 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | 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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
9281,
9376
]
} | 13,131 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20UpgradeSafe | contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
strin... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20MinterPauser}.
*
* TIP: For a detailed writeup see our guide... | 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.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
9974,
10071
]
} | 13,132 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20CappedUpgradeSafe | abstract contract ERC20CappedUpgradeSafe is Initializable, ERC20UpgradeSafe {
uint256 private _cap;
/**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/
function __ERC20Capped_init(uint256 cap) internal initializer {
... | /**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/ | NatSpecMultiLine | __ERC20Capped_init | function __ERC20Capped_init(uint256 cap) internal initializer {
__Context_init_unchained();
__ERC20Capped_init_unchained(cap);
}
| /**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
248,
404
]
} | 13,133 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20CappedUpgradeSafe | abstract contract ERC20CappedUpgradeSafe is Initializable, ERC20UpgradeSafe {
uint256 private _cap;
/**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/
function __ERC20Capped_init(uint256 cap) internal initializer {
... | /**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/ | NatSpecMultiLine | cap | function cap() public view returns (uint256) {
return _cap;
}
| /**
* @dev Returns the cap on the token's total supply.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
652,
732
]
} | 13,134 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ERC20CappedUpgradeSafe | abstract contract ERC20CappedUpgradeSafe is Initializable, ERC20UpgradeSafe {
uint256 private _cap;
/**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/
function __ERC20Capped_init(uint256 cap) internal initializer {
... | /**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
super._beforeTokenTransfer(from, to, amount);
if (from == address(0)) { // When minting tokens
require(totalSupply().add(amount) <= _cap, "ERC20Capped: cap exceeded");
}
}
| /**
* @dev See {ERC20-_beforeTokenTransfer}.
*
* Requirements:
*
* - minted tokens must not cause the total supply to go over the cap.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
914,
1237
]
} | 13,135 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is check... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2132,
3252
]
} | 13,136 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Governable | contract Governable is Initializable {
address public governor;
event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor);
/**
* @dev Contract initializer.
* called once by the factory at time of deployment
*/
function __Governable_init_unchai... | __Governable_init_unchained | function __Governable_init_unchained(address governor_) virtual public initializer {
governor = governor_;
emit GovernorshipTransferred(address(0), governor);
}
| /**
* @dev Contract initializer.
* called once by the factory at time of deployment
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
283,
471
]
} | 13,137 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Governable | contract Governable is Initializable {
address public governor;
event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor);
/**
* @dev Contract initializer.
* called once by the factory at time of deployment
*/
function __Governable_init_unchai... | renounceGovernorship | function renounceGovernorship() public governance {
emit GovernorshipTransferred(governor, address(0));
governor = address(0);
}
| /**
* @dev Allows the current governor to relinquish control of the contract.
* @notice Renouncing to governorship will leave the contract without an governor.
* It will not be possible to call the functions with the `governance`
* modifier anymore.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
854,
1010
]
} | 13,138 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Governable | contract Governable is Initializable {
address public governor;
event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor);
/**
* @dev Contract initializer.
* called once by the factory at time of deployment
*/
function __Governable_init_unchai... | transferGovernorship | function transferGovernorship(address newGovernor) public governance {
_transferGovernorship(newGovernor);
}
| /**
* @dev Allows the current governor to transfer control of the contract to a newGovernor.
* @param newGovernor The address to transfer governorship to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1194,
1321
]
} | 13,139 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Governable | contract Governable is Initializable {
address public governor;
event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor);
/**
* @dev Contract initializer.
* called once by the factory at time of deployment
*/
function __Governable_init_unchai... | _transferGovernorship | function _transferGovernorship(address newGovernor) internal {
require(newGovernor != address(0));
emit GovernorshipTransferred(governor, newGovernor);
governor = newGovernor;
}
| /**
* @dev Transfers control of the contract to a newGovernor.
* @param newGovernor The address to transfer governorship to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1475,
1689
]
} | 13,140 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IStakingRewards | interface IStakingRewards {
// Views
function lastTimeRewardApplicable() external view returns (uint256);
function rewardPerToken() external view returns (uint256);
function rewards(address account) external view returns (uint256);
function earned(address account) external view returns (u... | // Inheritancea | LineComment | lastTimeRewardApplicable | function lastTimeRewardApplicable() external view returns (uint256);
| // Views | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
43,
116
]
} | 13,141 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | IStakingRewards | interface IStakingRewards {
// Views
function lastTimeRewardApplicable() external view returns (uint256);
function rewardPerToken() external view returns (uint256);
function rewards(address account) external view returns (uint256);
function earned(address account) external view returns (u... | // Inheritancea | LineComment | stake | function stake(uint256 amount) external;
| // Mutative | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
562,
607
]
} | 13,142 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | StakingRewards | contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuardUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish... | __StakingRewards_init | function __StakingRewards_init(
address _rewardsDistribution,
address _rewardsToken,
address _stakingToken
) public initializer {
__ReentrancyGuard_init_unchained();
__StakingRewards_init_unchained(_rewardsDistribution, _rewardsToken, _stakingToken);
}
| //constructor( | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
802,
1114
]
} | 13,143 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | StakingRewards | contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuardUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish... | totalSupply | function totalSupply() virtual override public view returns (uint256) {
return _totalSupply;
}
| /* ========== VIEWS ========== */ | Comment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1461,
1574
]
} | 13,144 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | StakingRewards | contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuardUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish... | stakeWithPermit | function stakeWithPermit(uint256 amount, uint deadline, uint8 v, bytes32 r, bytes32 s) virtual public nonReentrant updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
// permit
IP... | /* ========== MUTATIVE FUNCTIONS ========== */ | Comment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2638,
3199
]
} | 13,145 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | StakingRewards | contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuardUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
uint256 public periodFinish... | notifyRewardAmount | function notifyRewardAmount(uint256 reward) override external onlyRewardsDistribution updateReward(address(0)) {
if (block.timestamp >= periodFinish) {
rewardRate = reward.div(rewardsDuration);
} else {
uint256 remaining = periodFinish.sub(block.timestamp);
uint256 leftover = remain... | /* ========== RESTRICTED FUNCTIONS ========== */ | Comment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
4484,
5581
]
} | 13,146 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Factory | contract Factory is ContextUpgradeSafe, Configurable, Constants {
using SafeERC20 for IERC20;
using SafeMath for uint;
bytes32 public constant REGISTER_TYPEHASH = keccak256("RegisterMapping(uint mainChainId,address token,uint[] chainIds,address[] mappingTokenMappeds,address signatory)");
bytes32... | calcMapping | function calcMapping(uint mainChainId, address tokenOrCreator) public view returns (address) {
return address(uint(keccak256(abi.encodePacked(
hex'ff',
address(this),
keccak256(abi.encodePacked(mainChainId, tokenOrCreator)),
keccak256(type(InitializableProductProxy).creation... | // calculates the CREATE2 address for a pair without making any external calls | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
14814,
15299
]
} | 13,147 | ||
Sonali | Sonali.sol | 0xe73213fcb56a9e0fe98d66dd3e573095a70194bb | Solidity | Sonali | contract Sonali is StandardToken {
string public constant name = "Sonali";
string public constant symbol = "sonali";
uint256 public constant decimals = 18;
string public version = "1.0";
uint256 public constant total = 50 * (10**7) * 10**decimals; // 20 *10^7 sonali total
function Sonali() publi... | Sonali | function Sonali() public {
balances[msg.sender] = total;
Transfer(0x0, msg.sender, total);
}
| // 20 *10^7 sonali total | LineComment | v0.4.18+commit.9cf6e910 | bzzr://2c3074f2cd1199f74733b63b9f2f460cf2ba24b5a0e6dee7933cda345dc680ff | {
"func_code_index": [
295,
403
]
} | 13,148 | |||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | setRewardOwner | function setRewardOwner(address _rewardOwner) public onlyOwner {
rewardOwner = _rewardOwner;
}
| /// @notice Sets the reward owner. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3200,
3310
]
} | 13,149 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | setBlockReward | function setBlockReward(uint256 _blockReward) public onlyOwner {
massUpdatePools();
blockReward = _blockReward;
emit LogBlockReward(_blockReward);
}
| /// @notice set block reward. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3346,
3526
]
} | 13,150 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | poolLength | function poolLength() public view returns (uint256 pools) {
pools = poolInfo.length;
}
| /// @notice Returns the number of Staking pools. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3581,
3683
]
} | 13,151 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | add | function add(
uint256 allocPoint,
IERC20 _lpToken,
IRewarder _rewarder
) public onlyOwner {
checkPoolDuplicate(_lpToken);
uint256 lastRewardBlock = block.number;
totalAllocPoint = totalAllocPoint.add(allocPoint);
lpToken.push(_lpToken);
rewarder.push(_rewarder);
poolInfo.push(
... | /// @notice Add a new LP to the pool. Can only be called by the owner.
/// DO NOT add the same LP token more than once. Rewards will be messed up if you do.
/// @param allocPoint AP of the new pool.
/// @param _lpToken Address of the LP ERC-20 token.
/// @param _rewarder Address of the rewarder delegate. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
4253,
4834
]
} | 13,152 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | set | function set(
uint256 _pid,
uint256 _allocPoint,
IRewarder _rewarder,
bool overwrite
) public onlyOwner {
massUpdatePools();
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint.to64();
if (overwrite) {
rewarde... | /// @notice Update the given pool's Reward token allocation point and `IRewarder` contract. Can only be called by the owner.
/// @param _pid The index of the pool. See `poolInfo`.
/// @param _allocPoint New AP of the pool.
/// @param _rewarder Address of the rewarder delegate.
/// @param overwrite True if _rewarder sho... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
5224,
5719
]
} | 13,153 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | pendingRewards | function pendingRewards(uint256 _pid, address _user) external view returns (uint256 pending) {
PoolInfo memory pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accRewardPerShare = pool.accRewardPerShare;
uint256 lpSupply = lpToken[_pid].balanceOf(address(this));
if (bloc... | /// @notice View function to see pending Rewards on frontend.
/// @param _pid The index of the pool. See `poolInfo`.
/// @param _user Address of user.
/// @return pending Token reward for a given user. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
5939,
6718
]
} | 13,154 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| /// @notice Update reward variables for all pools. Be careful of gas spending! | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6803,
6982
]
} | 13,155 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | updatePool | function updatePool(uint256 pid) public returns (PoolInfo memory pool) {
pool = poolInfo[pid];
if (block.number > pool.lastRewardBlock) {
uint256 lpSupply = lpToken[pid].balanceOf(address(this));
if (lpSupply > 0) {
uint256 blocks = block.number.sub(pool.lastRewardBlock);
... | /// @notice Update reward variables of the given pool.
/// @param pid The index of the pool. See `poolInfo`.
/// @return pool Returns the pool that was updated. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
7157,
7918
]
} | 13,156 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | deposit | function deposit(
uint256 pid,
uint256 amount,
address to
) public {
PoolInfo memory pool = updatePool(pid);
UserInfo storage user = userInfo[pid][to];
// Effects
user.amount = user.amount.add(amount);
user.rewardDebt = user.rewardDebt.add(int256(amount.mul(pool.accRewardPerShare) / ACC... | /// @notice Deposit LP tokens to Staking contract for Reward token allocation.
/// @param pid The index of the pool. See `poolInfo`.
/// @param amount LP token amount to deposit.
/// @param to The receiver of `amount` deposit benefit. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
8171,
8871
]
} | 13,157 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | withdraw | function withdraw(
uint256 pid,
uint256 amount,
address to
) public {
PoolInfo memory pool = updatePool(pid);
UserInfo storage user = userInfo[pid][msg.sender];
// Effects
user.rewardDebt = user.rewardDebt.sub(int256(amount.mul(pool.accRewardPerShare) / ACC_PRECISION));
user.amount = us... | /// @notice Withdraw LP tokens from Staking contract.
/// @param pid The index of the pool. See `poolInfo`.
/// @param amount LP token amount to withdraw.
/// @param to Receiver of the LP tokens. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
9085,
9776
]
} | 13,158 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | harvest | function harvest(uint256 pid, address to) public {
PoolInfo memory pool = updatePool(pid);
UserInfo storage user = userInfo[pid][msg.sender];
int256 accumulatedRewards = int256(user.amount.mul(pool.accRewardPerShare) / ACC_PRECISION);
uint256 _pendingRewards = accumulatedRewards.sub(user.rewardDebt).toU... | /// @notice Harvest proceeds for transaction sender to `to`.
/// @param pid The index of the pool. See `poolInfo`.
/// @param to Receiver of Token rewards. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
9946,
10763
]
} | 13,159 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | withdrawAndHarvest | function withdrawAndHarvest(
uint256 pid,
uint256 amount,
address to
) public {
PoolInfo memory pool = updatePool(pid);
UserInfo storage user = userInfo[pid][msg.sender];
int256 accumulatedRewards = int256(user.amount.mul(pool.accRewardPerShare) / ACC_PRECISION);
uint256 _pendingRewards = ac... | /// @notice Withdraw LP tokens from Staking contract and harvest proceeds for transaction sender to `to`.
/// @param pid The index of the pool. See `poolInfo`.
/// @param amount LP token amount to withdraw.
/// @param to Receiver of the LP tokens and Token rewards. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
11047,
12082
]
} | 13,160 | ||
SingleStaking | contracts/SingleStaking.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | SingleStaking | contract SingleStaking is Ownable, Multicall {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeERC20 for IERC20;
using SignedSafeMath for int256;
/// @notice Info of each stakers.
/// `amount` LP token amount the user has provided.
/// `rewardDebt` The amount of Token e... | // @notice Staking contract to reward Tokens for stakers | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 pid, address to) public {
UserInfo storage user = userInfo[pid][msg.sender];
uint256 amount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
IRewarder _rewarder = rewarder[pid];
if (address(_rewarder) != address(0)) {
_rewarder.onTokenReward(pid, m... | /// @notice Withdraw without caring about rewards. EMERGENCY ONLY.
/// @param pid The index of the pool. See `poolInfo`.
/// @param to Receiver of the LP tokens. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
12258,
12823
]
} | 13,161 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
94,
154
]
} | 13,162 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
237,
310
]
} | 13,163 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
534,
616
]
} | 13,164 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
895,
983
]
} | 13,165 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1647,
1726
]
} | 13,166 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
2039,
2175
]
} | 13,167 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
100,
159
]
} | 13,168 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
226,
287
]
} | 13,169 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
363,
418
]
} | 13,170 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
811,
916
]
} | 13,171 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1030,
1139
]
} | 13,172 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | decimals | function decimals() public view virtual override returns (uint8) {
return 18;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1773,
1871
]
} | 13,173 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1931,
2044
]
} | 13,174 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
2102,
2234
]
} | 13,175 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
2442,
2622
]
} | 13,176 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
2680,
2836
]
} | 13,177 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
2978,
3152
]
} | 13,178 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
3629,
3989
]
} | 13,179 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
4393,
4616
]
} | 13,180 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
5114,
5388
]
} | 13,181 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _transfer | function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
... | /**
* @dev Moves 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
5873,
6451
]
} | 13,182 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
6733,
7116
]
} | 13,183 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
7444,
7867
]
} | 13,184 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _approve | function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(own... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
8300,
8685
]
} | 13,185 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
9283,
9413
]
} | 13,186 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
259,
445
]
} | 13,187 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
723,
864
]
} | 13,188 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1162,
1359
]
} | 13,189 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1613,
2089
]
} | 13,190 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
2560,
2697
]
} | 13,191 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
3188,
3471
]
} | 13,192 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
3931,
4066
]
} | 13,193 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | 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.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
4546,
4717
]
} | 13,194 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
492,
576
]
} | 13,195 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1134,
1287
]
} | 13,196 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
1437,
1686
]
} | 13,197 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | mul | function mul(int256 a, int256 b) internal pure returns (int256) {
int256 c = a * b;
// Detect overflow when multiplying MIN_INT256 with -1
require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
require((b == 0) || (c / b == a));
return c;
}
| /**
* @dev Multiplies two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
234,
542
]
} | 13,198 | ||
BeastInu | BeastInu.sol | 0x3ba7bd4ca6feba7553521f5ba763b512983a6202 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | div | function div(int256 a, int256 b) internal pure returns (int256) {
// Prevent overflow when dividing MIN_INT256 by -1
require(b != -1 || a != MIN_INT256);
// Solidity already throws when dividing by 0.
return a / b;
}
| /**
* @dev Division of two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | None | ipfs://6eb2f669bd1e34b27004ebb832721fbc1ba867dc6db9365cdc2c984628976573 | {
"func_code_index": [
632,
896
]
} | 13,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.