Contract 0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f81

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb41032d732b11fd1647cbfa8560d73f8b8841bea4975f361faa4d33e16101422Stake130527722021-11-29 15:11:2731 mins ago0x5f20bd0ce265d89d8ad8cc4c1dcd555fb7e2a746 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000619845
0xe78b3eb1060fb1ef4d621c567ae2b6c87e7c43bc0bfecd897634bd66a3c8703fStake130527272021-11-29 15:09:1033 mins ago0x3e0722a1190647d47423aa3d4ab8d40c1b81471f IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00052443
0x1a54acf304e114fc27ce6d53aac1b394b2ccc96544fa130fdb460219ef443834Unstake130525832021-11-29 15:01:2341 mins ago0x37af2f17cebce2072435cafa7ae0c4794eecb977 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00053071
0x5b87be2ca7d8e0998e6d936e03e226a8b7627e938ca5e1ae77fd8cca79a90fdcUnstake130523762021-11-29 14:50:0052 mins ago0x6da06e8abce623b3a163ed90b889858a6516c2b7 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00068104
0x0a1ad2dac9a6bd18c2f023638f4569e346cbb8015258490e505ced3edeb5884dStake130523142021-11-29 14:46:3356 mins ago0xea7268d378bbecedb03c5e993e98b8259dac8d78 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00065189
0xc5ddeceec4e5f1ac8f3565e3eb18eedbba317415c0bb56fdab1e4582250f5d05Unstake130520982021-11-29 14:35:051 hr 7 mins ago0xe05f66198ca67e3b242409f20d06c21428e1a392 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000546852
0xd34d2b56af65b06f757644de31bc512b5098a2465b990d39cfc2fc2453a55cb3Stake130519462021-11-29 14:26:531 hr 15 mins ago0xe05f66198ca67e3b242409f20d06c21428e1a392 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000734382
0x9f04d2b4aae9982215dca746602f60e2e79b7163e3201168793bc0746e9e8ce5Stake130517042021-11-29 14:13:541 hr 28 mins ago0x586df5ec6d7763cc0d368f880e6b907d59f8faf4 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00059943
0x81019ff133d1166bb23cdee213b2b073c0cbd5f9c24bb70adf5bdd92789bcbedStake130507892021-11-29 13:22:222 hrs 20 mins ago0xf73b78f55d5d00d84ee5b2fa0fd097e0e771332f IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00052443
0x6cf41297ed19796a585c283e42a39ceefb5598c9ed34dc07293b0dc844e3345bStake130505762021-11-29 13:11:262 hrs 31 mins ago0x06b3d2e47e3d7fadde51e6bfcae447ab91df55d1 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00065201
0x17daa01212d56009c0b58a91d25ac8e6ec129722c3fac2d3cb270222a2cd4de9Stake130505122021-11-29 13:07:172 hrs 35 mins ago0x01eb2827f62b8536db0f61685e2c682bf10f9371 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000619845
0x38008f611a5dceb13ffdd3360008cf4437befcbf348310371a018641166b7287Stake130502922021-11-29 12:54:162 hrs 48 mins ago0x139c0cc4af7ef86ee27a04c203692375e08c64ff IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000619845
0x2bfede8c5fa14ca6e2c8bef55b241a1e28922121604010e424096fa18482544eUnstake130500282021-11-29 12:37:093 hrs 5 mins ago0xd51891a612a33d078fbbc0a9cde475bdaa11f04d IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00056028
0xfd390db25bc7105740caa13afe0c7556a5f91312908d2c3945a7e44085632459Unstake130498302021-11-29 12:24:403 hrs 18 mins ago0xe159ee05fd241189e1fdfa85ddeeee37ce7c62bd IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00056022
0xcaa26515ef2caadf6e1334cd9a2b1052e446749fe7f5ec723ff53d53841340aeUnstake130497992021-11-29 12:22:583 hrs 19 mins ago0x7c85161e292dcb24633f10cc957a859f42a0ec70 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00053071
0xc2e343519604a99de8eaa1ccd15eb47056f2a286b3de419cff38f714c80a8c61Stake130494672021-11-29 12:04:043 hrs 38 mins ago0xd06cd78c722d0e71231604defd35b8ecb85682f5 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000694725
0xd7a2339b96702d554607d9de40c0f0b26cb3cec90ecc500504aefe145e79bc33Stake130487792021-11-29 11:25:114 hrs 17 mins ago0x38213e241ce6922cb3764eb671e3effb6ec50af7 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00065195
0xca812cc6aae548a55cd9a61a5281d3f1cbb11f1f8e0153928cd181ce5e384857Stake130487542021-11-29 11:23:424 hrs 18 mins ago0x38213e241ce6922cb3764eb671e3effb6ec50af7 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00052443
0xc8f48a83000976fcd7f593ec14d91784864d1a7a20d944aa4cd778444b911f44Stake130487542021-11-29 11:23:424 hrs 18 mins ago0x38213e241ce6922cb3764eb671e3effb6ec50af7 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000536985
0x5fde5da2c7d3f721f3a1d969845481b5a3063643fd12ab999a86b48bde28a311Unstake130487072021-11-29 11:21:044 hrs 21 mins ago0xccba9e945993fc9cd7bd6b2c4ea80ccfece57cb6 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00053065
0x85afd29df1d067363db3816f3225e2c94c9a9fc12e709ca2adf6eade05c0b0fdStake130484642021-11-29 11:08:004 hrs 34 mins ago0x6a615b3fec52e3888bc3094f0c2d0aa03e02ec94 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000619845
0x52e23384c83a47e524340d87b72d7e21f381a1e93d2af9f76b65175e717691b4Stake130484412021-11-29 11:06:444 hrs 35 mins ago0xea7268d378bbecedb03c5e993e98b8259dac8d78 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000619785
0x66522bdd1de55aae6c181518e0af341e09e7c24905fc048850245a0d1446b36cStake130479012021-11-29 10:35:345 hrs 7 mins ago0x94f22d081d1df7c45257f1e0c17fa769bf7234b3 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00057508
0x417bf8f2625422e1de3964eb1cb74b3d8598c1a62fd68157897259a08c2354caStake130478242021-11-29 10:30:215 hrs 12 mins ago0x1033836a07ff68f4b221e2478d311f605aacbb1e IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.000694725
0x5a6f06a5a93695d510a3e84812bd295de11e1fd788e3338cdad7ae74638a9c74Unstake130475212021-11-29 10:11:525 hrs 30 mins ago0x301896b1e9713f74ffc0beab5d00f826f9ffdc42 IN  0x6a8dbbfbb5a57d07d14e63e757fb80b4a7494f810 BNB0.00060604
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x52c0421b2ff9b270e7c914e6c0a075ee0a6835323024df28d6822de90e0f267f100993342021-08-17 5:22:49104 days 10 hrs ago 0xdf2a7a6a2f2453f9b9ac5f7032d62cbc12b7fd93  Contract Creation0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

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 11 : 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/utils/Pausable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import './ICommonMaster.sol';

contract CommonMaster is ICommonMaster, Pausable, Ownable {
    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,
        uint256 _totalToBeMintAmount
    ) public {
        token = ERC20(_token);
        startBlock = _startBlock;
        tokenPerBlock = _tokenPerBlock;
        maxTokenPerBlock = _maxTokenPerBlock;
        totalToBeMintAmount = _totalToBeMintAmount;
    }

    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,
        bool _withUpdate
    ) external override onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        PoolInfo storage pool = poolInfoMap[_pair];
        require(pool.exists, 'POOL NOT EXISTS');
        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');
        emit SetTokenPerBlock(msg.sender, _tokenPerBlock);
        tokenPerBlock = _tokenPerBlock;
    }

    function setTotalToBeMintAmount(uint256 _totalToBeMintAmount) external override onlyOwner {
        require(totalToBeMintAmount != _totalToBeMintAmount, 'NOT NEED UPDATE');
        emit SetTotalToBeMintAmount(msg.sender, totalToBeMintAmount, _totalToBeMintAmount);
        totalToBeMintAmount = _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 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(address(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 {
        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(address(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 {
        UserInfo storage userInfo = poolUserInfoMap[_pair][msg.sender];
        PoolInfo memory pool = poolInfoMap[_pair];
        if (_amount == 0) {
            _amount = userInfo.amount;
        } else {
            _amount = Math.min(_amount, userInfo.amount);
        }
        ERC20(_pair).safeTransfer(address(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.transfer(_to, tokenBal);
        } else {
            token.transfer(_to, _amount);
        }
    }

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

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

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

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

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

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

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

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

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

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

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

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

File 5 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

File 8 of 11 : 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 SetTotalToBeMintAmount(address indexed user, uint256 oldTotalToBeMintAmount, uint256 newTotalToBeMintAmount);

    // *** 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,
        bool _withUpdate
    ) 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 setTotalToBeMintAmount(uint256 _totalToBeMintAmount) external;
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

File 10 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 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"},{"internalType":"uint256","name":"_totalToBeMintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"uint256","name":"oldTotalToBeMintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalToBeMintAmount","type":"uint256"}],"name":"SetTotalToBeMintAmount","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":"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"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"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":"uint256","name":"_totalToBeMintAmount","type":"uint256"}],"name":"setTotalToBeMintAmount","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"}]

60806040526000600155600060055560006006553480156200002057600080fd5b506040516200339738038062003397833981810160405260a08110156200004657600080fd5b5080516020820151604083015160608401516080909401516000805460ff1916815593949293919291620000826001600160e01b036200010a16565b60008054610100600160a81b0319166101006001600160a01b038416908102919091178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600780546001600160a01b0319166001600160a01b0396909616959095179094556002929092556003556004556005556200010e565b3390565b613279806200011e6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80634dc6fb2b1161010f5780638da5cb5b116100a2578063f2fde38b11610071578063f2fde38b1461058b578063f35e4a6e146105be578063fc0c546a146105db578063feb21b9c146105e3576101e5565b80638da5cb5b146104e0578063adc9772e14610511578063bffcb4081461054a578063c2a672e014610552576101e5565b8063653ce73b116100de578063653ce73b1461047a578063715018a61461049d5780637b46c54f146104a55780637c993f84146104d8576101e5565b80634dc6fb2b146103fe5780634efaaf851461041b5780635c975abb14610456578063630b5ba114610472576101e5565b806334ace41711610187578063428109671161015657806342810967146103ad57806348cd4cb1146103b55780634c17b6ea146103bd5780634c524dcf146103f6576101e5565b806334ace417146102fb578063411330bd1461034f5780634198709a1461036c5780634268121e14610374576101e5565b806317caf6f1116101c357806317caf6f1146102a25780631eaaa045146102aa5780632b4cc01f146102eb5780632d380242146102f3576101e5565b8063081e3eda146101ea5780630b139194146102045780631218c59814610247575b600080fd5b6101f2610600565b60408051918252519081900360200190f35b6102456004803603606081101561021a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001351515610606565b005b61027a6004803603602081101561025d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610785565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6101f26107af565b610245600480360360608110156102c057600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff602082013516906040013515156107b5565b6101f2610a1e565b6101f2610a24565b6103366004803603604081101561031157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610a2a565b6040805192835260208301919091528051918290030190f35b6102456004803603602081101561036557600080fd5b5035610a4e565b6101f2610bb0565b6102456004803603604081101561038a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610bb6565b610245610ea4565b6101f2610fca565b610245600480360360408110156103d357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fd0565b6102456111a4565b6102456004803603602081101561041457600080fd5b50356112c7565b6101f26004803603604081101561043157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611423565b61045e61187d565b604080519115158252519081900360200190f35b610245611886565b6101f26004803603604081101561049057600080fd5b50803590602001356118d7565b610245611948565b610245600480360360208110156104bb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a63565b6101f2611cef565b6104e8611cf5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102456004803603604081101561052757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611d16565b6101f261210f565b6102456004803603604081101561056857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561211c565b610245600480360360208110156105a157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661241b565b610245600480360360208110156105d457600080fd5b50356125c6565b6104e86126f0565b6104e8600480360360208110156105f957600080fd5b503561270c565b60085490565b61060e612740565b73ffffffffffffffffffffffffffffffffffffffff1661062c611cf5565b73ffffffffffffffffffffffffffffffffffffffff16146106ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80156106bc576106bc611886565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600960205260409020600381015460ff1661075457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f504f4f4c204e4f54204558495354530000000000000000000000000000000000604482015290519081900360640190fd5b805460015461077a91859161076e9163ffffffff61274416565b9063ffffffff6127bb16565b600155919091555050565b60096020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60015481565b6107bd612740565b73ffffffffffffffffffffffffffffffffffffffff166107db611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461085d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561086b5761086b611886565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260409020600381015460ff161561090457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f706f6f6c20616c72656164792065786973747300000000000000000000000000604482015290519081900360640190fd5b6000600254431161091757600254610919565b435b60015490915061092f908663ffffffff6127bb16565b6001908155604080516080810182529687526020808801938452600088830181815260608a0185815273ffffffffffffffffffffffffffffffffffffffff99909916808352600990935292812098518955935188840155905160028801559451600390960180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001696151596909617909555600880549586018155905250507ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60055481565b60065481565b600a6020908152600092835260408084209091529082529020805460019091015482565b610a56612740565b73ffffffffffffffffffffffffffffffffffffffff16610a74611cf5565b73ffffffffffffffffffffffffffffffffffffffff1614610af657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8060035414158015610b0a57506004548111155b610b7557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60408051828152905133917fddff55616b219b56dd2191e0b65a26724ff9542bc389bd96adcf32c84c578299919081900360200190a2600355565b60035481565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a602090815260408083203384529091529020610bee613182565b5073ffffffffffffffffffffffffffffffffffffffff831660009081526009602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff161515606082015282610c5a5781549250610c6b565b610c6883836000015461282f565b92505b610c9273ffffffffffffffffffffffffffffffffffffffff8516338563ffffffff61284516565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff86169133917facd6ba886f96aa17b747e8b4b559f17d2f0b4bb3ecc04cbe58e453087f2a70a69181900360200190a38154831415610d245773ffffffffffffffffffffffffffffffffffffffff84166000908152600a60209081526040808320338452909152812081815560010155610e9e565b8154610d36908463ffffffff61274416565b8260000181905550610e9868056bc75e2d63100000610e8c8673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9457600080fd5b505afa158015610da8573d6000803e3d6000fd5b505050506040513d6020811015610dbe57600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d6020811015610e5f57600080fd5b50516040870151885460ff909216600a0a91610e809163ffffffff6128d716565b9063ffffffff6128d716565b9063ffffffff61294a16565b60018301555b50505050565b610eac612740565b73ffffffffffffffffffffffffffffffffffffffff16610eca611cf5565b73ffffffffffffffffffffffffffffffffffffffff1614610f4c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610f5461187d565b15610fc057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610fc86129cb565b565b60025481565b610fd8612740565b73ffffffffffffffffffffffffffffffffffffffff16610ff6611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461107857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260409020600381015460ff1661111057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f504f4f4c204e4f54204558495354530000000000000000000000000000000000604482015290519081900360640190fd5b60028101541580156111225750438210155b8015611132575043816001015410155b61119d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f6572720000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001015550565b6111ac612740565b73ffffffffffffffffffffffffffffffffffffffff166111ca611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461124c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61125461187d565b6112bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b610fc8612abd565b6112cf612740565b73ffffffffffffffffffffffffffffffffffffffff166112ed611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461136f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8060055414156113e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e4f54204e454544205550444154450000000000000000000000000000000000604482015290519081900360640190fd5b6005546040805191825260208201839052805133927f3f679bfdea28516fde9cced866183cd8b4fba6fb7f322e329fd00c6d5509e0e192908290030190a2600555565b600061142d613182565b5073ffffffffffffffffffffffffffffffffffffffff831660009081526009602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff1615156060820181905261149b576000915050611877565b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600a6020908152604080832094881683529381528382208585015185517f313ce5670000000000000000000000000000000000000000000000000000000081529551919590946116a093909263313ce567926004808201939291829003018186803b15801561152657600080fd5b505afa15801561153a573d6000803e3d6000fd5b505050506040513d602081101561155057600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b1580156115c757600080fd5b505afa1580156115db573d6000803e3d6000fd5b505050506040513d60208110156115f157600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160ff909216600a0a9173ffffffffffffffffffffffffffffffffffffffff8d16916370a08231916024808301926020929190829003018186803b15801561166857600080fd5b505afa15801561167c573d6000803e3d6000fd5b505050506040513d602081101561169257600080fd5b50519063ffffffff6128d716565b90508360200151431180156116b457508015155b1561171e5760006116c98560200151436118d7565b905060006116ea600154610e8c8860000151856128d790919063ffffffff16565b905061171961170c84610e8c8468056bc75e2d6310000063ffffffff6128d716565b859063ffffffff6127bb16565b935050505b611870836001015461186468056bc75e2d63100000610e8c8b73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561177c57600080fd5b505afa158015611790573d6000803e3d6000fd5b505050506040513d60208110156117a657600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b15801561181d57600080fd5b505afa158015611831573d6000803e3d6000fd5b505050506040513d602081101561184757600080fd5b50518a5460ff909116600a0a90610e80908b63ffffffff6128d716565b9063ffffffff61274416565b9450505050505b92915050565b60005460ff1690565b60085460005b818110156118d3576118cb600882815481106118a457fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16611a63565b60010161188c565b5050565b6000600254821115806118ee575060055460065410155b156118fb57506000611877565b60025483101561190b5760025492505b61194161192560065460055461274490919063ffffffff16565b60035461193c90610e80868863ffffffff61274416565b61282f565b9392505050565b611950612740565b73ffffffffffffffffffffffffffffffffffffffff1661196e611cf5565b73ffffffffffffffffffffffffffffffffffffffff16146119f057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600960205260409020600381015460ff161580611aa0575080600101544311155b15611aab5750611cec565b6000611c388373ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611af657600080fd5b505afa158015611b0a573d6000803e3d6000fd5b505050506040513d6020811015611b2057600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b158015611b9757600080fd5b505afa158015611bab573d6000803e3d6000fd5b505050506040513d6020811015611bc157600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160ff909216600a0a9173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561166857600080fd5b905080611c4c575043600190910155611cec565b60055460065410611c5e575050611cec565b6000611c6e8360010154436118d7565b90506000611c8f600154610e8c8660000154856128d790919063ffffffff16565b600654909150611ca5908263ffffffff6127bb16565b600655611cd9611cc884610e8c8468056bc75e2d6310000063ffffffff6128d716565b60028601549063ffffffff6127bb16565b6002850155505043600190920191909155505b50565b60045481565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1690565b611d1e61187d565b15611d8a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600960209081526040808320600a8352818420338552909252909120611dcb84611a63565b805415611f32576000611f1e826001015461186468056bc75e2d63100000610e8c8973ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e3257600080fd5b505afa158015611e46573d6000803e3d6000fd5b505050506040513d6020811015611e5c57600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b158015611ed357600080fd5b505afa158015611ee7573d6000803e3d6000fd5b505050506040513d6020811015611efd57600080fd5b505160028b01548a5460ff909216600a0a91610e809163ffffffff6128d716565b90508015611f3057611f303382612b81565b505b8215611f7557611f6073ffffffffffffffffffffffffffffffffffffffff851633308663ffffffff612d8316565b8054611f72908463ffffffff6127bb16565b81555b6120b768056bc75e2d63100000610e8c8673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcb57600080fd5b505afa158015611fdf573d6000803e3d6000fd5b505050506040513d6020811015611ff557600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b15801561206c57600080fd5b505afa158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b50516002880154875460ff909216600a0a91610e809163ffffffff6128d716565b600182015560408051848152905173ffffffffffffffffffffffffffffffffffffffff86169133917f99039fcf0a98f484616c5196ee8b2ecfa971babf0b519848289ea4db381f85f79181900360200190a350505050565b68056bc75e2d6310000081565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600960209081526040808320600a835281842033855290925290912080548311156121c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f57495448445241573a204e4f5420474f4f440000000000000000000000000000604482015290519081900360640190fd5b6121cd84611a63565b600061222d826001015461186468056bc75e2d63100000610e8c8973ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e3257600080fd5b9050801561223f5761223f3382612b81565b8315612280578154612257908563ffffffff61274416565b825561228073ffffffffffffffffffffffffffffffffffffffff8616338663ffffffff61284516565b6123c268056bc75e2d63100000610e8c8773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156122d657600080fd5b505afa1580156122ea573d6000803e3d6000fd5b505050506040513d602081101561230057600080fd5b5051600754604080517f313ce567000000000000000000000000000000000000000000000000000000008152905160ff909316600a0a92610e8c9273ffffffffffffffffffffffffffffffffffffffff169163313ce567916004808301926020929190829003018186803b15801561237757600080fd5b505afa15801561238b573d6000803e3d6000fd5b505050506040513d60208110156123a157600080fd5b50516002890154885460ff909216600a0a91610e809163ffffffff6128d716565b600183015560408051858152905173ffffffffffffffffffffffffffffffffffffffff87169133917f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c9181900360200190a35050505050565b612423612740565b73ffffffffffffffffffffffffffffffffffffffff16612441611cf5565b73ffffffffffffffffffffffffffffffffffffffff16146124c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661252f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131ad6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff8085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b6125ce612740565b73ffffffffffffffffffffffffffffffffffffffff166125ec611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461266e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80431115801561268057504360025410155b6126eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600255565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b6008818154811061271957fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3390565b6000828211156127b557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561194157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081831061283e5781611941565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526128d2908490612e14565b505050565b6000826128e657506000611877565b828202828482816128f357fe5b0414611941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806131f96021913960400191505060405180910390fd5b60008082116129ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816129c357fe5b049392505050565b6129d361187d565b15612a3f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a93612740565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190a1565b612ac561187d565b612b3057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612a93612740565b600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015612bf257600080fd5b505afa158015612c06573d6000803e3d6000fd5b505050506040513d6020811015612c1c57600080fd5b5051905080821115612cd657600754604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015612ca457600080fd5b505af1158015612cb8573d6000803e3d6000fd5b505050506040513d6020811015612cce57600080fd5b506128d29050565b600754604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015612d5257600080fd5b505af1158015612d66573d6000803e3d6000fd5b505050506040513d6020811015612d7c57600080fd5b5050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610e9e9085905b6060612e76826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612eec9092919063ffffffff16565b8051909150156128d257808060200190516020811015612e9557600080fd5b50516128d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061321a602a913960400191505060405180910390fd5b6060612efb8484600085612f03565b949350505050565b606082471015612f5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131d36026913960400191505060405180910390fd5b612f67856130be565b612fd257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b6020831061303c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612fff565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461309e576040519150601f19603f3d011682016040523d82523d6000602084013e6130a3565b606091505b50915091506130b38282866130c4565b979650505050505050565b3b151590565b606083156130d3575081611941565b8251156130e35782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561314757818101518382015260200161312f565b50505050905090810190601f1680156131745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040518060800160405280600081526020016000815260200160008152602001600015158152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122004b425f4d5537c4ae71e3efdd94354d168f6f051d2b07ebb934ead428760065564736f6c63430006060033000000000000000000000000e02df9e3e622debdd69fb838bb799e3f168902c500000000000000000000000000000000000000000000000000000000009a221e00000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000084595161401484a000000

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

000000000000000000000000e02df9e3e622debdd69fb838bb799e3f168902c500000000000000000000000000000000000000000000000000000000009a221e00000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000084595161401484a000000

-----Decoded View---------------
Arg [0] : _token (address): 0xe02df9e3e622debdd69fb838bb799e3f168902c5
Arg [1] : _startBlock (uint256): 10101278
Arg [2] : _tokenPerBlock (uint256): 62500000000000000
Arg [3] : _maxTokenPerBlock (uint256): 10000000000000000000
Arg [4] : _totalToBeMintAmount (uint256): 10000000000000000000000000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000e02df9e3e622debdd69fb838bb799e3f168902c5
Arg [1] : 00000000000000000000000000000000000000000000000000000000009a221e
Arg [2] : 00000000000000000000000000000000000000000000000000de0b6b3a764000
Arg [3] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [4] : 000000000000000000000000000000000000000000084595161401484a000000


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.