Contract 0x7c3a78c3C2B6B90F6A523ae76cb8C2CbBA691464 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x961e20f3e6940e69b972b71a1d22e9339bc3d1ad403c956342a9a514acf03c2aDeposit221749082021-12-05 19:33:441 hr 27 mins ago0xc4417ee91ec12a94cf8cbe5e8f19e7db84b8df4c IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.02985411
0x0ae822269c5081a4b858bb10a465cb7fa2a439a8216b162da7c75029394ba608Withdraw221732492021-12-05 18:26:232 hrs 35 mins ago0x908656245538dd99f8b1523225042d012ed10499 IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.003307296
0x1ed104a0ea4d1e3b8d8cc86a7cf3c1375733b187458785fd28bf6cb82e6d4ca1Deposit221702372021-12-05 16:32:524 hrs 28 mins ago0x76afd1f84eda8b262cd61996efcce78323be7c2e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.002937088
0x4a3e70d780a6ed3f94609f9d2d8c7166ec0211770f08bd7c2a935532765e8abfDeposit221697692021-12-05 16:10:244 hrs 51 mins ago0x76afd1f84eda8b262cd61996efcce78323be7c2e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.003483904
0xde5d4e01fd1c668bcae1003aa3f5c5a41815ba4ac6dc7c37d946a73c257cadfeExecute Meta Tra...221696652021-12-05 16:06:524 hrs 54 mins ago0x9bc5a62d832fdb6980f1e505079ceea155080e5b IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.01826433
0x5d4d9bc3190c7a9e2499bf1de138f1b76e3aa68f2ad83eb21ceb7bf371076178Deposit221696302021-12-05 16:05:384 hrs 56 mins ago0x6174dc645e6b88c8e825c6346b35083d694a7779 IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.005199936
0xcccd7dbc160554dec89c50783e786ba074c2c30bb4a23ade94209b26275cfe70Deposit221696062021-12-05 16:04:504 hrs 56 mins ago0x76afd1f84eda8b262cd61996efcce78323be7c2e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.00901902
0xf202a62a7eb76fe4e4038eb6564751e900f58b8723e5b91cdeebadc15ba82277Deposit221695582021-12-05 16:01:125 hrs ago0x76afd1f84eda8b262cd61996efcce78323be7c2e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.005199936
0x077d608a5a6577a01d4cb3667a37b454ac1dfb2d89b2b2baffa4aeaede235a4cDeposit221695552021-12-05 16:00:545 hrs ago0x76afd1f84eda8b262cd61996efcce78323be7c2e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.004899136
0xa75a414fe27b6cc1e2b303f08708de94b78ffc93f3edb8c7da5c0a1fb337bdcbDeposit221695522021-12-05 16:00:365 hrs 1 min ago0x76afd1f84eda8b262cd61996efcce78323be7c2e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.005199936
0x377f0f6908281013fcac23b51072dfcabb685f627b29c17528521a7d82f72245Withdraw221694732021-12-05 15:56:465 hrs 4 mins ago0x816ae4dcfa8e7177ebd22e530ffde887069a991a IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.003307296
0xf64b59a5b330c963ecad581161ac1235bf743338c7602fd65eb4a6950bd7758cDeposit221688132021-12-05 15:31:545 hrs 29 mins ago0x047b8bce5f0472f3738f6c27443c7191145a3905 IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.010264177
0x8f691a92f7db10d7f17a1fc59e2e1fd18905255a0279263c77c600f3f2ec8555Execute Meta Tra...221670992021-12-05 14:24:266 hrs 37 mins ago0x16b59db66c4462045dd2f5ce5c717851dfe4538b IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.01780709
0x83f21448456128852efaa4383940b85aaafea4790642c2c577f95bdcd3f682d0Deposit221667962021-12-05 14:12:226 hrs 49 mins ago0x816ae4dcfa8e7177ebd22e530ffde887069a991a IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.005199552
0xba71254cfadb0d3267fac40702e50e9bb6a0ba91a41405d27f824feffc390beaExecute Meta Tra...221662722021-12-05 13:49:407 hrs 12 mins ago0x2b9278992af5b23a2b475d23de607a2334f75d4a IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.002454225
0x78edc6e1610231082742fdc814e7055604d305a4986a5f0cf84e49e1d466c651Execute Meta Tra...221662382021-12-05 13:48:287 hrs 13 mins ago0x2b9278992af5b23a2b475d23de607a2334f75d4a IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.0032711
0xf0fef87d651118de049b3e3fb36217752476be115c5efd75d04e7c2e6603fe34Execute Meta Tra...221662322021-12-05 13:48:167 hrs 13 mins ago0x2b9278992af5b23a2b475d23de607a2334f75d4a IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.002453325
0xfa8ed8d44c8379d8c084c5d68ea53a3ba6c83e2aeac752cbea7d94c9bb1fbeaaExecute Meta Tra...221662062021-12-05 13:47:207 hrs 14 mins ago0x02a0fef8df90a80f02e17d86a52ff91d04f27efb IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.012701601
0x7a70d6bd6a562262898ed42787e478cdd5929da53051e74eaa87559f194f9309Execute Meta Tra...221660762021-12-05 13:40:447 hrs 20 mins ago0x02a0fef8df90a80f02e17d86a52ff91d04f27efb IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.002878568
0x12cf10d60ff46df5e2f1f124a8f0d7ebd9b563c81f991d31c61000d812623964Execute Meta Tra...221660752021-12-05 13:40:427 hrs 21 mins ago0x02a0fef8df90a80f02e17d86a52ff91d04f27efb IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.002453325
0xe91eb10d227269092b1208755480aff2ed083344575f8d271145fb101d795c7bExecute Meta Tra...221660752021-12-05 13:40:427 hrs 21 mins ago0x02a0fef8df90a80f02e17d86a52ff91d04f27efb IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.0016519055
0x0c86ad8e49f79d8377c3e4c4d9dfdc1c4f88feb398ebab50ac246f32a8520494Execute Meta Tra...221660752021-12-05 13:40:427 hrs 21 mins ago0x02a0fef8df90a80f02e17d86a52ff91d04f27efb IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.0087014025
0x44b3ce2bb475d85d90ca90cd37268665ee1e14b9d2b4e2a1130af4f043180034Execute Meta Tra...221659462021-12-05 13:36:167 hrs 25 mins ago0x30e4ea94ab9c106a7d8158934e2588cde29de0d3 IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.02273004
0x8b0690dba89d7d18df5dc5040b74e40dd3e5e8a0ed95c082bb7bdc3fa48f1b3eExecute Meta Tra...221649152021-12-05 12:58:188 hrs 3 mins ago0xe94b53fc14cf61102c055519325866d3b9a53fb7 IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.021259485
0x03e394994c0792ba61d3b3c5fdb57a57871a07b5414ec3c89116b4e88f48d650Execute Meta Tra...221648842021-12-05 12:56:148 hrs 5 mins ago0x601f97196391764ea16d882f78949843b752006e IN  0x7c3a78c3c2b6b90f6a523ae76cb8c2cbba6914640 MATIC0.019699368
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Farm

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : Farm.sol
pragma solidity ^0.7.0;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./libraries/NativeMetaTransaction.sol";
import "./libraries/ContextMixin.sol";
import "./polydex/interfaces/IPolydexPair.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface IRewardManager {
    function handleRewardsForUser(
        address user,
        uint256 rewardAmount,
        uint256 timestamp,
        uint256 pid,
        uint256 rewardDebt
    ) external;
}

// Farm is the major distributor of CNT to the community. He gives juicy CNT rewards as per user's stake.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CNT is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract Farm is Ownable, ContextMixin, NativeMetaTransaction, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        uint256 rewardLockedUp; // Reward locked up.
        uint256 nextHarvestUntil; // When can the user harvest again.
        //
        // We do some fancy math here. Basically, any point in time, the amount of CNTs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accCNTPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accCNTPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. CNTs to distribute per block.
        uint256 lastRewardBlock; // Last block number that CNTs distribution occurs.
        uint256 accCNTPerShare; // Accumulated CNTs per share, times 1e12. See below.
        uint16 withdrawalFeeBP; // Deposit fee in basis points
        uint256 harvestInterval; // Harvest interval in seconds
    }

    // The CNT TOKEN!
    IERC20 public cnt;
    // Block number when bonus CNT period ends.
    uint256 public bonusEndBlock;
    // CNT tokens created per block.
    uint256 public cntPerBlock;
    // Deposit Fee address
    address public feeAddress;
    // Max harvest interval: 14 days.
    uint256 public constant MAXIMUM_HARVEST_INTERVAL = 14 days;
    // Max deposit fee: 10%.
    uint16 public constant MAXIMUM_WITHDRAWAL_FEE_BP = 1000;
    // Total locked up rewards
    uint256 public totalLockedUpRewards;
    // Bonus muliplier for early cnt makers.
    uint256 public BONUS_MULTIPLIER = 1;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    mapping(address => mapping(address => bool)) public whiteListedHandlers;

    mapping(address => bool) public activeLpTokens;

    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when CNT mining starts.
    uint256 public startBlock;

    //Trigger for RewardManager mode
    bool public isRewardManagerEnabled;

    address public rewardManager;

    event PoolAddition(
        uint256 indexed pid,
        uint256 allocPoint,
        IERC20 indexed lpToken,
        uint16 withdrawalFeeBP,
        uint256 harvestInterval
    );
    event UpdatedPoolAlloc(
        uint256 indexed pid,
        uint256 allocPoint,
        uint16 withdrawalFeeBP,
        uint256 harvestInterval
    );
    event PoolUpdated(
        uint256 indexed pid,
        uint256 lastRewardBlock,
        uint256 lpSupply,
        uint256 accCNTPerShare
    );
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );
    event SetFeeAddress(address indexed user, address indexed _devAddress);
    event RewardLockedUp(
        address indexed user,
        uint256 indexed pid,
        uint256 amountLockedUp
    );
    event BonusMultiplierUpdated(uint256 _bonusMultiplier);
    event BlockRateUpdated(uint256 _blockRate);
    event UserWhitelisted(address _primaryUser, address _whitelistedUser);
    event UserBlacklisted(address _primaryUser, address _blacklistedUser);

    constructor(
        IERC20 _cnt,
        uint256 _cntPerBlock,
        address _feeAddress,
        uint256 _startBlock,
        uint256 _bonusEndBlock
    ) {
        _initializeEIP712("Farm");
        cnt = _cnt;
        cntPerBlock = _cntPerBlock;
        feeAddress = _feeAddress;
        startBlock = _startBlock;
        bonusEndBlock = _bonusEndBlock;
        isRewardManagerEnabled = false;
        rewardManager = address(0);
    }

    modifier validatePoolByPid(uint256 _pid) {
        require(_pid < poolInfo.length, "Pool does not exist");
        _;
    }

    function _msgSender()
        internal
        view
        override
        returns (address payable sender)
    {
        return ContextMixin.msgSender();
    }

    function updateBonusMultiplier(uint256 multiplierNumber)
        external
        onlyOwner
    {
        massUpdatePools();
        BONUS_MULTIPLIER = multiplierNumber;
        emit BonusMultiplierUpdated(BONUS_MULTIPLIER);
    }

    function updateBlockRate(uint256 _cntPerBlock) external onlyOwner {
        massUpdatePools();
        cntPerBlock = _cntPerBlock;
        emit BlockRateUpdated(cntPerBlock);
    }

    function updateRewardManagerMode(bool _isRewardManagerEnabled)
        external
        onlyOwner
    {
        massUpdatePools();
        isRewardManagerEnabled = _isRewardManagerEnabled;
    }

    function updateRewardManager(address _rewardManager) external onlyOwner {
        require(_rewardManager != address(0), "Reward Manager address is zero");
        massUpdatePools();
        rewardManager = _rewardManager;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(
        uint256 _allocPoint,
        IERC20 _lpToken,
        uint16 _withdrawalFeeBP,
        uint256 _harvestInterval,
        bool _withUpdate
    ) external onlyOwner nonReentrant {
        require(
            _withdrawalFeeBP <= MAXIMUM_WITHDRAWAL_FEE_BP,
            "add: invalid deposit fee basis points"
        );
        require(
            _harvestInterval <= MAXIMUM_HARVEST_INTERVAL,
            "add: invalid harvest interval"
        );
        require(
            activeLpTokens[address(_lpToken)] == false,
            "Reward Token already added"
        );

        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock
            ? block.number
            : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accCNTPerShare: 0,
                withdrawalFeeBP: _withdrawalFeeBP,
                harvestInterval: _harvestInterval
            })
        );

        activeLpTokens[address(_lpToken)] = true;

        emit PoolAddition(
            poolInfo.length.sub(1),
            _allocPoint,
            _lpToken,
            _withdrawalFeeBP,
            _harvestInterval
        );
    }

    // Update the given pool's CNT allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        uint16 _withdrawalFeeBP,
        uint256 _harvestInterval,
        bool _withUpdate
    ) external onlyOwner validatePoolByPid(_pid) nonReentrant {
        require(
            _withdrawalFeeBP <= MAXIMUM_WITHDRAWAL_FEE_BP,
            "set: invalid deposit fee basis points"
        );
        require(
            _harvestInterval <= MAXIMUM_HARVEST_INTERVAL,
            "add: invalid harvest interval"
        );
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].withdrawalFeeBP = _withdrawalFeeBP;
        poolInfo[_pid].harvestInterval = _harvestInterval;

        emit UpdatedPoolAlloc(
            _pid,
            _allocPoint,
            _withdrawalFeeBP,
            _harvestInterval
        );
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)
        public
        view
        returns (uint256)
    {
        return _to.sub(_from).mul(BONUS_MULTIPLIER);
    }

    // View function to see pending CNTs on frontend.
    function pendingCNT(uint256 _pid, address _user)
        external
        view
        validatePoolByPid(_pid)
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accCNTPerShare = pool.accCNTPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(
                pool.lastRewardBlock,
                block.number
            );
            uint256 cntReward = multiplier
            .mul(cntPerBlock)
            .mul(pool.allocPoint)
            .div(totalAllocPoint);
            accCNTPerShare = accCNTPerShare.add(
                cntReward.mul(1e12).div(lpSupply)
            );
        }
        uint256 pending = user.amount.mul(accCNTPerShare).div(1e12).sub(
            user.rewardDebt
        );
        return pending.add(user.rewardLockedUp);
    }

    // View function to see if user can harvest cnt's.
    function canHarvest(uint256 _pid, address _user)
        public
        view
        validatePoolByPid(_pid)
        returns (bool)
    {
        UserInfo memory user = userInfo[_pid][_user];
        return block.timestamp >= user.nextHarvestUntil;
    }

    // View function to see if user harvest until time.
    function getHarvestUntil(uint256 _pid, address _user)
        external
        view
        validatePoolByPid(_pid)
        returns (uint256)
    {
        UserInfo memory user = userInfo[_pid][_user];
        return user.nextHarvestUntil;
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 cntReward = multiplier
        .mul(cntPerBlock)
        .mul(pool.allocPoint)
        .div(totalAllocPoint);
        pool.accCNTPerShare = pool.accCNTPerShare.add(
            cntReward.mul(1e12).div(lpSupply)
        );
        pool.lastRewardBlock = block.number;
        emit PoolUpdated(
            _pid,
            pool.lastRewardBlock,
            lpSupply,
            pool.accCNTPerShare
        );
    }

    function depositWithPermit(
        uint256 _pid,
        uint256 _amount,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) public {
        PoolInfo storage pool = poolInfo[_pid];
        uint256 value = uint256(-1);
        IPolydexPair(address(pool.lpToken)).permit(
            _msgSender(),
            address(this),
            value,
            _deadline,
            _v,
            _r,
            _s
        );
        _deposit(_pid, _amount, _msgSender());
    }

    function depositForWithPermit(
        uint256 _pid,
        uint256 _amount,
        address _user,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) public {
        PoolInfo storage pool = poolInfo[_pid];
        uint256 value = uint256(-1);
        IPolydexPair(address(pool.lpToken)).permit(
            _msgSender(),
            address(this),
            value,
            _deadline,
            _v,
            _r,
            _s
        );
        _deposit(_pid, _amount, _user);
    }

    // Deposit LP tokens to Farm for CNT allocation.
    function deposit(uint256 _pid, uint256 _amount)
        external
        validatePoolByPid(_pid)
        nonReentrant
    {
        _deposit(_pid, _amount, _msgSender());
    }

    // Deposit LP tokens to Farm for CNT allocation.
    function depositFor(
        uint256 _pid,
        uint256 _amount,
        address _user
    ) external validatePoolByPid(_pid) nonReentrant {
        _deposit(_pid, _amount, _user);
    }

    function _deposit(
        uint256 _pid,
        uint256 _amount,
        address _user
    ) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];

        whiteListedHandlers[_user][_user] = true;

        updatePool(_pid);
        payOrLockupPendingcnt(_pid, _user, _user);

        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(
                address(_msgSender()),
                address(this),
                _amount
            );
            user.amount = user.amount.add(_amount);
            user.nextHarvestUntil = block.timestamp.add(pool.harvestInterval);
        }
        user.rewardDebt = user.amount.mul(pool.accCNTPerShare).div(1e12);
        emit Deposit(_user, _pid, _amount);
    }

    // Withdraw LP tokens from Farm.
    function withdraw(uint256 _pid, uint256 _amount)
        external
        validatePoolByPid(_pid)
        nonReentrant
    {
        _withdraw(_pid, _amount, _msgSender(), _msgSender());
    }

    // Withdraw LP tokens from Farm.
    function withdrawFor(
        uint256 _pid,
        uint256 _amount,
        address _user
    ) external validatePoolByPid(_pid) nonReentrant {
        require(whiteListedHandlers[_user][_msgSender()], "not whitelisted");
        _withdraw(_pid, _amount, _user, _msgSender());
    }

    function _withdraw(
        uint256 _pid,
        uint256 _amount,
        address _user,
        address _withdrawer
    ) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];

        require(user.amount >= _amount, "withdraw: not good");

        updatePool(_pid);
        payOrLockupPendingcnt(_pid, _user, _withdrawer);

        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            if (pool.withdrawalFeeBP > 0) {
                uint256 withdrawalFee = _amount.mul(pool.withdrawalFeeBP).div(
                    10000
                );
                pool.lpToken.safeTransfer(feeAddress, withdrawalFee);
                pool.lpToken.safeTransfer(
                    address(_withdrawer),
                    _amount.sub(withdrawalFee)
                );
            } else {
                pool.lpToken.safeTransfer(address(_withdrawer), _amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accCNTPerShare).div(1e12);
        emit Withdraw(_user, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid)
        external
        validatePoolByPid(_pid)
        nonReentrant
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_msgSender()];
        pool.lpToken.safeTransfer(address(_msgSender()), user.amount);
        emit EmergencyWithdraw(_msgSender(), _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
        user.rewardLockedUp = 0;
        user.nextHarvestUntil = 0;
    }

    function addUserToWhiteList(address _user) external {
        whiteListedHandlers[_msgSender()][_user] = true;
        emit UserWhitelisted(_msgSender(), _user);
    }

    function removeUserFromWhiteList(address _user) external {
        whiteListedHandlers[_msgSender()][_user] = false;
        emit UserBlacklisted(_msgSender(), _user);
    }

    function isUserWhiteListed(address _owner, address _user)
        external
        view
        returns (bool)
    {
        return whiteListedHandlers[_owner][_user];
    }

    // Pay or lockup pending cnt.
    function payOrLockupPendingcnt(
        uint256 _pid,
        address _user,
        address _withdrawer
    ) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];

        if (user.nextHarvestUntil == 0) {
            user.nextHarvestUntil = block.timestamp.add(pool.harvestInterval);
        }

        uint256 pending = user.amount.mul(pool.accCNTPerShare).div(1e12).sub(
            user.rewardDebt
        );
        if (canHarvest(_pid, _user)) {
            if (pending > 0 || user.rewardLockedUp > 0) {
                uint256 totalRewards = pending.add(user.rewardLockedUp);

                // reset lockup
                totalLockedUpRewards = totalLockedUpRewards.sub(
                    user.rewardLockedUp
                );
                user.rewardLockedUp = 0;
                user.nextHarvestUntil = block.timestamp.add(
                    pool.harvestInterval
                );

                // send rewards
                if (isRewardManagerEnabled == true) {
                    safeCNTTransfer(rewardManager, totalRewards);
                    IRewardManager(rewardManager).handleRewardsForUser(
                        _withdrawer,
                        totalRewards,
                        block.timestamp,
                        _pid,
                        user.rewardDebt
                    );
                } else {
                    safeCNTTransfer(_withdrawer, totalRewards);
                }
            }
        } else if (pending > 0) {
            user.rewardLockedUp = user.rewardLockedUp.add(pending);
            totalLockedUpRewards = totalLockedUpRewards.add(pending);
            emit RewardLockedUp(_user, _pid, pending);
        }
    }

    // Update fee address by the previous fee address.
    function setFeeAddress(address _feeAddress) external onlyOwner {
        require(_feeAddress != address(0), "setFeeAddress: invalid address");
        feeAddress = _feeAddress;
        emit SetFeeAddress(_msgSender(), _feeAddress);
    }

    function withdrawCNT(uint256 _amount) external onlyOwner {
        cnt.transfer(msg.sender, _amount);
    }

    // Safe cnt transfer function, just in case if rounding error causes pool to not have enough CNTs.
    function safeCNTTransfer(address _to, uint256 _amount) internal {
        uint256 cntBal = cnt.balanceOf(address(this));
        if (_amount > cntBal) {
            cnt.transfer(_to, cntBal);
        } else {
            cnt.transfer(_to, _amount);
        }
    }
}

File 2 of 13 : 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 3 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 13 : NativeMetaTransaction.sol
pragma solidity >= 0.6.6;

import './EIP712Base.sol';
import "@openzeppelin/contracts/math/SafeMath.sol";

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint;
    bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
        bytes(
            "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
        )
    );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            msg.sender,
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }

}

File 5 of 13 : ContextMixin.sol
pragma solidity >= 0.6.6;

abstract contract ContextMixin {
    function msgSender() internal view returns (address payable sender) {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = msg.sender;
        }
        return sender;
    }
}

File 6 of 13 : IPolydexPair.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

interface IPolydexPair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 7 of 13 : 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 13 : 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 9 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 13 : 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 13 : EIP712Base.sol
pragma solidity >= 0.6.6;

import './Initializable.sol';

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        uint256 chainId;
    }

    string constant public ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
        bytes(
            "EIP712Domain(string name,string version,address verifyingContract,uint256 chainId)"
        )
    );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contractsa that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(
        string memory name
    )
        internal
        initializer
    {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                getChainId()
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public pure returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}

File 12 of 13 : Initializable.sol
pragma solidity >= 0.6.6;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

File 13 of 13 : 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_cnt","type":"address"},{"internalType":"uint256","name":"_cntPerBlock","type":"uint256"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_blockRate","type":"uint256"}],"name":"BlockRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_bonusMultiplier","type":"uint256"}],"name":"BonusMultiplierUpdated","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":"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":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint16","name":"withdrawalFeeBP","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"harvestInterval","type":"uint256"}],"name":"PoolAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accCNTPerShare","type":"uint256"}],"name":"PoolUpdated","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":"amountLockedUp","type":"uint256"}],"name":"RewardLockedUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"_devAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"withdrawalFeeBP","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"harvestInterval","type":"uint256"}],"name":"UpdatedPoolAlloc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_primaryUser","type":"address"},{"indexed":false,"internalType":"address","name":"_blacklistedUser","type":"address"}],"name":"UserBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_primaryUser","type":"address"},{"indexed":false,"internalType":"address","name":"_whitelistedUser","type":"address"}],"name":"UserWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_HARVEST_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_WITHDRAWAL_FEE_BP","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"activeLpTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_withdrawalFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"addUserToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"canHarvest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cnt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cntPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"depositForWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"getHarvestUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRewardManagerEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"isUserWhiteListed","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":"pendingCNT","outputs":[{"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":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accCNTPerShare","type":"uint256"},{"internalType":"uint16","name":"withdrawalFeeBP","type":"uint16"},{"internalType":"uint256","name":"harvestInterval","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"removeUserFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_withdrawalFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","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":"totalLockedUpRewards","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":"_cntPerBlock","type":"uint256"}],"name":"updateBlockRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"multiplierNumber","type":"uint256"}],"name":"updateBonusMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardManager","type":"address"}],"name":"updateRewardManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isRewardManagerEnabled","type":"bool"}],"name":"updateRewardManagerMode","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":"rewardLockedUp","type":"uint256"},{"internalType":"uint256","name":"nextHarvestUntil","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"whiteListedHandlers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawCNT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"withdrawFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805460ff60a01b191681556001600955600e553480156200002657600080fd5b5060405162003d6738038062003d67833981810160405260a08110156200004c57600080fd5b508051602082015160408301516060840151608090940151929391929091906000620000776200013f565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060016003556040805180820190915260048152634661726d60e01b6020820152620000ec906200015c565b600480546001600160a01b03199081166001600160a01b0397881617909155600694909455600780549094169290941691909117909155600f55600555601080546001600160a81b0319169055620002f2565b600062000156620001ce60201b62002a631760201c565b90505b90565b600054600160a01b900460ff1615620001ad576040805162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015290519081900360640190fd5b620001b8816200022c565b506000805460ff60a01b1916600160a01b179055565b6000333014156200022757600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620001599050565b503390565b60405180608001604052806052815260200162003d156052913980516020918201208251838301206040805180820190915260018152603160f81b930192909252907fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6306200029a620002ee565b60405160200180868152602001858152602001848152602001836001600160a01b03168152602001828152602001955050505050506040516020818303038152906040528051906020012060018190555050565b4690565b613a1380620003026000396000f3fe6080604052600436106102ad5760003560e01c806351eb05a6116101755780638da5cb5b116100dc578063d0d4a74111610095578063de73149d1161006f578063de73149d14610be2578063e2bbb15814610bf7578063f2fde38b14610c27578063f4f63c6914610c5a576102ad565b8063d0d4a74114610b57578063d6d838ad14610b92578063db252d9a14610ba7576102ad565b80638da5cb5b146109f95780638dbb1e3a14610a0e57806390210d7e14610a3e57806393f1a40b14610a7d578063af018de814610adc578063b5e69b1714610b2d576102ad565b80636ec5ab121161012e5780636ec5ab1214610904578063715018a61461093d57806375819a1e1461095257806377073e081461097e5780638705fcd4146109b15780638aa28550146109e4576102ad565b806351eb05a6146107e25780635312ea8e1461080c578063630b5ba1146108365780636498d1cd1461084b57806366c604fb14610877578063677e2af0146108d1576102ad565b80631b5f27c51161021957806341275358116101d257806341275358146106f5578063441a3e701461070a578063474fa6301461073a57806348cd4cb11461074f5780634f3bd0b914610764578063515bc32314610797576102ad565b80631b5f27c5146105ee57806320379ee5146106175780632143e5451461062c5780632d0335ab146106745780632e6c998d146106a75780633408e470146106e0576102ad565b80630f7e59701161026b5780630f7e5970146104e157806312cd090c146104f65780631526fe271461052f578063162efab81461059a57806317caf6f1146105c45780631aed6553146105d9576102ad565b8062110a41146102b2578063050eb2eb146102de578063081e3eda146103115780630c53c51c146103385780630ec9c06f146104715780630f4ef8a6146104b0575b600080fd5b3480156102be57600080fd5b506102dc600480360360208110156102d557600080fd5b5035610c6f565b005b3480156102ea57600080fd5b506102dc6004803603602081101561030157600080fd5b50356001600160a01b0316610d14565b34801561031d57600080fd5b50610326610e01565b60408051918252519081900360200190f35b6103fc600480360360a081101561034e57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561037957600080fd5b82018360208201111561038b57600080fd5b803590602001918460018302840111640100000000831117156103ad57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610e08565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561043657818101518382015260200161041e565b50505050905090810190601f1680156104635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561047d57600080fd5b506102dc6004803603606081101561049457600080fd5b50803590602081013590604001356001600160a01b031661110a565b3480156104bc57600080fd5b506104c561123a565b604080516001600160a01b039092168252519081900360200190f35b3480156104ed57600080fd5b506103fc61124e565b34801561050257600080fd5b506103266004803603604081101561051957600080fd5b50803590602001356001600160a01b031661126b565b34801561053b57600080fd5b506105596004803603602081101561055257600080fd5b5035611440565b604080516001600160a01b039097168752602087019590955285850193909352606085019190915261ffff16608084015260a0830152519081900360c00190f35b3480156105a657600080fd5b506102dc600480360360208110156105bd57600080fd5b5035611497565b3480156105d057600080fd5b5061032661157d565b3480156105e557600080fd5b50610326611583565b3480156105fa57600080fd5b50610603611589565b604080519115158252519081900360200190f35b34801561062357600080fd5b50610326611592565b34801561063857600080fd5b506102dc600480360360a081101561064f57600080fd5b5080359060208101359061ffff60408201351690606081013590608001351515611598565b34801561068057600080fd5b506103266004803603602081101561069757600080fd5b50356001600160a01b0316611851565b3480156106b357600080fd5b50610603600480360360408110156106ca57600080fd5b50803590602001356001600160a01b031661186c565b3480156106ec57600080fd5b50610326611913565b34801561070157600080fd5b506104c5611917565b34801561071657600080fd5b506102dc6004803603604081101561072d57600080fd5b5080359060200135611926565b34801561074657600080fd5b506103266119d6565b34801561075b57600080fd5b506103266119dc565b34801561077057600080fd5b506102dc6004803603602081101561078757600080fd5b50356001600160a01b03166119e2565b3480156107a357600080fd5b506102dc600480360360c08110156107ba57600080fd5b5080359060208101359060408101359060ff6060820135169060808101359060a00135611a76565b3480156107ee57600080fd5b506102dc6004803603602081101561080557600080fd5b5035611b59565b34801561081857600080fd5b506102dc6004803603602081101561082f57600080fd5b5035611d0f565b34801561084257600080fd5b506102dc611e88565b34801561085757600080fd5b506102dc6004803603602081101561086e57600080fd5b50351515611ea7565b34801561088357600080fd5b506102dc600480360360e081101561089a57600080fd5b508035906020810135906001600160a01b036040820135169060608101359060ff6080820135169060a08101359060c00135611f24565b3480156108dd57600080fd5b50610603600480360360208110156108f457600080fd5b50356001600160a01b0316612001565b34801561091057600080fd5b506103266004803603604081101561092757600080fd5b50803590602001356001600160a01b0316612016565b34801561094957600080fd5b506102dc6120ba565b34801561095e57600080fd5b50610967612166565b6040805161ffff9092168252519081900360200190f35b34801561098a57600080fd5b506102dc600480360360208110156109a157600080fd5b50356001600160a01b031661216c565b3480156109bd57600080fd5b506102dc600480360360208110156109d457600080fd5b50356001600160a01b03166121db565b3480156109f057600080fd5b506103266122f6565b348015610a0557600080fd5b506104c56122fc565b348015610a1a57600080fd5b5061032660048036036040811015610a3157600080fd5b508035906020013561230b565b348015610a4a57600080fd5b506102dc60048036036060811015610a6157600080fd5b50803590602081013590604001356001600160a01b0316612328565b348015610a8957600080fd5b50610ab660048036036040811015610aa057600080fd5b50803590602001356001600160a01b03166123c4565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610ae857600080fd5b506102dc600480360360a0811015610aff57600080fd5b508035906001600160a01b036020820135169061ffff604082013516906060810135906080013515156123f6565b348015610b3957600080fd5b506102dc60048036036020811015610b5057600080fd5b50356127b4565b348015610b6357600080fd5b5061060360048036036040811015610b7a57600080fd5b506001600160a01b0381358116916020013516612859565b348015610b9e57600080fd5b506104c5612887565b348015610bb357600080fd5b5061060360048036036040811015610bca57600080fd5b506001600160a01b0381358116916020013516612896565b348015610bee57600080fd5b506103266128b6565b348015610c0357600080fd5b506102dc60048036036040811015610c1a57600080fd5b50803590602001356128bd565b348015610c3357600080fd5b506102dc60048036036020811015610c4a57600080fd5b50356001600160a01b031661295b565b348015610c6657600080fd5b50610326612a5d565b610c77612abf565b6001600160a01b0316610c886122fc565b6001600160a01b031614610cd1576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b610cd9611e88565b60068190556040805182815290517feb2ccea799a774a5f19b5377418ee355fe1e175794e1050fb8f06ef6b34dbaf09181900360200190a150565b610d1c612abf565b6001600160a01b0316610d2d6122fc565b6001600160a01b031614610d76576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b6001600160a01b038116610dd1576040805162461bcd60e51b815260206004820152601e60248201527f526577617264204d616e616765722061646472657373206973207a65726f0000604482015290519081900360640190fd5b610dd9611e88565b601080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600a545b90565b60408051606081810183526001600160a01b03881660008181526002602090815290859020548452830152918101869052610e468782878787612ace565b610e815760405162461bcd60e51b81526004018080602001828103825260218152602001806139736021913960400191505060405180910390fd5b6001600160a01b038716600090815260026020526040902054610ea5906001612ba8565b60026000896001600160a01b03166001600160a01b03168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87338860405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610f4d578181015183820152602001610f35565b50505050905090810190601f168015610f7a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600080306001600160a01b0316888a6040516020018083805190602001908083835b60208310610fca5780518252601f199092019160209182019101610fab565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106110405780518252601f199092019160209182019101611021565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146110a2576040519150601f19603f3d011682016040523d82523d6000602084013e6110a7565b606091505b5091509150816110fe576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b600a5483908110611150576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b60026003541415611196576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b60026003556001600160a01b0382166000908152600c60205260408120906111bc612abf565b6001600160a01b0316815260208101919091526040016000205460ff1661121c576040805162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61122f84848461122a612abf565b612c02565b505060016003555050565b60105461010090046001600160a01b031681565b604051806040016040528060018152602001603160f81b81525081565b600a54600090839081106112b4576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b6000600a85815481106112c357fe5b60009182526020808320888452600b825260408085206001600160a01b038a811687529084528186206006959095029092016003810154815483516370a0823160e01b815230600482015293519298509596909590949316926370a082319260248082019391829003018186803b15801561133d57600080fd5b505afa158015611351573d6000803e3d6000fd5b505050506040513d602081101561136757600080fd5b505160028501549091504311801561137e57508015155b156113ea57600061139385600201544361230b565b905060006113c6600e546113c088600101546113ba60065487612da590919063ffffffff16565b90612da5565b90612dfe565b90506113e56113de846113c08464e8d4a51000612da5565b8590612ba8565b935050505b600061141a846001015461141464e8d4a510006113c0878960000154612da590919063ffffffff16565b90612e65565b9050611433846002015482612ba890919063ffffffff16565b9998505050505050505050565b600a818154811061145057600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909261ffff9091169086565b61149f612abf565b6001600160a01b03166114b06122fc565b6001600160a01b0316146114f9576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b600480546040805163a9059cbb60e01b8152339381019390935260248301849052516001600160a01b039091169163a9059cbb9160448083019260209291908290030181600087803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b505050565b600e5481565b60055481565b60105460ff1681565b60015490565b6115a0612abf565b6001600160a01b03166115b16122fc565b6001600160a01b0316146115fa576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b600a5485908110611640576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b60026003541415611686576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b60026003556103e861ffff851611156116d05760405162461bcd60e51b815260040180806020018281038252602581526020018061392e6025913960400191505060405180910390fd5b62127500831115611728576040805162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c000000604482015290519081900360640190fd5b811561173657611736611e88565b6117738561176d600a898154811061174a57fe5b906000526020600020906006020160010154600e54612e6590919063ffffffff16565b90612ba8565b600e8190555084600a878154811061178757fe5b90600052602060002090600602016001018190555083600a87815481106117aa57fe5b906000526020600020906006020160040160006101000a81548161ffff021916908361ffff16021790555082600a87815481106117e357fe5b906000526020600020906006020160050181905550857f0fbabe687f39d4b1c7528d4c9669c87734a8617dbf7ce248085b50a9284a743a868686604051808481526020018361ffff168152602001828152602001935050505060405180910390a25050600160035550505050565b6001600160a01b031660009081526002602052604090205490565b600a54600090839081106118b5576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b50506000918252600b602090815260408084206001600160a01b039390931684529181529181902081516080810183528154815260018201549381019390935260028101549183019190915260030154606090910181905242101590565b4690565b6007546001600160a01b031681565b600a548290811061196c576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b600260035414156119b2576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b60026003556119cc83836119c4612abf565b61122a612abf565b5050600160035550565b60085481565b600f5481565b6000600c60006119f0612abf565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790557fb238e099a93706e73d75fdb8fb35f9a0a146e80ead15480e50fbc9db1736aa04611a51612abf565b604080516001600160a01b03928316815291841660208301528051918290030190a150565b6000600a8781548110611a8557fe5b600091825260209091206006909102018054909150600019906001600160a01b031663d505accf611ab4612abf565b604080516001600160e01b031960e085901b1681526001600160a01b03909216600483015230602483015260448201859052606482018a905260ff8916608483015260a4820188905260c482018790525160e480830192600092919082900301818387803b158015611b2557600080fd5b505af1158015611b39573d6000803e3d6000fd5b50505050611b4f8888611b4a612abf565b612ec2565b5050505050505050565b600a5481908110611b9f576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b6000600a8381548110611bae57fe5b9060005260206000209060060201905080600201544311611bcf5750611d0b565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611c1957600080fd5b505afa158015611c2d573d6000803e3d6000fd5b505050506040513d6020811015611c4357600080fd5b5051905080611c59575043600290910155611d0b565b6000611c6983600201544361230b565b90506000611c90600e546113c086600101546113ba60065487612da590919063ffffffff16565b9050611cb3611ca8846113c08464e8d4a51000612da5565b600386015490612ba8565b600385018190554360028601819055604080519182526020820186905281810192909252905187917fb0a2ded49817748754bcca0474b24011f01d4574dd5c40e14197ffa2e6540fef919081900360600190a2505050505b5050565b600a5481908110611d55576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b60026003541415611d9b576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b60026003819055506000600a8381548110611db257fe5b60009182526020808320868452600b90915260408320600690920201925081611dd9612abf565b6001600160a01b03166001600160a01b031681526020019081526020016000209050611e1a611e06612abf565b825484546001600160a01b03169190612fdd565b83611e23612abf565b825460408051918252516001600160a01b0392909216917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001808301829055600283018290556003928301919091559055505050565b600a5460005b81811015611d0b57611e9f81611b59565b600101611e8e565b611eaf612abf565b6001600160a01b0316611ec06122fc565b6001600160a01b031614611f09576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b611f11611e88565b6010805460ff1916911515919091179055565b6000600a8881548110611f3357fe5b600091825260209091206006909102018054909150600019906001600160a01b031663d505accf611f62612abf565b604080516001600160e01b031960e085901b1681526001600160a01b03909216600483015230602483015260448201859052606482018a905260ff8916608483015260a4820188905260c482018790525160e480830192600092919082900301818387803b158015611fd357600080fd5b505af1158015611fe7573d6000803e3d6000fd5b50505050611ff6898989612ec2565b505050505050505050565b600d6020526000908152604090205460ff1681565b600a546000908390811061205f576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b50506000918252600b602090815260408084206001600160a01b039390931684529181529181902081516080810183528154815260018201549381019390935260028101549183019190915260030154606090910181905290565b6120c2612abf565b6001600160a01b03166120d36122fc565b6001600160a01b03161461211c576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103e881565b6001600c600061217a612abf565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790557f4bc18aa4b0095c9a3b5cdf42d2322d5a145591b04045988a995a5da426075457611a51612abf565b6121e3612abf565b6001600160a01b03166121f46122fc565b6001600160a01b03161461223d576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b6001600160a01b038116612298576040805162461bcd60e51b815260206004820152601e60248201527f736574466565416464726573733a20696e76616c696420616464726573730000604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0383169081179091556122be612abf565b6001600160a01b03167fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f760405160405180910390a350565b60095481565b6000546001600160a01b031690565b60095460009061231f906113ba8486612e65565b90505b92915050565b600a548390811061236e576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b600260035414156123b4576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b600260035561122f848484612ec2565b600b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b6123fe612abf565b6001600160a01b031661240f6122fc565b6001600160a01b031614612458576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b6002600354141561249e576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b60026003556103e861ffff841611156124e85760405162461bcd60e51b81526004018080602001828103825260258152602001806138346025913960400191505060405180910390fd5b62127500821115612540576040805162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600d602052604090205460ff16156125ae576040805162461bcd60e51b815260206004820152601a60248201527f52657761726420546f6b656e20616c7265616479206164646564000000000000604482015290519081900360640190fd5b80156125bc576125bc611e88565b6000600f5443116125cf57600f546125d1565b435b600e549091506125e19087612ba8565b600e556040805160c0810182526001600160a01b0387811680835260208084018b815284860187815260006060870181815261ffff8d811660808a0190815260a08a018e8152600a8054600180820183558288529c517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600690920291820180546001600160a01b03191691909d1617909b5596517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a98b015594517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa8a015591517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab89015590517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ac8801805461ffff19169190921617905590517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ad90950194909455828452600d90915293909120805460ff191683179055915461276491612e65565b6040805189815261ffff8816602082015280820187905290517fa8d7e93f0ff462eaad5accb37f709892108a1330fb25613c8cb5d74fc2a524379181900360600190a35050600160035550505050565b6127bc612abf565b6001600160a01b03166127cd6122fc565b6001600160a01b031614612816576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b61281e611e88565b60098190556040805182815290517ff3d4fb4a9ca93dbe227dc214a58b283b8c19652c09e15eae6c04e54aa28fa2ae9181900360200190a150565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b6004546001600160a01b031681565b600c60209081526000928352604080842090915290825290205460ff1681565b6212750081565b600a5482908110612903576040805162461bcd60e51b81526020600482015260136024820152600080516020613994833981519152604482015290519081900360640190fd5b60026003541415612949576040805162461bcd60e51b815260206004820152601f6024820152600080516020613814833981519152604482015290519081900360640190fd5b60026003556119cc8383611b4a612abf565b612963612abf565b6001600160a01b03166129746122fc565b6001600160a01b0316146129bd576040805162461bcd60e51b81526020600482018190526024820152600080516020613953833981519152604482015290519081900360640190fd5b6001600160a01b038116612a025760405162461bcd60e51b815260040180806020018281038252602681526020018061389c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60065481565b600033301415612aba57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150610e059050565b503390565b6000612ac9612a63565b905090565b60006001600160a01b038616612b155760405162461bcd60e51b81526004018080602001828103825260258152602001806138e86025913960400191505060405180910390fd5b6001612b28612b238761302f565b6130b2565b83868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612b7f573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60008282018381101561231f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000600a8581548110612c1157fe5b60009182526020808320888452600b825260408085206001600160a01b03891686529092529220805460069092029092019250851115612c8d576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b612c9686611b59565b612ca18685856130fe565b8415612d3d578054612cb39086612e65565b8155600482015461ffff1615612d27576004820154600090612ce290612710906113c090899061ffff16612da5565b6007548454919250612d01916001600160a01b03908116911683612fdd565b612d2184612d0f8884612e65565b85546001600160a01b03169190612fdd565b50612d3d565b8154612d3d906001600160a01b03168487612fdd565b60038201548154612d589164e8d4a51000916113c091612da5565b600182015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b600082612db457506000612322565b82820282848281612dc157fe5b041461231f5760405162461bcd60e51b815260040180806020018281038252602181526020018061390d6021913960400191505060405180910390fd5b6000808211612e54576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612e5d57fe5b049392505050565b600082821115612ebc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000600a8481548110612ed157fe5b60009182526020808320878452600b825260408085206001600160a01b03881686528352808520600c8452818620909352909320805460ff1916600117905560069091029091019150612f2385611b59565b612f2e8584856130fe565b8315612f7657612f52612f3f612abf565b83546001600160a01b0316903087613348565b8054612f5e9085612ba8565b81556005820154612f70904290612ba8565b60038201555b60038201548154612f919164e8d4a51000916113c091612da5565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526115789084906133a8565b600060405180608001604052806043815260200161385960439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b60006130bc611592565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000600a848154811061310d57fe5b60009182526020808320878452600b825260408085206001600160a01b0389168652909252922060038101546006909202909201925061315d576005820154613157904290612ba8565b60038201555b600061318b826001015461141464e8d4a510006113c087600301548760000154612da590919063ffffffff16565b9050613197868661186c565b156132d55760008111806131af575060008260020154115b156132d05760006131cd836002015483612ba890919063ffffffff16565b90506131e88360020154600854612e6590919063ffffffff16565b600855600060028401556005840154613202904290612ba8565b600384015560105460ff161515600114156132c4576010546132329061010090046001600160a01b031682613459565b601054600184015460408051632814ff8360e11b81526001600160a01b03898116600483015260248201869052426044830152606482018c90526084820193909352905161010090930490911691635029ff069160a48082019260009290919082900301818387803b1580156132a757600080fd5b505af11580156132bb573d6000803e3d6000fd5b505050506132ce565b6132ce8582613459565b505b613340565b80156133405760028201546132ea9082612ba8565b60028301556008546132fc9082612ba8565b60085560408051828152905187916001600160a01b038816917fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c19181900360200190a35b505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526133a29085906133a8565b50505050565b60006133fd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135f59092919063ffffffff16565b8051909150156115785780806020019051602081101561341c57600080fd5b50516115785760405162461bcd60e51b815260040180806020018281038252602a8152602001806139b4602a913960400191505060405180910390fd5b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b1580156134a857600080fd5b505afa1580156134bc573d6000803e3d6000fd5b505050506040513d60208110156134d257600080fd5b505190508082111561356a57600480546040805163a9059cbb60e01b81526001600160a01b0387811694820194909452602481018590529051929091169163a9059cbb916044808201926020929091908290030181600087803b15801561353857600080fd5b505af115801561354c573d6000803e3d6000fd5b505050506040513d602081101561356257600080fd5b506115789050565b600480546040805163a9059cbb60e01b81526001600160a01b0387811694820194909452602481018690529051929091169163a9059cbb916044808201926020929091908290030181600087803b1580156135c457600080fd5b505af11580156135d8573d6000803e3d6000fd5b505050506040513d60208110156135ee57600080fd5b5050505050565b6060613604848460008561360e565b90505b9392505050565b60608247101561364f5760405162461bcd60e51b81526004018080602001828103825260268152602001806138c26026913960400191505060405180910390fd5b61365885613769565b6136a9576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106136e75780518252601f1990920191602091820191016136c8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613749576040519150601f19603f3d011682016040523d82523d6000602084013e61374e565b606091505b509150915061375e82828661376f565b979650505050505050565b3b151590565b6060831561377e575081613607565b82511561378e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156137d85781810151838201526020016137c0565b50505050905090810190601f1680156138055780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c006164643a20696e76616c6964206465706f7369742066656520626173697320706f696e74734d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e4552536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777365743a20696e76616c6964206465706f7369742066656520626173697320706f696e74734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725369676e657220616e64207369676e617475726520646f206e6f74206d61746368506f6f6c20646f6573206e6f74206578697374000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206ade8779b06740ddb35240b4aa93c42b0046dc8ea2841cd8e0887144c581b91f64736f6c63430007060033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c75696e7432353620636861696e496429000000000000000000000000d1e6354fb05bf72a8909266203dab80947dceccf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000445c96b55e6846a039f90ed21f979afebd2392d6000000000000000000000000000000000000000000000000000000000108e480000000000000000000000000000000000000000000000000000000000108e480

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

000000000000000000000000d1e6354fb05bf72a8909266203dab80947dceccf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000445c96b55e6846a039f90ed21f979afebd2392d6000000000000000000000000000000000000000000000000000000000108e480000000000000000000000000000000000000000000000000000000000108e480

-----Decoded View---------------
Arg [0] : _cnt (address): 0xd1e6354fb05bf72a8909266203dab80947dceccf
Arg [1] : _cntPerBlock (uint256): 0
Arg [2] : _feeAddress (address): 0x445c96b55e6846a039f90ed21f979afebd2392d6
Arg [3] : _startBlock (uint256): 17360000
Arg [4] : _bonusEndBlock (uint256): 17360000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000d1e6354fb05bf72a8909266203dab80947dceccf
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000445c96b55e6846a039f90ed21f979afebd2392d6
Arg [3] : 000000000000000000000000000000000000000000000000000000000108e480
Arg [4] : 000000000000000000000000000000000000000000000000000000000108e480


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