Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
BeefyFeeBatch
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2021-06-12 */ // SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/utils/Context.sol pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/access/Ownable.sol pragma solidity >=0.6.0 <0.8.0; /** * @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}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @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. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ 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 Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @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. */ function allowance(address owner, address spender) external view returns (uint256); /** * @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 * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, 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. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/math/SafeMath.sol pragma solidity >=0.6.0 <0.8.0; /** * @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 languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(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), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol pragma solidity >=0.6.0 <0.8.0; /** * @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 guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @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. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @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 the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); 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 `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ 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 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` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); 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` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ 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 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. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ 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[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, 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. */ 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 Transfer(address(0), account, amount); } /** * @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. */ 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 = _totalSupply.sub(amount); emit Transfer(account, address(0), 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: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {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. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @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`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } // File: @openzeppelin/contracts/utils/Address.sol pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @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 `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ 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: unable to send value, recipient may have reverted"); } /** * @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 returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ 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 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._ */ 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-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol pragma solidity >=0.6.0 <0.8.0; /** * @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 `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ 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, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @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. */ 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 max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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.encode or one of its variants). */ 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 address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/BIFI/interfaces/common/IUniswapRouterETH.sol pragma solidity ^0.6.0; interface IUniswapRouterETH { function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } // File: contracts/BIFI/infra/BeefyFeeBatch.sol pragma solidity ^0.6.12; contract BeefyFeeBatch is Ownable { using SafeERC20 for IERC20; using SafeMath for uint256; // Tokens used address public wNative ; address public bifi; address public treasury; address public rewardPool; address public unirouter; // Fee constants uint constant public TREASURY_FEE = 140; uint constant public REWARD_POOL_FEE = 860; uint constant public MAX_FEE = 1000; address[] public wNativeToBifiRoute = [wNative, bifi]; constructor( address _treasury, address _rewardPool, address _unirouter, address _bifi, address _wNative ) public { treasury = _treasury; rewardPool = _rewardPool; unirouter = _unirouter; bifi = _bifi; wNative = _wNative ; IERC20(wNative).safeApprove(unirouter, uint256(-1)); } event NewRewardPool(address oldRewardPool, address newRewardPool); event NewTreasury(address oldTreasury, address newTreasury); event NewUnirouter(address oldUnirouter, address newUnirouter); event NewBifiRoute(address[] oldRoute, address[] newRoute); modifier onlyEOA() { require(msg.sender == tx.origin, "!EOA"); _; } // Main function. Divides Beefy's profits. function harvest() public onlyEOA { uint256 wNativeBal = IERC20(wNative).balanceOf(address(this)); uint256 treasuryHalf = wNativeBal.mul(TREASURY_FEE).div(MAX_FEE).div(2); IERC20(wNative).safeTransfer(treasury, treasuryHalf); IUniswapRouterETH(unirouter).swapExactTokensForTokens(treasuryHalf, 0, wNativeToBifiRoute, treasury, now); uint256 rewardsFeeAmount = wNativeBal.mul(REWARD_POOL_FEE).div(MAX_FEE); IERC20(wNative).safeTransfer(rewardPool, rewardsFeeAmount); } // Manage the contract function setRewardPool(address _rewardPool) external onlyOwner { emit NewRewardPool(rewardPool, _rewardPool); rewardPool = _rewardPool; } function setTreasury(address _treasury) external onlyOwner { emit NewTreasury(treasury, _treasury); treasury = _treasury; } function setUnirouter(address _unirouter) external onlyOwner { emit NewUnirouter(unirouter, _unirouter); IERC20(wNative).safeApprove(_unirouter, uint256(-1)); IERC20(wNative).safeApprove(unirouter, 0); unirouter = _unirouter; } function setNativeToBifiRoute(address[] memory _route) external onlyOwner { require(_route[0] == wNative); require(_route[_route.length - 1] == bifi); emit NewBifiRoute(wNativeToBifiRoute, _route); wNativeToBifiRoute = _route; } // Rescue locked funds sent by mistake function inCaseTokensGetStuck(address _token) external onlyOwner { require(_token != wNative, "!safe"); uint256 amount = IERC20(_token).balanceOf(address(this)); IERC20(_token).safeTransfer(msg.sender, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_rewardPool","type":"address"},{"internalType":"address","name":"_unirouter","type":"address"},{"internalType":"address","name":"_bifi","type":"address"},{"internalType":"address","name":"_wNative","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"oldRoute","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"newRoute","type":"address[]"}],"name":"NewBifiRoute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRewardPool","type":"address"},{"indexed":false,"internalType":"address","name":"newRewardPool","type":"address"}],"name":"NewRewardPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTreasury","type":"address"},{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"NewTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldUnirouter","type":"address"},{"indexed":false,"internalType":"address","name":"newUnirouter","type":"address"}],"name":"NewUnirouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_POOL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bifi","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_route","type":"address[]"}],"name":"setNativeToBifiRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardPool","type":"address"}],"name":"setRewardPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_unirouter","type":"address"}],"name":"setUnirouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wNative","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wNativeToBifiRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c06040526001546001600160a01b0390811660809081526002805490921660a05262000030916006919062000571565b503480156200003e57600080fd5b5060405162001ae538038062001ae5833981810160405260a08110156200006457600080fd5b5080516020820151604083015160608401516080909401519293919290919060006200008f6200015a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b03199081166001600160a01b038881169190911790925560048054821687841617905560058054821686841617908190556002805483168685161790556001805490921684841617918290556200014f9291821691166000196200015e602090811b62000daa17901c565b5050505050620005fc565b3390565b801580620001e8575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015620001b857600080fd5b505afa158015620001cd573d6000803e3d6000fd5b505050506040513d6020811015620001e457600080fd5b5051155b620002255760405162461bcd60e51b815260040180806020018281038252603681526020018062001aaf6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200027d9185916200028216565b505050565b6060620002de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200033e60201b62000ebd179092919060201c565b8051909150156200027d57808060200190516020811015620002ff57600080fd5b50516200027d5760405162461bcd60e51b815260040180806020018281038252602a81526020018062001a85602a913960400191505060405180910390fd5b60606200034f848460008562000359565b90505b9392505050565b6060824710156200039c5760405162461bcd60e51b815260040180806020018281038252602681526020018062001a5f6026913960400191505060405180910390fd5b620003a785620004c1565b620003f9576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106200043a5780518252601f19909201916020918201910162000419565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146200049e576040519150601f19603f3d011682016040523d82523d6000602084013e620004a3565b606091505b509092509050620004b6828286620004c7565b979650505050505050565b3b151590565b60608315620004d857508162000352565b825115620004e95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620005355781810151838201526020016200051b565b50505050905090810190601f168015620005635780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215620005c9579160200282015b82811115620005c957825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000592565b50620005d7929150620005db565b5090565b5b80821115620005d75780546001600160a01b0319168155600101620005dc565b611453806200060c6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80638ce1a483116100a2578063bf4b5ecc11610071578063bf4b5ecc14610281578063d92f3d7314610289578063def68a9c146102af578063f0f44260146102d5578063f2fde38b146102fb57610116565b80638ce1a4831461023a5780638da5cb5b14610254578063906cd40b1461025c578063bc063e1a1461027957610116565b80634bb43fc2116100e95780634bb43fc21461015957806361d027b3146101fc57806366666aa914610204578063715018a61461020c57806378238c371461021457610116565b8063257ae0de1461011b5780632d68efc91461013f5780634458020b146101475780634641257d1461014f575b600080fd5b610123610321565b604080516001600160a01b039092168252519081900360200190f35b610123610330565b61012361033f565b61015761034e565b005b6101576004803603602081101561016f57600080fd5b81019060208101813564010000000081111561018a57600080fd5b82018360208201111561019c57600080fd5b803590602001918460208302840111640100000000831117156101be57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610610945050505050565b6101236107be565b6101236107cd565b6101576107dc565b6101576004803603602081101561022a57600080fd5b50356001600160a01b0316610888565b610242610954565b60408051918252519081900360200190f35b610123610959565b6101236004803603602081101561027257600080fd5b5035610968565b61024261098f565b610242610995565b6101576004803603602081101561029f57600080fd5b50356001600160a01b031661099b565b610157600480360360208110156102c557600080fd5b50356001600160a01b0316610a9e565b610157600480360360208110156102eb57600080fd5b50356001600160a01b0316610bdc565b6101576004803603602081101561031157600080fd5b50356001600160a01b0316610ca8565b6005546001600160a01b031681565b6001546001600160a01b031681565b6002546001600160a01b031681565b33321461038b576040805162461bcd60e51b8152602060048083019190915260248201526321454f4160e01b604482015290519081900360640190fd5b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156103d657600080fd5b505afa1580156103ea573d6000803e3d6000fd5b505050506040513d602081101561040057600080fd5b505190506000610420600261041a6103e88186608c610ed6565b90610f38565b600354600154919250610440916001600160a01b03908116911683610f9f565b6005546003546040516338ed173960e01b8152600481018481526000602483018190526001600160a01b0393841660648401819052426084850181905260a0604486019081526006805460a4880181905297909816976338ed1739978a979596919591929160c40190869080156104e057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116104c2575b50509650505050505050600060405180830381600087803b15801561050457600080fd5b505af1158015610518573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561054157600080fd5b810190808051604051939291908464010000000082111561056157600080fd5b90830190602082018581111561057657600080fd5b825186602082028301116401000000008211171561059357600080fd5b82525081516020918201928201910280838360005b838110156105c05781810151838201526020016105a8565b505050509050016040525050505060006105eb6103e861041a61035c86610ed690919063ffffffff16565b60045460015491925061060b916001600160a01b03908116911683610f9f565b505050565b610618610ff1565b6001600160a01b0316610629610959565b6001600160a01b031614610672576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b60015481516001600160a01b0390911690829060009061068e57fe5b60200260200101516001600160a01b0316146106a957600080fd5b60025481516001600160a01b0390911690829060001981019081106106ca57fe5b60200260200101516001600160a01b0316146106e557600080fd5b7f87c6f79e7abb284656dc44f1ef4767a74344ec68149ef892ce9cc73fe80103c7600682604051808060200180602001838103835285818154815260200191508054801561075c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161073e575b50508381038252845181528451602091820191808701910280838360005b8381101561079257818101518382015260200161077a565b5050505090500194505050505060405180910390a180516107ba9060069060208401906112ac565b5050565b6003546001600160a01b031681565b6004546001600160a01b031681565b6107e4610ff1565b6001600160a01b03166107f5610959565b6001600160a01b03161461083e576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610890610ff1565b6001600160a01b03166108a1610959565b6001600160a01b0316146108ea576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b600454604080516001600160a01b039283168152918316602083015280517fe3d88fc63ce6f40e089447cea2116e10d00cd00302225a3d4d57db7d456933b39281900390910190a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b608c81565b6000546001600160a01b031690565b6006818154811061097557fe5b6000918252602090912001546001600160a01b0316905081565b6103e881565b61035c81565b6109a3610ff1565b6001600160a01b03166109b4610959565b6001600160a01b0316146109fd576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b600554604080516001600160a01b039283168152918316602083015280517f826424c54f0e53618740c75270163dc0ce89545f38164b0e4b3a265cf73144539281900390910190a1600154610a5e906001600160a01b031682600019610daa565b600554600154610a7c916001600160a01b0391821691166000610daa565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610aa6610ff1565b6001600160a01b0316610ab7610959565b6001600160a01b031614610b00576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b6001546001600160a01b0382811691161415610b4b576040805162461bcd60e51b8152602060048201526005602482015264217361666560d81b604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b9a57600080fd5b505afa158015610bae573d6000803e3d6000fd5b505050506040513d6020811015610bc457600080fd5b505190506107ba6001600160a01b0383163383610f9f565b610be4610ff1565b6001600160a01b0316610bf5610959565b6001600160a01b031614610c3e576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b600354604080516001600160a01b039283168152918316602083015280517f567657fa3f286518b318f4a29870674f433f622fdfc819691acb13105b2282259281900390910190a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b610cb0610ff1565b6001600160a01b0316610cc1610959565b6001600160a01b031614610d0a576040805162461bcd60e51b8152602060048201819052602482015260008051602061139e833981519152604482015290519081900360640190fd5b6001600160a01b038116610d4f5760405162461bcd60e51b81526004018080602001828103825260268152602001806113316026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b801580610e30575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b5051155b610e6b5760405162461bcd60e51b81526004018080602001828103825260368152602001806113e86036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261060b908490610ff5565b6060610ecc84846000856110a6565b90505b9392505050565b600082610ee557506000610f32565b82820282848281610ef257fe5b0414610f2f5760405162461bcd60e51b815260040180806020018281038252602181526020018061137d6021913960400191505060405180910390fd5b90505b92915050565b6000808211610f8e576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610f9757fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261060b908490610ff5565b3390565b606061104a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ebd9092919063ffffffff16565b80519091501561060b5780806020019051602081101561106957600080fd5b505161060b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806113be602a913960400191505060405180910390fd5b6060824710156110e75760405162461bcd60e51b81526004018080602001828103825260268152602001806113576026913960400191505060405180910390fd5b6110f085611202565b611141576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106111805780518252601f199092019160209182019101611161565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111e2576040519150601f19603f3d011682016040523d82523d6000602084013e6111e7565b606091505b50915091506111f7828286611208565b979650505050505050565b3b151590565b60608315611217575081610ecf565b8251156112275782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611271578181015183820152602001611259565b50505050905090810190601f16801561129e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215611301579160200282015b8281111561130157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906112cc565b5061130d929150611311565b5090565b5b8082111561130d5780546001600160a01b031916815560010161131256fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220369e5bfb86b72313083633f5d395f52a0242df1786290ee1587379cfd890b7c064736f6c634300060c0033416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000000009ef0e7b555599a9f810789fff68db8dbf4c51a0000000000000000000000000deb0a777ba6f59c78c654b8c92f80238c8002dd2000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff000000000000000000000000fbdd194376de19a88118e84e279b977f165d01b80000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000009ef0e7b555599a9f810789fff68db8dbf4c51a0000000000000000000000000deb0a777ba6f59c78c654b8c92f80238c8002dd2000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff000000000000000000000000fbdd194376de19a88118e84e279b977f165d01b80000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
-----Decoded View---------------
Arg [0] : _treasury (address): 0x09ef0e7b555599a9f810789fff68db8dbf4c51a0
Arg [1] : _rewardPool (address): 0xdeb0a777ba6f59c78c654b8c92f80238c8002dd2
Arg [2] : _unirouter (address): 0xa5e0829caced8ffdd4de3c43696c57f7d7a678ff
Arg [3] : _bifi (address): 0xfbdd194376de19a88118e84e279b977f165d01b8
Arg [4] : _wNative (address): 0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000009ef0e7b555599a9f810789fff68db8dbf4c51a0
Arg [1] : 000000000000000000000000deb0a777ba6f59c78c654b8c92f80238c8002dd2
Arg [2] : 000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff
Arg [3] : 000000000000000000000000fbdd194376de19a88118e84e279b977f165d01b8
Arg [4] : 0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Deployed ByteCode Sourcemap
38321:3079:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38570:24;;;:::i;:::-;;;;-1:-1:-1;;;;;38570:24:0;;;;;;;;;;;;;;38450:22;;;:::i;38480:19::-;;;:::i;39648:538::-;;;:::i;:::-;;40824:271;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40824:271:0;;-1:-1:-1;40824:271:0;;-1:-1:-1;;;;;40824:271:0:i;38508:23::-;;;:::i;38538:25::-;;;:::i;2781:148::-;;;:::i;40222:160::-;;;;;;;;;;;;;;;;-1:-1:-1;40222:160:0;-1:-1:-1;;;;;40222:160:0;;:::i;38625:39::-;;;:::i;:::-;;;;;;;;;;;;;;;;2130:87;;;:::i;38764:53::-;;;;;;;;;;;;;;;;-1:-1:-1;38764:53:0;;:::i;38720:35::-;;;:::i;38671:42::-;;;:::i;40544:272::-;;;;;;;;;;;;;;;;-1:-1:-1;40544:272:0;-1:-1:-1;;;;;40544:272:0;;:::i;41151:246::-;;;;;;;;;;;;;;;;-1:-1:-1;41151:246:0;-1:-1:-1;;;;;41151:246:0;;:::i;40390:146::-;;;;;;;;;;;;;;;;-1:-1:-1;40390:146:0;-1:-1:-1;;;;;40390:146:0;;:::i;3084:244::-;;;;;;;;;;;;;;;;-1:-1:-1;3084:244:0;-1:-1:-1;;;;;3084:244:0;;:::i;38570:24::-;;;-1:-1:-1;;;;;38570:24:0;;:::o;38450:22::-;;;-1:-1:-1;;;;;38450:22:0;;:::o;38480:19::-;;;-1:-1:-1;;;;;38480:19:0;;:::o;39648:538::-;39540:10;39554:9;39540:23;39532:40;;;;;-1:-1:-1;;;39532:40:0;;;;;;;;;;;;;;;-1:-1:-1;;;39532:40:0;;;;;;;;;;;;;;;39721:7:::1;::::0;39714:40:::1;::::0;;-1:-1:-1;;;39714:40:0;;39748:4:::1;39714:40;::::0;::::1;::::0;;;39693:18:::1;::::0;-1:-1:-1;;;;;39721:7:0::1;::::0;39714:25:::1;::::0;:40;;;;;::::1;::::0;;;;;;;;39721:7;39714:40;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;39714:40:0;;-1:-1:-1;39767:20:0::1;39790:48;39836:1;39790:41;38751:4;39790:41:::0;39714:40;38661:3:::1;39790:14;:28::i;:::-;:32:::0;::::1;:41::i;:48::-;39878:8;::::0;;39856:7;39767:71;;-1:-1:-1;39849:52:0::1;::::0;-1:-1:-1;;;;;39856:7:0;;::::1;::::0;39878:8:::1;39767:71:::0;39849:28:::1;:52::i;:::-;39930:9;::::0;40003:8:::1;::::0;39912:105:::1;::::0;-1:-1:-1;;;39912:105:0;;::::1;::::0;::::1;::::0;;;39930:9:::1;39912:105:::0;;;;;;-1:-1:-1;;;;;40003:8:0;;::::1;39912:105:::0;;;;;;40013:3:::1;39912:105:::0;;;;;;;;;;;;;39983:18:::1;39912:105:::0;;;;;;;;39930:9;;;::::1;::::0;39912:53:::1;::::0;39966:12;;39930:9;;39983:18;;39912:105;;;;;;39983:18;;39912:105;::::1;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;39912:105:0::1;::::0;;;;;::::1;::::0;::::1;;::::0;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;::::0;;::::1;-1:-1:-1::0;;39912:105:0::1;::::0;::::1;;::::0;::::1;::::0;::::1;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;::::0;;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;::::0;;-1:-1:-1;39912:105:0;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;::::1;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;::::0;::::1;;;40038:24;40065:44;38751:4;40065:31;38710:3;40065:10;:14;;:31;;;;:::i;:44::-;40149:10;::::0;;40127:7;40038:71;;-1:-1:-1;40120:58:0::1;::::0;-1:-1:-1;;;;;40127:7:0;;::::1;::::0;40149:10:::1;40038:71:::0;40120:28:::1;:58::i;:::-;39583:1;;;39648:538::o:0;40824:271::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;40930:7:::1;::::0;40917:9;;-1:-1:-1;;;;;40930:7:0;;::::1;::::0;40917:6;;40930:7:::1;::::0;40917:9:::1;;;;;;;;;;-1:-1:-1::0;;;;;40917:20:0::1;;40909:29;;;::::0;::::1;;40986:4;::::0;40964:13;;-1:-1:-1;;;;;40986:4:0;;::::1;::::0;40957:6;;-1:-1:-1;;40964:17:0;;;40957:25;::::1;;;;;;;;;;;-1:-1:-1::0;;;;;40957:33:0::1;;40949:42;;;::::0;::::1;;41009:40;41022:18;41042:6;41009:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;41009:40:0::1;::::0;;;;;::::1;::::0;::::1;;::::0;;::::1;;;;-1:-1:-1::0;;41009:40:0;;::::1;::::0;;;;;;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;::::1;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;41060:27:::0;;::::1;::::0;:18:::1;::::0;:27:::1;::::0;::::1;::::0;::::1;:::i;:::-;;40824:271:::0;:::o;38508:23::-;;;-1:-1:-1;;;;;38508:23:0;;:::o;38538:25::-;;;-1:-1:-1;;;;;38538:25:0;;:::o;2781:148::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;2888:1:::1;2872:6:::0;;2851:40:::1;::::0;-1:-1:-1;;;;;2872:6:0;;::::1;::::0;2851:40:::1;::::0;2888:1;;2851:40:::1;2919:1;2902:19:::0;;-1:-1:-1;;;;;;2902:19:0::1;::::0;;2781:148::o;40222:160::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;40315:10:::1;::::0;40301:38:::1;::::0;;-1:-1:-1;;;;;40315:10:0;;::::1;40301:38:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;40350:10;:24:::0;;-1:-1:-1;;;;;;40350:24:0::1;-1:-1:-1::0;;;;;40350:24:0;;;::::1;::::0;;;::::1;::::0;;40222:160::o;38625:39::-;38661:3;38625:39;:::o;2130:87::-;2176:7;2203:6;-1:-1:-1;;;;;2203:6:0;2130:87;:::o;38764:53::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;38764:53:0;;-1:-1:-1;38764:53:0;:::o;38720:35::-;38751:4;38720:35;:::o;38671:42::-;38710:3;38671:42;:::o;40544:272::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;40634:9:::1;::::0;40621:35:::1;::::0;;-1:-1:-1;;;;;40634:9:0;;::::1;40621:35:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;40676:7;::::0;40669:52:::1;::::0;-1:-1:-1;;;;;40676:7:0::1;40697:10:::0;-1:-1:-1;;40669:27:0::1;:52::i;:::-;40760:9;::::0;;40739:7;40732:41:::1;::::0;-1:-1:-1;;;;;40739:7:0;;::::1;::::0;40760:9:::1;;40732:27;:41::i;:::-;40786:9;:22:::0;;-1:-1:-1;;;;;;40786:22:0::1;-1:-1:-1::0;;;;;40786:22:0;;;::::1;::::0;;;::::1;::::0;;40544:272::o;41151:246::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;41245:7:::1;::::0;-1:-1:-1;;;;;41235:17:0;;::::1;41245:7:::0;::::1;41235:17;;41227:35;;;::::0;;-1:-1:-1;;;41227:35:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;41227:35:0;;;;;;;;;;;;;::::1;;41275:14;41299:6;-1:-1:-1::0;;;;;41292:24:0::1;;41325:4;41292:39;;;;;;;;;;;;;-1:-1:-1::0;;;;;41292:39:0::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;41292:39:0;;-1:-1:-1;41342:47:0::1;-1:-1:-1::0;;;;;41342:27:0;::::1;41370:10;41292:39:::0;41342:27:::1;:47::i;40390:146::-:0;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;40477:8:::1;::::0;40465:32:::1;::::0;;-1:-1:-1;;;;;40477:8:0;;::::1;40465:32:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;40508:8;:20:::0;;-1:-1:-1;;;;;;40508:20:0::1;-1:-1:-1::0;;;;;40508:20:0;;;::::1;::::0;;;::::1;::::0;;40390:146::o;3084:244::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;3173:22:0;::::1;3165:73;;;;-1:-1:-1::0;;;3165:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3275:6;::::0;;3254:38:::1;::::0;-1:-1:-1;;;;;3254:38:0;;::::1;::::0;3275:6;::::1;::::0;3254:38:::1;::::0;::::1;3303:6;:17:::0;;-1:-1:-1;;;;;;3303:17:0::1;-1:-1:-1::0;;;;;3303:17:0;;;::::1;::::0;;;::::1;::::0;;3084:244::o;33999:622::-;34369:10;;;34368:62;;-1:-1:-1;34385:39:0;;;-1:-1:-1;;;34385:39:0;;34409:4;34385:39;;;;-1:-1:-1;;;;;34385:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34385:39:0;:44;34368:62;34360:152;;;;-1:-1:-1;;;34360:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34550:62;;;-1:-1:-1;;;;;34550:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;34550:62:0;-1:-1:-1;;;34550:62:0;;;34523:90;;34543:5;;34523:19;:90::i;28335:195::-;28438:12;28470:52;28492:6;28500:4;28506:1;28509:12;28470:21;:52::i;:::-;28463:59;;28335:195;;;;;;:::o;9818:220::-;9876:7;9900:6;9896:20;;-1:-1:-1;9915:1:0;9908:8;;9896:20;9939:5;;;9943:1;9939;:5;:1;9963:5;;;;;:10;9955:56;;;;-1:-1:-1;;;9955:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10029:1;-1:-1:-1;9818:220:0;;;;;:::o;10516:153::-;10574:7;10606:1;10602;:5;10594:44;;;;;-1:-1:-1;;;10594:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10660:1;10656;:5;;;;;;;10516:153;-1:-1:-1;;;10516:153:0:o;33340:177::-;33450:58;;;-1:-1:-1;;;;;33450:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33450:58:0;-1:-1:-1;;;33450:58:0;;;33423:86;;33443:5;;33423:19;:86::i;667:106::-;755:10;667:106;:::o;35645:761::-;36069:23;36095:69;36123:4;36095:69;;;;;;;;;;;;;;;;;36103:5;-1:-1:-1;;;;;36095:27:0;;;:69;;;;;:::i;:::-;36179:17;;36069:95;;-1:-1:-1;36179:21:0;36175:224;;36321:10;36310:30;;;;;;;;;;;;;;;-1:-1:-1;36310:30:0;36302:85;;;;-1:-1:-1;;;36302:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29387:530;29514:12;29572:5;29547:21;:30;;29539:81;;;;-1:-1:-1;;;29539:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29639:18;29650:6;29639:10;:18::i;:::-;29631:60;;;;;-1:-1:-1;;;29631:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;29765:12;29779:23;29806:6;-1:-1:-1;;;;;29806:11:0;29826:5;29834:4;29806:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;29806:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29764:75;;;;29857:52;29875:7;29884:10;29896:12;29857:17;:52::i;:::-;29850:59;29387:530;-1:-1:-1;;;;;;;29387:530:0:o;25417:422::-;25784:20;25823:8;;;25417:422::o;31927:742::-;32042:12;32071:7;32067:595;;;-1:-1:-1;32102:10:0;32095:17;;32067:595;32216:17;;:21;32212:439;;32479:10;32473:17;32540:15;32527:10;32523:2;32519:19;32512:44;32427:148;32622:12;32615:20;;-1:-1:-1;;;32615:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
ipfs://369e5bfb86b72313083633f5d395f52a0242df1786290ee1587379cfd890b7c0
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.