source_idx
stringlengths
1
5
contract_name
stringlengths
1
48
func_name
stringlengths
0
52
masked_contract
stringlengths
105
184k
func_body
stringlengths
0
324k
func_requirement
stringlengths
1
28.3k
165
ERC20Detailed
name
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
return _name;
* * @return the name of the token.
165
ERC20Detailed
symbol
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
return _symbol;
* * @return the symbol of the token.
165
ERC20Detailed
decimals
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
return _decimals;
* * @return the number of decimals of the token.
165
Ownable
null
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 {<FILL_FUNCTION_BODY>} /** ...
address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender);
* * @dev Initializes the contract setting the deployer as the initial owner.
165
Ownable
owner
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...
return _owner;
* * @dev Returns the address of the current owner.
165
Ownable
isOwner
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...
return _msgSender() == _owner;
* * @dev Returns true if the caller is the current owner.
165
Ownable
renounceOwnership
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...
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 ...
165
Ownable
transferOwnership
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
_transferOwnership(newOwner);
* * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner.
165
Ownable
_transferOwnership
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...
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`).
165
Pausable
paused
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return True if the contract is paused, false otherwise. */ function paused() public vi...
return _paused;
* * @return True if the contract is paused, false otherwise.
165
Pausable
pause
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return True if the contract is paused, false otherwise. */ function paused() public vi...
_paused = true; emit Paused(msg.sender);
* * @dev Called by a pauser to pause, triggers stopped state.
165
Pausable
unpause
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return True if the contract is paused, false otherwise. */ function paused() public vi...
_paused = false; emit Unpaused(msg.sender);
* * @dev Called by a pauser to unpause, returns to normal state.
165
Lockable
isLock
contract Lockable is PauserRole{ mapping (address => bool) private lockers; event LockAccount(address account, bool islock); /** * @dev Check if the account is locked. * @param account specific account address. */ function isLock(address account) public ...
return lockers[account];
* * @dev Check if the account is locked. * @param account specific account address.
165
Lockable
lock
contract Lockable is PauserRole{ mapping (address => bool) private lockers; event LockAccount(address account, bool islock); /** * @dev Check if the account is locked. * @param account specific account address. */ function isLock(address account) public ...
lockers[account] = islock; emit LockAccount(account, islock);
* * @dev Lock or thaw account address * @param account specific account address. * @param islock true lock, false thaw.
165
HooToken
null
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
require(initialSupply > 0); _mint(_addr, initialSupply * (10 ** uint256(decimals())));
address private _owner;
165
HooToken
burn
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
require(!isLock(msg.sender)); _burn(msg.sender, value);
* * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned.
165
HooToken
freeze
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
require(!isLock(msg.sender)); _freeze(value);
* * @dev Freeze a specific amount of tokens. * @param value The amount of token to be Freeze.
165
HooToken
unfreeze
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
require(!isLock(msg.sender)); _unfreeze(value);
* * @dev unFreeze a specific amount of tokens. * @param value The amount of token to be unFreeze.
166
Token
totalSupply
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {<FILL_FUNCTION_BODY>} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 bal...
/ @return total amount of tokens
166
Token
balanceOf
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {<FILL_FUNCTIO...
/ @param _owner The address from which the balance will be retrieved / @return The balance
166
Token
transfer
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
/ @notice send `_value` token to `_to` from `msg.sender` / @param _to The address of the recipient / @param _value The amount of token to be transferred / @return Whether the transfer was successful or not
166
Token
transferFrom
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` / @param _from The address of the sender / @param _to The address of the recipient / @param _value The amount of token to be transferred / @return Whether the transfer was successful or not
166
Token
approve
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
/ @notice `msg.sender` approves `_addr` to spend `_value` tokens / @param _spender The address of the account able to transfer the tokens / @param _value The amount of wei to be approved for transfer / @return Whether the approval was successful or not
166
Token
allowance
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
/ @param _owner The address of the account owning tokens / @param _spender The address of the account able to transfer the tokens / @return Amount of remaining tokens allowed to spent
166
BOXEX
approveAndCall
contract BOXEX is StandardToken { function () { throw; } /* Public variables of the token */ string public name; uint8 public decimals; string public symbol; string public version = 'H1.0'; function BOXEX(...
allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this. //receiveApprov...
Approves and then calls the receiving contract
168
BaseLogic
null
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
accountStorage = _accountStorage;
*************** Constructor ********************** //
168
BaseLogic
initAccount
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
emit LogicInitialised(address(_account));
*************** Initialization ********************* //
168
BaseLogic
getKeyNonce
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
return keyNonce[_key];
*************** Getter ********************** //
168
BaseLogic
getSignHash
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
// use EIP 191 // 0x1900 + this logic address + data + nonce of signing key bytes32 msgHash = keccak256(abi.encodePacked(byte(0x19), byte(0), address(this), _data, _nonce)); bytes32 prefixedHash = keccak256(abi.encodePacked(SIGN_HASH_PREFIX, msgHash)); return prefixedHash; ...
*************** Signature ********************** //
168
BaseLogic
recover
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
// Check the signature length if (signature.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get...
* * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the ...
168
BaseLogic
getSignerAddress
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
require(_b.length >= 36, "invalid bytes"); // solium-disable-next-line security/no-inline-assembly assembly { let mask := 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF _a := and(mask, mload(add(_b, 36))) // b = {length:32}{method sig:4}{address:32}{...} ...
get signer address from data * @dev Gets an address encoded as the first argument in transaction data * @param b The byte array that should have an address as first argument * @returns a The address retrieved from the array
168
BaseLogic
getMethodId
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
require(_b.length >= 4, "invalid data"); // solium-disable-next-line security/no-inline-assembly assembly { // 32 bytes is the length of the bytes array _a := mload(add(_b, 32)) }
get method id, first 4 bytes of data
168
BaseLogic
checkAndUpdateNonce
contract BaseLogic { bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32"; mapping (address => uint256) keyNonce; AccountStorage public accountStorage; modifier allowSelfCallsOnly() { require (msg.sender == address(this), "only internal call is allowed"); ...
require(_nonce > keyNonce[_key], "nonce too small"); require(SafeMath.div(_nonce, 1000000) <= now + 86400, "nonce too big"); // 86400=24*3600 seconds keyNonce[_key] = _nonce;
_nonce is timestamp in microsecond(1/1000000 second)
168
Owned
changeOwner
contract Owned { // The owner address public owner; event OwnerChanged(address indexed _newOwner); /** * @dev Throws if the sender is not the owner. */ modifier onlyOwner { require(msg.sender == owner, "Must be owner"); _; } constructor() public {...
require(_newOwner != address(0), "Address must not be null"); owner = _newOwner; emit OwnerChanged(_newOwner);
* * @dev Lets the owner transfer ownership of the contract to a new owner. * @param _newOwner The new owner.
168
AccountStorage
getOperationKeyCount
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
return operationKeyCount[_account];
*************** keyCount ********************** //
168
AccountStorage
getKeyData
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
KeyItem memory item = keyData[_account][_index]; return item.pubKey;
*************** keyData ********************** //
168
AccountStorage
getKeyStatus
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
KeyItem memory item = keyData[_account][_index]; return item.status;
*************** keyStatus ********************** //
168
AccountStorage
getBackupAddress
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
BackupAccount memory b = backupData[_account][_index]; return b.backup;
*************** backupData ********************** //
168
AccountStorage
getDelayDataHash
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
DelayItem memory item = delayData[_account][_actionId]; return item.hash;
*************** delayData ********************** //
168
AccountStorage
getProposalDataHash
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
Proposal memory p = proposalData[_client][_proposer][_actionId]; return p.hash;
*************** proposalData ********************** //
168
AccountStorage
initAccount
contract AccountStorage { modifier allowAccountCallsOnly(Account _account) { require(msg.sender == address(_account), "caller must be account"); _; } modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) { require(LogicManager(Account(_account).manager()...
require(getKeyData(address(_account), 0) == address(0), "AccountStorage: account already initialized!"); require(_keys.length > 0, "empty keys array"); operationKeyCount[address(_account)] = _keys.length - 1; for (uint256 index = 0; index < _keys.length; index++) { ...
*************** init ********************** //
168
Account
enableStaticCall
contract Account { // The implementation of the proxy address public implementation; // Logic manager address public manager; // The enabled static calls mapping (bytes4 => address) public enabled; event EnabledStaticCall(address indexed module, bytes4 indexed method); ...
enabled[_method] = _module; emit EnabledStaticCall(_module, _method);
* * @dev Enables a static method by specifying the target module to which the call must be delegated. * @param _module The target module. * @param _method The static method signature.
168
Account
contract Account { // The implementation of the proxy address public implementation; // Logic manager address public manager; // The enabled static calls mapping (bytes4 => address) public enabled; event EnabledStaticCall(address indexed module, bytes4 indexed method); ...
if(msg.data.length > 0) { address logic = enabled[msg.sig]; if(logic == address(0)) { emit Received(msg.value, msg.sender, msg.data); } else { require(LogicManager(manager).isAuthorized(logic), "must be an authorized logic f...
* * @dev This method makes it possible for the wallet to comply to interfaces expecting the wallet to * implement specific static methods. It delegates the static call to a target contract if the data corresponds * to an enabled method, or logs the call otherwise.
175
AirDrop
sendTokens
contract AirDrop is Ownable { Token token; event TransferredToken(address indexed to, uint256 value); event FailedTransfer(address indexed to, uint256 value); modifier whenDropIsActive() { assert(isActive()); _; } function AirDrop () { address _tokenAddr = 0xCEb99b21d2C9CB01...
uint256 i = 0; while (i < dests.length) { uint256 toSend = values[i] * 10**8; sendInternally(dests[i] , toSend, values[i]); i++; }
below function can be used when you want to send every recipeint with different number of tokens
175
AirDrop
sendTokensSingleValue
contract AirDrop is Ownable { Token token; event TransferredToken(address indexed to, uint256 value); event FailedTransfer(address indexed to, uint256 value); modifier whenDropIsActive() { assert(isActive()); _; } function AirDrop () { address _tokenAddr = 0xCEb99b21d2C9CB01...
uint256 i = 0; uint256 toSend = value * 10**8; while (i < dests.length) { sendInternally(dests[i] , toSend, value); i++; }
this function can be used when you want to send same number of tokens to all the recipients
177
ERC20
null
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 _symbol; ...
_name = name; _symbol = symbol; _decimals = 18;
* * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction.
177
ERC20
name
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 _symbol; ...
return _name;
* * @dev Returns the name of the token.
177
ERC20
symbol
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 _symbol; ...
return _symbol;
* * @dev Returns the symbol of the token, usually a shorter version of the * name.
177
ERC20
decimals
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 _symbol; ...
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 ...
177
ERC20
totalSupply
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 _symbol; ...
return _totalSupply;
* * @dev See {IERC20-totalSupply}.
177
ERC20
balanceOf
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 _symbol; ...
return _balances[account];
* * @dev See {IERC20-balanceOf}.
177
ERC20
transfer
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 _symbol; ...
_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`.
177
ERC20
allowance
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 _symbol; ...
return _allowances[owner][spender];
* * @dev See {IERC20-allowance}.
177
ERC20
approve
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 _symbol; ...
_approve(_msgSender(), spender, amount); return true;
* * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address.
177
ERC20
transferFrom
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 _symbol; ...
_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 bal...
177
ERC20
increaseAllowance
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 _symbol; ...
_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:...
177
ERC20
decreaseAllowance
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 _symbol; ...
_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:...
177
ERC20
_transfer
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 _symbol; ...
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[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance")...
* * @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` can...
177
ERC20
_mint
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 _symbol; ...
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 Transfer(address(0), account, amount);
* @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address.
177
ERC20
_burn
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 _symbol; ...
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 = _totalSupply.sub(amount); emit Transfer(account, ad...
* * @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.
177
ERC20
_approve
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 _symbol; ...
require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount);
* * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * ...
177
ERC20
_setupDecimals
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 _symbol; ...
_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.
177
ERC20
_beforeTokenTransfer
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 _symbol; ...
* * @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 ...
180
Ownable
null
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 {<FILL_FUNCTION_BODY>} /** ...
address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender);
* * @dev Initializes the contract setting the deployer as the initial owner.
180
Ownable
owner
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...
return _owner;
* * @dev Returns the address of the current owner.
180
Ownable
renounceOwnership
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...
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 ...
180
Ownable
transferOwnership
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...
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.
180
ERC20
null
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 ...
_name = name; _symbol = symbol; _decimals = 18;
* * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction.
180
ERC20
name
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 ...
return _name;
* * @dev Returns the name of the token.
180
ERC20
symbol
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 ...
return _symbol;
* * @dev Returns the symbol of the token, usually a shorter version of the * name.
180
ERC20
decimals
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 ...
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 * ...
180
ERC20
totalSupply
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 ...
return _totalSupply;
* * @dev See {IERC20-totalSupply}.
180
ERC20
balanceOf
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 ...
return _balances[account];
* * @dev See {IERC20-balanceOf}.
180
ERC20
transfer
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 ...
_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`.
180
ERC20
allowance
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 ...
return _allowances[owner][spender];
* * @dev See {IERC20-allowance}.
180
ERC20
approve
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 ...
_approve(_msgSender(), spender, amount); return true;
* * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address.
180
ERC20
transferFrom
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 ...
_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 ha...
180
ERC20
increaseAllowance
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 ...
_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. * * Requi...
180
ERC20
decreaseAllowance
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 ...
_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. * * Requi...
180
ERC20
_transfer
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 ...
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[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds bal...
* * @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: * * - `s...
180
ERC20
_mint
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 ...
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 Transfer(address(0), account, amount);
* @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address.
180
ERC20
_burn
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 ...
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 = _totalSupply.sub(amount); emit Transfer(acco...
* * @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.
180
ERC20
_approve
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 ...
require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount);
* * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This 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: * ...
180
ERC20
_setupDecimals
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 ...
_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.
180
ERC20
_beforeTokenTransfer
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 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 ...
180
Ectoplasma
mint
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 ...
_mint(_to, _amount);
mints new ecto tokens, can only be called by BooBank contract during burns, no users or dev can call this
180
BooBank
mint
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...
_mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount);
/ @notice Creates `_amount` token to `_to`. Must only be called by the owner (MrBanker).
180
BooBank
delegates
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...
return _delegates[delegator];
* * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for
180
BooBank
delegate
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...
return _delegate(msg.sender, delegatee);
* * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to
180
BooBank
delegateBySig
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...
bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this) ) ); bytes32 structHash = keccak256( abi.encode( ...
* * @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 * @p...
180
BooBank
getCurrentVotes
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...
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`
180
BooBank
getPriorVotes
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...
require(blockNumber < block.number, "BOOB::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBl...
* * @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 vot...
180
MrBanker
add
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...
require(poolIsAdded[address(_lpToken)] == false, 'add: pool already added'); poolIsAdded[address(_lpToken)] = true; if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoi...
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.
180
MrBanker
set
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...
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.
180
MrBanker
setBonusMultiplier
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...
BONUS_MULTIPLIER = _bonusMultiplier;
Updates bonus multiplier for early farmers
180
MrBanker
getMultiplier
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...
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).add( _to.sub(bonusEndBlock) ...
Return reward multiplier over the given _from to _to block.
180
MrBanker
pendingSushi
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...
PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSushiPerShare = pool.accSushiPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint25...
View function to see pending BOOBs on frontend.
180
MrBanker
massUpdatePools
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...
uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); }
Update reward variables for all pools. Be careful of gas spending!
180
MrBanker
updatePool
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...
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.
180
MrBanker
deposit
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...
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.earlyRewardMultiplier > 100 ...
Deposit LP tokens to MrBanker for BOOB allocation.