Contract 0x8fed5324dd180a72e7ed54e3cef1a843aa89fc60

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xeabba8ead5c115e34e1210c6b1d203c34e1a710516c71756b78c5364f425e69dUnstake130506232021-11-29 13:13:5637 mins ago0x6871012d29643333c11aade19f1a01349116205a IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353235
0x5cb62331f1ab38eede6dfff549ee0f086954b74e57d548329edca250a2f30f0aUnstake130502952021-11-29 12:54:3057 mins ago0xdd75e8d2bd6f8d3433bb6eeb1d72a7ba77569f8d IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053764
0xc555ea1d0cce7c544587608cc0fd9a9ca7d92a2ccafde70eefa428a24fcc2842Unstake130502222021-11-29 12:49:501 hr 1 min ago0x139c0cc4af7ef86ee27a04c203692375e08c64ff IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353235
0xa5e85ebcce51eae7135282db017faf4ed86d07c103d51ee154fb703f0f8a1074Unstake130497912021-11-29 12:22:241 hr 29 mins ago0xb56af512b14b96f81738a6cb522a15187cb11daf IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053764
0x8ff630f0b78a708f92c916e24947bc7141ef45a34394ccf4c30f33f0541398b4Unstake130494702021-11-29 12:04:131 hr 47 mins ago0x882fe4822ef3cfbb352409b45d33d60979629e56 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353175
0x47ed160736226e9827f029f6992592af969641b4541e8e26e3e306072f250a1fStake130494352021-11-29 12:02:271 hr 49 mins ago0x882fe4822ef3cfbb352409b45d33d60979629e56 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00050179
0x9e979775be98cd51c8fb71a2a01c7dd598d266eb5971b65b60dbe505b88cf414Unstake130489422021-11-29 11:34:462 hrs 17 mins ago0xd06cd78c722d0e71231604defd35b8ecb85682f5 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00046252
0xbcc780a6c53990d72bedd143d3ec261b46f17c24d987dfd0adbbae45bec8ae3cUnstake130486302021-11-29 11:16:562 hrs 34 mins ago0xa1dadd3ee2314f4bbd7fbb6de3213ce47192da39 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000604278
0x8ec0182aa7b2b7576abcc58676b7acaba2b23b88f2790ddfdc8c4c55e1bb4ec7Unstake130485662021-11-29 11:13:442 hrs 38 mins ago0xe9d182158b304aec87d44695fc8286fae0dd0b3f IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353175
0xbb5e822eecc7cb2c6337efaf98b441ee6b380b99e5493f06360939d64f622a37Unstake130476722021-11-29 10:20:563 hrs 30 mins ago0x3de5ee31a5116f24dd3ccb9745c187471fbb8cf6 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353235
0x0fe7d944f85d3b549c3ed1ca980f1f52a7f125e24b365c006a33931b4e4eac8cUnstake130475192021-11-29 10:11:463 hrs 40 mins ago0x9f71ee9eccbe0483e1d4ba8f855f1eed22080565 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00046264
0x8db7034ed777376f25d5786394cca68e51aff5d9eb1321d79cebd95070e754f4Unstake130467982021-11-29 9:32:434 hrs 19 mins ago0x70dacdfb3d067d535b6de9b0621b1b92aacb2b14 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00038764
0x4048c1c6b97c299274342e4d8b95475c75d28d466e2388a8dc49d242da2afd62Unstake130465942021-11-29 9:21:054 hrs 30 mins ago0xb932cc684f661ae83ab532b3eee1a14582c152a1 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353295
0xed542186a3706c186c5970b379bf1e6d2c9fb639fe2efb8dc9a5d19baae2ad6bUnstake130461162021-11-29 8:53:594 hrs 57 mins ago0x31521a359cf9381a5cbce7180df2c9457e0528d9 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053758
0x71519b8d525c1135025f217d2218481b3b7869657978d813e95cd09258949eaeUnstake130460752021-11-29 8:51:494 hrs 59 mins ago0x3cc9af0ab20314feb2c334a55f71aabb7a98502c IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053752
0x00b38b98f9f30d0c7a45210d3611aa55c4d729dad7111c97b1cb8f3dec142afbUnstake130459892021-11-29 8:47:045 hrs 4 mins ago0xe3b5a904315bb6457abbe43a5d00d4ce3d151a48 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353235
0x6d3735a3f81db731b197d74fecc5637a4cb4f1137339695471bc1cf0ec882783Unstake130458892021-11-29 8:41:135 hrs 10 mins ago0x62ff9ac6080a321a6264729efb3c4f0844a1eaf0 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353175
0x2acc120098a2e2135391159907b094071ec142c0377a1d989df9ab5a7266d770Unstake130456542021-11-29 8:26:585 hrs 24 mins ago0x4ab6fabddca006d3bbcf3e1c85361edddbad1b62 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053758
0x2cd2badc350b07839d3093dbf68d4725751ee479b5279ffe50d6e0dd21ecefb0Unstake130455492021-11-29 8:20:535 hrs 30 mins ago0x2b2269f5dc72453e4c1205951c65ebb4c38eb2c9 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.0005377
0xe4fca134989edafddabe0ff5cfb0dbe62442e3814ff30b5b873f70287b0f5c67Unstake130455402021-11-29 8:20:155 hrs 31 mins ago0xc9424bc721a68ebcd187495b780fe067994f9cae IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353175
0x836fdd6f8e968e05e9490c7e5af413b3177b5ba0b1613dab603d53acf4c5f44eUnstake130454952021-11-29 8:17:335 hrs 34 mins ago0xf761021e5f5e81a5e780e8946f98d46b08c7601d IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053758
0x42bc94da8684a32a8aef53fddda4c074e58a60427e43a9dac645b3ad37043117Unstake130451532021-11-29 7:57:555 hrs 53 mins ago0xb070ef1332e1decf3b40d775fdf30eb7c924bd16 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053764
0x94d0dd37a74e8125b38018c406c28eda36eea2d99ff5ca1b26739cc829305ae7Unstake130451352021-11-29 7:56:495 hrs 54 mins ago0xee7ebb217a2929001d7e0bc798db219985a9cba0 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000353235
0xf17dca72f86213a310df81990e823aae08f1ca7abe44fbfdcc0e1a448b0ef3eaStake130447652021-11-29 7:35:526 hrs 15 mins ago0x6871012d29643333c11aade19f1a01349116205a IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.000502995
0xc9ea529b89c8c4979251312a55631bbca0b3a378df3ce8445acb9d605a0086e4Unstake130446492021-11-29 7:29:486 hrs 22 mins ago0x3dc04269aa9050852be32ce61d30d2bfad5aa1e8 IN  0x8fed5324dd180a72e7ed54e3cef1a843aa89fc600 BNB0.00053764
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x4e5fe96f9c6c30f6432f73f0da0599defb91fa721bc2543b9d4fe74fbe85539a126569662021-11-15 1:38:4314 days 12 hrs ago 0x885d6c4e815ab079e07266110cf39558fd66c106  Contract Creation0 BNB
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x82B58aEa9Ee704bA3191D85decE3794400a4a100

Contract Name:
CommonMaster

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

pragma solidity =0.6.6;

import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/math/Math.sol';
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Pausable.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import './ICommonMaster.sol';

contract CommonMaster is ICommonMaster, Pausable, Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;
    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
    }

    // Info of each pool.
    struct PoolInfo {
        uint256 allocPoint; // How many allocation points assigned to this pool. TOKENs to distribute per block.
        uint256 lastRewardBlock; // Last block number that TOKENs distribution occurs.
        uint256 accTokenPerShare; // Accumulated TOKENs per share, times 1e12. See below.
        bool exists; //
    }
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when TOKEN mining starts.
    uint256 public startBlock;
    // TOKEN tokens created per block.
    uint256 public tokenPerBlock;
    // MAX TOKEN tokens created per block.
    uint256 public maxTokenPerBlock;
    // Accumulated TOKENs per share, times 1e20.
    uint256 public constant accTokenPerShareMultiple = 1E20;
    // total TOKEN to be mint amount
    uint256 public totalToBeMintAmount = 0;
    // minted TOKEN amount
    uint256 public mintedAmount = 0;
    // The TOKEN TOKEN!
    ERC20 public token;
    address[] public poolAddresses;
    // Info of each pool.
    mapping(address => PoolInfo) public poolInfoMap;
    // Info of each user that stakes LP tokens.
    mapping(address => mapping(address => UserInfo)) public override poolUserInfoMap;

    constructor(
        address _token,
        uint256 _startBlock,
        uint256 _tokenPerBlock,
        uint256 _maxTokenPerBlock
    ) public {
        token = ERC20(_token);
        startBlock = _startBlock;
        tokenPerBlock = _tokenPerBlock;
        maxTokenPerBlock = _maxTokenPerBlock;
    }

    function setStartBlock(uint256 _startBlock) public onlyOwner {
        require(block.number <= _startBlock && startBlock >= block.number, 'FORBIDDEN');
        startBlock = _startBlock;
    }

    // *** POOL MANAGER ***
    function poolLength() external view override returns (uint256) {
        return poolAddresses.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,
        address _pair,
        bool _withUpdate
    ) external override onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        PoolInfo storage pool = poolInfoMap[_pair];
        require(!pool.exists, 'pool already exists');
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfoMap[_pair] = PoolInfo({
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accTokenPerShare: 0,
            exists: true
        });
        poolAddresses.push(_pair);
    }

    // Update the given pool's TOKEN allocation point. Can only be called by the owner.
    function set(address _pair, uint256 _allocPoint) external override onlyOwner {
        PoolInfo storage pool = poolInfoMap[_pair];
        require(pool.exists, 'POOL NOT EXISTS');
        massUpdatePools();
        totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint);
        pool.allocPoint = _allocPoint;
    }

    function setLastRewardBlock(address _pair, uint256 _lastRewardBlock) external override onlyOwner {
        PoolInfo storage pool = poolInfoMap[_pair];
        require(pool.exists, 'POOL NOT EXISTS');
        require(
            pool.accTokenPerShare == 0 && _lastRewardBlock >= block.number && pool.lastRewardBlock >= block.number,
            'err'
        );
        pool.lastRewardBlock = _lastRewardBlock;
    }

    function setTokenPerBlock(uint256 _tokenPerBlock) external override onlyOwner {
        require(tokenPerBlock != _tokenPerBlock && _tokenPerBlock <= maxTokenPerBlock, 'FORBIDDEN');
        massUpdatePools();
        emit SetTokenPerBlock(msg.sender, _tokenPerBlock);
        tokenPerBlock = _tokenPerBlock;
    }

    function addTotalToBeMintAmount(uint256 _pendingTotalToBeMintAmount) external override onlyOwner {
        require(_pendingTotalToBeMintAmount != 0);
        massUpdatePools();
        token.safeTransferFrom(msg.sender, address(this), _pendingTotalToBeMintAmount);
        totalToBeMintAmount = totalToBeMintAmount.add(_pendingTotalToBeMintAmount);
        emit AddTotalToBeMintAmount(msg.sender, _pendingTotalToBeMintAmount, totalToBeMintAmount);
    }

    // Return total reward over the given _from to _to block.
    function getTotalReward(uint256 _from, uint256 _to) public view override returns (uint256 totalReward) {
        if (_to <= startBlock || mintedAmount >= totalToBeMintAmount) {
            return 0;
        }
        if (_from < startBlock) {
            _from = startBlock;
        }
        return Math.min(totalToBeMintAmount.sub(mintedAmount), _to.sub(_from).mul(tokenPerBlock));
    }

    // View function to see pending TOKENs on frontend.
    function pendingToken(address _pair, address _user) external view override returns (uint256) {
        PoolInfo memory pool = poolInfoMap[_pair];
        if (!pool.exists) {
            return 0;
        }
        UserInfo storage userInfo = poolUserInfoMap[_pair][_user];
        uint256 accTokenPerShare = pool.accTokenPerShare;
        uint256 stakeBalance = ERC20(_pair).balanceOf(address(this)).mul(10**uint256(token.decimals())).div(
            10**uint256(ERC20(_pair).decimals())
        );
        if (block.number > pool.lastRewardBlock && stakeBalance != 0) {
            uint256 totalReward = getTotalReward(pool.lastRewardBlock, block.number);
            uint256 tokenReward = totalReward.mul(pool.allocPoint).div(totalAllocPoint);
            accTokenPerShare = accTokenPerShare.add(tokenReward.mul(accTokenPerShareMultiple).div(stakeBalance));
        }
        return
            userInfo
                .amount
                .mul(accTokenPerShare)
                .mul(10**uint256(token.decimals()))
                .div(10**uint256(ERC20(_pair).decimals()))
                .div(accTokenPerShareMultiple)
                .sub(userInfo.rewardDebt);
    }

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() public override {
        uint256 length = poolAddresses.length;
        for (uint256 i = 0; i < length; ++i) {
            updatePool(poolAddresses[i]);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(address _pair) public override {
        PoolInfo storage pool = poolInfoMap[_pair];
        if (!pool.exists || block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 stakeBalance = ERC20(_pair).balanceOf(address(this)).mul(10**uint256(token.decimals())).div(
            10**uint256(ERC20(_pair).decimals())
        );
        if (stakeBalance == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        if (mintedAmount >= totalToBeMintAmount) {
            return;
        }
        uint256 totalReward = getTotalReward(pool.lastRewardBlock, block.number);
        uint256 tokenReward = totalReward.mul(pool.allocPoint).div(totalAllocPoint);
        mintedAmount = mintedAmount.add(tokenReward);
        pool.accTokenPerShare = pool.accTokenPerShare.add(tokenReward.mul(accTokenPerShareMultiple).div(stakeBalance));
        pool.lastRewardBlock = block.number;
    }

    // Stake LP tokens to TokenMaster for TOKEN allocation.
    function stake(address _pair, uint256 _amount) external override nonReentrant whenNotPaused {
        PoolInfo storage pool = poolInfoMap[_pair];
        UserInfo storage userInfo = poolUserInfoMap[_pair][msg.sender];
        updatePool(_pair);
        if (userInfo.amount != 0) {
            uint256 pending = userInfo
                .amount
                .mul(pool.accTokenPerShare)
                .mul(10**uint256(token.decimals()))
                .div(10**uint256(ERC20(_pair).decimals()))
                .div(accTokenPerShareMultiple)
                .sub(userInfo.rewardDebt);
            if (pending != 0) {
                safeTokenTransfer(msg.sender, pending);
            }
        }
        if (_amount != 0) {
            ERC20(_pair).safeTransferFrom(msg.sender, address(this), _amount);
            userInfo.amount = userInfo.amount.add(_amount);
        }
        userInfo.rewardDebt = userInfo
            .amount
            .mul(pool.accTokenPerShare)
            .mul(10**uint256(token.decimals()))
            .div(10**uint256(ERC20(_pair).decimals()))
            .div(accTokenPerShareMultiple);
        emit Stake(msg.sender, _pair, _amount);
    }

    // Unstake LP tokens from TokenMaster.
    function unstake(address _pair, uint256 _amount) external override nonReentrant {
        PoolInfo storage pool = poolInfoMap[_pair];
        UserInfo storage userInfo = poolUserInfoMap[_pair][msg.sender];
        require(userInfo.amount >= _amount, 'WITHDRAW: NOT GOOD');
        updatePool(_pair);
        uint256 pending = userInfo
            .amount
            .mul(pool.accTokenPerShare)
            .mul(10**uint256(token.decimals()))
            .div(10**uint256(ERC20(_pair).decimals()))
            .div(accTokenPerShareMultiple)
            .sub(userInfo.rewardDebt);
        if (pending != 0) {
            safeTokenTransfer(msg.sender, pending);
        }
        if (_amount != 0) {
            userInfo.amount = userInfo.amount.sub(_amount);
            ERC20(_pair).safeTransfer(msg.sender, _amount);
        }
        userInfo.rewardDebt = userInfo
            .amount
            .mul(pool.accTokenPerShare)
            .mul(10**uint256(token.decimals()))
            .div(10**uint256(ERC20(_pair).decimals()))
            .div(accTokenPerShareMultiple);
        emit Unstake(msg.sender, _pair, _amount);
    }

    // Unstake without caring about rewards. EMERGENCY ONLY.
    function emergencyUnstake(address _pair, uint256 _amount) external override nonReentrant {
        PoolInfo memory pool = poolInfoMap[_pair];
        require(pool.exists, 'POOL NOT EXISTS');
        UserInfo storage userInfo = poolUserInfoMap[_pair][msg.sender];
        if (_amount == 0) {
            _amount = userInfo.amount;
        } else {
            _amount = Math.min(_amount, userInfo.amount);
        }
        ERC20(_pair).safeTransfer(msg.sender, _amount);
        emit EmergencyUnstake(msg.sender, _pair, _amount);
        if (_amount == userInfo.amount) {
            delete poolUserInfoMap[_pair][msg.sender];
        } else {
            userInfo.amount = userInfo.amount.sub(_amount);
            userInfo.rewardDebt = userInfo
                .amount
                .mul(pool.accTokenPerShare)
                .mul(10**uint256(token.decimals()))
                .div(10**uint256(ERC20(_pair).decimals()))
                .div(accTokenPerShareMultiple);
        }
    }

    // Safe token transfer function, just in case if rounding error causes pool to not have enough TOKENs.
    function safeTokenTransfer(address _to, uint256 _amount) internal {
        uint256 tokenBal = token.balanceOf(address(this));
        if (_amount > tokenBal) {
            token.safeTransfer(_to, tokenBal);
        } else {
            token.safeTransfer(_to, _amount);
        }
    }

    function pauseStake() external override onlyOwner whenNotPaused {
        _pause();
    }

    function unpauseStake() external override onlyOwner whenPaused {
        _unpause();
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

import "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 9 of 12 : ICommonMaster.sol
pragma solidity =0.6.6;

interface ICommonMaster {
    event Stake(address indexed user, address indexed poolAddress, uint256 amount);
    event Unstake(address indexed user, address indexed poolAddress, uint256 amount);
    event EmergencyUnstake(address indexed user, address indexed poolAddress, uint256 amount);
    event SetTokenPerBlock(address indexed user, uint256 tokenPerBlock);
    event AddTotalToBeMintAmount(address indexed user, uint256 pendingTotalToBeMintAmount, uint256 totalToBeMintAmount);

    // *** POOL MANAGER ***
    function poolLength() external view returns (uint256);

    // 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,
        address _pair,
        bool _withUpdate
    ) external;

    // Update the given pool's TOKEN allocation point. Can only be called by the owner.
    function set(address _pair, uint256 _allocPoint) external;

    function setLastRewardBlock(address _pair, uint256 _lastRewardBlock) external;

    function poolUserInfoMap(address, address) external view returns (uint256, uint256);

    // Return total reward over the given _from to _to block.
    function getTotalReward(uint256 _from, uint256 _to) external view returns (uint256 totalReward);

    // View function to see pending TOKENs on frontend.
    function pendingToken(address _pair, address _user) external view returns (uint256);

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() external;

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(address _pair) external;

    // Stake LP tokens to TokenMaster for TOKEN allocation.
    function stake(address _pair, uint256 _amount) external;

    // Unstake LP tokens from TokenMaster.
    function unstake(address _pair, uint256 _amount) external;

    // Unstake without caring about rewards. EMERGENCY ONLY.
    function emergencyUnstake(address _pair, uint256 _amount) external;

    function pauseStake() external;

    function unpauseStake() external;

    function setTokenPerBlock(uint256 _tokenPerBlock) external;

    function addTotalToBeMintAmount(uint256 _pendingTotalToBeMintAmount) external;
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_tokenPerBlock","type":"uint256"},{"internalType":"uint256","name":"_maxTokenPerBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"pendingTotalToBeMintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalToBeMintAmount","type":"uint256"}],"name":"AddTotalToBeMintAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyUnstake","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenPerBlock","type":"uint256"}],"name":"SetTokenPerBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"inputs":[],"name":"accTokenPerShareMultiple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"address","name":"_pair","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pendingTotalToBeMintAmount","type":"uint256"}],"name":"addTotalToBeMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getTotalReward","outputs":[{"internalType":"uint256","name":"totalReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTokenPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolInfoMap","outputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accTokenPerShare","type":"uint256"},{"internalType":"bool","name":"exists","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"poolUserInfoMap","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint256","name":"_lastRewardBlock","type":"uint256"}],"name":"setLastRewardBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"setStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPerBlock","type":"uint256"}],"name":"setTokenPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalToBeMintAmount","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":[],"name":"unpauseStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600255600060065560006007553480156200002057600080fd5b506040516200344e3803806200344e833981810160405260808110156200004657600080fd5b508051602082015160408301516060909301516000805460ff19168155929391926200007a6001600160e01b036200010316565b60008054610100600160a81b0319166101006001600160a01b038416908102919091178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055600880546001600160a01b0319166001600160a01b03959095169490941790935560039190915560045560055562000107565b3390565b61333780620001176000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80634efaaf851161010f578063adc9772e116100a2578063f2fde38b11610071578063f2fde38b14610583578063f35e4a6e146105b6578063fc0c546a146105d3578063feb21b9c146105db576101e5565b8063adc9772e146104ec578063bffcb40814610525578063c0a1fdef1461052d578063c2a672e01461054a576101e5565b8063715018a6116100de578063715018a6146104785780637b46c54f146104805780637c993f84146104b35780638da5cb5b146104bb576101e5565b80634efaaf85146103f65780635c975abb14610431578063630b5ba11461044d578063653ce73b14610455576101e5565b80633825d82811610187578063428109671161015657806342810967146103a557806348cd4cb1146103ad5780634c17b6ea146103b55780634c524dcf146103ee576101e5565b80633825d8281461030e578063411330bd146103475780634198709a146103645780634268121e1461036c576101e5565b80631eaaa045116101c35780631eaaa045146102675780632b4cc01f146102aa5780632d380242146102b257806334ace417146102ba576101e5565b8063081e3eda146101ea5780631218c5981461020457806317caf6f11461025f575b600080fd5b6101f26105f8565b60408051918252519081900360200190f35b6102376004803603602081101561021a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166105fe565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6101f2610628565b6102a86004803603606081101561027d57600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561062e565b005b6101f2610899565b6101f261089f565b6102f5600480360360408110156102d057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166108a5565b6040805192835260208301919091528051918290030190f35b6102a86004803603604081101561032457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108c9565b6102a86004803603602081101561035d57600080fd5b5035610a3e565b6101f2610ba8565b6102a86004803603604081101561038257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610bae565b6102a8610f84565b6101f26110aa565b6102a8600480360360408110156103cb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356110b0565b6102a8611284565b6101f26004803603604081101561040c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166113a7565b610439611801565b604080519115158252519081900360200190f35b6102a861180a565b6101f26004803603604081101561046b57600080fd5b508035906020013561185b565b6102a86118cc565b6102a86004803603602081101561049657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166119e7565b6101f2611c73565b6104c3611c79565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102a86004803603604081101561050257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611c9a565b6101f261210e565b6102a86004803603602081101561054357600080fd5b503561211b565b6102a86004803603604081101561056057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135612257565b6102a86004803603602081101561059957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166125d1565b6102a8600480360360208110156105cc57600080fd5b503561277c565b6104c36128a6565b6104c3600480360360208110156105f157600080fd5b50356128c2565b60095490565b600a6020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60025481565b6106366128f6565b73ffffffffffffffffffffffffffffffffffffffff16610654611c79565b73ffffffffffffffffffffffffffffffffffffffff16146106d657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80156106e4576106e461180a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60205260409020600381015460ff161561077d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f706f6f6c20616c72656164792065786973747300000000000000000000000000604482015290519081900360640190fd5b6000600354431161079057600354610792565b435b6002549091506107a8908663ffffffff6128fa16565b60029081556040805160808101825296875260208088019384526000888301818152600160608b0181815273ffffffffffffffffffffffffffffffffffffffff9a909a16808452600a90945293822099518a559451898401559351928801929092559451600390960180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001696151596909617909555600980549485018155905250507f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60065481565b60075481565b600b6020908152600092835260408084209091529082529020805460019091015482565b6108d16128f6565b73ffffffffffffffffffffffffffffffffffffffff166108ef611c79565b73ffffffffffffffffffffffffffffffffffffffff161461097157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60205260409020600381015460ff16610a0957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f504f4f4c204e4f54204558495354530000000000000000000000000000000000604482015290519081900360640190fd5b610a1161180a565b8054600254610a37918491610a2b9163ffffffff61296e16565b9063ffffffff6128fa16565b6002555550565b610a466128f6565b73ffffffffffffffffffffffffffffffffffffffff16610a64611c79565b73ffffffffffffffffffffffffffffffffffffffff1614610ae657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8060045414158015610afa57506005548111155b610b6557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b610b6d61180a565b60408051828152905133917fddff55616b219b56dd2191e0b65a26724ff9542bc389bd96adcf32c84c578299919081900360200190a2600455565b60045481565b60026001541415610c2057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155610c2d613240565b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600a602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff16151560608201819052610cf857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f504f4f4c204e4f54204558495354530000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b60209081526040808320338452909152902082610d365780549250610d47565b610d448382600001546129e5565b92505b610d6e73ffffffffffffffffffffffffffffffffffffffff8516338563ffffffff6129fb16565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff86169133917facd6ba886f96aa17b747e8b4b559f17d2f0b4bb3ecc04cbe58e453087f2a70a69181900360200190a38054831415610e005773ffffffffffffffffffffffffffffffffffffffff84166000908152600b60209081526040808320338452909152812081815560010155610f7a565b8054610e12908463ffffffff61296e16565b8160000181905550610f7468056bc75e2d63100000610f688673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7057600080fd5b505afa158015610e84573d6000803e3d6000fd5b505050506040513d6020811015610e9a57600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b158015610f1157600080fd5b505afa158015610f25573d6000803e3d6000fd5b505050506040513d6020811015610f3b57600080fd5b50516040880151875460ff909216600a0a91610f5c9163ffffffff612a8d16565b9063ffffffff612a8d16565b9063ffffffff612b0016565b60018201555b5050600180555050565b610f8c6128f6565b73ffffffffffffffffffffffffffffffffffffffff16610faa611c79565b73ffffffffffffffffffffffffffffffffffffffff161461102c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611034611801565b156110a057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6110a8612b81565b565b60035481565b6110b86128f6565b73ffffffffffffffffffffffffffffffffffffffff166110d6611c79565b73ffffffffffffffffffffffffffffffffffffffff161461115857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60205260409020600381015460ff166111f057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f504f4f4c204e4f54204558495354530000000000000000000000000000000000604482015290519081900360640190fd5b60028101541580156112025750438210155b8015611212575043816001015410155b61127d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6572720000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001015550565b61128c6128f6565b73ffffffffffffffffffffffffffffffffffffffff166112aa611c79565b73ffffffffffffffffffffffffffffffffffffffff161461132c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611334611801565b61139f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6110a8612c73565b60006113b1613240565b5073ffffffffffffffffffffffffffffffffffffffff83166000908152600a602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff1615156060820181905261141f5760009150506117fb565b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600b6020908152604080832094881683529381528382208585015185517f313ce56700000000000000000000000000000000000000000000000000000000815295519195909461162493909263313ce567926004808201939291829003018186803b1580156114aa57600080fd5b505afa1580156114be573d6000803e3d6000fd5b505050506040513d60208110156114d457600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b15801561154b57600080fd5b505afa15801561155f573d6000803e3d6000fd5b505050506040513d602081101561157557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160ff909216600a0a9173ffffffffffffffffffffffffffffffffffffffff8d16916370a08231916024808301926020929190829003018186803b1580156115ec57600080fd5b505afa158015611600573d6000803e3d6000fd5b505050506040513d602081101561161657600080fd5b50519063ffffffff612a8d16565b905083602001514311801561163857508015155b156116a257600061164d85602001514361185b565b9050600061166e600254610f68886000015185612a8d90919063ffffffff16565b905061169d61169084610f688468056bc75e2d6310000063ffffffff612a8d16565b859063ffffffff6128fa16565b935050505b6117f483600101546117e868056bc75e2d63100000610f688b73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561170057600080fd5b505afa158015611714573d6000803e3d6000fd5b505050506040513d602081101561172a57600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b1580156117a157600080fd5b505afa1580156117b5573d6000803e3d6000fd5b505050506040513d60208110156117cb57600080fd5b50518a5460ff909116600a0a90610f5c908b63ffffffff612a8d16565b9063ffffffff61296e16565b9450505050505b92915050565b60005460ff1690565b60095460005b818110156118575761184f6009828154811061182857fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff166119e7565b600101611810565b5050565b600060035482111580611872575060065460075410155b1561187f575060006117fb565b60035483101561188f5760035492505b6118c56118a960075460065461296e90919063ffffffff16565b6004546118c090610f5c868863ffffffff61296e16565b6129e5565b9392505050565b6118d46128f6565b73ffffffffffffffffffffffffffffffffffffffff166118f2611c79565b73ffffffffffffffffffffffffffffffffffffffff161461197457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a60205260409020600381015460ff161580611a24575080600101544311155b15611a2f5750611c70565b6000611bbc8373ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7a57600080fd5b505afa158015611a8e573d6000803e3d6000fd5b505050506040513d6020811015611aa457600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b158015611b1b57600080fd5b505afa158015611b2f573d6000803e3d6000fd5b505050506040513d6020811015611b4557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160ff909216600a0a9173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b1580156115ec57600080fd5b905080611bd0575043600190910155611c70565b60065460075410611be2575050611c70565b6000611bf283600101544361185b565b90506000611c13600254610f68866000015485612a8d90919063ffffffff16565b600754909150611c29908263ffffffff6128fa16565b600755611c5d611c4c84610f688468056bc75e2d6310000063ffffffff612a8d16565b60028601549063ffffffff6128fa16565b6002850155505043600190920191909155505b50565b60055481565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1690565b60026001541415611d0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155611d19611801565b15611d8557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320600b8352818420338552909252909120611dc6846119e7565b805415611f2d576000611f1982600101546117e868056bc75e2d63100000610f688973ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b158015611ece57600080fd5b505afa158015611ee2573d6000803e3d6000fd5b505050506040513d6020811015611ef857600080fd5b505160028b01548a5460ff909216600a0a91610f5c9163ffffffff612a8d16565b90508015611f2b57611f2b3382612d37565b505b8215611f7057611f5b73ffffffffffffffffffffffffffffffffffffffff851633308663ffffffff612e3716565b8054611f6d908463ffffffff6128fa16565b81555b6120b268056bc75e2d63100000610f688673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611fc657600080fd5b505afa158015611fda573d6000803e3d6000fd5b505050506040513d6020811015611ff057600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b15801561206757600080fd5b505afa15801561207b573d6000803e3d6000fd5b505050506040513d602081101561209157600080fd5b50516002880154875460ff909216600a0a91610f5c9163ffffffff612a8d16565b600182015560408051848152905173ffffffffffffffffffffffffffffffffffffffff86169133917f99039fcf0a98f484616c5196ee8b2ecfa971babf0b519848289ea4db381f85f79181900360200190a35050600180555050565b68056bc75e2d6310000081565b6121236128f6565b73ffffffffffffffffffffffffffffffffffffffff16612141611c79565b73ffffffffffffffffffffffffffffffffffffffff16146121c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b806121cd57600080fd5b6121d561180a565b6008546122009073ffffffffffffffffffffffffffffffffffffffff1633308463ffffffff612e3716565b600654612213908263ffffffff6128fa16565b6006819055604080518381526020810192909252805133927fb73baa08ac248be29e50c98a6614410f70ddb9153b93a895e0f8984e01361e3392908290030190a250565b600260015414156122c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015573ffffffffffffffffffffffffffffffffffffffff82166000908152600a60209081526040808320600b8352818420338552909252909120805483111561237657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f57495448445241573a204e4f5420474f4f440000000000000000000000000000604482015290519081900360640190fd5b61237f846119e7565b60006123df82600101546117e868056bc75e2d63100000610f688973ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b905080156123f1576123f13382612d37565b8315612432578154612409908563ffffffff61296e16565b825561243273ffffffffffffffffffffffffffffffffffffffff8616338663ffffffff6129fb16565b61257468056bc75e2d63100000610f688773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561248857600080fd5b505afa15801561249c573d6000803e3d6000fd5b505050506040513d60208110156124b257600080fd5b5051600854604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610f689273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b15801561252957600080fd5b505afa15801561253d573d6000803e3d6000fd5b505050506040513d602081101561255357600080fd5b50516002890154885460ff909216600a0a91610f5c9163ffffffff612a8d16565b600183015560408051858152905173ffffffffffffffffffffffffffffffffffffffff87169133917f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c9181900360200190a3505060018055505050565b6125d96128f6565b73ffffffffffffffffffffffffffffffffffffffff166125f7611c79565b73ffffffffffffffffffffffffffffffffffffffff161461267957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166126e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061326b6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff8085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b6127846128f6565b73ffffffffffffffffffffffffffffffffffffffff166127a2611c79565b73ffffffffffffffffffffffffffffffffffffffff161461282457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80431115801561283657504360035410155b6128a157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600355565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b600981815481106128cf57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3390565b6000828201838110156118c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000828211156129df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008183106129f457816118c5565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612a88908490612ed2565b505050565b600082612a9c575060006117fb565b82820282848281612aa957fe5b04146118c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806132b76021913960400191505060405180910390fd5b6000808211612b7057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612b7957fe5b049392505050565b612b89611801565b15612bf557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c496128f6565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190a1565b612c7b611801565b612ce657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612c496128f6565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015612da857600080fd5b505afa158015612dbc573d6000803e3d6000fd5b505050506040513d6020811015612dd257600080fd5b5051905080821115612e0d57600854612e089073ffffffffffffffffffffffffffffffffffffffff16848363ffffffff6129fb16565b612a88565b600854612a889073ffffffffffffffffffffffffffffffffffffffff16848463ffffffff6129fb16565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052612ecc908590612ed2565b50505050565b6060612f34826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612faa9092919063ffffffff16565b805190915015612a8857808060200190516020811015612f5357600080fd5b5051612a88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806132d8602a913960400191505060405180910390fd5b6060612fb98484600085612fc1565b949350505050565b60608247101561301c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132916026913960400191505060405180910390fd5b6130258561317c565b61309057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106130fa57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016130bd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461315c576040519150601f19603f3d011682016040523d82523d6000602084013e613161565b606091505b5091509150613171828286613182565b979650505050505050565b3b151590565b606083156131915750816118c5565b8251156131a15782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156132055781810151838201526020016131ed565b50505050905090810190601f1680156132325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040518060800160405280600081526020016000815260200160008152602001600015158152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d23440c6ff5133f724b5e4593ed588a35da5569712b2c3f091563bed48235fc464736f6c63430006060033000000000000000000000000d8813b5dfa9abeb693f217bb905ec99b66fb017c0000000000000000000000000000000000000000000000000000000000a347060000000000000000000000000000000000000000000000000853a0d2313c00000000000000000000000000000000000000000000000000056bc75e2d63100000

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