Contract 0x59c35128b6e6db1b972f5d572d3388361fd5307f 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa530bfb0ba67fd8f0de72abfd87e272d2463ebdff29b6816ec16931eafe3f4aaDeposit79181782021-12-07 8:22:006 mins ago0xd5ed0dc20bafc45e9b7c18b310934def3cfdf723 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.00907707525
0xb6e55165970e64e4a4574994ec851d38347ba3858ec4ab68b7d4a30fa2bbf319Withdraw79180832021-12-07 8:18:4510 mins ago0x1f9730d6a1b45b76ae2919cb178160a6419920ac IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0139435525
0xff2e8bbf337a2bc97b8f6b6ffca4f26c6424ef9288b17d3d52cdf13697a92347Withdraw79179602021-12-07 8:14:4014 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.008366872552.5
0xa897a23a07a8e3812bd5ba88866b16e81a88beb916ea573572c04e4e8527bc4dDeposit79179272021-12-07 8:13:3315 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0090081652.5
0x9624771789ae598a6b2eb23146049ca036fe5227c1dc3e1bb4d561b225c23582Withdraw79178662021-12-07 8:11:3017 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.00755863552.5
0x45df3362c1088fa2a34f858d1b1793ec00787377b6498ccf8a3464a7645c0db9Withdraw79178552021-12-07 8:11:0617 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.00845701552.5
0xef8dae216e0f43dd184d80d3eec88b7024b30ebe86945598036f060d000729f4Withdraw79178292021-12-07 8:10:1818 mins ago0x1f9730d6a1b45b76ae2919cb178160a6419920ac IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0035996525
0xcd1a7cec2f73859041fa5bfa2adf349078c8e7827e7ef40cf75ae442fc178b0aWithdraw79178282021-12-07 8:10:1618 mins ago0x1f9730d6a1b45b76ae2919cb178160a6419920ac IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0035996525
0xe9bf1b2cec5fede4aec3df8525aba816bfaed94052fdbff9620e35a405c1e37fWithdraw79178272021-12-07 8:10:1318 mins ago0x1f9730d6a1b45b76ae2919cb178160a6419920ac IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0035996525
0x038cb9e0e379f825a66618f4f6fa97a41ec548142e169e1b7fe7b3fe26e5aa3cWithdraw79177292021-12-07 8:06:5621 mins ago0xee79285718bda39a4c3e30c988e6890c5508d694 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0035996525
0x0db332f5d54be638e57c20ea8be4b2d29f3e2af29d86b30af60217b38a4888f6Withdraw79177152021-12-07 8:06:3022 mins ago0xee79285718bda39a4c3e30c988e6890c5508d694 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0040271525
0xf21f998062bf7f046de134238d5e0f1a93928ce15d50a6321d8d25af72a75e29Withdraw79176832021-12-07 8:05:2223 mins ago0xec964b6c91abde8f583f744de48da87b9f43035e IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0167879525
0x5a7c29d969700e0f5a430d09615564aa232b8f41360b491dfd3e2514886d0802Withdraw79174362021-12-07 7:57:0631 mins ago0xec964b6c91abde8f583f744de48da87b9f43035e IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0136855525
0x73bbf99639ac169b7ca56928b360cbf1aa3f5ba31e42e1835bb47082b599eb73Withdraw79173322021-12-07 7:53:3635 mins ago0xec964b6c91abde8f583f744de48da87b9f43035e IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0040271525
0x5d43de3f77ca4ccdd8ebe83e2dec1a85dfb1bb8b923bb5348c591fc89e07a05cDeposit79172862021-12-07 7:52:0436 mins ago0x9f6d8e8daa10a57242bda2e95e6f4246f483f26c IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.005348425
0xffb0a3b8557c29e9b2269bf1beec8f32d35e5fa7ec3a2c98cc9de328d1f3acf4Deposit79171342021-12-07 7:46:5342 mins ago0x352345432be82440c678e6a2ee8e262236230b54 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.00471856 27.5
0xd7d23e3315912390e42e8f123f44e2a970f413270c889d9726b6a1b62df3cd8aWithdraw79171292021-12-07 7:46:4042 mins ago0x352345432be82440c678e6a2ee8e262236230b54 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.003959615 27.5
0xcbb7434e5919cbe654a6a6ef7372d2d395b2614fc2d5c66487071422065cff4cDeposit79170352021-12-07 7:43:3445 mins ago0xd88311c19c56464707fe035856864d9a3367066b IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.004289625
0x0b59fff5a959506afec1e442011623a481f26aef02de26c1b06052389a14ac2aWithdraw79170212021-12-07 7:43:0545 mins ago0xd88311c19c56464707fe035856864d9a3367066b IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0035993525
0x5fc218664cb5cd3a40b3468352410472edce251b9140fd9d037e19edef593486Withdraw79169052021-12-07 7:39:1149 mins ago0x257132569ed80a2f8a57860d2b146fde7942ed88 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.017433982527.5
0xbdac5e63e9aa51300fe05881117b1f9145572c2db50a6e28f069a6b20c343f1dWithdraw79168922021-12-07 7:38:4550 mins ago0x257132569ed80a2f8a57860d2b146fde7942ed88 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.01846641527.5
0x8f0d35405cedfb1ce18e28b3338655cb5d921c97509af852e9dd77639e0b43b2Deposit79168862021-12-07 7:38:3250 mins ago0xff4ec6d1b54c18ab28cb2ba460d9d04b865c06e7 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.0054640525
0xeb84f66c88969601cf845ec6dc801feba9822c1e84ff492307dade0732c3a15dWithdraw79168842021-12-07 7:38:2950 mins ago0x257132569ed80a2f8a57860d2b146fde7942ed88 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.00438080527.5
0xd8abc9851f458f8aabe51084a49ba0cafac71ea46b0a3b07dd8be3925a106058Deposit79168072021-12-07 7:35:5452 mins ago0x034908f882843c22b7a7f22715dcbe9fec9c0fa9 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.01625618527.5
0x71e06f74f9bd0acc9bccf2b3c6511110c598ab4ee5a034b0b4262a12a247976dDeposit79164822021-12-07 7:25:021 hr 3 mins ago0x12bf53715f23c8a485860bfa3ade550a42234b61 IN  0x59c35128b6e6db1b972f5d572d3388361fd5307f0 AVAX0.004289625
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterDuo

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : MasterDuo.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libs/IERC20.sol";
import "./Duo.sol";
import "./libs/SafeERC20.sol";
import "./libs/Ichef.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

contract MasterDuo is Ownable, ReentrancyGuard{
    using SafeMath for uint;
    using SafeERC20 for IERC20;
    // Info of each user.
    struct UserInfo {
        uint amount;         // How many LP tokens the user has provided.
        uint rewardDebt;     // Reward debt. See explanation below.
        uint ethDebt;
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint allocPoint;       // How many allocation points assigned to this pool. DUOs to distribute per block.
        uint ethAlloc;
        uint lastRewardTime;  // Last block number that DUOs distribution occurs.
        uint accDuoPerShare;   // Accumulated DUOs per share, times 1e12. See below.
        uint accEthPerShare;
        uint16 depositFeeBP;      // Deposit fee in basis points
        uint totalcap;
        address strat;
        uint stratId;   //pid in strat contract, not the final dest
    }
    struct Ethpool{
        uint newreserve;
        uint nextRolltime;
        uint ethPerSec;
        uint rollrate;//bp
        uint period;
    }
    Ethpool public ethpool;
    Duo public duo;
    IERC20 public wETH=IERC20(0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7);
    // Dev address.
    address public devaddr;
    address feeAddress;
    uint public duoPerSec;
    uint public totPaid;
    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (uint => mapping (address => UserInfo)) public userInfo;
    mapping(uint=>mapping(address=>uint)) public whitelist;
    bool public finWL;
    mapping(address=>bool) public approvedContracts;
    uint public totalAllocPoint;
    uint public totalEthAllocPoint;
    uint public startTime;
    event Deposit(address indexed user, uint indexed pid, uint amount);
    event Withdraw(address indexed user, uint indexed pid, uint amount);
    event EmergencyWithdraw(address indexed user, uint indexed pid, uint amount);
    modifier onlyEOA() {
        require(
            tx.origin == msg.sender || approvedContracts[msg.sender],
            "onlyEOA"
        );
        _;
    }
    constructor(Duo _duo,address _devaddr,address _feeAddress,uint _duoPerSec,uint _period,uint _startTime) public { 
        require(_startTime>block.timestamp);
        startTime=_startTime; 
        duo = _duo;
        devaddr = _devaddr;
        feeAddress = _feeAddress;
        duoPerSec = _duoPerSec;
        ethpool=Ethpool({
            newreserve:0,
            nextRolltime:0,
            ethPerSec:0,
            rollrate:5000,//bp
            period:_period //change on real contract
        });
    }
    function poolLength() external view returns (uint) {
        return poolInfo.length;
    }
    function ethpoolquery() external view returns(Ethpool memory){
        return ethpool;
    }
    function setEthpool(uint rollrate,uint period) external onlyOwner{
        require(rollrate<=10000 && period>0);
        ethpool.rollrate=rollrate;
        ethpool.period=period;
    }
    function add(uint _allocPoint,uint _ethalloc, IERC20 _lpToken, uint16 _depositFeeBP, address _strat,uint _stratId,bool _withUpdate) public onlyOwner {
        require(_depositFeeBP <= 400, "max 4%");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint lastRewardTime = block.timestamp > startTime ? block.timestamp : startTime;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        totalEthAllocPoint=totalEthAllocPoint.add(_ethalloc);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            ethAlloc:_ethalloc,
            lastRewardTime: lastRewardTime,
            accDuoPerShare: 0,
            accEthPerShare:0,
            depositFeeBP: _depositFeeBP,
            totalcap:0,
            strat:_strat,
            stratId:_stratId
        }));
        if(_strat!=address(0)){
            _lpToken.approve(_strat,uint(-1));
        }
    }
    function Addwhite(uint pid,address _lp,address[] memory users,uint[] memory amount) external onlyOwner{
        require(users.length==amount.length,"length mismatch");
        require(finWL==false && _lp==address(poolInfo[pid].lpToken),"wrong lp");
        for(uint i=0;i<users.length;i++){
            whitelist[pid][users[i]]=amount[i];
        }
    }
    function endWL() external onlyOwner{
        finWL=true;
    }
    function set(uint _pid, uint _allocPoint, uint _ethAlloc, uint16 _depositFeeBP, bool _withUpdate) public onlyOwner {
        require(_depositFeeBP <= 400, "max 4%");
        if (_withUpdate) {
            massUpdatePools();
        }
        PoolInfo storage pool = poolInfo[_pid];
        totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint);
        totalEthAllocPoint=totalEthAllocPoint.sub(pool.ethAlloc).add(_ethAlloc);
        pool.ethAlloc=_ethAlloc;
        pool.allocPoint = _allocPoint;
        pool.depositFeeBP = _depositFeeBP;
    }
    function pendingTokens(uint _pid, address _user) external view returns (uint,uint) {//DUO , ETH
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint accDuoPerShare = pool.accDuoPerShare;
        uint accEthPerShare=pool.accEthPerShare;
        if (block.timestamp > pool.lastRewardTime && pool.totalcap != 0 && totalAllocPoint>0 && totalEthAllocPoint>0) {
            uint multiplier = block.timestamp.sub(pool.lastRewardTime);
            uint duoReward = multiplier.mul(duoPerSec).mul(pool.allocPoint).div(totalAllocPoint);
            uint EthReward= multiplier.mul(ethpool.ethPerSec).mul(pool.ethAlloc).div(totalEthAllocPoint);
            accDuoPerShare = accDuoPerShare.add(duoReward.mul(1e12).div(pool.totalcap));
            accEthPerShare=accEthPerShare.add(EthReward.mul(1e12).div(pool.totalcap));
        }
        return (user.amount.mul(accDuoPerShare).div(1e12).sub(user.rewardDebt),user.amount.mul(accEthPerShare).div(1e12).sub(user.ethDebt));
    }

    function massUpdatePools() public {
        uint length = poolInfo.length;
        for (uint pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint _pid) public {
        //rmb: update strategy too
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardTime) {
            return;
        }
        if (pool.totalcap == 0 || pool.allocPoint == 0) {
            pool.lastRewardTime = block.timestamp;
            return;
        }
        uint multiplier = block.timestamp.sub(pool.lastRewardTime);
        uint duoReward = multiplier.mul(duoPerSec).mul(pool.allocPoint).div(totalAllocPoint);
        uint EthReward= multiplier.mul(ethpool.ethPerSec).mul(pool.ethAlloc).div(totalEthAllocPoint);
        duo.mint(devaddr, duoReward.div(10));
        duo.mint(address(this), duoReward);
        pool.accDuoPerShare = pool.accDuoPerShare.add(duoReward.mul(1e12).div(pool.totalcap));
        pool.accEthPerShare=pool.accEthPerShare.add(EthReward.mul(1e12).div(pool.totalcap));
        pool.lastRewardTime = block.timestamp;
    }

    function deposit(uint _pid, uint _amount) external onlyEOA nonReentrant{
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint pending = user.amount.mul(pool.accDuoPerShare).div(1e12).sub(user.rewardDebt);
            uint pendeth= user.amount.mul(pool.accEthPerShare).div(1e12).sub(user.ethDebt);
            safeDuoTransfer(msg.sender, pending);
            safeEthTransfer(msg.sender,pendeth);
        }
        if(_amount > 0) {
            uint before=pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
            _amount=pool.lpToken.balanceOf(address(this))-before;
            if(pool.depositFeeBP > 0){
                uint depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                if(whitelist[_pid][msg.sender]>=_amount){
                    whitelist[_pid][msg.sender]-=_amount;
                    depositFee=0;
                }else if(whitelist[_pid][msg.sender]==0){
                    pool.lpToken.safeTransfer(feeAddress, depositFee);
                    _amount=_amount.sub(depositFee);
                }else{
                    depositFee-=whitelist[_pid][msg.sender].mul(pool.depositFeeBP).div(10000);
                    whitelist[_pid][msg.sender]=0;
                    pool.lpToken.safeTransfer(feeAddress, depositFee);
                    _amount=_amount.sub(depositFee);
                }
            }
            if (pool.strat!=address(0)) {
                Strat(pool.strat).deposit(pool.stratId,_amount);
            }
            user.amount = user.amount.add(_amount);
            pool.totalcap=pool.totalcap.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accDuoPerShare).div(1e12);
        user.ethDebt=user.amount.mul(pool.accEthPerShare).div(1e12);
        checkroll();
        emit Deposit(msg.sender, _pid, _amount);
    }
    function withdraw(uint _pid, uint _amount) external onlyEOA nonReentrant{
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        if(user.amount>0){
            uint pending = user.amount.mul(pool.accDuoPerShare).div(1e12).sub(user.rewardDebt);
            uint pendeth= user.amount.mul(pool.accEthPerShare).div(1e12).sub(user.ethDebt);
            safeDuoTransfer(msg.sender, pending);
            safeEthTransfer(msg.sender,pendeth);
        }
        if(_amount > 0) {
            if (pool.strat!=address(0)) {
                Strat(pool.strat).withdraw(pool.stratId, _amount);
            }
            user.amount = user.amount.sub(_amount);
            pool.totalcap=pool.totalcap.sub(_amount);
            pool.lpToken.safeTransfer(msg.sender, _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accDuoPerShare).div(1e12);
        user.ethDebt=user.amount.mul(pool.accEthPerShare).div(1e12);
        checkroll();
        emit Withdraw(msg.sender, _pid, _amount);
    }
     // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint _pid) external onlyEOA nonReentrant{
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint amount = user.amount;
        if(amount>0){
            if(pool.strat!=address(0) && !Strat(pool.strat).isRetired(_pid)){//panic=>lp moved back to master
                Strat(pool.strat).withdraw(pool.stratId,amount);
            }
            pool.lpToken.transfer(msg.sender,amount);
            pool.totalcap=pool.totalcap.sub(amount);
            user.amount=0;
            user.rewardDebt=0;
            user.ethDebt=0;
        }
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }
    function addReserve(uint _amount) external {
        if(_amount>0){
            wETH.transferFrom(msg.sender,address(this),_amount);
            ethpool.newreserve+=_amount;
            totPaid+=_amount;
        }
    }
    function checkroll() internal {
        if(ethpool.nextRolltime<block.timestamp){
            //update pool first
            ethpool.nextRolltime=block.timestamp+ethpool.period;
            uint nextreward=ethpool.newreserve*ethpool.rollrate/10000;
            ethpool.ethPerSec=nextreward.div(ethpool.period);
            ethpool.newreserve-=nextreward;
        }
    }
    function safeDuoTransfer(address _to, uint _amount) internal {
        uint duoBal = duo.balanceOf(address(this));
        if(_amount>0 || duoBal>0){
            if (_amount > duoBal) {
                duo.transfer(_to, duoBal);
                duo.mint(_to,_amount.sub(duoBal));
            } else {
                duo.transfer(_to, _amount);
            }
        }
    }
    function safeEthTransfer(address _to, uint _amount) internal {
        uint ethBal = wETH.balanceOf(address(this));
        if(_amount>0 || ethBal>0){
            if (_amount > ethBal) {
                wETH.transfer(_to, ethBal);
            } else {
                wETH.transfer(_to, _amount);
            }
        }
    }

    function dev(address _devaddr) external {
        require(msg.sender == devaddr && _devaddr!=address(0), "dev: wut?");
        devaddr = _devaddr;
    }

    function setFeeAddress(address _feeAddress) external{
        require(msg.sender == feeAddress && _feeAddress!=address(0), "setFeeAddress: FORBIDDEN");
        feeAddress = _feeAddress;
    }
    function setApprovedContract(address _contract, bool _status) external onlyOwner {
        approvedContracts[_contract] = _status;
    }

    function updateEmissionRate(uint _duoPerSec) external onlyOwner {
        require(_duoPerSec<1 ether,"too large");
        massUpdatePools();
        duoPerSec = _duoPerSec;
    }
}

File 2 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/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 3 of 12 : Ichef.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IChef {//for JOE in AVAX
  function deposit(uint256 _pid, uint256 _amount) external;
  function withdraw(uint256 _pid, uint256 _amount) external;
  function pendingTokens(uint256 _pid, address _user) external view returns (uint256,address,string memory,uint256);
  function poolInfo(uint _pid) external view returns(address,uint,uint,uint,address);//lp,alloc,lastrewardtime,accJoeperShare,rewarder
  function joePerSec() external view returns(uint256);
  function totalAllocPoint() external view returns(uint256);
  function rewarderBonusTokenInfo(uint256 _pid) external view returns (address bonusTokenAddress, string memory bonusTokenSymbol);
  function emergencyWithdraw(uint _pid) external;
}
interface Strat{
  function updatePool(uint _pid) external;
  function deposit(uint256 _pid, uint256 _amount) external;
  function withdraw(uint256 _pid, uint256 _amount) external;
  function rewards() external view returns(address[] memory);
  function isRetired(uint _pid) external view returns(bool);
}

File 4 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.4;

interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the token name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @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 5 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/GSN/Context.sol';
import './IERC20.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import "@openzeppelin/contracts/utils/Address.sol";


contract ERC20 is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external override view returns (address) {
        return owner();
    }

    /**
     * @dev Returns the token name.
     */
    function name() public override view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token decimals.
     */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev Returns the token symbol.
     */
    function symbol() public override view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {ERC20-totalSupply}.
     */
    function totalSupply() public override view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {ERC20-balanceOf}.
     */
    function balanceOf(address account) public override view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {ERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {ERC20-allowance}.
     */
    function allowance(address owner, address spender) public override view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {ERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {ERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")
        );
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {ERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {ERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")
        );
        return true;
    }

    /**
     * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
     * the total supply.
     *
     * Requirements
     *
     * - `msg.sender` must be the token owner
     */
    function mint(uint256 amount) public onlyOwner returns (bool) {
        _mint(_msgSender(), amount);
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: mint to the zero address");

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: burn from the zero address");

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(
            account,
            _msgSender(),
            _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")
        );
    }
}

File 6 of 12 : Duo.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;

import "./libs/ERC20.sol";

// Duo with Governance.
contract Duo is ERC20('Duo', 'DUO') {

    constructor(uint _initamt) public {
        _mint(msg.sender, _initamt*1e18);
    }

    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner 
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

    // Copied and modified from YAM code:
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
    // Which is copied and modified from COMPOUND:
    // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol

    mapping (address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

      /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegator The address to get delegatee for
     */
    function delegates(address delegator)
        external
        view
        returns (address)
    {
        return _delegates[delegator];
    }

   /**
    * @notice Delegate votes from `msg.sender` to `delegatee`
    * @param delegatee The address to delegate votes to
    */
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint nonce,
        uint expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
    {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(
                DELEGATION_TYPEHASH,
                delegatee,
                nonce,
                expiry
            )
        );

        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                structHash
            )
        );

        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "DUO::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "DUO::delegateBySig: invalid nonce");
        require(now <= expiry, "DUO::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account)
        external
        view
        returns (uint256)
    {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint blockNumber)
        external
        view
        returns (uint256)
    {
        require(blockNumber < block.number, "DUO::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee)
        internal
    {
        address currentDelegate = _delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator); // balance of underlying DUOs (not scaled);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                // decrease old representative
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                // increase new representative
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    )
        internal
    {
        uint32 blockNumber = safe32(block.number, "DUO::_writeCheckpoint: block number exceeds 32 bits");

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function getChainId() internal pure returns (uint) {
        uint256 chainId;
        assembly { chainId := chainid() }
        return chainId;
    }
}

File 7 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 8 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 12 : 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 10 of 12 : 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 11 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 12 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"contract Duo","name":"_duo","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"uint256","name":"_duoPerSec","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"},{"internalType":"uint256","name":"_startTime","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"_lp","type":"address"},{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"Addwhite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_ethalloc","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"address","name":"_strat","type":"address"},{"internalType":"uint256","name":"_stratId","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"address","name":"_devaddr","type":"address"}],"name":"dev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duo","outputs":[{"internalType":"contract Duo","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duoPerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endWL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ethpool","outputs":[{"internalType":"uint256","name":"newreserve","type":"uint256"},{"internalType":"uint256","name":"nextRolltime","type":"uint256"},{"internalType":"uint256","name":"ethPerSec","type":"uint256"},{"internalType":"uint256","name":"rollrate","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethpoolquery","outputs":[{"components":[{"internalType":"uint256","name":"newreserve","type":"uint256"},{"internalType":"uint256","name":"nextRolltime","type":"uint256"},{"internalType":"uint256","name":"ethPerSec","type":"uint256"},{"internalType":"uint256","name":"rollrate","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"}],"internalType":"struct MasterDuo.Ethpool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finWL","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"ethAlloc","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accDuoPerShare","type":"uint256"},{"internalType":"uint256","name":"accEthPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"totalcap","type":"uint256"},{"internalType":"address","name":"strat","type":"address"},{"internalType":"uint256","name":"stratId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_ethAlloc","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setApprovedContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rollrate","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"}],"name":"setEthpool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalEthAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duoPerSec","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","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"},{"internalType":"uint256","name":"ethDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wETH","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"uint256","name":"","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"}]

6080604052600880546001600160a01b03191673b31f66aa3c1e785363f0875a1b74e27b85fd66c71790553480156200003757600080fd5b5060405162002e8238038062002e828339810160408190526200005a9162000156565b60006200006662000152565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055428111620000c157600080fd5b601455600780546001600160a01b03199081166001600160a01b039788161790915560098054821695871695909517909455600a80549094169290941691909117909155600b556040805160a08101825260008082526020820181905291810182905261138860608201819052608090910183905260028290556003829055600491909155600555600655620001de565b3390565b60008060008060008060c087890312156200016f578182fd5b86516200017c81620001c5565b60208801519096506200018f81620001c5565b6040880151909550620001a281620001c5565b80945050606087015192506080870151915060a087015190509295509295509295565b6001600160a01b0381168114620001db57600080fd5b50565b612c9480620001ee6000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806378e9792511610125578063bb76aecb116100ad578063db307ed51161007c578063db307ed514610420578063e2bbb15814610433578063f242862114610446578063f2fde38b1461044e578063ffcd42631461046157610211565b8063bb76aecb146103ef578063c23ffe6b146103f7578063d49e77cd14610410578063daa0bac71461041857610211565b80638da5cb5b116100f45780638da5cb5b1461039557806393f1a40b146103aa5780639f3e161c146103cc578063ae182a04146103d4578063ba4b0fe5146103dc57610211565b806378e97925146103525780637f7f91841461035a5780638705fcd41461036f5780638d88a90e1461038257610211565b8063441a3e70116101a85780635312ea8e116101775780635312ea8e146103145780635ffd993b14610327578063630b5ba11461033a57806366c6eef414610342578063715018a61461034a57610211565b8063441a3e70146102c85780634b25bfce146102db5780634b8243c9146102ee57806351eb05a61461030157610211565b8063189d7f3c116101e4578063189d7f3c1461027a57806326749ad71461028d5780632a42ecce146102ad57806336dcd960146102c057610211565b8063081e3eda146102165780630ba84cd2146102345780631526fe271461024957806317caf6f114610272575b600080fd5b61021e610482565b60405161022b9190612b68565b60405180910390f35b610247610242366004612471565b610488565b005b61025c610257366004612471565b610504565b60405161022b9a9998979695949392919061270b565b61021e610578565b6102476102883660046125c4565b61057e565b6102a061029b366004612401565b610825565b60405161022b9190612700565b6102476102bb3660046124c5565b61083a565b610247610965565b6102476102d63660046125a3565b6109b3565b61021e6102e93660046124a1565b610c51565b6102476102fc366004612471565b610c6e565b61024761030f366004612471565b610d0f565b610247610322366004612471565b610f14565b61024761033536600461241d565b6111a5565b61024761120f565b6102a0611232565b61024761123b565b61021e6112c4565b6103626112ca565b60405161022b9190612b2e565b61024761037d366004612401565b611307565b610247610390366004612401565b611367565b61039d6113c7565b60405161022b91906126af565b6103bd6103b83660046124a1565b6113d6565b60405161022b93929190612b7f565b61021e611402565b61021e611408565b6102476103ea3660046125a3565b61140e565b61039d611473565b6103ff611482565b60405161022b959493929190612b95565b61039d611494565b61021e6114a3565b61024761042e36600461263e565b6114a9565b6102476104413660046125a3565b6115a5565b61039d611a4d565b61024761045c366004612401565b611a5c565b61047461046f3660046124a1565b611b1c565b60405161022b929190612b71565b600d5490565b610490611cca565b6001600160a01b03166104a16113c7565b6001600160a01b0316146104d05760405162461bcd60e51b81526004016104c79061299b565b60405180910390fd5b670de0b6b3a764000081106104f75760405162461bcd60e51b81526004016104c7906127c3565b6104ff61120f565b600b55565b600d818154811061051157fe5b60009182526020909120600a909102018054600182015460028301546003840154600485015460058601546006870154600788015460088901546009909901546001600160a01b039889169a509698959794969395929461ffff909216939092909116908a565b60125481565b610586611cca565b6001600160a01b03166105976113c7565b6001600160a01b0316146105bd5760405162461bcd60e51b81526004016104c79061299b565b6101908461ffff1611156105e35760405162461bcd60e51b81526004016104c7906127e6565b80156105f1576105f161120f565b6000601454421161060457601454610606565b425b6012549091506106169089611cce565b6012556013546106269088611cce565b601381905550600d604051806101400160405280886001600160a01b031681526020018a815260200189815260200183815260200160008152602001600081526020018761ffff16815260200160008152602001866001600160a01b031681526020018581525090806001815401808255809150506001900390600052602060002090600a020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548161ffff021916908361ffff16021790555060e082015181600701556101008201518160080160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101208201518160090155505060006001600160a01b0316846001600160a01b03161461081b5760405163095ea7b360e01b81526001600160a01b0387169063095ea7b3906107c7908790600019906004016126e7565b602060405180830381600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108199190612455565b505b5050505050505050565b60116020526000908152604090205460ff1681565b610842611cca565b6001600160a01b03166108536113c7565b6001600160a01b0316146108795760405162461bcd60e51b81526004016104c79061299b565b805182511461089a5760405162461bcd60e51b81526004016104c79061279a565b60105460ff161580156108d55750600d84815481106108b557fe5b60009182526020909120600a90910201546001600160a01b038481169116145b6108f15760405162461bcd60e51b81526004016104c7906129d0565b60005b825181101561095e5781818151811061090957fe5b6020026020010151600f6000878152602001908152602001600020600085848151811061093257fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020556001016108f4565b5050505050565b61096d611cca565b6001600160a01b031661097e6113c7565b6001600160a01b0316146109a45760405162461bcd60e51b81526004016104c79061299b565b6010805460ff19166001179055565b323314806109d057503360009081526011602052604090205460ff165b6109ec5760405162461bcd60e51b81526004016104c790612a55565b60026001541415610a0f5760405162461bcd60e51b81526004016104c790612af7565b60026001819055506000600d8381548110610a2657fe5b60009182526020808320868452600e8252604080852033865290925292208054600a9092029092019250831115610a6f5760405162461bcd60e51b81526004016104c790612a29565b610a7884610d0f565b805415610b02576000610ab98260010154610ab364e8d4a51000610aad87600401548760000154611cfc90919063ffffffff16565b90611d36565b90611d68565b90506000610ae98360020154610ab364e8d4a51000610aad88600501548860000154611cfc90919063ffffffff16565b9050610af53383611d90565b610aff3382611faf565b50505b8215610bbd5760088201546001600160a01b031615610b855760088201546009830154604051630441a3e760e41b81526001600160a01b039092169163441a3e7091610b52918790600401612b71565b600060405180830381600087803b158015610b6c57600080fd5b505af1158015610b80573d6000803e3d6000fd5b505050505b8054610b919084611d68565b81556007820154610ba29084611d68565b60078301558154610bbd906001600160a01b0316338561210a565b60048201548154610bd89164e8d4a5100091610aad91611cfc565b600182015560058201548154610bf89164e8d4a5100091610aad91611cfc565b6002820155610c05612160565b83336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56885604051610c3f9190612b68565b60405180910390a35050600180555050565b600f60209081526000928352604080842090915290825290205481565b8015610d0c576008546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610ca8903390309086906004016126c3565b602060405180830381600087803b158015610cc257600080fd5b505af1158015610cd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfa9190612455565b506002805482019055600c8054820190555b50565b6000600d8281548110610d1e57fe5b90600052602060002090600a0201905080600301544211610d3f5750610d0c565b60078101541580610d5257506001810154155b15610d635742600390910155610d0c565b6000610d7c826003015442611d6890919063ffffffff16565b90506000610da9601254610aad8560010154610da3600b5487611cfc90919063ffffffff16565b90611cfc565b90506000610dd2601354610aad8660020154610da3600280015488611cfc90919063ffffffff16565b6007546009549192506001600160a01b03908116916340c10f199116610df985600a611d36565b6040518363ffffffff1660e01b8152600401610e169291906126e7565b600060405180830381600087803b158015610e3057600080fd5b505af1158015610e44573d6000803e3d6000fd5b50506007546040516340c10f1960e01b81526001600160a01b0390911692506340c10f199150610e7a90309086906004016126e7565b600060405180830381600087803b158015610e9457600080fd5b505af1158015610ea8573d6000803e3d6000fd5b5050506007850154610ed39150610ec890610aad8564e8d4a51000611cfc565b600486015490611cce565b60048501556007840154610eff90610ef490610aad8464e8d4a51000611cfc565b600586015490611cce565b60058501555050426003909201919091555050565b32331480610f3157503360009081526011602052604090205460ff165b610f4d5760405162461bcd60e51b81526004016104c790612a55565b60026001541415610f705760405162461bcd60e51b81526004016104c790612af7565b60026001819055506000600d8281548110610f8757fe5b60009182526020808320858452600e8252604080852033865290925292208054600a9092029092019250801561116b5760088301546001600160a01b0316158015906110525750600883015460405163cf6ebee760e01b81526001600160a01b039091169063cf6ebee790611000908790600401612b68565b60206040518083038186803b15801561101857600080fd5b505afa15801561102c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110509190612455565b155b156110c15760088301546009840154604051630441a3e760e41b81526001600160a01b039092169163441a3e709161108e918590600401612b71565b600060405180830381600087803b1580156110a857600080fd5b505af11580156110bc573d6000803e3d6000fd5b505050505b825460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906110f290339085906004016126e7565b602060405180830381600087803b15801561110c57600080fd5b505af1158015611120573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111449190612455565b5060078301546111549082611d68565b600784015560008083556001830181905560028301555b83336001600160a01b03167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059583604051610c3f9190612b68565b6111ad611cca565b6001600160a01b03166111be6113c7565b6001600160a01b0316146111e45760405162461bcd60e51b81526004016104c79061299b565b6001600160a01b03919091166000908152601160205260409020805460ff1916911515919091179055565b600d5460005b8181101561122e5761122681610d0f565b600101611215565b5050565b60105460ff1681565b611243611cca565b6001600160a01b03166112546113c7565b6001600160a01b03161461127a5760405162461bcd60e51b81526004016104c79061299b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60145481565b6112d2612364565b506040805160a08101825260025481526003546020820152600454918101919091526005546060820152600654608082015290565b600a546001600160a01b03163314801561132957506001600160a01b03811615155b6113455760405162461bcd60e51b81526004016104c790612a76565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b03163314801561138957506001600160a01b03811615155b6113a55760405162461bcd60e51b81526004016104c790612937565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b600e60209081526000928352604080842090915290825290208054600182015460029092015490919083565b60135481565b600c5481565b611416611cca565b6001600160a01b03166114276113c7565b6001600160a01b03161461144d5760405162461bcd60e51b81526004016104c79061299b565b612710821115801561145f5750600081115b61146857600080fd5b600591909155600655565b6007546001600160a01b031681565b60025460035460045460055460065485565b6009546001600160a01b031681565b600b5481565b6114b1611cca565b6001600160a01b03166114c26113c7565b6001600160a01b0316146114e85760405162461bcd60e51b81526004016104c79061299b565b6101908261ffff16111561150e5760405162461bcd60e51b81526004016104c7906127e6565b801561151c5761151c61120f565b6000600d868154811061152b57fe5b90600052602060002090600a0201905061155e856115588360010154601254611d6890919063ffffffff16565b90611cce565b601255600281015460135461157891869161155891611d68565b6013556002810193909355506001820192909255600601805461ffff191661ffff90921691909117905550565b323314806115c257503360009081526011602052604090205460ff165b6115de5760405162461bcd60e51b81526004016104c790612a55565b600260015414156116015760405162461bcd60e51b81526004016104c790612af7565b60026001819055506000600d838154811061161857fe5b60009182526020808320868452600e825260408085203386529092529220600a909102909101915061164984610d0f565b8054156116c757600061167e8260010154610ab364e8d4a51000610aad87600401548760000154611cfc90919063ffffffff16565b905060006116ae8360020154610ab364e8d4a51000610aad88600501548860000154611cfc90919063ffffffff16565b90506116ba3383611d90565b6116c43382611faf565b50505b82156119cb5781546040516370a0823160e01b81526000916001600160a01b0316906370a08231906116fd9030906004016126af565b60206040518083038186803b15801561171557600080fd5b505afa158015611729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174d9190612489565b8354909150611767906001600160a01b031633308761219b565b82546040516370a0823160e01b815282916001600160a01b0316906370a08231906117969030906004016126af565b60206040518083038186803b1580156117ae57600080fd5b505afa1580156117c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e69190612489565b6006850154919003945061ffff161561192a5760068301546000906118189061271090610aad90889061ffff16611cfc565b6000878152600f60209081526040808320338452909152902054909150851161186157506000858152600f60209081526040808320338452909152812080548690039055611928565b6000868152600f602090815260408083203384529091529020546118ac57600a54845461189b916001600160a01b0391821691168361210a565b6118a58582611d68565b9450611928565b60068401546000878152600f602090815260408083203384529091529020546118e09161271091610aad9161ffff16611cfc565b6000878152600f60209081526040808320338452909152812055600a548554919092039161191b916001600160a01b0390811691168361210a565b6119258582611d68565b94505b505b60088301546001600160a01b0316156119a75760088301546009840154604051631c57762b60e31b81526001600160a01b039092169163e2bbb15891611974918890600401612b71565b600060405180830381600087803b15801561198e57600080fd5b505af11580156119a2573d6000803e3d6000fd5b505050505b81546119b39085611cce565b825560078301546119c49085611cce565b6007840155505b600482015481546119e69164e8d4a5100091610aad91611cfc565b600182015560058201548154611a069164e8d4a5100091610aad91611cfc565b6002820155611a13612160565b83336001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1585604051610c3f9190612b68565b6008546001600160a01b031681565b611a64611cca565b6001600160a01b0316611a756113c7565b6001600160a01b031614611a9b5760405162461bcd60e51b81526004016104c79061299b565b6001600160a01b038116611ac15760405162461bcd60e51b81526004016104c790612806565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000600d8581548110611b2e57fe5b60009182526020808320888452600e825260408085206001600160a01b038a16865290925292206004600a9092029092019081015460058201546003830154929450909142118015611b835750600784015415155b8015611b9157506000601254115b8015611b9f57506000601354115b15611c6b576000611bbd856003015442611d6890919063ffffffff16565b90506000611be4601254610aad8860010154610da3600b5487611cfc90919063ffffffff16565b90506000611c0d601354610aad8960020154610da3600280015488611cfc90919063ffffffff16565b9050611c39611c328860070154610aad64e8d4a5100086611cfc90919063ffffffff16565b8690611cce565b9450611c65611c5e8860070154610aad64e8d4a5100085611cfc90919063ffffffff16565b8590611cce565b93505050505b611c938360010154610ab364e8d4a51000610aad868860000154611cfc90919063ffffffff16565b611cbb8460020154610ab364e8d4a51000610aad868960000154611cfc90919063ffffffff16565b95509550505050509250929050565b3390565b600082820183811015611cf35760405162461bcd60e51b81526004016104c79061284c565b90505b92915050565b600082611d0b57506000611cf6565b82820282848281611d1857fe5b0414611cf35760405162461bcd60e51b81526004016104c79061295a565b6000808211611d575760405162461bcd60e51b81526004016104c790612900565b818381611d6057fe5b049392505050565b600082821115611d8a5760405162461bcd60e51b81526004016104c790612883565b50900390565b6007546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611dc19030906004016126af565b60206040518083038186803b158015611dd957600080fd5b505afa158015611ded573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e119190612489565b90506000821180611e225750600081115b15611faa5780821115611f245760075460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611e6190869085906004016126e7565b602060405180830381600087803b158015611e7b57600080fd5b505af1158015611e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb39190612455565b506007546001600160a01b03166340c10f1984611ed08585611d68565b6040518363ffffffff1660e01b8152600401611eed9291906126e7565b600060405180830381600087803b158015611f0757600080fd5b505af1158015611f1b573d6000803e3d6000fd5b50505050611faa565b60075460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611f5690869086906004016126e7565b602060405180830381600087803b158015611f7057600080fd5b505af1158015611f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa89190612455565b505b505050565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611fe09030906004016126af565b60206040518083038186803b158015611ff857600080fd5b505afa15801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190612489565b905060008211806120415750600081115b15611faa57808211156120d85760085460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061208090869085906004016126e7565b602060405180830381600087803b15801561209a57600080fd5b505af11580156120ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d29190612455565b50611faa565b60085460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611f5690869086906004016126e7565b611faa8363a9059cbb60e01b84846040516024016121299291906126e7565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526121bc565b600354421115612199576006544281016003556005546002546127109102049061218b908290611d36565b600455600280549190910390555b565b611fa8846323b872dd60e01b858585604051602401612129939291906126c3565b6060612211826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661224b9092919063ffffffff16565b805190915015611faa578080602001905181019061222f9190612455565b611faa5760405162461bcd60e51b81526004016104c790612aad565b606061225a8484600085612264565b90505b9392505050565b6060824710156122865760405162461bcd60e51b81526004016104c7906128ba565b61228f85612325565b6122ab5760405162461bcd60e51b81526004016104c7906129f2565b60006060866001600160a01b031685876040516122c89190612693565b60006040518083038185875af1925050503d8060008114612305576040519150601f19603f3d011682016040523d82523d6000602084013e61230a565b606091505b509150915061231a82828661232b565b979650505050505050565b3b151590565b6060831561233a57508161225d565b82511561234a5782518084602001fd5b8160405162461bcd60e51b81526004016104c79190612767565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b600082601f8301126123a3578081fd5b81356123b66123b182612bdf565b612bb8565b8181529150602080830190848101818402860182018710156123d757600080fd5b60005b848110156123f6578135845292820192908201906001016123da565b505050505092915050565b600060208284031215612412578081fd5b8135611cf381612c2b565b6000806040838503121561242f578081fd5b823561243a81612c2b565b9150602083013561244a81612c40565b809150509250929050565b600060208284031215612466578081fd5b8151611cf381612c40565b600060208284031215612482578081fd5b5035919050565b60006020828403121561249a578081fd5b5051919050565b600080604083850312156124b3578182fd5b82359150602083013561244a81612c2b565b600080600080608085870312156124da578182fd5b843593506020808601356124ed81612c2b565b9350604086013567ffffffffffffffff80821115612509578485fd5b818801915088601f83011261251c578485fd5b813561252a6123b182612bdf565b81815284810190848601868402860187018d1015612546578889fd5b8895505b8386101561257157803561255d81612c2b565b83526001959095019491860191860161254a565b50965050506060880135925080831115612589578384fd5b505061259787828801612393565b91505092959194509250565b600080604083850312156125b5578182fd5b50508035926020909101359150565b600080600080600080600060e0888a0312156125de578283fd5b873596506020880135955060408801356125f781612c2b565b9450606088013561260781612c4e565b9350608088013561261781612c2b565b925060a0880135915060c088013561262e81612c40565b8091505092959891949750929550565b600080600080600060a08688031215612655578081fd5b853594506020860135935060408601359250606086013561267581612c4e565b9150608086013561268581612c40565b809150509295509295909350565b600082516126a5818460208701612bff565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6001600160a01b039a8b168152602081019990995260408901979097526060880195909552608087019390935260a086019190915261ffff1660c085015260e08401529092166101008201526101208101919091526101400190565b6000602082528251806020840152612786816040850160208701612bff565b601f01601f19169190910160400192915050565b6020808252600f908201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b604082015260600190565b602080825260099082015268746f6f206c6172676560b81b604082015260600190565b6020808252600690820152656d617820342560d01b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600990820152686465763a207775743f60b81b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260089082015267077726f6e67206c760c41b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601290820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604082015260600190565b6020808252600790820152666f6e6c79454f4160c81b604082015260600190565b60208082526018908201527f736574466565416464726573733a20464f5242494444454e0000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060a082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b948552602085019390935260408401919091526060830152608082015260a00190565b60405181810167ffffffffffffffff81118282101715612bd757600080fd5b604052919050565b600067ffffffffffffffff821115612bf5578081fd5b5060209081020190565b60005b83811015612c1a578181015183820152602001612c02565b83811115611fa85750506000910152565b6001600160a01b0381168114610d0c57600080fd5b8015158114610d0c57600080fd5b61ffff81168114610d0c57600080fdfea26469706673582212201a6d4b327d78b453724242259273018d1bae43c1ceac66ab303401ba165bbd1e64736f6c634300060c0033000000000000000000000000ed4102f3a1a24bd4ef1f29b90cd8bf00a540c0c200000000000000000000000017b3d9da9bfc6aa9c366640866e6afac12cf3246000000000000000000000000d7be2e5da86f08c7dbf338b1fec84cd7e31ca7d100000000000000000000000000000000000000000000000000470de4df820000000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000000000000000619e5370

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

000000000000000000000000ed4102f3a1a24bd4ef1f29b90cd8bf00a540c0c200000000000000000000000017b3d9da9bfc6aa9c366640866e6afac12cf3246000000000000000000000000d7be2e5da86f08c7dbf338b1fec84cd7e31ca7d100000000000000000000000000000000000000000000000000470de4df820000000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000000000000000619e5370

-----Decoded View---------------
Arg [0] : _duo (address): 0xed4102f3a1a24bd4ef1f29b90cd8bf00a540c0c2
Arg [1] : _devaddr (address): 0x17b3d9da9bfc6aa9c366640866e6afac12cf3246
Arg [2] : _feeAddress (address): 0xd7be2e5da86f08c7dbf338b1fec84cd7e31ca7d1
Arg [3] : _duoPerSec (uint256): 20000000000000000
Arg [4] : _period (uint256): 86400
Arg [5] : _startTime (uint256): 1637766000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000ed4102f3a1a24bd4ef1f29b90cd8bf00a540c0c2
Arg [1] : 00000000000000000000000017b3d9da9bfc6aa9c366640866e6afac12cf3246
Arg [2] : 000000000000000000000000d7be2e5da86f08c7dbf338b1fec84cd7e31ca7d1
Arg [3] : 00000000000000000000000000000000000000000000000000470de4df820000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [5] : 00000000000000000000000000000000000000000000000000000000619e5370


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.