Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0x1e09aca923176998c9442d74820e2e4a54f486beffaf306becb5f81ae2d66ba3 | 38098159 | 10 days 15 hrs ago | 0x9294b95b014c32a3a92db2f11c56486b74b0189c | Contract Creation | 0 FTM |
[ Download CSV Export ]
Contract Name:
ElfGenesisRewardPool
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at FtmScan.com on 2022-05-12 */ /** *Submitted for verification at FtmScan.com on 2022-05-08 */ /** *Submitted for verification at FtmScan.com on 2022-04-14 */ /** *Submitted for verification at FtmScan.com on 2022-04-14 */ /** *Submitted for verification at FtmScan.com on 2022-04-14 */ /** *Submitted for verification at FtmScan.com on 2022-04-12 */ /** *Submitted for verification at FtmScan.com on 2022-04-07 */ // SPDX-License-Identifier: MIT 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); } 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; } } 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); } } } } 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"); } } } pragma solidity 0.6.12; // Note that this pool has no minter key of ELF (rewards). // Instead, the governance will call ELF distributeReward method and send reward to this pool at the beginning. contract ElfGenesisRewardPool { using SafeMath for uint256; using SafeERC20 for IERC20; // governance address public operator; // Info of each user. struct UserInfo { uint256 amount; // How many tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. } // Info of each pool. struct PoolInfo { IERC20 token; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. ELF to distribute. uint256 lastRewardTime; // Last time that ELF distribution occurs. uint256 accElfPerShare; // Accumulated ELF per share, times 1e18. See below. bool isStarted; // if lastRewardBlock has passed uint256 depositFeeBP; } IERC20 public elf; address public feeAddress; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The time when ELF mining starts. uint256 public poolStartTime; // The time when ELF mining ends. uint256 public poolEndTime; // TESTNET // uint256 public elfPerSecond = 3.0555555 ether; // 25000 ELF / (1h * 60min * 60s) // uint256 public runningTime = 48 hours; // 1 hours // uint256 public constant TOTAL_REWARDS = 25000 ether; // END TESTNET // MAINNET uint256 public elfPerSecond = 0.1446748 ether; // 25000 ELF / (24h * 60min * 60s) uint256 public runningTime = 2 days; // 2 days uint256 public constant TOTAL_REWARDS = 25000 ether; // END MAINNET event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); event RewardPaid(address indexed user, uint256 amount); constructor( address _elf, uint256 _poolStartTime ) public { require(block.timestamp < _poolStartTime, "late"); if (_elf != address(0)) elf = IERC20(_elf); poolStartTime = _poolStartTime; poolEndTime = poolStartTime + runningTime; operator = msg.sender; feeAddress = msg.sender; } modifier onlyOperator() { require(operator == msg.sender, "ElfGenesisPool: caller is not the operator"); _; } function checkPoolDuplicate(IERC20 _token) internal view { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { require(poolInfo[pid].token != _token, "ElfGenesisPool: existing pool?"); } } // Add a new token to the pool. Can only be called by the owner. function add( uint256 _allocPoint, IERC20 _token, bool _withUpdate, uint256 _lastRewardTime, uint256 _depositFeeBP ) public onlyOperator { require(_depositFeeBP <= 100, "add: invalid deposit fee basis points"); // 1% checkPoolDuplicate(_token); if (_withUpdate) { massUpdatePools(); } if (block.timestamp < poolStartTime) { // chef is sleeping if (_lastRewardTime == 0) { _lastRewardTime = poolStartTime; } else { if (_lastRewardTime < poolStartTime) { _lastRewardTime = poolStartTime; } } } else { // chef is cooking if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) { _lastRewardTime = block.timestamp; } } bool _isStarted = (_lastRewardTime <= poolStartTime) || (_lastRewardTime <= block.timestamp); poolInfo.push(PoolInfo({ token : _token, allocPoint : _allocPoint, lastRewardTime : _lastRewardTime, accElfPerShare : 0, isStarted : _isStarted, depositFeeBP: _depositFeeBP })); if (_isStarted) { totalAllocPoint = totalAllocPoint.add(_allocPoint); } } // Update the given pool's ELF allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, uint256 _depositFeeBP) public onlyOperator { require(_depositFeeBP <= 100, "set: invalid deposit fee basis points"); //// 1% massUpdatePools(); PoolInfo storage pool = poolInfo[_pid]; if (pool.isStarted) { totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add( _allocPoint ); } poolInfo[_pid].allocPoint = _allocPoint; poolInfo[_pid].depositFeeBP = _depositFeeBP; } // Return accumulate rewards over the given _from to _to block. function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) { if (_fromTime >= _toTime) return 0; if (_toTime >= poolEndTime) { if (_fromTime >= poolEndTime) return 0; if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(elfPerSecond); return poolEndTime.sub(_fromTime).mul(elfPerSecond); } else { if (_toTime <= poolStartTime) return 0; if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(elfPerSecond); return _toTime.sub(_fromTime).mul(elfPerSecond); } } // View function to see pending ELF on frontend. function pendingELF(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accElfPerShare = pool.accElfPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _elfReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); accElfPerShare = accElfPerShare.add(_elfReward.mul(1e18).div(tokenSupply)); } return user.amount.mul(accElfPerShare).div(1e18).sub(user.rewardDebt); } // Update reward variables for all pools. Be careful of gas spending! function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; if (block.timestamp <= pool.lastRewardTime) { return; } uint256 tokenSupply = pool.token.balanceOf(address(this)); if (tokenSupply == 0) { pool.lastRewardTime = block.timestamp; return; } if (!pool.isStarted) { pool.isStarted = true; totalAllocPoint = totalAllocPoint.add(pool.allocPoint); } if (totalAllocPoint > 0) { uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp); uint256 _elfReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint); pool.accElfPerShare = pool.accElfPerShare.add(_elfReward.mul(1e18).div(tokenSupply)); } pool.lastRewardTime = block.timestamp; } // Deposit LP tokens. function deposit(uint256 _pid, uint256 _amount) public { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; updatePool(_pid); if (user.amount > 0) { uint256 _pending = user.amount.mul(pool.accElfPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeElfTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } } if (_amount > 0) { pool.token.safeTransferFrom(_sender, address(this), _amount); user.amount = user.amount.add(_amount); if(pool.depositFeeBP > 0){ uint256 depositFee = 0; depositFee = _amount.mul(pool.depositFeeBP).div(10000); pool.token.safeTransfer(feeAddress, depositFee); user.amount = user.amount.sub(depositFee); } } user.rewardDebt = user.amount.mul(pool.accElfPerShare).div(1e18); emit Deposit(_sender, _pid, _amount); } // Withdraw LP tokens. function withdraw(uint256 _pid, uint256 _amount) public { address _sender = msg.sender; PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 _pending = user.amount.mul(pool.accElfPerShare).div(1e18).sub(user.rewardDebt); if (_pending > 0) { safeElfTransfer(_sender, _pending); emit RewardPaid(_sender, _pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); pool.token.safeTransfer(_sender, _amount); } user.rewardDebt = user.amount.mul(pool.accElfPerShare).div(1e18); emit Withdraw(_sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 _amount = user.amount; user.amount = 0; user.rewardDebt = 0; pool.token.safeTransfer(msg.sender, _amount); emit EmergencyWithdraw(msg.sender, _pid, _amount); } // Safe elf transfer function, just in case if rounding error causes pool to not have enough ELFs. function safeElfTransfer(address _to, uint256 _amount) internal { uint256 _elfBalance = elf.balanceOf(address(this)); if (_elfBalance > 0) { if (_amount > _elfBalance) { elf.safeTransfer(_to, _elfBalance); } else { elf.safeTransfer(_to, _amount); } } } function setOperator(address _operator) external onlyOperator { operator = _operator; } function setFeeAddress(address _feeAddress) public{ require(msg.sender == feeAddress, "setFeeAddress: FORBIDDEN"); require(_feeAddress != address(0), "setFeeAddress: ZERO"); feeAddress = _feeAddress; } function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator { if (block.timestamp < poolEndTime + 90 days) { // do not allow to drain core token (ELF or lps) if less than 90 days after pool ends require(_token != elf, "elf"); uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { PoolInfo storage pool = poolInfo[pid]; require(_token != pool.token, "pool.token"); } } _token.safeTransfer(to, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_elf","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"TOTAL_REWARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"_depositFeeBP","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"elf","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elfPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingELF","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accElfPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"uint256","name":"depositFeeBP","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depositFeeBP","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600555670201fcf6cdf360006008556202a30060095534801561002857600080fd5b50604051611b3c380380611b3c8339818101604052604081101561004b57600080fd5b508051602090910151428111610091576040805162461bcd60e51b815260206004808301919091526024820152636c61746560e01b604482015290519081900360640190fd5b6001600160a01b038216156100bc57600180546001600160a01b0319166001600160a01b0384161790555b6006819055600954016007555060008054336001600160a01b03199182168117835560028054909216179055611a449081906100f890396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063570ca735116100c357806393f1a40b1161007c57806393f1a40b14610363578063943f013d146103a85780639a6703e5146103b0578063b1f1ece5146103dc578063b3ab15fb146103e4578063e2bbb1581461040a5761014d565b8063570ca735146102dd5780635f96dc11146102e557806362e006c7146102ed578063630b5ba11461032d5780636e271dd5146103355780638705fcd41461033d5761014d565b80634127535811610115578063412753581461021757806343b0e8df1461021f578063441a3e701461024a57806351eb05a61461026d5780635312ea8e1461028a57806354575af4146102a75761014d565b806309cf6091146101525780631526fe271461016c57806317caf6f1146101c8578063231f0c6a146101d05780633aa0d648146101f3575b600080fd5b61015a61042d565b60408051918252519081900360200190f35b6101896004803603602081101561018257600080fd5b503561043b565b604080516001600160a01b03909716875260208701959095528585019390935260608501919091521515608084015260a0830152519081900360c00190f35b61015a61048e565b61015a600480360360408110156101e657600080fd5b5080359060200135610494565b6101fb610559565b604080516001600160a01b039092168252519081900360200190f35b6101fb610568565b6102486004803603606081101561023557600080fd5b5080359060208101359060400135610577565b005b6102486004803603604081101561026057600080fd5b50803590602001356106aa565b6102486004803603602081101561028357600080fd5b5035610867565b610248600480360360208110156102a057600080fd5b50356109c5565b610248600480360360608110156102bd57600080fd5b506001600160a01b03813581169160208101359160409091013516610a61565b6101fb610ba6565b61015a610bb5565b610248600480360360a081101561030357600080fd5b508035906001600160a01b0360208201351690604081013515159060608101359060800135610bbb565b610248610e28565b61015a610e4b565b6102486004803603602081101561035357600080fd5b50356001600160a01b0316610e51565b61038f6004803603604081101561037957600080fd5b50803590602001356001600160a01b0316610f23565b6040805192835260208301919091528051918290030190f35b61015a610f47565b61015a600480360360408110156103c657600080fd5b50803590602001356001600160a01b0316610f4d565b61015a6110ae565b610248600480360360208110156103fa57600080fd5b50356001600160a01b03166110b4565b6102486004803603604081101561042057600080fd5b508035906020013561111f565b69054b40b1f852bda0000081565b6003818154811061044857fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909260ff9091169086565b60055481565b60008183106104a557506000610553565b600754821061050d5760075483106104bf57506000610553565b60065483116104f2576104eb6008546104e56006546007546112e690919063ffffffff16565b90611343565b9050610553565b6104eb6008546104e5856007546112e690919063ffffffff16565b600654821161051e57506000610553565b6006548311610542576104eb6008546104e5600654856112e690919063ffffffff16565b6008546104eb906104e584866112e6565b92915050565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b031633146105c05760405162461bcd60e51b815260040180806020018281038252602a81526020018061192a602a913960400191505060405180910390fd5b60648111156106005760405162461bcd60e51b81526004018080602001828103825260258152602001806119c06025913960400191505060405180910390fd5b610608610e28565b60006003848154811061061757fe5b60009182526020909120600690910201600481015490915060ff161561065e5761065a8361065483600101546005546112e690919063ffffffff16565b906113a3565b6005555b826003858154811061066c57fe5b906000526020600020906006020160010181905550816003858154811061068f57fe5b90600052602060002090600602016005018190555050505050565b60003390506000600384815481106106be57fe5b600091825260208083208784526004825260408085206001600160a01b0388168652909252922080546006909202909201925084111561073a576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61074385610867565b6000610780826001015461077a670de0b6b3a76400006107748760030154876000015461134390919063ffffffff16565b906113fd565b906112e6565b905080156107d2576107928482611464565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b84156107fc5781546107e490866112e6565b825582546107fc906001600160a01b0316858761151a565b6003830154825461081a91670de0b6b3a76400009161077491611343565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b60006003828154811061087657fe5b906000526020600020906006020190508060020154421161089757506109c2565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156108e157600080fd5b505afa1580156108f5573d6000803e3d6000fd5b505050506040513d602081101561090b57600080fd5b50519050806109215750426002909101556109c2565b600482015460ff166109525760048201805460ff1916600190811790915582015460055461094e916113a3565b6005555b600554156109b957600061096a836002015442610494565b9050600061098b60055461077486600101548561134390919063ffffffff16565b90506109b16109a68461077484670de0b6b3a7640000611343565b6003860154906113a3565b600385015550505b50426002909101555b50565b6000600382815481106109d457fe5b600091825260208083208584526004825260408085203380875293528420805485825560018201959095556006909302018054909450919291610a24916001600160a01b0391909116908361151a565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6000546001600160a01b03163314610aaa5760405162461bcd60e51b815260040180806020018281038252602a81526020018061192a602a913960400191505060405180910390fd5b6007546276a70001421015610b8d576001546001600160a01b0384811691161415610b02576040805162461bcd60e51b815260206004820152600360248201526232b63360e91b604482015290519081900360640190fd5b60035460005b81811015610b8a57600060038281548110610b1f57fe5b6000918252602090912060069091020180549091506001600160a01b0387811691161415610b81576040805162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b604482015290519081900360640190fd5b50600101610b08565b50505b610ba16001600160a01b038416828461151a565b505050565b6000546001600160a01b031681565b60065481565b6000546001600160a01b03163314610c045760405162461bcd60e51b815260040180806020018281038252602a81526020018061192a602a913960400191505060405180910390fd5b6064811115610c445760405162461bcd60e51b81526004018080602001828103825260258152602001806119546025913960400191505060405180910390fd5b610c4d8461156c565b8215610c5b57610c5b610e28565b600654421015610c895781610c74576006549150610c84565b600654821015610c845760065491505b610c9e565b811580610c9557504282105b15610c9e574291505b600060065483111580610cb15750428311155b6040805160c0810182526001600160a01b038881168252602082018a8152928201878152600060608401818152861580156080870190815260a087018b815260038054600181018255955296517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600690950294850180546001600160a01b031916919097161790955595517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c83015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d82015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e82015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f8201805460ff191691151591909117905590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f86090910155909150610e2057600554610e1c90876113a3565b6005555b505050505050565b60035460005b81811015610e4757610e3f81610867565b600101610e2e565b5050565b60075481565b6002546001600160a01b03163314610eb0576040805162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b6001600160a01b038116610f01576040805162461bcd60e51b8152602060048201526013602482015272736574466565416464726573733a205a45524f60681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60046020908152600092835260408084209091529082529020805460019091015482565b60095481565b60008060038481548110610f5d57fe5b60009182526020808320878452600480835260408086206001600160a01b038a811688529085528187206006969096029093016003810154815483516370a0823160e01b81523095810195909552925191985095969491909316926370a08231926024808201939291829003018186803b158015610fda57600080fd5b505afa158015610fee573d6000803e3d6000fd5b505050506040513d602081101561100457600080fd5b505160028501549091504211801561101b57508015155b15611078576000611030856002015442610494565b9050600061105160055461077488600101548561134390919063ffffffff16565b905061107361106c8461077484670de0b6b3a7640000611343565b85906113a3565b935050505b6110a3836001015461077a670de0b6b3a764000061077486886000015461134390919063ffffffff16565b979650505050505050565b60085481565b6000546001600160a01b031633146110fd5760405162461bcd60e51b815260040180806020018281038252602a81526020018061192a602a913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600033905060006003848154811061113357fe5b600091825260208083208784526004825260408085206001600160a01b038816865290925292206006909102909101915061116d85610867565b8054156111f95760006111a5826001015461077a670de0b6b3a76400006107748760030154876000015461134390919063ffffffff16565b905080156111f7576111b78482611464565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b831561127c578154611216906001600160a01b0316843087611606565b805461122290856113a3565b815560058201541561127c57600061124d61271061077485600501548861134390919063ffffffff16565b600254845491925061126c916001600160a01b0390811691168361151a565b815461127890826112e6565b8255505b6003820154815461129a91670de0b6b3a76400009161077491611343565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60008282111561133d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261135257506000610553565b8282028284828161135f57fe5b041461139c5760405162461bcd60e51b815260040180806020018281038252602181526020018061199f6021913960400191505060405180910390fd5b9392505050565b60008282018381101561139c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211611453576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161145c57fe5b049392505050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156114af57600080fd5b505afa1580156114c3573d6000803e3d6000fd5b505050506040513d60208110156114d957600080fd5b505190508015610ba1578082111561150757600154611502906001600160a01b0316848361151a565b610ba1565b600154610ba1906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ba1908490611666565b60035460005b81811015610ba157826001600160a01b03166003828154811061159157fe5b60009182526020909120600690910201546001600160a01b031614156115fe576040805162461bcd60e51b815260206004820152601e60248201527f456c6647656e65736973506f6f6c3a206578697374696e6720706f6f6c3f0000604482015290519081900360640190fd5b600101611572565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611660908590611666565b50505050565b60606116bb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117179092919063ffffffff16565b805190915015610ba1578080602001905160208110156116da57600080fd5b5051610ba15760405162461bcd60e51b815260040180806020018281038252602a8152602001806119e5602a913960400191505060405180910390fd5b6060611726848460008561172e565b949350505050565b60608247101561176f5760405162461bcd60e51b81526004018080602001828103825260268152602001806119796026913960400191505060405180910390fd5b6117788561187f565b6117c9576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106118085780518252601f1990920191602091820191016117e9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461186a576040519150601f19603f3d011682016040523d82523d6000602084013e61186f565b606091505b50915091506110a3828286611885565b3b151590565b6060831561189457508161139c565b8251156118a45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118ee5781810151838201526020016118d6565b50505050905090810190601f16801561191b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456c6647656e65736973506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f726164643a20696e76616c6964206465706f7369742066656520626173697320706f696e7473416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777365743a20696e76616c6964206465706f7369742066656520626173697320706f696e74735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122096fdcc81bd414bf96e10b96f244fdbfe83288669ae2799ca92918a3ea7c399bf64736f6c634300060c0033000000000000000000000000300f03050271e33501973ef00b320f4e9a1a68e20000000000000000000000000000000000000000000000000000000062813fa0
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000300f03050271e33501973ef00b320f4e9a1a68e20000000000000000000000000000000000000000000000000000000062813fa0
-----Decoded View---------------
Arg [0] : _elf (address): 0x300f03050271e33501973ef00b320f4e9a1a68e2
Arg [1] : _poolStartTime (uint256): 1652637600
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000300f03050271e33501973ef00b320f4e9a1a68e2
Arg [1] : 0000000000000000000000000000000000000000000000000000000062813fa0
Deployed ByteCode Sourcemap
22463:11723:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24208:51;;;:::i;:::-;;;;;;;;;;;;;;;;23367:26;;;;;;;;;;;;;;;;-1:-1:-1;23367:26:0;;:::i;:::-;;;;-1:-1:-1;;;;;23367:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23612:34;;;:::i;27592:649::-;;;;;;;;;;;;;;;;-1:-1:-1;27592:649:0;;;;;;;:::i;23280:17::-;;;:::i;:::-;;;;-1:-1:-1;;;;;23280:17:0;;;;;;;;;;;;;;23306:25;;;:::i;26988:527::-;;;;;;;;;;;;;;;;-1:-1:-1;26988:527:0;;;;;;;;;;;;:::i;:::-;;31500:807;;;;;;;;;;;;;;;;-1:-1:-1;31500:807:0;;;;;;;:::i;29405:904::-;;;;;;;;;;;;;;;;-1:-1:-1;29405:904:0;;:::i;32378:377::-;;;;;;;;;;;;;;;;-1:-1:-1;32378:377:0;;:::i;33582:601::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;33582:601:0;;;;;;;;;;;;;;;;;:::i;22587:23::-;;;:::i;23696:28::-;;;:::i;25447:1446::-;;;;;;;;;;;;;;;;-1:-1:-1;25447:1446:0;;;-1:-1:-1;;;;;25447:1446:0;;;;;;;;;;;;;;;;;;;;;;:::i;29149:180::-;;;:::i;23772:26::-;;;:::i;33341:233::-;;;;;;;;;;;;;;;;-1:-1:-1;33341:233:0;-1:-1:-1;;;;;33341:233:0;;:::i;23451:64::-;;;;;;;;;;;;;;;;-1:-1:-1;23451:64:0;;;;;;-1:-1:-1;;;;;23451:64:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;24156:35;;;:::i;28303:763::-;;;;;;;;;;;;;;;;-1:-1:-1;28303:763:0;;;;;;-1:-1:-1;;;;;28303:763:0;;:::i;24069:45::-;;;:::i;33232:101::-;;;;;;;;;;;;;;;;-1:-1:-1;33232:101:0;-1:-1:-1;;;;;33232:101:0;;:::i;30344:1120::-;;;;;;;;;;;;;;;;-1:-1:-1;30344:1120:0;;;;;;;:::i;24208:51::-;24248:11;24208:51;:::o;23367:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23367:26:0;;;;-1:-1:-1;23367:26:0;;;;;;;;;;:::o;23612:34::-;;;;:::o;27592:649::-;27677:7;27714;27701:9;:20;27697:34;;-1:-1:-1;27730:1:0;27723:8;;27697:34;27757:11;;27746:7;:22;27742:492;;27802:11;;27789:9;:24;27785:38;;-1:-1:-1;27822:1:0;27815:8;;27785:38;27855:13;;27842:9;:26;27838:87;;27877:48;27912:12;;27877:30;27893:13;;27877:11;;:15;;:30;;;;:::i;:::-;:34;;:48::i;:::-;27870:55;;;;27838:87;27947:44;27978:12;;27947:26;27963:9;27947:11;;:15;;:26;;;;:::i;27742:492::-;28039:13;;28028:7;:24;28024:38;;-1:-1:-1;28061:1:0;28054:8;;28024:38;28094:13;;28081:9;:26;28077:83;;28116:44;28147:12;;28116:26;28128:13;;28116:7;:11;;:26;;;;:::i;28077:83::-;28209:12;;28182:40;;:22;:7;28194:9;28182:11;:22::i;27742:492::-;27592:649;;;;:::o;23280:17::-;;;-1:-1:-1;;;;;23280:17:0;;:::o;23306:25::-;;;-1:-1:-1;;;;;23306:25:0;;:::o;26988:527::-;25012:8;;-1:-1:-1;;;;;25012:8:0;25024:10;25012:22;25004:77;;;;-1:-1:-1;;;25004:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27115:3:::1;27098:13;:20;;27090:70;;;;-1:-1:-1::0;;;27090:70:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27181:17;:15;:17::i;:::-;27209:21;27233:8;27242:4;27233:14;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;27262;::::0;::::1;::::0;27233;;-1:-1:-1;27262:14:0::1;;27258:150;;;27311:85;27370:11;27311:36;27331:4;:15;;;27311;;:19;;:36;;;;:::i;:::-;:40:::0;::::1;:85::i;:::-;27293:15;:103:::0;27258:150:::1;27446:11;27418:8;27427:4;27418:14;;;;;;;;;;;;;;;;;;:25;;:39;;;;27498:13;27468:8;27477:4;27468:14;;;;;;;;;;;;;;;;;;:27;;:43;;;;25092:1;26988:527:::0;;;:::o;31500:807::-;31567:15;31585:10;31567:28;;31606:21;31630:8;31639:4;31630:14;;;;;;;;;;;;;;;;31679;;;:8;:14;;;;;;-1:-1:-1;;;;;31679:23:0;;;;;;;;;31721:11;;31630:14;;;;;;;;-1:-1:-1;31721:22:0;-1:-1:-1;31721:22:0;31713:53;;;;;-1:-1:-1;;;31713:53:0;;;;;;;;;;;;-1:-1:-1;;;31713:53:0;;;;;;;;;;;;;;;31777:16;31788:4;31777:10;:16::i;:::-;31804;31823:67;31874:4;:15;;;31823:46;31864:4;31823:36;31839:4;:19;;;31823:4;:11;;;:15;;:36;;;;:::i;:::-;:40;;:46::i;:::-;:50;;:67::i;:::-;31804:86;-1:-1:-1;31905:12:0;;31901:128;;31934:34;31950:7;31959:8;31934:15;:34::i;:::-;31988:29;;;;;;;;-1:-1:-1;;;;;31988:29:0;;;;;;;;;;;;;31901:128;32043:11;;32039:138;;32085:11;;:24;;32101:7;32085:15;:24::i;:::-;32071:38;;32124:10;;:41;;-1:-1:-1;;;;;32124:10:0;32148:7;32157;32124:23;:41::i;:::-;32221:19;;;;32205:11;;:46;;32246:4;;32205:36;;:15;:36::i;:46::-;32187:15;;;:64;32267:32;;;;;;;;32285:4;;-1:-1:-1;;;;;32267:32:0;;;;;;;;;;;;31500:807;;;;;;:::o;29405:904::-;29457:21;29481:8;29490:4;29481:14;;;;;;;;;;;;;;;;;;29457:38;;29529:4;:19;;;29510:15;:38;29506:77;;29565:7;;;29506:77;29615:10;;:35;;;-1:-1:-1;;;29615:35:0;;29644:4;29615:35;;;;;;29593:19;;-1:-1:-1;;;;;29615:10:0;;:20;;:35;;;;;;;;;;;;;;:10;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29615:35:0;;-1:-1:-1;29665:16:0;29661:107;;-1:-1:-1;29720:15:0;29698:19;;;;:37;29750:7;;29661:107;29783:14;;;;;;29778:138;;29814:14;;;:21;;-1:-1:-1;;29814:21:0;29831:4;29814:21;;;;;;29888:15;;;29868;;:36;;:19;:36::i;:::-;29850:15;:54;29778:138;29930:15;;:19;29926:328;;29966:24;29993:56;30012:4;:19;;;30033:15;29993:18;:56::i;:::-;29966:83;;30064:18;30085:58;30127:15;;30085:37;30106:4;:15;;;30085:16;:20;;:37;;;;:::i;:58::-;30064:79;-1:-1:-1;30180:62:0;30204:37;30229:11;30204:20;30064:79;30219:4;30204:14;:20::i;:37::-;30180:19;;;;;:23;:62::i;:::-;30158:19;;;:84;-1:-1:-1;;29926:328:0;-1:-1:-1;30286:15:0;30264:19;;;;:37;29405:904;;:::o;32378:377::-;32437:21;32461:8;32470:4;32461:14;;;;;;;;;;;;;;;;32510;;;:8;:14;;;;;;32525:10;32510:26;;;;;;;32565:11;;32587:15;;;-1:-1:-1;32613:15:0;;:19;;;;32461:14;;;;;32643:10;;32461:14;;-1:-1:-1;32510:26:0;;32565:11;32643:44;;-1:-1:-1;;;;;32643:10:0;;;;;32565:11;32643:23;:44::i;:::-;32703;;;;;;;;32733:4;;32721:10;;32703:44;;;;;;;;;32378:377;;;;:::o;33582:601::-;25012:8;;-1:-1:-1;;;;;25012:8:0;25024:10;25012:22;25004:77;;;;-1:-1:-1;;;25004:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33718:11:::1;;33732:7;33718:21;33700:15;:39;33696:438;;;33873:3;::::0;-1:-1:-1;;;;;33863:13:0;;::::1;33873:3:::0;::::1;33863:13;;33855:29;;;::::0;;-1:-1:-1;;;33855:29:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;33855:29:0;;;;;;;;;;;;;::::1;;33916:8;:15:::0;33899:14:::1;33946:177;33974:6;33968:3;:12;33946:177;;;34008:21;34032:8;34041:3;34032:13;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;34082:10:::0;;34032:13;;-1:-1:-1;;;;;;34072:20:0;;::::1;34082:10:::0;::::1;34072:20;;34064:43;;;::::0;;-1:-1:-1;;;34064:43:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;34064:43:0;;;;;;;;;;;;;::::1;;-1:-1:-1::0;33982:5:0::1;;33946:177;;;;33696:438;;34144:31;-1:-1:-1::0;;;;;34144:19:0;::::1;34164:2:::0;34168:6;34144:19:::1;:31::i;:::-;33582:601:::0;;;:::o;22587:23::-;;;-1:-1:-1;;;;;22587:23:0;;:::o;23696:28::-;;;;:::o;25447:1446::-;25012:8;;-1:-1:-1;;;;;25012:8:0;25024:10;25012:22;25004:77;;;;-1:-1:-1;;;25004:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25670:3:::1;25653:13;:20;;25645:70;;;;-1:-1:-1::0;;;25645:70:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25742:26;25761:6;25742:18;:26::i;:::-;25783:11;25779:61;;;25811:17;:15;:17::i;:::-;25872:13;;25854:15;:31;25850:534;;;25939:20:::0;25935:243:::1;;25998:13;;25980:31;;25935:243;;;26074:13;;26056:15;:31;26052:111;;;26130:13;;26112:31;;26052:111;25850:534;;;26246:20:::0;;;:57:::1;;;26288:15;26270;:33;26246:57;26242:131;;;26342:15;26324:33;;26242:131;26394:15;26441:13;;26422:15;:32;;26421:83;;;;26488:15;26469;:34;;26421:83;26529:252;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;26529:252:0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;26529:252:0;;;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;26515:8:::1;:267:::0;;::::1;::::0;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;26515:267:0::1;::::0;;;::::1;;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;26515:267:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;;;;;;;26529:252;;-1:-1:-1;26793:93:0::1;;26842:15;::::0;:32:::1;::::0;26862:11;26842:19:::1;:32::i;:::-;26824:15;:50:::0;26793:93:::1;25092:1;25447:1446:::0;;;;;:::o;29149:180::-;29211:8;:15;29194:14;29237:85;29265:6;29259:3;:12;29237:85;;;29295:15;29306:3;29295:10;:15::i;:::-;29273:5;;29237:85;;;;29149:180;:::o;23772:26::-;;;;:::o;33341:233::-;33424:10;;-1:-1:-1;;;;;33424:10:0;33410;:24;33402:61;;;;;-1:-1:-1;;;33402:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33482:25:0;;33474:57;;;;;-1:-1:-1;;;33474:57:0;;;;;;;;;;;;-1:-1:-1;;;33474:57:0;;;;;;;;;;;;;;;33542:10;:24;;-1:-1:-1;;;;;;33542:24:0;-1:-1:-1;;;;;33542:24:0;;;;;;;;;;33341:233::o;23451:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;24156:35::-;;;;:::o;28303:763::-;28375:7;28395:21;28419:8;28428:4;28419:14;;;;;;;;;;;;;;;;28468;;;:8;:14;;;;;;;-1:-1:-1;;;;;28468:21:0;;;;;;;;;;;28419:14;;;;;;;;28525:19;;;;28577:10;;:35;;-1:-1:-1;;;28577:35:0;;28606:4;28577:35;;;;;;;;;28419:14;;-1:-1:-1;28468:21:0;;28419:14;28577:10;;;;;:20;;:35;;;;;28419:14;28577:35;;;;;;:10;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28577:35:0;28645:19;;;;28577:35;;-1:-1:-1;28627:15:0;:37;:57;;;;-1:-1:-1;28668:16:0;;;28627:57;28623:356;;;28701:24;28728:56;28747:4;:19;;;28768:15;28728:18;:56::i;:::-;28701:83;;28799:18;28820:58;28862:15;;28820:37;28841:4;:15;;;28820:16;:20;;:37;;;;:::i;:58::-;28799:79;-1:-1:-1;28910:57:0;28929:37;28954:11;28929:20;28799:79;28944:4;28929:14;:20::i;:37::-;28910:14;;:18;:57::i;:::-;28893:74;;28623:356;;;28996:62;29042:4;:15;;;28996:41;29032:4;28996:31;29012:14;28996:4;:11;;;:15;;:31;;;;:::i;:62::-;28989:69;28303:763;-1:-1:-1;;;;;;;28303:763:0:o;24069:45::-;;;;:::o;33232:101::-;25012:8;;-1:-1:-1;;;;;25012:8:0;25024:10;25012:22;25004:77;;;;-1:-1:-1;;;25004:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33305:8:::1;:20:::0;;-1:-1:-1;;;;;;33305:20:0::1;-1:-1:-1::0;;;;;33305:20:0;;;::::1;::::0;;;::::1;::::0;;33232:101::o;30344:1120::-;30410:15;30428:10;30410:28;;30449:21;30473:8;30482:4;30473:14;;;;;;;;;;;;;;;;30522;;;:8;:14;;;;;;-1:-1:-1;;;;;30522:23:0;;;;;;;;;30473:14;;;;;;;;-1:-1:-1;30556:16:0;30531:4;30556:10;:16::i;:::-;30587:11;;:15;30583:288;;30619:16;30638:67;30689:4;:15;;;30638:46;30679:4;30638:36;30654:4;:19;;;30638:4;:11;;;:15;;:36;;;;:::i;:67::-;30619:86;-1:-1:-1;30724:12:0;;30720:140;;30757:34;30773:7;30782:8;30757:15;:34::i;:::-;30815:29;;;;;;;;-1:-1:-1;;;;;30815:29:0;;;;;;;;;;;;;30720:140;30583:288;;30885:11;;30881:454;;30913:10;;:60;;-1:-1:-1;;;;;30913:10:0;30941:7;30958:4;30965:7;30913:27;:60::i;:::-;31002:11;;:24;;31018:7;31002:15;:24::i;:::-;30988:38;;31046:17;;;;:21;31043:281;;31087:18;31141:41;31176:5;31141:30;31153:4;:17;;;31141:7;:11;;:30;;;;:::i;:41::-;31225:10;;31201;;31128:54;;-1:-1:-1;31201:47:0;;-1:-1:-1;;;;;31201:10:0;;;;31225;31128:54;31201:23;:47::i;:::-;31281:11;;:27;;31297:10;31281:15;:27::i;:::-;31267:41;;-1:-1:-1;31043:281:0;31379:19;;;;31363:11;;:46;;31404:4;;31363:36;;:15;:36::i;:46::-;31345:15;;;:64;31425:31;;;;;;;;31442:4;;-1:-1:-1;;;;;31425:31:0;;;;;;;;;;;;30344:1120;;;;;:::o;6406:158::-;6464:7;6497:1;6492;:6;;6484:49;;;;;-1:-1:-1;;;6484:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6551:5:0;;;6406:158::o;6823:220::-;6881:7;6905:6;6901:20;;-1:-1:-1;6920:1:0;6913:8;;6901:20;6944:5;;;6948:1;6944;:5;:1;6968:5;;;;;:10;6960:56;;;;-1:-1:-1;;;6960:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7034:1;6823:220;-1:-1:-1;;;6823:220:0:o;5944:179::-;6002:7;6034:5;;;6058:6;;;;6050:46;;;;;-1:-1:-1;;;6050:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;7521:153;7579:7;7611:1;7607;:5;7599:44;;;;;-1:-1:-1;;;7599:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7665:1;7661;:5;;;;;;;7521:153;-1:-1:-1;;;7521:153:0:o;32867:357::-;32964:3;;:28;;;-1:-1:-1;;;32964:28:0;;32986:4;32964:28;;;;;;32942:19;;-1:-1:-1;;;;;32964:3:0;;:13;;:28;;;;;;;;;;;;;;:3;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32964:28:0;;-1:-1:-1;33007:15:0;;33003:214;;33053:11;33043:7;:21;33039:167;;;33085:3;;:34;;-1:-1:-1;;;;;33085:3:0;33102;33107:11;33085:16;:34::i;:::-;33039:167;;;33160:3;;:30;;-1:-1:-1;;;;;33160:3:0;33177;33182:7;19186:177;19296:58;;;-1:-1:-1;;;;;19296:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19296:58:0;-1:-1:-1;;;19296:58:0;;;19269:86;;19289:5;;19269:19;:86::i;25109:260::-;25194:8;:15;25177:14;25220:142;25248:6;25242:3;:12;25220:142;;;25309:6;-1:-1:-1;;;;;25286:29:0;:8;25295:3;25286:13;;;;;;;;;;;;;;;;;;;;;:19;-1:-1:-1;;;;;25286:19:0;:29;;25278:72;;;;;-1:-1:-1;;;25278:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;25256:5;;25220:142;;19371:205;19499:68;;;-1:-1:-1;;;;;19499:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19499:68:0;-1:-1:-1;;;19499:68:0;;;19472:96;;19492:5;;19472:19;:96::i;:::-;19371:205;;;;:::o;21491:761::-;21915:23;21941:69;21969:4;21941:69;;;;;;;;;;;;;;;;;21949:5;-1:-1:-1;;;;;21941:27:0;;;:69;;;;;:::i;:::-;22025:17;;21915:95;;-1:-1:-1;22025:21:0;22021:224;;22167:10;22156:30;;;;;;;;;;;;;;;-1:-1:-1;22156:30:0;22148:85;;;;-1:-1:-1;;;22148:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14247:195;14350:12;14382:52;14404:6;14412:4;14418:1;14421:12;14382:21;:52::i;:::-;14375:59;14247:195;-1:-1:-1;;;;14247:195:0:o;15299:530::-;15426:12;15484:5;15459:21;:30;;15451:81;;;;-1:-1:-1;;;15451:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15551:18;15562:6;15551:10;:18::i;:::-;15543:60;;;;;-1:-1:-1;;;15543:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;15677:12;15691:23;15718:6;-1:-1:-1;;;;;15718:11:0;15738:5;15746:4;15718:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;15718:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15676:75;;;;15769:52;15787:7;15796:10;15808:12;15769:17;:52::i;11329:422::-;11696:20;11735:8;;;11329:422::o;17839:742::-;17954:12;17983:7;17979:595;;;-1:-1:-1;18014:10:0;18007:17;;17979:595;18128:17;;:21;18124:439;;18391:10;18385:17;18452:15;18439:10;18435:2;18431:19;18424:44;18339:148;18534:12;18527:20;;-1:-1:-1;;;18527:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
ipfs://96fdcc81bd414bf96e10b96f244fdbfe83288669ae2799ca92918a3ea7c399bf
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.