Contract 0xc3d490F6369e709f6FA79DA673Cc74F21764ecF7

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xacc8a687017740cbed1a2c9eb699a631db57c3775f28a59aae8b4cde1fa647e0Withdraw683948922022-06-24 7:01:0396 days 9 hrs ago0xe729e82c62ba98ee226dbf680803cfb4189dbe30 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.0000085015
0x3132b5a1fd263f836e0e1722ad57f6969f4a6280a15ab661ae0199427a568ad2Withdraw670947232022-06-05 17:03:55114 days 23 hrs ago0x3b892fc080b4ccb34f64fc705b773496aff3bfd9 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000207114
0xee667cefa12863e6b1f72ad1213d6ca22907dd44733dd5c5a9fd8810dc9a3dddWithdraw667580132022-05-31 16:07:34120 days 3 mins ago0x9ec8c577749aafd92f98adfa71257f922213a32f IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000435036
0x98d9d5f4437a45eb5f2cbc0dc83b673c00338e33d89a9c6865e0b53a80753b27Withdraw662899902022-05-24 18:42:15126 days 21 hrs ago0xa9f971e9d392825560319d2508fe8f2cc4c03120 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000313029
0xec59459588dd7b1c599f3dbe0de71a36c18948fbed071f2dc3f81de35312113fWithdraw662182892022-05-23 17:44:28127 days 22 hrs ago0xe2193b83a25e0a306a33dfa42b557ae5771b6e37 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000312993
0x1c3ba041ec8aabe22f5f1ec22aac9ac279939adb1e06668b2f29857e5b964b53Withdraw661545722022-05-22 20:01:20128 days 20 hrs ago0x8069aae66d7104fc3b068f1cb2e73a9da641d3a5 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000363789
0xbd994d73e2ad9e19efba298497c2a07e70367e847fc0eeb4392c55d0e5a777a7Withdraw661416762022-05-22 15:43:12129 days 28 mins ago0xa9f971e9d392825560319d2508fe8f2cc4c03120 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000341928
0x27047bf6b298836ed1cf7bf35b5b34b988a76d35b51341b11aaaa0db4879e069Withdraw660728832022-05-21 16:56:10129 days 23 hrs ago0x318f6277e7ec3ce9f9f1cb655fef873b930b61f5 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000312993
0x23f8d30cb053d033ef4e29afd555c307851abbf6b1c9820e591e72a761b9d4caWithdraw660476812022-05-21 8:33:16130 days 7 hrs ago0x5e62d2cae0469b47b12546013f548f0e824bdece IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000384189
0xc8b175e1e5d254235c5cb5ea7957cf9780d8731b057618a5f971dcd9e88509feWithdraw659147132022-05-19 11:49:11132 days 4 hrs ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000355371
0xbee7e8791e6b20279ea0738fa67c9444b43bae2bd54cdc756f39517bc5f5cc1cWithdraw658676642022-05-18 19:28:54132 days 20 hrs ago0xfa5c81bb8c83a0eed6ec19dd1187ea67de27bed3 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000235674
0xda13a3a320708348c529c2d207655d5002dc1522d7c679e47acc68fce4511629Withdraw658649012022-05-18 18:31:50132 days 21 hrs ago0x0414ab2d43867b37af9cb601b573e3937f4f8784 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.0000008658
0x65312161a2842bda4045da722a8e28227901fc1453a1cb1da40531f69fe2a33aWithdraw658648922022-05-18 18:31:38132 days 21 hrs ago0x0414ab2d43867b37af9cb601b573e3937f4f8784 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000341964
0x088a82274a148d67b73f2a0f94c01f8c5cdff9883e482cb15a524e1cd67cda5dWithdraw658561662022-05-18 15:29:44133 days 41 mins ago0xa9f971e9d392825560319d2508fe8f2cc4c03120 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000341928
0x92734310a6d50babfe8d2e1494ffd3d6d196454367a86b3617b9324ee0b4d9ddWithdraw658558242022-05-18 15:22:30133 days 48 mins ago0x10694497ee3bb8a1523d4202de5da9ef8ea87d45 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000332889
0x879bc0e1bdd33ed8dd3a22f99e1a6aa5d1359fee876f8ab5b6855c801caebf54Withdraw658404332022-05-18 10:03:33133 days 6 hrs ago0x28b366708b0e0ab093d7628b0491a03526400512 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000383736
0x508d9ab182e5bf88965d5dcdc46cf8d446d88c090f79a4302a21401f4d808ef3Withdraw658296332022-05-18 6:22:24133 days 9 hrs ago0x565d5f36c13e234a2a4c0c5df65e705dda175667 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000384786
0x666e294a473681c36c4760fce416db83e56bb781fb0fe01837ad3db33a290b95Withdraw658288802022-05-18 6:07:06133 days 10 hrs ago0x7dd24cb2f5301961e2e25aa69a3bd7015bdeef54 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000341964
0x7f5f58ba9981c2e4ff8f0add7d48c2302156c86f67f19257e2c003a0ac59e468Withdraw658237892022-05-18 4:23:59133 days 11 hrs ago0xb9f87ada4e2b7164dd198d8c22ff38cbf8731438 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000332889
0xdc01e2afecff33927cc99b7719406341b9ae036d8c4717ddcb1915d804504f86Withdraw658237472022-05-18 4:23:07133 days 11 hrs ago0xb9f87ada4e2b7164dd198d8c22ff38cbf8731438 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000384822
0xcd774e30dbefac2caea526b38d7129c4b085822e4215f77a7d35fc47ef1d36eaWithdraw658187662022-05-18 2:40:00133 days 13 hrs ago0x7dd24cb2f5301961e2e25aa69a3bd7015bdeef54 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000235944
0x6b5d03efdbe594fdb6451e6cd2f430b23684efd302d9eb9841951b88f885471dWithdraw658187502022-05-18 2:39:40133 days 13 hrs ago0x7dd24cb2f5301961e2e25aa69a3bd7015bdeef54 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000360387
0x7f547e4f08d734ecbc21b1784050de2a2ae759763119024e3c794c06c369e9d6Withdraw658070022022-05-17 22:38:30133 days 17 hrs ago0x7456f94fb690774b1aef005d6cba76b184574f0b IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000384786
0xfe31f84cd823356cad105069b248e9b9c9f21524f97c200db3a715470b9138e9Withdraw658066862022-05-17 22:31:56133 days 17 hrs ago0x5ded0a69df8118fafa5af5d3648ceec68d783a87 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000326472
0xe88863949443862209e72f498511bdb2a19b1af290e0f2e6b6e717c3ebcdc33aWithdraw658040872022-05-17 21:39:21133 days 18 hrs ago0xdc08c1111caa4132abede6bcf6da7838183882d5 IN  0xc3d490f6369e709f6fa79da673cc74f21764ecf70 ETH0.00000435072
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EthernalGenesisRewardPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 6 : EthernalGenesisRewardPool.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "IERC20.sol";
import "SafeERC20.sol";
import "SafeMath.sol";
import "ContractGuard.sol";


// Note that this pool has no minter key of ETHERNAL (rewards).
// Instead, the governance will call ETHERNAL distributeReward method and send reward to this pool at the beginning.
contract EthernalGenesisRewardPool is ContractGuard{
    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. ETHERNAL to distribute.
        uint256 lastRewardTime; // Last time that ETHERNAL distribution occurs.
        uint256 accEthernalPerShare; // Accumulated ETHERNAL per share, times 1e18. See below.
        bool isStarted; // if lastRewardBlock has passed
        uint256 daoFee;
    }

    IERC20 public ethernal;

    // 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 ETHERNAL mining starts.
    uint256 public poolStartTime;

    // The time when ETHERNAL mining ends.
    uint256 public poolEndTime;

    address public daoAddress;

    // MAINNET
    uint256 constant public ethernalPerSecond = 0.0004629630e18; // 40 ETHERNAL / (24h * 60min * 60s)
    uint256 constant public runningTime = 1 days; // 1 days
    uint256 constant public TOTAL_REWARDS = 40e18;
    // 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 _ethernal,
        uint256 _poolStartTime,
        address _daoAddress
        ) public {
        require(block.timestamp < _poolStartTime, "late");
        if (_ethernal != address(0)) ethernal = IERC20(_ethernal);
        daoAddress = _daoAddress;
        poolStartTime = _poolStartTime;
        poolEndTime = poolStartTime + runningTime;
        operator = msg.sender;
    }

    modifier onlyOperator() {
        require(operator == msg.sender, "EthernalGenesisPool: 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, "EthernalGenesisPool: 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,
        uint _daoFee
    ) public onlyOperator {
        require(_daoFee <= 100, "fee can not be above 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,
            accEthernalPerShare : 0,
            isStarted : _isStarted,
            daoFee: _daoFee
            }));
        if (_isStarted) {
            totalAllocPoint = totalAllocPoint.add(_allocPoint);
        }
    }

    // Update the given pool's ETHERNAL allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint) public onlyOperator {
        massUpdatePools();
        PoolInfo storage pool = poolInfo[_pid];
        if (pool.isStarted) {
            totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(
                _allocPoint
            );
        }
        pool.allocPoint = _allocPoint;
    }

    // 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(ethernalPerSecond);
            return poolEndTime.sub(_fromTime).mul(ethernalPerSecond);
        } else {
            if (_toTime <= poolStartTime) return 0;
            if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(ethernalPerSecond);
            return _toTime.sub(_fromTime).mul(ethernalPerSecond);
        }
    }

    // View function to see pending ETHERNAL on frontend.
    function pendingEthernal(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accEthernalPerShare = pool.accEthernalPerShare;
        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            accEthernalPerShare = accEthernalPerShare.add(_generatedReward.mul(pool.allocPoint).mul(1e18).div(totalAllocPoint).div(tokenSupply));
        }
        return user.amount.mul(accEthernalPerShare).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);
            pool.accEthernalPerShare = pool.accEthernalPerShare.add(_generatedReward.mul(pool.allocPoint).mul(1e18).div(totalAllocPoint).div(tokenSupply));
        }
        pool.lastRewardTime = block.timestamp;
    }

    // Deposit LP tokens.
    function deposit(uint256 _pid, uint256 _amount) public onlyOneBlock {
        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.accEthernalPerShare).div(1e18).sub(user.rewardDebt);
            if (_pending > 0) {
                safeEthernalTransfer(_sender, _pending);
                emit RewardPaid(_sender, _pending);
            }
        }
        if (_amount > 0) {
            pool.token.safeTransferFrom(_sender, address(this), _amount);
            if (pool.daoFee > 0) {
                uint256 _fee = _amount.mul(pool.daoFee).div(10000);
                pool.token.safeTransfer(daoAddress, _fee);
                user.amount = user.amount.add(_amount.sub(_fee));
            }
            else {
                user.amount = user.amount.add(_amount);
            }
            
        }
        user.rewardDebt = user.amount.mul(pool.accEthernalPerShare).div(1e18);
        emit Deposit(_sender, _pid, _amount);
    }

    // Withdraw LP tokens.
    function withdraw(uint256 _pid, uint256 _amount) public onlyOneBlock {
        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.accEthernalPerShare).div(1e18).sub(user.rewardDebt);
        if (_pending > 0) {
            safeEthernalTransfer(_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.accEthernalPerShare).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 ETHERNAL transfer function, just in case if rounding error causes pool to not have enough ETHERNALs.
    function safeEthernalTransfer(address _to, uint256 _amount) internal {
        uint256 _ethernalBalance = ethernal.balanceOf(address(this));
        if (_ethernalBalance > 0) {
            if (_amount > _ethernalBalance) {
                ethernal.safeTransfer(_to, _ethernalBalance);
            } else {
                ethernal.safeTransfer(_to, _amount);
            }
        }
    }

    function setOperator(address _operator) external onlyOperator {
        operator = _operator;
    }

    function setDaoFee(uint256 _pid, uint _fee) external onlyOperator {
        require(_fee <= 100, "fee can not be above 1%");
        PoolInfo storage pool = poolInfo[_pid];
        pool.daoFee = _fee;
    }

}

File 2 of 6 : IERC20.sol
// 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);
}

File 3 of 6 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "IERC20.sol";
import "SafeMath.sol";
import "Address.sol";

/**
 * @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 4 of 6 : SafeMath.sol
// SPDX-License-Identifier: MIT

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 5 of 6 : Address.sol
// SPDX-License-Identifier: MIT

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 6 of 6 : ContractGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

contract ContractGuard {
    mapping(uint256 => mapping(address => bool)) private _status;

    function checkSameOriginReentranted() internal view returns (bool) {
        return _status[block.number][tx.origin];
    }

    function checkSameSenderReentranted() internal view returns (bool) {
        return _status[block.number][msg.sender];
    }

    modifier onlyOneBlock() {
        require(!checkSameOriginReentranted(), "ContractGuard: one block, one function");
        require(!checkSameSenderReentranted(), "ContractGuard: one block, one function");

        _;

        _status[block.number][tx.origin] = true;
        _status[block.number][msg.sender] = true;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "EthernalGenesisRewardPool.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_ethernal","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"},{"internalType":"address","name":"_daoAddress","type":"address"}],"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":"_daoFee","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daoAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ethernal","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethernalPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"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":"pendingEthernal","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":"accEthernalPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"uint256","name":"daoFee","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"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setDaoFee","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"}]

6080604052600060055534801561001557600080fd5b50604051611af1380380611af18339818101604052606081101561003857600080fd5b5080516020820151604090920151909190428211610086576040805162461bcd60e51b815260206004808301919091526024820152636c61746560e01b604482015290519081900360640190fd5b6001600160a01b038316156100b157600280546001600160a01b0319166001600160a01b0385161790555b600880546001600160a01b039092166001600160a01b03199283161790556006829055620151809091016007556001805490911633179055506119f8806100f96000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80635f96dc11116100b857806393f1a40b1161007c57806393f1a40b14610319578063943f013d1461035e578063ab1d8c8014610366578063ad782d0414610392578063b3ab15fb1461039a578063e2bbb158146103c057610142565b80635f96dc111461029e57806362e006c7146102a6578063630b5ba1146102e65780636e271dd5146102ee578063771d1baf146102f657610142565b8063231f0c6a1161010a578063231f0c6a1461020e57806333b817f014610231578063441a3e701461023957806351eb05a61461025c5780635312ea8e14610279578063570ca7351461029657610142565b806309cf6091146101475780631526fe271461016157806317caf6f1146101bd5780631ab06ee5146101c55780632131c68c146101ea575b600080fd5b61014f6103e3565b60408051918252519081900360200190f35b61017e6004803603602081101561017757600080fd5b50356103f0565b604080516001600160a01b03909716875260208701959095528585019390935260608501919091521515608084015260a0830152519081900360c00190f35b61014f610443565b6101e8600480360360408110156101db57600080fd5b5080359060200135610449565b005b6101f26104f7565b604080516001600160a01b039092168252519081900360200190f35b61014f6004803603604081101561022457600080fd5b5080359060200135610506565b61014f6105de565b6101e86004803603604081101561024f57600080fd5b50803590602001356105e9565b6101e86004803603602081101561027257600080fd5b5035610867565b6101e86004803603602081101561028f57600080fd5b50356109ba565b6101f2610a56565b61014f610a65565b6101e8600480360360a08110156102bc57600080fd5b508035906001600160a01b0360208201351690604081013515159060608101359060800135610a6b565b6101e8610ce8565b61014f610d0b565b6101e86004803603604081101561030c57600080fd5b5080359060200135610d11565b6103456004803603604081101561032f57600080fd5b50803590602001356001600160a01b0316610dd4565b6040805192835260208301919091528051918290030190f35b61014f610df8565b61014f6004803603604081101561037c57600080fd5b50803590602001356001600160a01b0316610dff565b6101f2610f55565b6101e8600480360360208110156103b057600080fd5b50356001600160a01b0316610f64565b6101e8600480360360408110156103d657600080fd5b5080359060200135610fcf565b68022b1c8c1227a0000081565b600381815481106103fd57fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909260ff9091169086565b60055481565b6001546001600160a01b031633146104925760405162461bcd60e51b815260040180806020018281038252602f815260200180611923602f913960400191505060405180910390fd5b61049a610ce8565b6000600383815481106104a957fe5b60009182526020909120600690910201600481015490915060ff16156104f0576104ec826104e6836001015460055461126590919063ffffffff16565b906112c2565b6005555b6001015550565b6008546001600160a01b031681565b6000818310610517575060006105d8565b6007548210610589576007548310610531575060006105d8565b6006548311610569576105626601a50ff928be0061055c60065460075461126590919063ffffffff16565b90611323565b90506105d8565b6105626601a50ff928be0061055c8560075461126590919063ffffffff16565b600654821161059a575060006105d8565b60065483116105c3576105626601a50ff928be0061055c6006548561126590919063ffffffff16565b6105626601a50ff928be0061055c8486611265565b92915050565b6601a50ff928be0081565b6105f161137c565b1561062d5760405162461bcd60e51b815260040180806020018281038252602681526020018061199d6026913960400191505060405180910390fd5b61063561139b565b156106715760405162461bcd60e51b815260040180806020018281038252602681526020018061199d6026913960400191505060405180910390fd5b600033905060006003848154811061068557fe5b600091825260208083208784526004825260408085206001600160a01b03881686529092529220805460069092029092019250841115610701576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61070a85610867565b60006107478260010154610741670de0b6b3a764000061073b8760030154876000015461132390919063ffffffff16565b906113ba565b90611265565b90508015610799576107598482611421565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b84156107c35781546107ab9086611265565b825582546107c3906001600160a01b031685876114e0565b600383015482546107e191670de0b6b3a76400009161073b91611323565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050436000908152602081815260408083203284529091528082208054600160ff199182168117909255338452919092208054909116909117905550505050565b60006003828154811061087657fe5b906000526020600020906006020190508060020154421161089757506109b7565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156108e157600080fd5b505afa1580156108f5573d6000803e3d6000fd5b505050506040513d602081101561090b57600080fd5b50519050806109215750426002909101556109b7565b600482015460ff166109525760048201805460ff1916600190811790915582015460055461094e916112c2565b6005555b600554156109ae57600061096a836002015442610506565b90506109a761099c8361073b60055461073b670de0b6b3a764000061055c8a600101548961132390919063ffffffff16565b6003850154906112c2565b6003840155505b50426002909101555b50565b6000600382815481106109c957fe5b600091825260208083208584526004825260408085203380875293528420805485825560018201959095556006909302018054909450919291610a19916001600160a01b039190911690836114e0565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6001546001600160a01b031681565b60065481565b6001546001600160a01b03163314610ab45760405162461bcd60e51b815260040180806020018281038252602f815260200180611923602f913960400191505060405180910390fd5b6064811115610b04576040805162461bcd60e51b81526020600482015260176024820152766665652063616e206e6f742062652061626f766520312560481b604482015290519081900360640190fd5b610b0d84611532565b8215610b1b57610b1b610ce8565b600654421015610b495781610b34576006549150610b44565b600654821015610b445760065491505b610b5e565b811580610b5557504282105b15610b5e574291505b600060065483111580610b715750428311155b6040805160c0810182526001600160a01b038881168252602082018a8152928201878152600060608401818152861580156080870190815260a087018b815260038054600181018255955296517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600690950294850180546001600160a01b031916919097161790955595517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c83015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d82015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e82015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f8201805460ff191691151591909117905590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f86090910155909150610ce057600554610cdc90876112c2565b6005555b505050505050565b60035460005b81811015610d0757610cff81610867565b600101610cee565b5050565b60075481565b6001546001600160a01b03163314610d5a5760405162461bcd60e51b815260040180806020018281038252602f815260200180611923602f913960400191505060405180910390fd5b6064811115610daa576040805162461bcd60e51b81526020600482015260176024820152766665652063616e206e6f742062652061626f766520312560481b604482015290519081900360640190fd5b600060038381548110610db957fe5b60009182526020909120600560069092020101919091555050565b60046020908152600092835260408084209091529082529020805460019091015482565b6201518081565b60008060038481548110610e0f57fe5b60009182526020808320878452600480835260408086206001600160a01b038a811688529085528187206006969096029093016003810154815483516370a0823160e01b81523095810195909552925191985095969491909316926370a08231926024808201939291829003018186803b158015610e8c57600080fd5b505afa158015610ea0573d6000803e3d6000fd5b505050506040513d6020811015610eb657600080fd5b5051600285015490915042118015610ecd57508015155b15610f1f576000610ee2856002015442610506565b9050610f1b610f148361073b60055461073b670de0b6b3a764000061055c8c600101548961132390919063ffffffff16565b84906112c2565b9250505b610f4a8360010154610741670de0b6b3a764000061073b86886000015461132390919063ffffffff16565b979650505050505050565b6002546001600160a01b031681565b6001546001600160a01b03163314610fad5760405162461bcd60e51b815260040180806020018281038252602f815260200180611923602f913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610fd761137c565b156110135760405162461bcd60e51b815260040180806020018281038252602681526020018061199d6026913960400191505060405180910390fd5b61101b61139b565b156110575760405162461bcd60e51b815260040180806020018281038252602681526020018061199d6026913960400191505060405180910390fd5b600033905060006003848154811061106b57fe5b600091825260208083208784526004825260408085206001600160a01b03881686529092529220600690910290910191506110a585610867565b8054156111315760006110dd8260010154610741670de0b6b3a764000061073b8760030154876000015461132390919063ffffffff16565b9050801561112f576110ef8482611421565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b83156111c257815461114e906001600160a01b03168430876115b6565b6005820154156111b357600061117761271061073b85600501548861132390919063ffffffff16565b6008548454919250611196916001600160a01b039081169116836114e0565b6111ab6111a38683611265565b8354906112c2565b8255506111c2565b80546111bf90856112c2565b81555b600382015481546111e091670de0b6b3a76400009161073b91611323565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055505050565b6000828211156112bc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561131c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082611332575060006105d8565b8282028284828161133f57fe5b041461131c5760405162461bcd60e51b81526004018080602001828103825260218152602001806119526021913960400191505060405180910390fd5b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b6000808211611410576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161141957fe5b049392505050565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561146c57600080fd5b505afa158015611480573d6000803e3d6000fd5b505050506040513d602081101561149657600080fd5b5051905080156114db57808211156114c4576002546114bf906001600160a01b031684836114e0565b6114db565b6002546114db906001600160a01b031684846114e0565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526114db908490611616565b60035460005b818110156114db57826001600160a01b03166003828154811061155757fe5b60009182526020909120600690910201546001600160a01b031614156115ae5760405162461bcd60e51b81526004018080602001828103825260238152602001806119006023913960400191505060405180910390fd5b600101611538565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611610908590611616565b50505050565b606061166b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116c79092919063ffffffff16565b8051909150156114db5780806020019051602081101561168a57600080fd5b50516114db5760405162461bcd60e51b815260040180806020018281038252602a815260200180611973602a913960400191505060405180910390fd5b60606116d684846000856116de565b949350505050565b60608247101561171f5760405162461bcd60e51b81526004018080602001828103825260268152602001806118da6026913960400191505060405180910390fd5b6117288561182f565b611779576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106117b85780518252601f199092019160209182019101611799565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461181a576040519150601f19603f3d011682016040523d82523d6000602084013e61181f565b606091505b5091509150610f4a828286611835565b3b151590565b6060831561184457508161131c565b8251156118545782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561189e578181015183820152602001611886565b50505050905090810190601f1680156118cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c45746865726e616c47656e65736973506f6f6c3a206578697374696e6720706f6f6c3f45746865726e616c47656e65736973506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756e6374696f6ea2646970667358221220d2f3ae9bd18c9c08edd7219c0ef9be4e7d79a8ad39c0fa4f4f6e9b5b90a4864364736f6c634300060c003300000000000000000000000017cbd9c274e90c537790c51b4015a65cd015497e00000000000000000000000000000000000000000000000000000000627fb5e0000000000000000000000000fd7cbeae92ed5ec9c58b88fe5af9a78115a82cd8

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000017cbd9c274e90c537790c51b4015a65cd015497e00000000000000000000000000000000000000000000000000000000627fb5e0000000000000000000000000fd7cbeae92ed5ec9c58b88fe5af9a78115a82cd8

-----Decoded View---------------
Arg [0] : _ethernal (address): 0x17cbd9c274e90c537790c51b4015a65cd015497e
Arg [1] : _poolStartTime (uint256): 1652536800
Arg [2] : _daoAddress (address): 0xfd7cbeae92ed5ec9c58b88fe5af9a78115a82cd8

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000017cbd9c274e90c537790c51b4015a65cd015497e
Arg [1] : 00000000000000000000000000000000000000000000000000000000627fb5e0
Arg [2] : 000000000000000000000000fd7cbeae92ed5ec9c58b88fe5af9a78115a82cd8


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.