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
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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 r...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 971, 1063 ] }
3,300
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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 r...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 1770, 1853 ] }
3,301
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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 r...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 2194, 2300 ] }
3,302
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 290, 496 ] }
3,303
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 805, 958 ] }
3,304
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 1287, 1504 ] }
3,305
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 1789, 2309 ] }
3,306
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 2817, 2966 ] }
3,307
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 3494, 3801 ] }
3,308
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 4298, 4445 ] }
3,309
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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...
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 4962, 5149 ] }
3,310
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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. * * Amon...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 658, 1322 ] }
3,311
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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. * * Amon...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 2301, 2727 ] }
3,312
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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. * * Amon...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 3538, 3726 ] }
3,313
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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. * * Amon...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 3970, 4183 ] }
3,314
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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. * * Amon...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 4587, 4830 ] }
3,315
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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. * * Amon...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 5100, 5437 ] }
3,316
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 622, 718 ] }
3,317
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 1324, 1493 ] }
3,318
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 1656, 1925 ] }
3,319
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
lock
function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); }
//Locks the contract for owner for the amount of time provided
LineComment
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 2109, 2352 ] }
3,320
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
unlock
function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; }
//Unlocks the contract for owner when _lockTime is exceeds
LineComment
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 2431, 2753 ] }
3,321
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
SIB
contract SIB is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; m...
// Contract implementation
LineComment
manualSwap
function manualSwap() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); }
// We are exposing these functions to be able to manual swap and send // in case the token is highly valued and 5M becomes too much
LineComment
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 19539, 19716 ] }
3,322
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
Solidity
SIB
contract SIB is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; m...
// Contract implementation
LineComment
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 24001, 24039 ] }
3,323
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 94, 154 ] }
3,324
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 237, 310 ] }
3,325
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 534, 616 ] }
3,326
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 895, 983 ] }
3,327
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1647, 1726 ] }
3,328
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2039, 2141 ] }
3,329
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 259, 445 ] }
3,330
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 723, 864 ] }
3,331
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1162, 1359 ] }
3,332
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1613, 2089 ] }
3,333
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2560, 2697 ] }
3,334
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3188, 3471 ] }
3,335
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3931, 4066 ] }
3,336
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4546, 4717 ] }
3,337
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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) { // 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 addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 606, 1033 ] }
3,338
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1963, 2365 ] }
3,339
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3121, 3299 ] }
3,340
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3524, 3725 ] }
3,341
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4095, 4326 ] }
3,342
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4577, 4898 ] }
3,343
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 747, 1374 ] }
3,344
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2393, 3159 ] }
3,345
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_add
function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; retur...
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 908, 1327 ] }
3,346
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_remove
function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element f...
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1498, 3047 ] }
3,347
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_contains
function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3128, 3262 ] }
3,348
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_length
function _length(Set storage set) private view returns (uint256) { return set._values.length; }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3343, 3457 ] }
3,349
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_at
function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3796, 4005 ] }
3,350
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4254, 4402 ] }
3,351
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4573, 4727 ] }
3,352
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4808, 4971 ] }
3,353
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5052, 5174 ] }
3,354
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5513, 5667 ] }
3,355
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5912, 6048 ] }
3,356
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 6219, 6361 ] }
3,357
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 6442, 6593 ] }
3,358
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 6674, 6793 ] }
3,359
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 7132, 7274 ] }
3,360
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 497, 581 ] }
3,361
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1139, 1292 ] }
3,362
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1442, 1691 ] }
3,363
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 902, 990 ] }
3,364
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1104, 1196 ] }
3,365
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1829, 1917 ] }
3,366
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 1977, 2082 ] }
3,367
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2140, 2264 ] }
3,368
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2472, 2652 ] }
3,369
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2710, 2866 ] }
3,370
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3008, 3182 ] }
3,371
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3651, 3977 ] }
3,372
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4381, 4604 ] }
3,373
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5102, 5376 ] }
3,374
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5861, 6405 ] }
3,375
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 6681, 7064 ] }
3,376
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 7391, 7814 ] }
3,377
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 8247, 8598 ] }
3,378
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 8925, 9020 ] }
3,379
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
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
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 9618, 9715 ] }
3,380
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
Ectoplasma
contract Ectoplasma is ERC20("Gasoline", "GAS"), Ownable { using SafeMath for uint256; address public devaddr; // the amount of burn to ecto during every transfer, i.e. 100 = 1%, 50 = 2%, 40 = 2.5%, 255 being the lowest burn uint8 public burnDivisor; constructor(uint8 _burnDivisor, address ...
//
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); }
// mints new ecto tokens, can only be called by BooBank // contract during burns, no users or dev can call this
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 614, 718 ] }
3,381
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
BooBank
contract BooBank is ERC20("Tocaine.Finance", "CAINE"), Ownable { // START OF BOO BANK SPECIFIC CODE // BooBank is an exact copy of sushi except for the // following code, which implements a burn every transfer // https://etherscan.io/token/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2 // the Boo b...
// // Boo with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MrBanker).
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 2788, 2955 ] }
3,382
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
BooBank
contract BooBank is ERC20("Tocaine.Finance", "CAINE"), Ownable { // START OF BOO BANK SPECIFIC CODE // BooBank is an exact copy of sushi except for the // following code, which implements a burn every transfer // https://etherscan.io/token/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2 // the Boo b...
// // Boo with Governance.
LineComment
delegates
function delegates(address delegator) external view returns (address) { return _delegates[delegator]; }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5329, 5483 ] }
3,383
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
BooBank
contract BooBank is ERC20("Tocaine.Finance", "CAINE"), Ownable { // START OF BOO BANK SPECIFIC CODE // BooBank is an exact copy of sushi except for the // following code, which implements a burn every transfer // https://etherscan.io/token/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2 // the Boo b...
// // Boo with Governance.
LineComment
delegate
function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5622, 5731 ] }
3,384
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
BooBank
contract BooBank is ERC20("Tocaine.Finance", "CAINE"), Ownable { // START OF BOO BANK SPECIFIC CODE // BooBank is an exact copy of sushi except for the // following code, which implements a burn every transfer // https://etherscan.io/token/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2 // the Boo b...
// // Boo with Governance.
LineComment
delegateBySig
function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), ...
/** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECD...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 6160, 7343 ] }
3,385
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
BooBank
contract BooBank is ERC20("Tocaine.Finance", "CAINE"), Ownable { // START OF BOO BANK SPECIFIC CODE // BooBank is an exact copy of sushi except for the // following code, which implements a burn every transfer // https://etherscan.io/token/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2 // the Boo b...
// // Boo with Governance.
LineComment
getCurrentVotes
function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; }
/** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 7539, 7799 ] }
3,386
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
BooBank
contract BooBank is ERC20("Tocaine.Finance", "CAINE"), Ownable { // START OF BOO BANK SPECIFIC CODE // BooBank is an exact copy of sushi except for the // following code, which implements a burn every transfer // https://etherscan.io/token/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2 // the Boo b...
// // Boo with Governance.
LineComment
getPriorVotes
function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "BOOB::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First c...
/** * @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 ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 8225, 9483 ] }
3,387
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
add
function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner { require(poolIsAdded[address(_lpToken)] == false, 'add: pool already added'); poolIsAdded[address(_lpToken)] = true; if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number >...
// 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
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 3602, 4257 ] }
3,388
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
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 BOOB allocation point. Can only be called by the owner.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 4348, 4657 ] }
3,389
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
setBonusMultiplier
function setBonusMultiplier(uint256 _bonusMultiplier) public onlyOwner { BONUS_MULTIPLIER = _bonusMultiplier; }
// Updates bonus multiplier for early farmers
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5079, 5209 ] }
3,390
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
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(BONUS_MULTIPLIER)...
// Return reward multiplier over the given _from to _to block.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5401, 5829 ] }
3,391
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
pendingSushi
function pendingSushi(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSushiPerShare = pool.accSushiPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (block.numbe...
// View function to see pending BOOBs on frontend.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 5888, 6910 ] }
3,392
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
massUpdatePools
function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } }
// Update reward variables for all pools. Be careful of gas spending!
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 6988, 7173 ] }
3,393
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
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; } ...
// Update reward variables of the given pool to be up-to-date.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 7244, 8044 ] }
3,394
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
deposit
function deposit(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (block.number < startBlock) { user.earlyRewardMultiplier = 110; } else { user.earlyRewardMultiplier = user....
// Deposit LP tokens to MrBanker for BOOB allocation.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 8106, 9497 ] }
3,395
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
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.accSushiPerShare).div(1e12).sub(u...
// Withdraw LP tokens from MrBanker.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 9542, 10581 ] }
3,396
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
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...
// Withdraw without caring about rewards. EMERGENCY ONLY.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 10647, 11008 ] }
3,397
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
safeSushiTransfer
function safeSushiTransfer(address _to, uint256 _amount) internal { uint256 sushiBal = sushi.balanceOf(address(this)); if (_amount > sushiBal) { sushi.transfer(_to, sushiBal); } else { sushi.transfer(_to, _amount); } }
// Safe boo transfer function, just in case if rounding error causes pool to not have enough BOOBs.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 11116, 11406 ] }
3,398
MrBanker
MrBanker.sol
0xc04c212168d6f6eee8ac864a34b186fecb194d3f
Solidity
MrBanker
contract MrBanker 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. uint256 earlyRewardM...
// // MrBanker is the master of BooBank. He can make BooBank 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 BOOB is sufficiently // distributed and the community can show to govern itself. // // Have fun...
LineComment
setBurnRate
function setBurnRate(uint8 _burnDivisor) public onlyOwner { require(_burnDivisor > 0, "Boo: burnDivisor must be bigger than 0"); sushi.setBurnRate(_burnDivisor); }
// Set burn rate for both BooBank and Ectoplasma
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://50566d787320e9b7f661f5887e292636f9fffdd7ce821d8efea08510a28024a4
{ "func_code_index": [ 11463, 11654 ] }
3,399