Contract 0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc1 2

Contract Overview

Balance:
0 HT

HT Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd13f2b331a3236a7d6c619b211f9190eda9318e4eec82c41eb829a9020911558Deposit02021-10-19 6:48:465 secs ago0xc55dfed7103de3197bbb8196b7ffd742e1153bdc IN 0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc1ERR
0x6d5a58e17e47a9cadb691a32074b116a0dd7e0581a4260c5e5364029337a5776Deposit02021-10-19 6:48:3021 secs ago0xc55dfed7103de3197bbb8196b7ffd742e1153bdc IN 0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc1ERR
0x4223ae6897438be786b4aaf021552c110d07249575c766f8f483240450713308Withdraw92440462021-10-19 6:48:1437 secs ago0x68576265870ca46f7351d88bc399488aa4c676ed IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0113660470
0xd4dd9aa70c8e3a5cd70ead57aec38c958f4c74ca2940ca5d4309208fe2aa0a41Deposit92439402021-10-19 6:42:565 mins ago0xc73fc1f9fa817ad2beaf0c795ac5d81c35a1d46e IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0107624370
0x38232e1777fc1b1844d908b3a98c83c4f55052bb67533c1d4c3a7868bcefbf4eDeposit92439052021-10-19 6:41:117 mins ago0xc73fc1f9fa817ad2beaf0c795ac5d81c35a1d46e IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0075811470
0xec2bbd2110f0aadec1474428f806d87a11c66ede3ea970c73dfabd9d09853ed0Deposit92438712021-10-19 6:39:299 mins ago0xe09021bec18f10fff97220d3529efd6349728b2f IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000307460252.25
0x463f4395b072e38b5fbf42e68aafe6a63dc6fefe75d91cba93e18a4bc336a458Deposit92438502021-10-19 6:38:2610 mins ago0xa94fbfaace8ede2d1c644785d2ff66dc78ecaf82 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0075811470
0x0d8ede20420eaec4e48d5b48eda62561cb3ba6618f0100f8ea29a705714f141cDeposit92438462021-10-19 6:38:1410 mins ago0x2504094feee90f5a9c89ebf5283ff90b90858629 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.00756637 70
0x11bccc3998e1c81c7494604172157cddb4c870cd252f90895f5abb8d2cd369b7Deposit92438382021-10-19 6:37:5011 mins ago0x2504094feee90f5a9c89ebf5283ff90b90858629 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.00876337 70
0xa9c79fe361da543b80c1a260fc2110f0f73a5dc131e1ac442b99fb17681d6d37Deposit92438052021-10-19 6:36:1112 mins ago0x0529c18cd89ddf043ba2007d0e351ba6f8f0d18a IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0004270472222.777777777
0x24122bcb25f8a56facdecd15846b0d49c2f28211290c0d35080afb4e40234efaDeposit92437892021-10-19 6:35:2313 mins ago0x58bf9b521811e07f8bd8eaf54280173944f62cbc IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.00024367952.25
0xf789f5a1503e62e86b29c714000400cbbe8620fe9a4266ce5d36a83ca1018ab7Deposit92437822021-10-19 6:35:0213 mins ago0x7ffcf2a57f6762697b6f9c9b6430fae98ba4f757 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000243204752.25
0xd8d38f6c8da7507965a8f1a0d87a3818c8ab4e197a1f8b10ee4bd4e35332b921Deposit92437752021-10-19 6:34:4114 mins ago0x7ffcf2a57f6762697b6f9c9b6430fae98ba4f757 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000243204752.25
0xc4866b5805dda48d6a42c271a5c8597a424a178cdc4c6fa69e1dfc6d655d055aDeposit92437672021-10-19 6:34:1714 mins ago0x7ffcf2a57f6762697b6f9c9b6430fae98ba4f757 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000243204752.25
0x70dffbc3d58074c10581de4c17eba9a3e1e9f5fdefa16bc56dde564979574d6dDeposit92435722021-10-19 6:24:3224 mins ago0xa07458e82de26a2518ac87c36c98fe1c3f882835 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0087781470
0xd9e978a188470c156abb70f324496a7bbd48843a1cb97c9f6ce83ee89acfdc89Deposit92435232021-10-19 6:22:0526 mins ago0x868da1f8144424549e73cd32f04c0ee9e2354512 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.00024367952.25
0xa87a42c6add46fa935c72eb255f82733ae09e0ebfbeea32f04d9efa283ea567dDeposit92434812021-10-19 6:19:5928 mins ago0x7ffcf2a57f6762697b6f9c9b6430fae98ba4f757 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000243204752.25
0x7df17474bd9baf503e1ac550c19cb25d04c125e8e2eb210de814ef53ce296f61Deposit92434702021-10-19 6:19:2629 mins ago0x7ffcf2a57f6762697b6f9c9b6430fae98ba4f757 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000243204752.25
0x4ac9ec0dc7917d2d294cfc3ba205ec2d4f1e98b3659df70546f97d44da811b5dWithdraw92433562021-10-19 6:13:4435 mins ago0x1b6d3d158e210ff5d4bbd1c71d552f9845c39423 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.010564470
0xdced7bb2400d96aef61eb0e66d62ac3561b8e482d384102d41e115702a8626cfWithdraw92432732021-10-19 6:09:3539 mins ago0x9eec5cbb0ef988be6b53e237f8148f2036ce2882 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0110870970
0x69d6fc0bd43a7a98d8331daded88661cc19abc627c30b20bf6ee2ab091baa571Deposit92429942021-10-19 5:55:3853 mins ago0x641d6b9932daf438bd78a2567fef4b31c7fc29cb IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000355367252.25
0x62d767374c7a2cff027dfae26d9671cc2174d783e450dec78a991c5ef226b8daDeposit92429522021-10-19 5:53:3255 mins ago0x641d6b9932daf438bd78a2567fef4b31c7fc29cb IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000243204752.25
0x22202b15405a6487f4ab79a6a2c9860cdf19ee28a112f60273fd308d5ed815ffDeposit92429482021-10-19 5:53:2055 mins ago0x02c688a88ed65cf3259cfb3ea44551c7e4526c06 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.000355313252.25
0x5dc4a5f3bf1d1d3c517f7b055c83ac442a0dadda89e31d31b7ce7f5cdee46217Deposit92427542021-10-19 5:43:381 hr 5 mins ago0xd88977e0360dc0a75faaf74635c35a7e2a3613c8 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0075663770
0xadce4151f40e0eb73141eda3fd39055aa8881da4166ecb9eded1a649d10b6872Deposit92427312021-10-19 5:42:291 hr 6 mins ago0xd88977e0360dc0a75faaf74635c35a7e2a3613c8 IN  0x55bf276e2a2e10aeb62c0ed37d36585cb24d9cc10 HT0.0075811470
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xe3e75Ab09FA0E045523A6B4E81bdB5F11a8bc99c

Contract Name:
BXHPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : bxhpool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;


import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import './interfaces/IMasterChefHeco.sol';
import './interfaces/IBXH.sol';



contract BXHPool is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    using EnumerableSet for EnumerableSet.AddressSet;
    EnumerableSet.AddressSet private _multLP;

    // Info of each user.
    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt.
        uint256 multLpRewardDebt; //multLp Reward debt.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. BXHs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that BXHs distribution occurs.
        uint256 accBXHPerShare; // Accumulated BXHs per share, times 1e12.
        uint256 accMultLpPerShare; //Accumulated multLp per share
        uint256 totalAmount;    // Total amount of current pool deposit.
    }

    // The BXH Token!
    IBXH public bxh;
    // BXH tokens created per block.
    uint256 public bxhPerBlock;
    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Corresponding to the pid of the multLP pool
    mapping(uint256 => uint256) public poolCorrespond;
    // pid corresponding address
    mapping(address => uint256) public LpOfPid;
    // Control mining
    bool public paused = false;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when BXH mining starts.
    uint256 public startBlock;
    // multLP MasterChef
    address public multLpChef;
    // multLP Token
    address public multLpToken;
    // How many blocks are halved
    uint256 public decayPeriod = 201600; //7*24*1200
    uint256 public decayRatio = 970;//3%

    uint256 []public decayTable;

    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);

    constructor(
        IBXH _bxh,
        uint256 _bxhPerBlock, //42
        uint256 _startBlock,
        uint256 _decayRatio  //970
    ) public {
        bxh = _bxh;
        bxhPerBlock = _bxhPerBlock;
        startBlock = _startBlock;
        decayRatio = _decayRatio;
     	decayTable.push(_bxhPerBlock); 

     	for(uint256 i=0;i<32;i++) {
     		decayTable.push(decayTable[i].mul(decayRatio).div(1000));
     	}
    }

    function setDecayPeriod(uint256 _block) public onlyOwner {
        decayPeriod = _block;
    }

	function setDecayRatio(uint256 _ratio) public onlyOwner {
		require(_ratio<1000,"ratio should less than 1000");
        decayRatio = _ratio;
    }


    // Set the number of bxh produced by each block
    function setBXHPerBlock(uint256 _newPerBlock) public onlyOwner {
        massUpdatePools();
        bxhPerBlock = _newPerBlock;
    }

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

    function addMultLP(address _addLP) public onlyOwner returns (bool) {
        require(_addLP != address(0), "LP is the zero address");
        IERC20(_addLP).approve(multLpChef, uint256(- 1));
        return EnumerableSet.add(_multLP, _addLP);
    }

    function isMultLP(address _LP) public view returns (bool) {
        return EnumerableSet.contains(_multLP, _LP);
    }

    function getMultLPLength() public view returns (uint256) {
        return EnumerableSet.length(_multLP);
    }

    function getMultLPAddress(uint256 _pid) public view returns (address){
        require(_pid <= getMultLPLength() - 1, "not find this multLP");
        return EnumerableSet.at(_multLP, _pid);
    }

    function setPause() public onlyOwner {
        paused = !paused;
    }

    function setMultLP(address _multLpToken, address _multLpChef) public onlyOwner {
        require(_multLpToken != address(0) && _multLpChef != address(0), "is the zero address");
        multLpToken = _multLpToken;
        multLpChef = _multLpChef;
    }

    function replaceMultLP(address _multLpToken, address _multLpChef) public onlyOwner {
        require(_multLpToken != address(0) && _multLpChef != address(0), "is the zero address");
        require(paused == true, "No mining suspension");
        multLpToken = _multLpToken;
        multLpChef = _multLpChef;
        uint256 length = getMultLPLength();
        while (length > 0) {
            address dAddress = EnumerableSet.at(_multLP, 0);
            uint256 pid = LpOfPid[dAddress];
            IMasterChefHeco(multLpChef).emergencyWithdraw(poolCorrespond[pid]);
            EnumerableSet.remove(_multLP, dAddress);
            length--;
        }
    }

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
        require(address(_lpToken) != address(0), "_lpToken is the zero address");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
        lpToken : _lpToken,
        allocPoint : _allocPoint,
        lastRewardBlock : lastRewardBlock,
        accBXHPerShare : 0,
        accMultLpPerShare : 0,
        totalAmount : 0
        }));
        LpOfPid[address(_lpToken)] = poolLength() - 1;
    }

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

    // The current pool corresponds to the pid of the multLP pool
    function setPoolCorr(uint256 _pid, uint256 _sid) public onlyOwner {
        require(_pid <= poolLength() - 1, "not find this pool");
        poolCorrespond[_pid] = _sid;
    }

    function phase(uint256 blockNumber) public view returns (uint256) {
        if (decayPeriod == 0) {
            return 0;
        }
        if (blockNumber > startBlock) {
            return (blockNumber.sub(startBlock).sub(1)).div(decayPeriod);
        }
        return 0;
    }

    function rewardV(uint256 blockNumber) public view returns (uint256) {
        uint256 _phase = phase(blockNumber);
        require(_phase<decayTable.length,"phase not ready");
        return decayTable[_phase];
    }

	function batchPrepareRewardTable(uint256 spareCount) public returns (uint256) {
		require(spareCount<64,"spareCount too large , must less than 64");
        uint256 _phase = phase(block.number);
        if( _phase.add(spareCount) >= decayTable.length){
        	uint256 loop = _phase.add(spareCount).sub(decayTable.length);
	        for(uint256 i=0;i<=loop;i++) {
	        	uint256 lastDecayValue = decayTable[decayTable.length-1];
	     		decayTable.push(lastDecayValue.mul(decayRatio).div(1000));
	     	}
        }
        return decayTable[_phase];
    }

    function safePrepareRewardTable(uint256 blockNumber)  internal returns (uint256) {
        uint256 _phase = phase(blockNumber);       
        if( _phase >= decayTable.length){
        	uint256 lastDecayValue = decayTable[decayTable.length-1];
	     	decayTable.push(lastDecayValue.mul(decayRatio).div(1000));
        }
        return decayTable[_phase];
    }

    function getBXHBlockRewardV(uint256 _lastRewardBlock) public view returns (uint256) {
        uint256 blockReward = 0;
        uint256 n = phase(_lastRewardBlock);
        uint256 m = phase(block.number);
        while (n < m) {
            n++;
            uint256 r = n.mul(decayPeriod).add(startBlock);
            blockReward = blockReward.add((r.sub(_lastRewardBlock)).mul(rewardV(r)));
            _lastRewardBlock = r;
        }
        blockReward = blockReward.add((block.number.sub(_lastRewardBlock)).mul(rewardV(block.number)));
        return blockReward;
    }

    function safeGetBXHBlockReward(uint256 _lastRewardBlock) public returns (uint256) {
        uint256 blockReward = 0;
        uint256 n = phase(_lastRewardBlock);
        uint256 m = phase(block.number);
        while (n < m) {
            n++;
            uint256 r = n.mul(decayPeriod).add(startBlock);
            blockReward = blockReward.add((r.sub(_lastRewardBlock)).mul(safePrepareRewardTable(r)));
            _lastRewardBlock = r;
        }
        blockReward = blockReward.add((block.number.sub(_lastRewardBlock)).mul(safePrepareRewardTable(block.number)));
        return blockReward;
    }


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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply;
        if (isMultLP(address(pool.lpToken))) {
            if (pool.totalAmount == 0) {
                pool.lastRewardBlock = block.number;
                return;
            }
            lpSupply = pool.totalAmount;
        } else {
            lpSupply = pool.lpToken.balanceOf(address(this));
            if (lpSupply == 0) {
                pool.lastRewardBlock = block.number;
                return;
            }
        }
        uint256 blockReward = safeGetBXHBlockReward(pool.lastRewardBlock);
        if (blockReward <= 0) {
            return;
        }
        uint256 bxhReward = blockReward.mul(pool.allocPoint).div(totalAllocPoint);
        bool minRet = bxh.mint(address(this), bxhReward);
        if (minRet) {
            pool.accBXHPerShare = pool.accBXHPerShare.add(bxhReward.mul(1e12).div(lpSupply));
        }
        pool.lastRewardBlock = block.number;
    }

    // View function to see pending BXHs on frontend.
    function pending(uint256 _pid, address _user) external view returns (uint256, uint256){
        PoolInfo storage pool = poolInfo[_pid];
        if (isMultLP(address(pool.lpToken))) {
            (uint256 bxhAmount, uint256 tokenAmount) = pendingBXHAndToken(_pid, _user);
            return (bxhAmount, tokenAmount);
        } else {
            uint256 bxhAmount = pendingBXH(_pid, _user);
            return (bxhAmount, 0);
        }
    }

    function pendingBXHAndToken(uint256 _pid, address _user) private view returns (uint256, uint256){
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accBXHPerShare = pool.accBXHPerShare;
        uint256 accMultLpPerShare = pool.accMultLpPerShare;
        if (user.amount > 0) {
            uint256 TokenPending = IMasterChefHeco(multLpChef).pending(poolCorrespond[_pid], address(this));
            accMultLpPerShare = accMultLpPerShare.add(TokenPending.mul(1e12).div(pool.totalAmount));
            uint256 userPending = user.amount.mul(accMultLpPerShare).div(1e12).sub(user.multLpRewardDebt);
            if (block.number > pool.lastRewardBlock) {
                uint256 blockReward = getBXHBlockRewardV(pool.lastRewardBlock);
                uint256 bxhReward = blockReward.mul(pool.allocPoint).div(totalAllocPoint);
                accBXHPerShare = accBXHPerShare.add(bxhReward.mul(1e12).div(pool.totalAmount));
                return (user.amount.mul(accBXHPerShare).div(1e12).sub(user.rewardDebt), userPending);
            }
            if (block.number == pool.lastRewardBlock) {
                return (user.amount.mul(accBXHPerShare).div(1e12).sub(user.rewardDebt), userPending);
            }
        }
        return (0, 0);
    }

    function pendingBXH(uint256 _pid, address _user) private view returns (uint256){
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accBXHPerShare = pool.accBXHPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (user.amount > 0) {
            if (block.number > pool.lastRewardBlock) {
                uint256 blockReward = getBXHBlockRewardV(pool.lastRewardBlock);
                uint256 bxhReward = blockReward.mul(pool.allocPoint).div(totalAllocPoint);
                accBXHPerShare = accBXHPerShare.add(bxhReward.mul(1e12).div(lpSupply));
                return user.amount.mul(accBXHPerShare).div(1e12).sub(user.rewardDebt);
            }
            if (block.number == pool.lastRewardBlock) {
                return user.amount.mul(accBXHPerShare).div(1e12).sub(user.rewardDebt);
            }
        }
        return 0;
    }

    // Deposit LP tokens to HecoPool for BXH allocation.
    function deposit(uint256 _pid, uint256 _amount) public notPause {
        PoolInfo storage pool = poolInfo[_pid];
        if (isMultLP(address(pool.lpToken))) {
            depositBXHAndToken(_pid, _amount, msg.sender);
        } else {
            depositBXH(_pid, _amount, msg.sender);
        }
    }

    function depositBXHAndToken(uint256 _pid, uint256 _amount, address _user) private {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pendingAmount = user.amount.mul(pool.accBXHPerShare).div(1e12).sub(user.rewardDebt);
            if (pendingAmount > 0) {
                safeBXHTransfer(_user, pendingAmount);
            }
            uint256 beforeToken = IERC20(multLpToken).balanceOf(address(this));
            IMasterChefHeco(multLpChef).deposit(poolCorrespond[_pid], 0);
            uint256 afterToken = IERC20(multLpToken).balanceOf(address(this));
            pool.accMultLpPerShare = pool.accMultLpPerShare.add(afterToken.sub(beforeToken).mul(1e12).div(pool.totalAmount));
            uint256 tokenPending = user.amount.mul(pool.accMultLpPerShare).div(1e12).sub(user.multLpRewardDebt);
            if (tokenPending > 0) {
                IERC20(multLpToken).safeTransfer(_user, tokenPending);
            }
        }
        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(_user, address(this), _amount);
            if (pool.totalAmount == 0) {
                IMasterChefHeco(multLpChef).deposit(poolCorrespond[_pid], _amount);
                user.amount = user.amount.add(_amount);
                pool.totalAmount = pool.totalAmount.add(_amount);
            } else {
                uint256 beforeToken = IERC20(multLpToken).balanceOf(address(this));
                IMasterChefHeco(multLpChef).deposit(poolCorrespond[_pid], _amount);
                uint256 afterToken = IERC20(multLpToken).balanceOf(address(this));
                pool.accMultLpPerShare = pool.accMultLpPerShare.add(afterToken.sub(beforeToken).mul(1e12).div(pool.totalAmount));
                user.amount = user.amount.add(_amount);
                pool.totalAmount = pool.totalAmount.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accBXHPerShare).div(1e12);
        user.multLpRewardDebt = user.amount.mul(pool.accMultLpPerShare).div(1e12);
        emit Deposit(_user, _pid, _amount);
    }

    function depositBXH(uint256 _pid, uint256 _amount, address _user) private {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pendingAmount = user.amount.mul(pool.accBXHPerShare).div(1e12).sub(user.rewardDebt);
            if (pendingAmount > 0) {
                safeBXHTransfer(_user, pendingAmount);
            }
        }
        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(_user, address(this), _amount);
            user.amount = user.amount.add(_amount);
            pool.totalAmount = pool.totalAmount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accBXHPerShare).div(1e12);
        emit Deposit(_user, _pid, _amount);
    }

    // Withdraw LP tokens from HecoPool.
    function withdraw(uint256 _pid, uint256 _amount) public notPause {
        PoolInfo storage pool = poolInfo[_pid];
        if (isMultLP(address(pool.lpToken))) {
            withdrawBXHAndToken(_pid, _amount, msg.sender);
        } else {
            withdrawBXH(_pid, _amount, msg.sender);
        }
    }

    function withdrawBXHAndToken(uint256 _pid, uint256 _amount, address _user) private {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        require(user.amount >= _amount, "withdrawBXHAndToken: not good");
        updatePool(_pid);
        uint256 pendingAmount = user.amount.mul(pool.accBXHPerShare).div(1e12).sub(user.rewardDebt);
        if (pendingAmount > 0) {
            safeBXHTransfer(_user, pendingAmount);
        }
        if (_amount > 0) {
            uint256 beforeToken = IERC20(multLpToken).balanceOf(address(this));
            IMasterChefHeco(multLpChef).withdraw(poolCorrespond[_pid], _amount);
            uint256 afterToken = IERC20(multLpToken).balanceOf(address(this));
            pool.accMultLpPerShare = pool.accMultLpPerShare.add(afterToken.sub(beforeToken).mul(1e12).div(pool.totalAmount));
            uint256 tokenPending = user.amount.mul(pool.accMultLpPerShare).div(1e12).sub(user.multLpRewardDebt);
            if (tokenPending > 0) {
                IERC20(multLpToken).safeTransfer(_user, tokenPending);
            }
            user.amount = user.amount.sub(_amount);
            pool.totalAmount = pool.totalAmount.sub(_amount);
            pool.lpToken.safeTransfer(_user, _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accBXHPerShare).div(1e12);
        user.multLpRewardDebt = user.amount.mul(pool.accMultLpPerShare).div(1e12);
        emit Withdraw(_user, _pid, _amount);
    }

    function withdrawBXH(uint256 _pid, uint256 _amount, address _user) private {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        require(user.amount >= _amount, "withdrawBXH: not good");
        updatePool(_pid);
        uint256 pendingAmount = user.amount.mul(pool.accBXHPerShare).div(1e12).sub(user.rewardDebt);
        if (pendingAmount > 0) {
            safeBXHTransfer(_user, pendingAmount);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.totalAmount = pool.totalAmount.sub(_amount);
            pool.lpToken.safeTransfer(_user, _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accBXHPerShare).div(1e12);
        emit Withdraw(_user, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public notPause {
        PoolInfo storage pool = poolInfo[_pid];
        if (isMultLP(address(pool.lpToken))) {
            emergencyWithdrawBXHAndToken(_pid, msg.sender);
        } else {
            emergencyWithdrawBXH(_pid, msg.sender);
        }
    }

    function emergencyWithdrawBXHAndToken(uint256 _pid, address _user) private {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 amount = user.amount;
        uint256 beforeToken = IERC20(multLpToken).balanceOf(address(this));
        IMasterChefHeco(multLpChef).withdraw(poolCorrespond[_pid], amount);
        uint256 afterToken = IERC20(multLpToken).balanceOf(address(this));
        pool.accMultLpPerShare = pool.accMultLpPerShare.add(afterToken.sub(beforeToken).mul(1e12).div(pool.totalAmount));
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(_user, amount);
        pool.totalAmount = pool.totalAmount.sub(amount);
        emit EmergencyWithdraw(_user, _pid, amount);
    }

    function emergencyWithdrawBXH(uint256 _pid, address _user) private {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(_user, amount);
        pool.totalAmount = pool.totalAmount.sub(amount);
        emit EmergencyWithdraw(_user, _pid, amount);
    }

    // Safe BXH transfer function, just in case if rounding error causes pool to not have enough BXHs.
    function safeBXHTransfer(address _to, uint256 _amount) internal {
        uint256 bxhBal = bxh.balanceOf(address(this));
        if (_amount > bxhBal) {
            bxh.transfer(_to, bxhBal);
        } else {
            bxh.transfer(_to, _amount);
        }
    }

    modifier notPause() {
        require(paused == false, "Mining has been suspended");
        _;
    }
}

File 2 of 11 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

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

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

        _beforeTokenTransfer(address(0), account, amount);

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

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

        _beforeTokenTransfer(account, address(0), amount);

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

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 3 of 11 : 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 4 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

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

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 7 of 11 : IMasterChefHeco.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;



interface IMasterChefHeco {
    function pending(uint256 pid, address user) external view returns (uint256);

    function deposit(uint256 pid, uint256 amount) external;

    function withdraw(uint256 pid, uint256 amount) external;

    function emergencyWithdraw(uint256 pid) external;
}

File 8 of 11 : IBXH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

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


interface IBXH is IERC20 {
    function mint(address to, uint256 amount) external returns (bool);
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

File 10 of 11 : 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 11 of 11 : 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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IBXH","name":"_bxh","type":"address"},{"internalType":"uint256","name":"_bxhPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_decayRatio","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"LpOfPid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addLP","type":"address"}],"name":"addMultLP","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"spareCount","type":"uint256"}],"name":"batchPrepareRewardTable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bxh","outputs":[{"internalType":"contract IBXH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bxhPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decayPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decayRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"decayTable","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"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastRewardBlock","type":"uint256"}],"name":"getBXHBlockRewardV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"getMultLPAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMultLPLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_LP","type":"address"}],"name":"isMultLP","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"multLpChef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multLpToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pending","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"phase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolCorrespond","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":"accBXHPerShare","type":"uint256"},{"internalType":"uint256","name":"accMultLpPerShare","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_multLpToken","type":"address"},{"internalType":"address","name":"_multLpChef","type":"address"}],"name":"replaceMultLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"rewardV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastRewardBlock","type":"uint256"}],"name":"safeGetBXHBlockReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPerBlock","type":"uint256"}],"name":"setBXHPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_block","type":"uint256"}],"name":"setDecayPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"setDecayRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_multLpToken","type":"address"},{"internalType":"address","name":"_multLpChef","type":"address"}],"name":"setMultLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_sid","type":"uint256"}],"name":"setPoolCorr","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"multLpRewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526009805460ff191690556000600a5562031380600e556103ca600f553480156200002d57600080fd5b5060405162003b9d38038062003b9d833981810160405260808110156200005357600080fd5b5080516020820151604083015160609093015191929091600062000076620001a1565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b0319166001600160a01b0386161790556004839055600b829055600f8190556010805460018101825560009182527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae672018490555b6020811015620001965760106200017a6103e862000166600f54601086815481106200014757fe5b9060005260206000200154620001a560201b62001c4a1790919060201c565b6200020c60201b62001caa1790919060201c565b815460018181018455600093845260209093200155016200011f565b505050505062000275565b3390565b600082620001b65750600062000206565b82820282848281620001c457fe5b0414620002035760405162461bcd60e51b815260040180806020018281038252602181526020018062003b7c6021913960400191505060405180910390fd5b90505b92915050565b600080821162000263576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816200026d57fe5b049392505050565b6138f780620002856000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c806364482f7911610146578063b337d32c116100c3578063e2bbb15811610087578063e2bbb1581461065c578063e4c75c271461067f578063e6ab8d48146106c4578063e715e234146106cc578063e9ecc457146106fa578063f2fde38b146107175761025e565b8063b337d32c146105ef578063cb4502c414610612578063d431b1ac1461062f578063dbca587c14610637578063dfc7b95b146106545761025e565b80638da5cb5b1161010a5780638da5cb5b1461054157806393f1a40b14610549578063a1f9acec14610593578063aaae43cc1461059b578063b0c7044b146105c95761025e565b806364482f79146104c35780636e03b27c146104ee578063705bbc011461050b578063715018a6146105135780637fe6f5ac1461051b5761025e565b806343154907116101df57806351eb05a6116101a357806351eb05a6146104375780635312ea8e1461045457806356c5867d146104715780635c975abb146104ab578063604f488d146104b3578063630b5ba1146104bb5761025e565b806343154907146103ca578063441a3e70146103e757806348cd4cb11461040a57806348d67e1b14610412578063512787591461041a5761025e565b80631eaaa045116102265780631eaaa045146103195780632afa178a1461034f578063327702161461036c578063342f802b146103895780633beaaefc146103a65761025e565b8063081e3eda1461026357806308fdd8ec1461027d578063135f8aa71461029a5780631526fe27146102b757806317caf6f114610311575b600080fd5b61026b61073d565b60408051918252519081900360200190f35b61026b6004803603602081101561029357600080fd5b5035610743565b61026b600480360360208110156102b057600080fd5b50356107e9565b6102d4600480360360208110156102cd57600080fd5b5035610843565b604080516001600160a01b0390971687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b61026b610890565b61034d6004803603606081101561032f57600080fd5b508035906001600160a01b0360208201351690604001351515610896565b005b61034d6004803603602081101561036557600080fd5b5035610afe565b61026b6004803603602081101561038257600080fd5b5035610bbb565b61034d6004803603602081101561039f57600080fd5b5035610c28565b6103ae610c8f565b604080516001600160a01b039092168252519081900360200190f35b6103ae600480360360208110156103e057600080fd5b5035610c9e565b61034d600480360360408110156103fd57600080fd5b5080359060200135610d07565b61026b610db6565b61026b610dbc565b61026b6004803603602081101561043057600080fd5b5035610dc2565b61034d6004803603602081101561044d57600080fd5b5035610ec6565b61034d6004803603602081101561046a57600080fd5b50356110c3565b6104976004803603602081101561048757600080fd5b50356001600160a01b031661116f565b604080519115158252519081900360200190f35b6104976112b6565b61026b6112bf565b61034d6112c5565b61034d600480360360608110156104d957600080fd5b508035906020810135906040013515156112e4565b61026b6004803603602081101561050457600080fd5b50356113b9565b6103ae611410565b61034d61141f565b6104976004803603602081101561053157600080fd5b50356001600160a01b03166114cb565b6103ae6114d8565b6105756004803603604081101561055f57600080fd5b50803590602001356001600160a01b03166114e7565b60408051938452602084019290925282820152519081900360600190f35b61026b611513565b61034d600480360360408110156105b157600080fd5b506001600160a01b0381358116916020013516611519565b61026b600480360360208110156105df57600080fd5b50356001600160a01b0316611723565b61034d6004803603604081101561060557600080fd5b5080359060200135611735565b61026b6004803603602081101561062857600080fd5b50356117fd565b61034d61180f565b61034d6004803603602081101561064d57600080fd5b5035611885565b6103ae6118f4565b61034d6004803603604081101561067257600080fd5b5080359060200135611903565b6106ab6004803603604081101561069557600080fd5b50803590602001356001600160a01b03166119a8565b6040805192835260208301919091528051918290030190f35b61026b611a22565b61034d600480360360408110156106e257600080fd5b506001600160a01b0381358116916020013516611a33565b61026b6004803603602081101561071057600080fd5b5035611b2a565b61034d6004803603602081101561072d57600080fd5b50356001600160a01b0316611b48565b60055490565b60008080610750846107e9565b9050600061075d436107e9565b90505b808210156107be57600b54600e5460019093019260009161078c91610786908690611c4a565b90611d11565b90506107b46107ad61079d836113b9565b6107a7848a611d6b565b90611c4a565b8590611d11565b9095509250610760565b6107de6107d76107cd436113b9565b6107a74389611d6b565b8490611d11565b93505050505b919050565b6000600e54600014156107fe575060006107e4565b600b5482111561083b57610834600e5461082e6001610828600b5487611d6b90919063ffffffff16565b90611d6b565b90611caa565b90506107e4565b506000919050565b6005818154811061085057fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909286565b600a5481565b61089e611dc8565b6001600160a01b03166108af6114d8565b6001600160a01b0316146108f8576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6001600160a01b038216610953576040805162461bcd60e51b815260206004820152601c60248201527f5f6c70546f6b656e20697320746865207a65726f206164647265737300000000604482015290519081900360640190fd5b8015610961576109616112c5565b6000600b54431161097457600b54610976565b435b600a549091506109869085611d11565b600a556040805160c0810182526001600160a01b038581168252602082018781529282018481526000606084018181526080850182815260a0860183815260058054600180820183559190955296517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600690950294850180546001600160a01b031916919097161790955595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db282015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db382015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db4840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db590920191909155610adb61073d565b6001600160a01b0390941660009081526008602052604090209303909255505050565b610b06611dc8565b6001600160a01b0316610b176114d8565b6001600160a01b031614610b60576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6103e88110610bb6576040805162461bcd60e51b815260206004820152601b60248201527f726174696f2073686f756c64206c657373207468616e20313030300000000000604482015290519081900360640190fd5b600f55565b60008080610bc8846107e9565b90506000610bd5436107e9565b90505b80821015610c1957600b54600e54600190930192600091610bfe91610786908690611c4a565b9050610c0f6107ad61079d83611dcc565b9095509250610bd8565b6107de6107d76107cd43611dcc565b610c30611dc8565b6001600160a01b0316610c416114d8565b6001600160a01b031614610c8a576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b600e55565b6003546001600160a01b031681565b60006001610caa611a22565b03821115610cf6576040805162461bcd60e51b815260206004820152601460248201527306e6f742066696e642074686973206d756c744c560641b604482015290519081900360640190fd5b610d01600183611e48565b92915050565b60095460ff1615610d5b576040805162461bcd60e51b8152602060048201526019602482015278135a5b9a5b99c81a185cc81899595b881cdd5cdc195b991959603a1b604482015290519081900360640190fd5b600060058381548110610d6a57fe5b600091825260209091206006909102018054909150610d91906001600160a01b03166114cb565b15610da657610da1838333611e54565b610db1565b610db18383336121e0565b505050565b600b5481565b600e5481565b600060408210610e035760405162461bcd60e51b815260040180806020018281038252602881526020018061382f6028913960400191505060405180910390fd5b6000610e0e436107e9565b601054909150610e1e8285611d11565b10610ea657601054600090610e37906108288487611d11565b905060005b818111610ea35760108054600091906000198101908110610e5957fe5b906000526020600020015490506010610e836103e861082e600f5485611c4a90919063ffffffff16565b815460018181018455600093845260209093200155919091019050610e3c565b50505b60108181548110610eb357fe5b9060005260206000200154915050919050565b600060058281548110610ed557fe5b9060005260206000209060060201905080600201544311610ef657506110c0565b8054600090610f0d906001600160a01b03166114cb565b15610f33576005820154610f285750436002909101556110c0565b506005810154610fbd565b8154604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610f7d57600080fd5b505afa158015610f91573d6000803e3d6000fd5b505050506040513d6020811015610fa757600080fd5b5051905080610fbd5750436002909101556110c0565b6000610fcc8360020154610bbb565b905060008111610fde575050506110c0565b6000610ffd600a5461082e866001015485611c4a90919063ffffffff16565b600354604080516340c10f1960e01b81523060048201526024810184905290519293506000926001600160a01b03909216916340c10f199160448082019260209290919082900301818787803b15801561105657600080fd5b505af115801561106a573d6000803e3d6000fd5b505050506040513d602081101561108057600080fd5b5051905080156110b1576110ab6110a08561082e8564e8d4a51000611c4a565b600387015490611d11565b60038601555b43856002018190555050505050505b50565b60095460ff1615611117576040805162461bcd60e51b8152602060048201526019602482015278135a5b9a5b99c81a185cc81899595b881cdd5cdc195b991959603a1b604482015290519081900360640190fd5b60006005828154811061112657fe5b60009182526020909120600690910201805490915061114d906001600160a01b03166114cb565b156111615761115c823361235f565b61116b565b61116b82336125a6565b5050565b6000611179611dc8565b6001600160a01b031661118a6114d8565b6001600160a01b0316146111d3576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6001600160a01b038216611227576040805162461bcd60e51b81526020600482015260166024820152754c5020697320746865207a65726f206164647265737360501b604482015290519081900360640190fd5b600c546040805163095ea7b360e01b81526001600160a01b039283166004820152600019602482015290519184169163095ea7b3916044808201926020929091908290030181600087803b15801561127e57600080fd5b505af1158015611292573d6000803e3d6000fd5b505050506040513d60208110156112a857600080fd5b50610d01905060018361265c565b60095460ff1681565b600f5481565b60055460005b8181101561116b576112dc81610ec6565b6001016112cb565b6112ec611dc8565b6001600160a01b03166112fd6114d8565b6001600160a01b031614611346576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b8015611354576113546112c5565b61138b826107866005868154811061136857fe5b906000526020600020906006020160010154600a54611d6b90919063ffffffff16565b600a81905550816005848154811061139f57fe5b906000526020600020906006020160010181905550505050565b6000806113c5836107e9565b6010549091508110610ea6576040805162461bcd60e51b815260206004820152600f60248201526e7068617365206e6f7420726561647960881b604482015290519081900360640190fd5b600d546001600160a01b031681565b611427611dc8565b6001600160a01b03166114386114d8565b6001600160a01b031614611481576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610d01600183612671565b6000546001600160a01b031690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60045481565b611521611dc8565b6001600160a01b03166115326114d8565b6001600160a01b03161461157b576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6001600160a01b0382161580159061159b57506001600160a01b03811615155b6115e2576040805162461bcd60e51b8152602060048201526013602482015272697320746865207a65726f206164647265737360681b604482015290519081900360640190fd5b60095460ff161515600114611635576040805162461bcd60e51b815260206004820152601460248201527327379036b4b734b7339039bab9b832b739b4b7b760611b604482015290519081900360640190fd5b600d80546001600160a01b038085166001600160a01b031992831617909255600c805492841692909116919091179055600061166f611a22565b90505b8015610db157600061168660016000611e48565b6001600160a01b03808216600090815260086020908152604080832054600c548185526007909352818420548251632989754760e11b815260048101919091529151959650949190931692635312ea8e92602480830193919282900301818387803b1580156116f457600080fd5b505af1158015611708573d6000803e3d6000fd5b50505050611717600183612686565b50505060001901611672565b60086020526000908152604090205481565b61173d611dc8565b6001600160a01b031661174e6114d8565b6001600160a01b031614611797576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b60016117a161073d565b038211156117eb576040805162461bcd60e51b81526020600482015260126024820152711b9bdd08199a5b99081d1a1a5cc81c1bdbdb60721b604482015290519081900360640190fd5b60009182526007602052604090912055565b60076020526000908152604090205481565b611817611dc8565b6001600160a01b03166118286114d8565b6001600160a01b031614611871576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6009805460ff19811660ff90911615179055565b61188d611dc8565b6001600160a01b031661189e6114d8565b6001600160a01b0316146118e7576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6118ef6112c5565b600455565b600c546001600160a01b031681565b60095460ff1615611957576040805162461bcd60e51b8152602060048201526019602482015278135a5b9a5b99c81a185cc81899595b881cdd5cdc195b991959603a1b604482015290519081900360640190fd5b60006005838154811061196657fe5b60009182526020909120600690910201805490915061198d906001600160a01b03166114cb565b1561199d57610da183833361269b565b610db1838333612c15565b6000806000600585815481106119ba57fe5b6000918252602090912060069091020180549091506119e1906001600160a01b03166114cb565b15611a01576000806119f38787612d4e565b9095509350611a1b92505050565b6000611a0d8686612f7f565b935060009250611a1b915050565b9250929050565b6000611a2e6001613115565b905090565b611a3b611dc8565b6001600160a01b0316611a4c6114d8565b6001600160a01b031614611a95576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6001600160a01b03821615801590611ab557506001600160a01b03811615155b611afc576040805162461bcd60e51b8152602060048201526013602482015272697320746865207a65726f206164647265737360681b604482015290519081900360640190fd5b600d80546001600160a01b039384166001600160a01b031991821617909155600c8054929093169116179055565b60108181548110611b3757fe5b600091825260209091200154905081565b611b50611dc8565b6001600160a01b0316611b616114d8565b6001600160a01b031614611baa576040805162461bcd60e51b81526020600482018190526024820152600080516020613878833981519152604482015290519081900360640190fd5b6001600160a01b038116611bef5760405162461bcd60e51b81526004018080602001828103825260268152602001806137e36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082611c5957506000610d01565b82820282848281611c6657fe5b0414611ca35760405162461bcd60e51b81526004018080602001828103825260218152602001806138576021913960400191505060405180910390fd5b9392505050565b6000808211611d00576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d0957fe5b049392505050565b600082820183811015611ca3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115611dc2576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3390565b600080611dd8836107e9565b6010549091508110610ea65760108054600091906000198101908110611dfa57fe5b906000526020600020015490506010611e246103e861082e600f5485611c4a90919063ffffffff16565b815460018101835560009283526020909220909101555060108181548110610eb357fe5b6000611ca38383613120565b600060058481548110611e6357fe5b60009182526020808320878452600680835260408086206001600160a01b0389168752909352919093208054929091029092019250841115611eec576040805162461bcd60e51b815260206004820152601d60248201527f7769746864726177425848416e64546f6b656e3a206e6f7420676f6f64000000604482015290519081900360640190fd5b611ef585610ec6565b6000611f23826001015461082864e8d4a5100061082e87600301548760000154611c4a90919063ffffffff16565b90508015611f3557611f358482613184565b841561215857600d54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611f8657600080fd5b505afa158015611f9a573d6000803e3d6000fd5b505050506040513d6020811015611fb057600080fd5b5051600c54600089815260076020526040808220548151630441a3e760e41b81526004810191909152602481018b905290519394506001600160a01b039092169263441a3e7092604480820193929182900301818387803b15801561201457600080fd5b505af1158015612028573d6000803e3d6000fd5b5050600d54604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b15801561207957600080fd5b505afa15801561208d573d6000803e3d6000fd5b505050506040513d60208110156120a357600080fd5b505160058601549091506120d3906120c89061082e64e8d4a510006107a78688611d6b565b600487015490611d11565b60048601819055600285015485546000926120fd92916108289164e8d4a510009161082e91611c4a565b9050801561211c57600d5461211c906001600160a01b03168883613314565b84546121289089611d6b565b855560058601546121399089611d6b565b60058701558554612154906001600160a01b0316888a613314565b5050505b600383015482546121739164e8d4a510009161082e91611c4a565b6001830155600483015482546121939164e8d4a510009161082e91611c4a565b600283015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b6000600584815481106121ef57fe5b60009182526020808320878452600680835260408086206001600160a01b0389168752909352919093208054929091029092019250841115612270576040805162461bcd60e51b81526020600482015260156024820152741dda5d1a191c985dd096120e881b9bdd0819dbdbd9605a1b604482015290519081900360640190fd5b61227985610ec6565b60006122a7826001015461082864e8d4a5100061082e87600301548760000154611c4a90919063ffffffff16565b905080156122b9576122b98482613184565b84156122f75781546122cb9086611d6b565b825560058301546122dc9086611d6b565b600584015582546122f7906001600160a01b03168587613314565b600383015482546123129164e8d4a510009161082e91611c4a565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b60006005838154811061236e57fe5b60009182526020808320868452600680835260408086206001600160a01b03808a1688529085528187208054600d5484516370a0823160e01b8152306004820152945195909802909501985096939593949316926370a0823192602480840193829003018186803b1580156123e257600080fd5b505afa1580156123f6573d6000803e3d6000fd5b505050506040513d602081101561240c57600080fd5b5051600c54600088815260076020526040808220548151630441a3e760e41b815260048101919091526024810187905290519394506001600160a01b039092169263441a3e7092604480820193929182900301818387803b15801561247057600080fd5b505af1158015612484573d6000803e3d6000fd5b5050600d54604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b1580156124d557600080fd5b505afa1580156124e9573d6000803e3d6000fd5b505050506040513d60208110156124ff57600080fd5b50516005860154909150612524906120c89061082e64e8d4a510006107a78688611d6b565b6004860155600080855560018501558454612549906001600160a01b03168785613314565b60058501546125589084611d6b565b600586015560408051848152905188916001600160a01b038916917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050505050565b6000600583815481106125b557fe5b60009182526020808320868452600680835260408086206001600160a01b03808a1688529452852080548682556001820196909655930201805490945091929161260191168583613314565b60058301546126109082611d6b565b600584015560408051828152905186916001600160a01b038716917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a35050505050565b6000611ca3836001600160a01b038416613366565b6000611ca3836001600160a01b0384166133b0565b6000611ca3836001600160a01b0384166133c8565b6000600584815481106126aa57fe5b60009182526020808320878452600680835260408086206001600160a01b038916875290935291909320910290910191506126e485610ec6565b805415612906576000612719826001015461082864e8d4a5100061082e87600301548760000154611c4a90919063ffffffff16565b9050801561272b5761272b8482613184565b600d54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561277657600080fd5b505afa15801561278a573d6000803e3d6000fd5b505050506040513d60208110156127a057600080fd5b5051600c54600089815260076020526040808220548151631c57762b60e31b815260048101919091526024810183905290519394506001600160a01b039092169263e2bbb15892604480820193929182900301818387803b15801561280457600080fd5b505af1158015612818573d6000803e3d6000fd5b5050600d54604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b15801561286957600080fd5b505afa15801561287d573d6000803e3d6000fd5b505050506040513d602081101561289357600080fd5b505160058601549091506128b8906120c89061082e64e8d4a510006107a78688611d6b565b60048601819055600285015485546000926128e292916108289164e8d4a510009161082e91611c4a565b9050801561290157600d54612901906001600160a01b03168883613314565b505050505b8315612b8e578154612923906001600160a01b031684308761348e565b60058201546129cc57600c54600086815260076020526040808220548151631c57762b60e31b815260048101919091526024810188905290516001600160a01b039093169263e2bbb1589260448084019391929182900301818387803b15801561298c57600080fd5b505af11580156129a0573d6000803e3d6000fd5b505082546129b19250905085611d11565b815560058201546129c29085611d11565b6005830155612b8e565b600d54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612a1757600080fd5b505afa158015612a2b573d6000803e3d6000fd5b505050506040513d6020811015612a4157600080fd5b5051600c54600088815260076020526040808220548151631c57762b60e31b81526004810191909152602481018a905290519394506001600160a01b039092169263e2bbb15892604480820193929182900301818387803b158015612aa557600080fd5b505af1158015612ab9573d6000803e3d6000fd5b5050600d54604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b158015612b0a57600080fd5b505afa158015612b1e573d6000803e3d6000fd5b505050506040513d6020811015612b3457600080fd5b50516005850154909150612b6490612b599061082e64e8d4a510006107a78688611d6b565b600486015490611d11565b60048501558254612b759087611d11565b83556005840154612b869087611d11565b600585015550505b60038201548154612ba99164e8d4a510009161082e91611c4a565b600182015560048201548154612bc99164e8d4a510009161082e91611c4a565b600282015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b600060058481548110612c2457fe5b60009182526020808320878452600680835260408086206001600160a01b03891687529093529190932091029091019150612c5e85610ec6565b805415612ca7576000612c93826001015461082864e8d4a5100061082e87600301548760000154611c4a90919063ffffffff16565b90508015612ca557612ca58482613184565b505b8315612ce7578154612cc4906001600160a01b031684308761348e565b8054612cd09085611d11565b81556005820154612ce19085611d11565b60058301555b60038201548154612d029164e8d4a510009161082e91611c4a565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b600080600060058581548110612d6057fe5b60009182526020808320888452600680835260408086206001600160a01b038b168752909352919093209102909101600381015460048201548354929450909115612f6f57600c54600089815260076020908152604080832054815163e4c75c2760e01b81526004810191909152306024820152905192936001600160a01b03169263e4c75c2792604480840193919291829003018186803b158015612e0557600080fd5b505afa158015612e19573d6000803e3d6000fd5b505050506040513d6020811015612e2f57600080fd5b50516005860154909150612e5790612e509061082e8464e8d4a51000611c4a565b8390611d11565b91506000612e83856002015461082864e8d4a5100061082e878a60000154611c4a90919063ffffffff16565b90508560020154431115612f29576000612ea08760020154610743565b90506000612ec1600a5461082e8a6001015485611c4a90919063ffffffff16565b9050612eed612ee6896005015461082e64e8d4a5100085611c4a90919063ffffffff16565b8790611d11565b9550612f17876001015461082864e8d4a5100061082e8a8c60000154611c4a90919063ffffffff16565b83995099505050505050505050611a1b565b8560020154431415612f6c57612f5d856001015461082864e8d4a5100061082e888a60000154611c4a90919063ffffffff16565b97509550611a1b945050505050565b50505b5060009788975095505050505050565b60008060058481548110612f8f57fe5b60009182526020808320878452600680835260408086206001600160a01b03808b16885290855281872060039390960290930191820154825482516370a0823160e01b815230600482015292519398509596909590949316926370a0823192602480840193829003018186803b15801561300857600080fd5b505afa15801561301c573d6000803e3d6000fd5b505050506040513d602081101561303257600080fd5b50518354909150156131085783600201544311156130c95760006130598560020154610743565b9050600061307a600a5461082e886001015485611c4a90919063ffffffff16565b90506130926107ad8461082e8464e8d4a51000611c4a565b93506130bc856001015461082864e8d4a5100061082e888a60000154611c4a90919063ffffffff16565b9650505050505050610d01565b8360020154431415613108576130fd836001015461082864e8d4a5100061082e868860000154611c4a90919063ffffffff16565b945050505050610d01565b5060009695505050505050565b6000610d01826134ee565b815460009082106131625760405162461bcd60e51b81526004018080602001828103825260228152602001806137c16022913960400191505060405180910390fd5b82600001828154811061317157fe5b9060005260206000200154905092915050565b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d60208110156131f957600080fd5b505190508082111561328d576003546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561325b57600080fd5b505af115801561326f573d6000803e3d6000fd5b505050506040513d602081101561328557600080fd5b50610db19050565b6003546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156132e357600080fd5b505af11580156132f7573d6000803e3d6000fd5b505050506040513d602081101561330d57600080fd5b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610db19084906134f2565b600061337283836133b0565b6133a857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d01565b506000610d01565b60009081526001919091016020526040902054151590565b6000818152600183016020526040812054801561348457835460001980830191908101906000908790839081106133fb57fe5b906000526020600020015490508087600001848154811061341857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061344857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610d01565b6000915050610d01565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526134e89085906134f2565b50505050565b5490565b6060613547826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135a39092919063ffffffff16565b805190915015610db15780806020019051602081101561356657600080fd5b5051610db15760405162461bcd60e51b815260040180806020018281038252602a815260200180613898602a913960400191505060405180910390fd5b60606135b284846000856135ba565b949350505050565b6060824710156135fb5760405162461bcd60e51b81526004018080602001828103825260268152602001806138096026913960400191505060405180910390fd5b61360485613716565b613655576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106136945780518252601f199092019160209182019101613675565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146136f6576040519150601f19603f3d011682016040523d82523d6000602084013e6136fb565b606091505b509150915061370b82828661371c565b979650505050505050565b3b151590565b6060831561372b575081611ca3565b82511561373b5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561378557818101518382015260200161376d565b50505050905090810190601f1680156137b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c7370617265436f756e7420746f6f206c61726765202c206d757374206c657373207468616e203634536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b7b368e910933214b9f23acca41e245ada941ee72aafa36ae502fc4570daf42164736f6c634300060c0033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77000000000000000000000000cbd6cb9243d8e3381fea611ef023e17d1b7aedf0000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ca

Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading