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
OneTwoThreeMasterChef
contracts/OneTwoThreeBonusToken.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeBonusToken
contract OneTwoThreeBonusToken is ERC20("123swap Bonus Token", "123b"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (OneTwoThreeMasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0),...
// OneTwoThreeBonusToken with Governance.
LineComment
getPriorVotes
function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "123b::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most re...
/** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @r...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 5115, 6336 ] }
17,400
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 94, 154 ] }
17,401
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 237, 310 ] }
17,402
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 534, 616 ] }
17,403
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 895, 983 ] }
17,404
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 1647, 1726 ] }
17,405
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 2039, 2141 ] }
17,406
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 259, 445 ] }
17,407
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 723, 864 ] }
17,408
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 1162, 1359 ] }
17,409
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 1613, 2089 ] }
17,410
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 2560, 2697 ] }
17,411
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 3188, 3471 ] }
17,412
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 3931, 4066 ] }
17,413
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 4546, 4717 ] }
17,414
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 606, 1230 ] }
17,415
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 2160, 2562 ] }
17,416
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 3318, 3496 ] }
17,417
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 3721, 3922 ] }
17,418
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 4292, 4523 ] }
17,419
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 4774, 5095 ] }
17,420
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 497, 581 ] }
17,421
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 1139, 1292 ] }
17,422
MIDAS
MIDAS.sol
0xd6a647e13bed952f1289d17612bbc18b7f750117
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://887895ce79ee3d2adad4756e7d1b1ad0bffad18af9d91e8b01df11fe55ae37f2
{ "func_code_index": [ 1442, 1691 ] }
17,423
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
IMigratorChef
interface IMigratorChef { // Perform LP token migration from legacy UniswapV2 to BonusSwap. // Take the current LP token address and return the new LP token address. // Migrator should have full access to the caller's LP token. // Return the new LP token address. // // XXX Migrator must have all...
migrate
function migrate(IERC20 token) external returns (IERC20);
// Perform LP token migration from legacy UniswapV2 to BonusSwap. // Take the current LP token address and return the new LP token address. // Migrator should have full access to the caller's LP token. // Return the new LP token address. // // XXX Migrator must have allowance access to UniswapV2 LP tokens. // BonusSwap...
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 535, 596 ] }
17,424
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
add
function add( uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate ) public onlyOwner { if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo....
// Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 3090, 3680 ] }
17,425
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
set
function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public onlyOwner { if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add( _allocPoint ); poolInfo[_pid].allocPoint = _allocPoint; }
// Update the given pool's BONUS allocation point. Can only be called by the owner.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 3770, 4124 ] }
17,426
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
setMigrator
function setMigrator(IMigratorChef _migrator) public onlyOwner { migrator = _migrator; }
// Set the migrator contract. Can only be called by the owner.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 4193, 4297 ] }
17,427
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
migrate
function migrate(uint256 _pid) public { require(address(migrator) != address(0), "migrate: no migrator"); PoolInfo storage pool = poolInfo[_pid]; IERC20 lpToken = pool.lpToken; uint256 bal = lpToken.balanceOf(address(this)); lpToken.safeApprove(address(migrator), bal); IERC20 newLpToken = migrat...
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 4413, 4899 ] }
17,428
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
getMultiplier
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { if (_to <= bonusEndBlock) { return _to.sub(_from).mul(BONUS_MULTIPLIER); } else if (_from >= bonusEndBlock) { return _to.sub(_from); } else { return bonusEndBlock.sub(_from).mul...
// Return reward multiplier over the given _from to _to block.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 4968, 5437 ] }
17,429
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
pendingBonus
function pendingBonus(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accBonusPerShare = pool.accBonusPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (bloc...
// View function to see pending 123b on frontend.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 5493, 6382 ] }
17,430
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
massUpdatePools
function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } }
// Update reward vairables for all pools. Be careful of gas spending!
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 6458, 6637 ] }
17,431
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
updatePool
function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0) { pool.lastRewardBlock = block.number; return; } uint2...
// Update reward variables of the given pool to be up-to-date.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 6706, 7548 ] }
17,432
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
deposit
function deposit(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accBonusPerShare).div(1e12).sub( user.r...
// Deposit LP tokens to OneTwoThreeMasterChef for BONUS allocation.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 7622, 8373 ] }
17,433
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
withdraw
function withdraw(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 pending = user.amount.mul(pool.accBonusPerShare).div(1e12).su...
// Withdraw LP tokens from OneTwoThreeMasterChef.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 8429, 9119 ] }
17,434
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
emergencyWithdraw
function emergencyWithdraw(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; pool.lpToken.safeTransfer(address(msg.sender), user.amount); emit EmergencyWithdraw(msg.sender, _pid, user.amount); user.amount = 0; user.rewardDebt = 0; ...
// Withdraw without caring about rewards. EMERGENCY ONLY.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 9183, 9536 ] }
17,435
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
safeBonusTransfer
function safeBonusTransfer(address _to, uint256 _amount) internal { uint256 bonusBal = bonus.balanceOf(address(this)); if (_amount > bonusBal) { bonus.transfer(_to, bonusBal); } else { bonus.transfer(_to, _amount); } }
// Safe bonus transfer function, just in case if rounding error causes pool to not have enough 123b.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 9643, 9925 ] }
17,436
OneTwoThreeMasterChef
contracts/OneTwoThreeMasterChef.sol
0x44e706c18a1cc9ff67ed1ee37465a857fe25336c
Solidity
OneTwoThreeMasterChef
contract OneTwoThreeMasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do ...
// OneTwoThreeMasterChef is the master of Bonus. He can make Bonus and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once BONUS is sufficiently // distributed and the community can show to govern itself. // // Ha...
LineComment
dev
function dev(address _devaddr) public { require(msg.sender == devaddr, "dev: wut?"); devaddr = _devaddr; }
// Update dev address by the previous dev.
LineComment
v0.6.12+commit.27d51765
MIT
{ "func_code_index": [ 9974, 10104 ] }
17,437
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 92, 152 ] }
17,438
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 233, 306 ] }
17,439
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 524, 606 ] }
17,440
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 879, 967 ] }
17,441
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 1618, 1697 ] }
17,442
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 2002, 2104 ] }
17,443
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 157, 384 ] }
17,444
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 528, 727 ] }
17,445
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 873, 1381 ] }
17,446
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 1528, 1728 ] }
17,447
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 1885, 2085 ] }
17,448
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 2318, 2421 ] }
17,449
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 2690, 2793 ] }
17,450
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 3038, 3141 ] }
17,451
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 3428, 3531 ] }
17,452
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 3982, 4085 ] }
17,453
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 4547, 4758 ] }
17,454
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invali...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 5463, 5673 ] }
17,455
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 6317, 6527 ] }
17,456
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 590, 1017 ] }
17,457
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @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.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 1932, 2334 ] }
17,458
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 3073, 3251 ] }
17,459
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 3471, 3671 ] }
17,460
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 4031, 4262 ] }
17,461
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disa...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 4508, 5043 ] }
17,462
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 5218, 5422 ] }
17,463
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.stat...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 5604, 6031 ] }
17,464
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 6208, 6413 ] }
17,465
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
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 return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.deleg...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 6597, 7025 ] }
17,466
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
Ownable
abstract 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 () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 450, 542 ] }
17,467
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
Ownable
abstract 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 () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 1093, 1246 ] }
17,468
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
Ownable
abstract 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 () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 1393, 1642 ] }
17,469
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
MARIO
contract MARIO is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint8 private _decimals = 9; // string private _name = "SUPER MARIO"; string private _symbol = "MARIO"; uint256 private _tTotal = 1000 * 10**9 * 10**uint256(_decimals); // ...
// contract implementation
LineComment
//to recieve ETH
LineComment
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 6889, 6923 ] }
17,470
MARIO
MARIO.sol
0xc8cf9b8ccfb4c53c052427e98669ff28b6f7e301
Solidity
MARIO
contract MARIO is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint8 private _decimals = 9; // string private _name = "SUPER MARIO"; string private _symbol = "MARIO"; uint256 private _tTotal = 1000 * 10**9 * 10**uint256(_decimals); // ...
// contract implementation
LineComment
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipie...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.3+commit.8d00100c
None
ipfs://870fd5f98d91da70d06b25f28ad7701ddfc4fca9e34ecc21b01655d70053545d
{ "func_code_index": [ 13006, 13829 ] }
17,471
ICToken
contracts/ICToken.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
ICToken
contract ICToken is IICToken, IVNFTErc20Container, VNFTCore { event NewSolver(ISolver oldSolver, ISolver newSolver); event NewVestingPool( IVestingPool oldVestingPool, IVestingPool newVestingPool ); using SafeMathUpgradeable for uint256; using SafeMathUpgradeable for uint64; ad...
mint
function mint( uint64 term_, /*seconds*/ uint256 amount_, uint64[] calldata maturities_, uint32[] calldata percentages_, string memory originalInvestor_ ) external virtual override returns (uint256, uint256) { (uint256 slot, uint256 tokenId) = _mint( msg.sender, term_, am...
/** * @notice Mint a new Voucher of the specified type. * @param term_ Release term: * One-time release type: fixed at 0; * Linear and Staged release type: duration in seconds from start to end of release. * @param amount_ Amount of assets (ERC20) to be locked up * @param maturities_ Tim...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 2518, 3018 ] }
17,472
ICToken
contracts/ICToken.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
ICToken
contract ICToken is IICToken, IVNFTErc20Container, VNFTCore { event NewSolver(ISolver oldSolver, ISolver newSolver); event NewVestingPool( IVestingPool oldVestingPool, IVestingPool newVestingPool ); using SafeMathUpgradeable for uint256; using SafeMathUpgradeable for uint64; ad...
claim
function claim(uint256 tokenId, uint256 amount) external virtual override { _claim(msg.sender, tokenId, amount); }
/** * @notice Claim specified amount of assets of target Voucher. * @param tokenId Id of the Voucher to claim * @param amount Amount of assets (ERC20) to claim */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 4654, 4784 ] }
17,473
ICToken
contracts/ICToken.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
ICToken
contract ICToken is IICToken, IVNFTErc20Container, VNFTCore { event NewSolver(ISolver oldSolver, ISolver newSolver); event NewVestingPool( IVestingPool oldVestingPool, IVestingPool newVestingPool ); using SafeMathUpgradeable for uint256; using SafeMathUpgradeable for uint64; ad...
claimAll
function claimAll(uint256 tokenId) external virtual override { _claim(msg.sender, tokenId, claimableAmount(tokenId)); }
/** * @notice Claim All underlying assets of target Voucher. * @param tokenId Id of the Voucher to claim */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 4913, 5048 ] }
17,474
ICToken
contracts/ICToken.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
ICToken
contract ICToken is IICToken, IVNFTErc20Container, VNFTCore { event NewSolver(ISolver oldSolver, ISolver newSolver); event NewVestingPool( IVestingPool oldVestingPool, IVestingPool newVestingPool ); using SafeMathUpgradeable for uint256; using SafeMathUpgradeable for uint64; ad...
claimableAmount
function claimableAmount(uint256 tokenId_) public view virtual override returns (uint256) { return vestingPool.claimableAmount(tokenId_); }
/** * @notice Query the released amount of the underlying assets. * @param tokenId_ Id of the Voucher to query */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 5183, 5382 ] }
17,475
ICToken
contracts/ICToken.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
ICToken
contract ICToken is IICToken, IVNFTErc20Container, VNFTCore { event NewSolver(ISolver oldSolver, ISolver newSolver); event NewVestingPool( IVestingPool oldVestingPool, IVestingPool newVestingPool ); using SafeMathUpgradeable for uint256; using SafeMathUpgradeable for uint64; ad...
transferFrom
function transferFrom( address from_, address to_, uint256 tokenId_, uint256 transferUnits_ ) public virtual override returns (uint256 newTokenId) { newTokenId = generateTokenId(); _transferUnitsFrom(from_, to_, tokenId_, newTokenId, transferUnits_); }
/** * @notice Transfer part of units of a Voucher to target address. * @param from_ Address of the Voucher sender * @param to_ Address of the Voucher recipient * @param tokenId_ Id of the Voucher to transfer * @param transferUnits_ Amount of units to transfer */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 8282, 8594 ] }
17,476
ICToken
contracts/ICToken.sol
0xb4cf4bc604740d6bd946b3e8bf89f01399296ec2
Solidity
ICToken
contract ICToken is IICToken, IVNFTErc20Container, VNFTCore { event NewSolver(ISolver oldSolver, ISolver newSolver); event NewVestingPool( IVestingPool oldVestingPool, IVestingPool newVestingPool ); using SafeMathUpgradeable for uint256; using SafeMathUpgradeable for uint64; ad...
transferFrom
function transferFrom( address from_, address to_, uint256 tokenId_, uint256 targetTokenId_, uint256 transferUnits_ ) public virtual override { require(_exists(targetTokenId_), "target token not exists"); _transferUnitsFrom( from_, to_, tokenId_, targetTokenId...
/** * @notice Transfer part of units of a Voucher to another Voucher. * @param from_ Address of the Voucher sender * @param to_ Address of the Voucher recipient * @param tokenId_ Id of the Voucher to transfer * @param targetTokenId_ Id of the Voucher to receive * @param transferUnits_ Amount of units to transfer ...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 8952, 9370 ] }
17,477
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 94, 154 ] }
17,478
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 237, 310 ] }
17,479
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 534, 616 ] }
17,480
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 895, 983 ] }
17,481
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * // importANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortuna...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 1650, 1729 ] }
17,482
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 2042, 2144 ] }
17,483
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 259, 445 ] }
17,484
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 723, 864 ] }
17,485
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 1162, 1359 ] }
17,486
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 1613, 2089 ] }
17,487
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 2560, 2697 ] }
17,488
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 3188, 3471 ] }
17,489
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 3931, 4066 ] }
17,490
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 4546, 4717 ] }
17,491
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresse...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 609, 1036 ] }
17,492
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 1969, 2371 ] }
17,493
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 3127, 3305 ] }
17,494
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 3530, 3731 ] }
17,495
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 4101, 4332 ] }
17,496
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [// importANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 4583, 4904 ] }
17,497
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 902, 990 ] }
17,498
UnbasedAMPL
UnbasedAMPL.sol
0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view 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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486
{ "func_code_index": [ 1104, 1196 ] }
17,499