Contract 0x578B2a5dd65c2450aA9C5e03f95f2e1CbAe7661F

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfe7af4109952a1842be546d3e5437b400b026b3035c28237a53b25cbb4384a66Withdraw373975082022-05-02 15:22:08151 days 9 hrs ago0x6f01d5416d3172f7b544acbbeced762d44d22e35 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.029894540015
0x3e5d68b09b4a8da55d808fd08e249f01489691c0432e54aeee4b8ebd4551fc24Withdraw373974022022-05-02 15:19:28151 days 9 hrs ago0x6f01d5416d3172f7b544acbbeced762d44d22e35 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.030603856068
0x3fd5c2fed3c31efccecb22c062efd8384c5f74de95e789e87759e7706e812d23Withdraw359403322022-04-13 7:26:26170 days 17 hrs ago0x2b58a02b1168330f7158f742b8ae3bd32f409fcf IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.012707656071
0xbcf584e8ef97802ca0efa175dd33d619f2655ec279cbec0d7fe7be02e6e6920eWithdraw356968482022-04-10 7:17:20173 days 17 hrs ago0x1d246a5b81f998fe152f8b760f63e7b366c6dc79 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.019185128074
0xcc3f9a934d2044edc1a2b1ec59336ccd4b7f95930975a52551ba64680fe2a0f2Withdraw356070962022-04-09 5:54:57174 days 19 hrs ago0x74445a2a7f4a45bdad2d3b95262354f6de8148ea IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.013444371093
0x22e9a5c34ea6bf011354f21a511e602b04959c4626147f686ca3886bb959b5f2Withdraw354445632022-04-07 7:54:17176 days 17 hrs ago0x2efe9b4da333d16570eed9913bac71a19452c911 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.023536122483
0x7a23cf2330713801183dcf27a5bac7292221971336e3601de7cbb4e369002875Withdraw353593852022-04-06 6:42:42177 days 18 hrs ago0x965c953bd112d76935768ee2adf31c5e3347779e IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.013641767974
0x34168a2a058b5e427f03ed6cb8822ee7ba003376e407c32e3045fdb96bef4071Withdraw352223652022-04-04 15:38:16179 days 9 hrs ago0x95d9ab4bfce178eb6561f088eac563eb379a4b9b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.057398630293
0x39a494c0af7c32f11a15dbeda7d9adaea0d9ad81a6e610c4b3e1141364a36202Withdraw352124592022-04-04 12:38:16179 days 12 hrs ago0x176b40a2b38fb8c34a9d77e7a3de4f951626f5f5 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.008113740671
0xdfbb2977b57ebecf9d95f5654e9a549d4789a99e80af074d2591c7bf321d2567Withdraw351552422022-04-03 20:49:46180 days 4 hrs ago0x71a89f888dac6dcaa8b6c276e1bb6d058cde537d IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.014129185825
0x6174bd3e674aa336638ff7f86dc0ace07c0ee59180bed68656b9748339adb936Withdraw351552302022-04-03 20:49:34180 days 4 hrs ago0x71a89f888dac6dcaa8b6c276e1bb6d058cde537d IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.031612312599
0xe3a83e2a30be6c0ea369860ae2208b1d4850ec0c8e10281f01441a7381ad32c5Withdraw351128092022-04-03 8:17:40180 days 16 hrs ago0xfb332d623fdd34223d6da576d9eb4fecc28d6a7b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.024002118621
0x6321b83c4ef101de3ee521f51fff50e869a5d57f7b8484b4d18e8ca77cbc3e68Withdraw351122202022-04-03 8:07:57180 days 16 hrs ago0x1c0f9f592c976d6b9fc8f211145c8b9bb214da81 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.031266231989
0x679b8312dcc013bb9a8e4d59d92842954a64c46c8f97bcd58de290635be25806Withdraw350831922022-04-02 23:47:39181 days 1 hr ago0x3593040f9275b98ace0d149502336459295de54b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.00657696204
0x3a9ba58e04f48e6a06c03eee3ff0de7537be10865d8dd16f2444b92ca9fe34efWithdraw350831572022-04-02 23:47:08181 days 1 hr ago0x3593040f9275b98ace0d149502336459295de54b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.008377579056
0x605d67bc53f9270aefa99ef8c0fa0218586edde5a0e9f19000fc2376bf7de9eaWithdraw350831502022-04-02 23:47:01181 days 1 hr ago0x3593040f9275b98ace0d149502336459295de54b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.010425416654
0x7aeff43f59c1278abec54e6b41b809454717815358b53e9be5e2f86399223fd6Withdraw350831172022-04-02 23:46:31181 days 1 hr ago0x3593040f9275b98ace0d149502336459295de54b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.026688213974
0x6c1c0adbd10d8c421047a576a15705ef489f56f04235301f96d9463a172c7dbaWithdraw350831072022-04-02 23:46:22181 days 1 hr ago0x3593040f9275b98ace0d149502336459295de54b IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.011261938953
0xd99608ae30afa411f4c64d47d7e076e6d89634cce859991c14933120db953dcbWithdraw350799602022-04-02 22:55:47181 days 2 hrs ago0xaf3a3cf6960ed4a43c72a7d176b69354ab494f37 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.013859674661
0xfbce659ee9ffc20a43c8d475782a747f5a1b61317daa6d87906331a4150a0063Deposit350481802022-04-02 13:43:32181 days 11 hrs ago0x2efe9b4da333d16570eed9913bac71a19452c911 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.024594122497
0xaf32ed3cd6d248fb3262069918fbf15f74b30707efe223631f89722070de07b8Deposit350480032022-04-02 13:39:33181 days 11 hrs ago0x2efe9b4da333d16570eed9913bac71a19452c911 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.025510441869
0x1e285bcd1316424ca67b7e7231d7a76a87d11d01e40b68e463d224277f095c82Withdraw349978542022-04-01 23:24:33182 days 1 hr ago0x4a1898e59226e41aca71297e1e352468169439fc IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.040645497784
0x77a69d4af17cc468c2441873eed7f5184b2215fe924c84044e32a3b868be8705Withdraw349835932022-04-01 19:04:23182 days 6 hrs ago0xa3e2ad3d208347d7a1b9418f4736b9edb1df42c6 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.018593685556
0x490318fa2bca5e15c07b97b6d4a3e7c70c7866fea7a6336b5463c31453cebca9Withdraw349835582022-04-01 19:03:40182 days 6 hrs ago0xa3e2ad3d208347d7a1b9418f4736b9edb1df42c6 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.022302214234
0x811b0e7ece3736451b81b3d76fa94cbe964ff6fa0457097b048e6d847e77fbcdWithdraw349705112022-04-01 15:12:31182 days 9 hrs ago0x5bd0383a2a5d8d0ced4178567c95028a4326cbb1 IN  0x578b2a5dd65c2450aa9c5e03f95f2e1cbae7661f0 FTM0.01223990603
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x74874242822576333a1028f1ffe6300c9b2d552b1b960173f4a8c2826c170c4e337391672022-03-18 9:00:22196 days 16 hrs ago Piggy Finance: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
TPiggyGenesisRewardPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : TPiggyGenesisRewardPool.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

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

    IERC20 public piggy;
    address public daoFundAddress;

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

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

    // MAINNET
    uint256 public piggyPerSecond = 0.52 ether; // 90000 PIGGY / (48h * 60min * 60s)
    uint256 public runningTime = 2 days; // 48 hours
    uint256 public constant TOTAL_REWARDS = 90000 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 _piggy,
        address _daoFund,
        uint256 _poolStartTime
    ) public {
        require(block.timestamp < _poolStartTime, "late");
        if (_piggy != address(0)) piggy = IERC20(_piggy);
        if (_daoFund != address(0)) daoFundAddress = _daoFund;
        poolStartTime = _poolStartTime;
        poolEndTime = poolStartTime + runningTime;
        operator = msg.sender;
    }

    modifier onlyOperator() {
        require(operator == msg.sender, "PiggyGenesisPool: 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, "PiggyGenesisPool: 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
    ) public onlyOperator {
        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,
            accPiggyPerShare : 0,
            isStarted : _isStarted
            }));
        if (_isStarted) {
            totalAllocPoint = totalAllocPoint.add(_allocPoint);
        }
    }

    // Update the given pool's PIGGY 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(piggyPerSecond);
            return poolEndTime.sub(_fromTime).mul(piggyPerSecond);
        } else {
            if (_toTime <= poolStartTime) return 0;
            if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(piggyPerSecond);
            return _toTime.sub(_fromTime).mul(piggyPerSecond);
        }
    }

    // View function to see pending PIGGY on frontend.
    function pendingPIGGY(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accPiggyPerShare = pool.accPiggyPerShare;
        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _piggyReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            accPiggyPerShare = accPiggyPerShare.add(_piggyReward.mul(1e18).div(tokenSupply));
        }
        return user.amount.mul(accPiggyPerShare).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 _piggyReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            pool.accPiggyPerShare = pool.accPiggyPerShare.add(_piggyReward.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.accPiggyPerShare).div(1e18).sub(user.rewardDebt);
            if (_pending > 0) {
                safePiggyTransfer(_sender, _pending);
                emit RewardPaid(_sender, _pending);
            }
        }
        if (_amount > 0) {
            pool.token.safeTransferFrom(_sender, address(this), _amount);
            uint256 depositDebt = _amount.mul(50).div(10000);
            user.amount = user.amount.add(_amount.sub(depositDebt));
            pool.token.safeTransfer(daoFundAddress, depositDebt);
        }
        user.rewardDebt = user.amount.mul(pool.accPiggyPerShare).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.accPiggyPerShare).div(1e18).sub(user.rewardDebt);
        if (_pending > 0) {
            safePiggyTransfer(_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.accPiggyPerShare).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 PIGGY transfer function, just in case if rounding error causes pool to not have enough PIGGYs.
    function safePiggyTransfer(address _to, uint256 _amount) internal {
        uint256 _piggyBalance = piggy.balanceOf(address(this));
        if (_piggyBalance > 0) {
            if (_amount > _piggyBalance) {
                piggy.safeTransfer(_to, _piggyBalance);
            } else {
                piggy.safeTransfer(_to, _amount);
            }
        }
    }

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

    function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator {
        if (block.timestamp < poolEndTime + 90 days) {
            // do not allow to drain core token (TPIGGY or lps) if less than 90 days after pool ends
            require(_token != piggy, "tpiggy");
            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);
    }
}

File 2 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 5 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/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 5 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the 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) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an 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);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid 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 5 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_piggy","type":"address"},{"internalType":"address","name":"_daoFund","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"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daoFundAddress","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":[{"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":"pendingPIGGY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"piggy","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"piggyPerSecond","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":"accPiggyPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"}],"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":"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"}]

60806040526000600555670737693eb33400006008556202a30060095534801561002857600080fd5b5060405161192e38038061192e8339818101604052606081101561004b57600080fd5b5080516020820151604090920151909190428111610099576040805162461bcd60e51b815260206004808301919091526024820152636c61746560e01b604482015290519081900360640190fd5b6001600160a01b038316156100c457600180546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156100ef57600280546001600160a01b0319166001600160a01b0384161790555b6006819055600954016007555050600080546001600160a01b031916331790556118108061011e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80635f96dc11116100b857806396805e541161007c57806396805e5414610329578063ad9bd68f14610363578063b3ab15fb1461036b578063b5fdf28e14610391578063e2bbb15814610399578063e86b46d9146103bc57610142565b80635f96dc11146102c4578063630b5ba1146102cc5780636e271dd5146102d457806393f1a40b146102dc578063943f013d1461032157610142565b8063441a3e701161010a578063441a3e70146102055780634eba10101461022857806351eb05a6146102305780635312ea8e1461024d57806354575af41461026a578063570ca735146102a057610142565b806309cf6091146101475780631526fe271461016157806317caf6f1146101b55780631ab06ee5146101bd578063231f0c6a146101e2575b600080fd5b61014f6103e8565b60408051918252519081900360200190f35b61017e6004803603602081101561017757600080fd5b50356103f6565b604080516001600160a01b039096168652602086019490945284840192909252606084015215156080830152519081900360a00190f35b61014f610441565b6101e0600480360360408110156101d357600080fd5b5080359060200135610447565b005b61014f600480360360408110156101f857600080fd5b50803590602001356104f5565b6101e06004803603604081101561021b57600080fd5b50803590602001356105ba565b61014f610777565b6101e06004803603602081101561024657600080fd5b503561077d565b6101e06004803603602081101561026357600080fd5b50356108db565b6101e06004803603606081101561028057600080fd5b506001600160a01b03813581169160208101359160409091013516610977565b6102a8610abf565b604080516001600160a01b039092168252519081900360200190f35b61014f610ace565b6101e0610ad4565b61014f610af7565b610308600480360360408110156102f257600080fd5b50803590602001356001600160a01b0316610afd565b6040805192835260208301919091528051918290030190f35b61014f610b21565b6101e06004803603608081101561033f57600080fd5b508035906001600160a01b0360208201351690604081013515159060600135610b27565b6102a8610d24565b6101e06004803603602081101561038157600080fd5b50356001600160a01b0316610d33565b6102a8610d9e565b6101e0600480360360408110156103af57600080fd5b5080359060200135610dad565b61014f600480360360408110156103d257600080fd5b50803590602001356001600160a01b0316610f58565b69130ee8e717904440000081565b6003818154811061040357fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909160ff1685565b60055481565b6000546001600160a01b031633146104905760405162461bcd60e51b815260040180806020018281038252602c815260200180611764602c913960400191505060405180910390fd5b610498610ad4565b6000600383815481106104a757fe5b60009182526020909120600590910201600481015490915060ff16156104ee576104ea826104e483600101546005546110b990919063ffffffff16565b90611102565b6005555b6001015550565b6000818310610506575060006105b4565b600754821061056e576007548310610520575060006105b4565b60065483116105535761054c6008546105466006546007546110b990919063ffffffff16565b9061115c565b90506105b4565b61054c600854610546856007546110b990919063ffffffff16565b600654821161057f575060006105b4565b60065483116105a35761054c600854610546600654856110b990919063ffffffff16565b60085461054c9061054684866110b9565b92915050565b60003390506000600384815481106105ce57fe5b600091825260208083208784526004825260408085206001600160a01b0388168652909252922080546005909202909201925084111561064a576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b6106538561077d565b6000610690826001015461068a670de0b6b3a76400006106848760030154876000015461115c90919063ffffffff16565b906111b5565b906110b9565b905080156106e2576106a284826111f7565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b841561070c5781546106f490866110b9565b8255825461070c906001600160a01b031685876112ad565b6003830154825461072a91670de0b6b3a7640000916106849161115c565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b60085481565b60006003828154811061078c57fe5b90600052602060002090600502019050806002015442116107ad57506108d8565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107f757600080fd5b505afa15801561080b573d6000803e3d6000fd5b505050506040513d602081101561082157600080fd5b50519050806108375750426002909101556108d8565b600482015460ff166108685760048201805460ff1916600190811790915582015460055461086491611102565b6005555b600554156108cf5760006108808360020154426104f5565b905060006108a160055461068486600101548561115c90919063ffffffff16565b90506108c76108bc8461068484670de0b6b3a764000061115c565b600386015490611102565b600385015550505b50426002909101555b50565b6000600382815481106108ea57fe5b60009182526020808320858452600482526040808520338087529352842080548582556001820195909555600590930201805490945091929161093a916001600160a01b039190911690836112ad565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6000546001600160a01b031633146109c05760405162461bcd60e51b815260040180806020018281038252602c815260200180611764602c913960400191505060405180910390fd5b6007546276a70001421015610aa6576001546001600160a01b0384811691161415610a1b576040805162461bcd60e51b815260206004820152600660248201526574706967677960d01b604482015290519081900360640190fd5b60035460005b81811015610aa357600060038281548110610a3857fe5b6000918252602090912060059091020180549091506001600160a01b0387811691161415610a9a576040805162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b604482015290519081900360640190fd5b50600101610a21565b50505b610aba6001600160a01b03841682846112ad565b505050565b6000546001600160a01b031681565b60065481565b60035460005b81811015610af357610aeb8161077d565b600101610ada565b5050565b60075481565b60046020908152600092835260408084209091529082529020805460019091015482565b60095481565b6000546001600160a01b03163314610b705760405162461bcd60e51b815260040180806020018281038252602c815260200180611764602c913960400191505060405180910390fd5b610b79836112ff565b8115610b8757610b87610ad4565b600654421015610bb35780610b9f5750600654610bae565b600654811015610bae57506006545b610bc7565b801580610bbf57504281105b15610bc75750425b600060065482111580610bda5750428211155b6040805160a0810182526001600160a01b03878116825260208201898152928201868152600060608401818152861580156080870190815260038054600181018255945295517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600590940293840180546001600160a01b031916919096161790945594517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c82015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d82015592517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e84015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f909201805460ff191692151592909217909155909150610d1d57600554610d199086611102565b6005555b5050505050565b6002546001600160a01b031681565b6000546001600160a01b03163314610d7c5760405162461bcd60e51b815260040180806020018281038252602c815260200180611764602c913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b6000339050600060038481548110610dc157fe5b600091825260208083208784526004825260408085206001600160a01b0388168652909252922060059091029091019150610dfb8561077d565b805415610e87576000610e33826001015461068a670de0b6b3a76400006106848760030154876000015461115c90919063ffffffff16565b90508015610e8557610e4584826111f7565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b8315610eee578154610ea4906001600160a01b0316843087611399565b6000610eb761271061068487603261115c565b9050610ece610ec686836110b9565b835490611102565b82556002548354610eec916001600160a01b039182169116836112ad565b505b60038201548154610f0c91670de0b6b3a7640000916106849161115c565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60008060038481548110610f6857fe5b60009182526020808320878452600480835260408086206001600160a01b038a811688529085528187206005969096029093016003810154815483516370a0823160e01b81523095810195909552925191985095969491909316926370a08231926024808201939291829003018186803b158015610fe557600080fd5b505afa158015610ff9573d6000803e3d6000fd5b505050506040513d602081101561100f57600080fd5b505160028501549091504211801561102657508015155b1561108357600061103b8560020154426104f5565b9050600061105c60055461068488600101548561115c90919063ffffffff16565b905061107e6110778461068484670de0b6b3a764000061115c565b8590611102565b935050505b6110ae836001015461068a670de0b6b3a764000061068486886000015461115c90919063ffffffff16565b979650505050505050565b60006110fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f9565b9392505050565b6000828201838110156110fb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008261116b575060006105b4565b8282028284828161117857fe5b04146110fb5760405162461bcd60e51b81526004018080602001828103825260218152602001806117906021913960400191505060405180910390fd5b60006110fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611490565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561124257600080fd5b505afa158015611256573d6000803e3d6000fd5b505050506040513d602081101561126c57600080fd5b505190508015610aba578082111561129a57600154611295906001600160a01b031684836112ad565b610aba565b600154610aba906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610aba9084906114f5565b60035460005b81811015610aba57826001600160a01b03166003828154811061132457fe5b60009182526020909120600590910201546001600160a01b03161415611391576040805162461bcd60e51b815260206004820181905260248201527f506967677947656e65736973506f6f6c3a206578697374696e6720706f6f6c3f604482015290519081900360640190fd5b600101611305565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113f39085906114f5565b50505050565b600081848411156114885760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561144d578181015183820152602001611435565b50505050905090810190601f16801561147a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836114df5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561144d578181015183820152602001611435565b5060008385816114eb57fe5b0495945050505050565b606061154a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115a69092919063ffffffff16565b805190915015610aba5780806020019051602081101561156957600080fd5b5051610aba5760405162461bcd60e51b815260040180806020018281038252602a8152602001806117b1602a913960400191505060405180910390fd5b60606115b584846000856115bd565b949350505050565b60606115c88561172a565b611619576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116585780518252601f199092019160209182019101611639565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146116ba576040519150601f19603f3d011682016040523d82523d6000602084013e6116bf565b606091505b509150915081156116d35791506115b59050565b8051156116e35780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561144d578181015183820152602001611435565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906115b557505015159291505056fe506967677947656e65736973506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220dab9d429e71893094fa646bfdef82e50e4f46cfd33c12912b87696eca30f5ec364736f6c634300060c00330000000000000000000000000d3d5bf98d7b9961c602fbfb8032c7bdc6a0c386000000000000000000000000fa6eb497f460bcda2f80d3d00718af25848088b0000000000000000000000000000000000000000000000000000000006240fa80

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

0000000000000000000000000d3d5bf98d7b9961c602fbfb8032c7bdc6a0c386000000000000000000000000fa6eb497f460bcda2f80d3d00718af25848088b0000000000000000000000000000000000000000000000000000000006240fa80

-----Decoded View---------------
Arg [0] : _piggy (address): 0x0d3d5bf98d7b9961c602fbfb8032c7bdc6a0c386
Arg [1] : _daoFund (address): 0xfa6eb497f460bcda2f80d3d00718af25848088b0
Arg [2] : _poolStartTime (uint256): 1648425600

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000d3d5bf98d7b9961c602fbfb8032c7bdc6a0c386
Arg [1] : 000000000000000000000000fa6eb497f460bcda2f80d3d00718af25848088b0
Arg [2] : 000000000000000000000000000000000000000000000000000000006240fa80


Block Transaction Gas Used Reward
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
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.