Contract 0x9214759e21d4d4110a959fe4faa528cc98e4372f

 
Ad
Ad
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3899facac12be27c2cd6b5c248517717fe5154b134679aeaa2078ba846d20806Deposit202045822021-10-14 9:16:024 days 16 hrs ago0xef669b7c021853c091b5ef77068594ff081f987e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.008731485001
0xd1eb1e6c20aa8bc1afa66808a49429a162d458ccb3410bda45dac046a9514191Withdraw202045362021-10-14 9:13:584 days 16 hrs ago0xef669b7c021853c091b5ef77068594ff081f987e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.007937640001
0x5cb867f46ec36d2e2d616e79c779bb17093c91a4f1d64a60c3e0f1b9268e4933Withdraw201941682021-10-14 2:22:554 days 23 hrs ago0xf465d66fe7c960bf1da323c0ee6dee54eedb6edb IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.007139565
0xe4f22125ce4ebda0759f13223084e907d3a5bed6ee05ce974d0aca2e069df794Deposit201938712021-10-14 2:10:374 days 23 hrs ago0xf465d66fe7c960bf1da323c0ee6dee54eedb6edb IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.006990255
0x8dad18fdcaafb9d62ebe1ea65c812875c586a6731e48ba62e511130665194c24Deposit201937192021-10-14 2:05:214 days 23 hrs ago0xf465d66fe7c960bf1da323c0ee6dee54eedb6edb IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.010068255
0x2060414ae53f8e1bbaaf304e15d4ed10422034158259cea93f4877bf864dc9fbDeposit201897012021-10-13 23:19:225 days 2 hrs ago0xf465d66fe7c960bf1da323c0ee6dee54eedb6edb IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.007911135
0xe7327767b4312bdc85c0f171883a5efc7e7af613ebf693abcbc5b38a10363206Deposit201862182021-10-13 20:52:145 days 4 hrs ago0xef669b7c021853c091b5ef77068594ff081f987e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.008554950001
0xa3ee9a120edc2032e73220be8a121f191315a11ef1b38d955f9c9901b6d49b09Withdraw201427982021-10-12 16:10:006 days 9 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00234585
0x274490d0a9477fc0b51d01b73eec32478d213e0cf469504ca833d9dc857810edDeposit201427282021-10-12 16:07:366 days 9 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00281907
0x1e94aaa1a8f4761f6dee1dc92ec5cb830e73ef5fd25eaef2f8f75417824e8039Withdraw201426792021-10-12 16:05:546 days 9 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00140634
0x386edaf3db47c003535d43b3df57e9342b37868151bffdaf1851f99920de753aWithdraw201426212021-10-12 16:02:466 days 9 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00279648
0xd165790cf43c0aa2339967c8570e00382a288289f32fc18e77ff5f8998c43b34Deposit201423732021-10-12 15:53:146 days 9 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00286803
0xee7fc918770c09cf3724312bc1b39c0c6b83734a6e1f69e7c240a3079a6dfb6cWithdraw201423222021-10-12 15:51:286 days 9 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00279648
0x1d368f36afd0475948dbeaff12a71eccda284211df17f35d561172ab596a5b01Withdraw201421612021-10-12 15:42:456 days 9 hrs ago0xbb8eb8dbee8d4ba716489ede53b96edd49471eee IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00177954
0x80b74919007cff2a723f0d73a56e11da4af8947c1e0c6991c3be173813d259deWithdraw201420312021-10-12 15:36:236 days 10 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00279648
0xb2b192c4121ecde6d37e8d09a51afe0dbdb9a6e3f72a829f9e279597885a3f72Withdraw201416672021-10-12 15:23:516 days 10 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.0027972
0xaee4311fd8900b09490b651c63ecfefc2a68bc5a26c8ee706cbb24bcd017e3b8Deposit201410392021-10-12 14:59:126 days 10 hrs ago0xbb8eb8dbee8d4ba716489ede53b96edd49471eee IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.003787487
0x9739875963fadaec079bef7bdf9a9acf5a1bbbaa6a187eff3f4ec8d0351975f6Deposit201400572021-10-12 14:21:016 days 11 hrs ago0x9e866eab4c6685ed0dfab886ee8ad0350db8488d IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00507693
0x0922eebee18c4e5e0c94badb74dc7de0fb1bfb075c2ec43e9faae44e40aec7a1Deposit201395692021-10-12 14:04:016 days 11 hrs ago0xfd16d776d9127b3d86ec0f7b1858304f96bff88e IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.00514713
0x33cd487993f25d85cfddc1c999bb024ed6aa8bdad6253808736e922a2a267995Multi Add200755782021-10-10 21:15:098 days 4 hrs ago0x9e866eab4c6685ed0dfab886ee8ad0350db8488d IN  0x9214759e21d4d4110a959fe4faa528cc98e4372f0 MATIC0.14642726
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xfd37bd2edf9f2ce7e4b3fe0f2b26baef3330a0b8c5701049bb43f73a44051ea3200755442021-10-10 21:12:538 days 4 hrs ago 0x770092c61fe5e5cbe3b10e219f4c6ba1da2cc438  Contract Creation0 MATIC
[ Download CSV Export 
Loading

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

Contract Name:
MasterChef

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : MasterChef.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import '@openzeppelin/contracts/math/SafeMath.sol';
import './libs/IBEP20.sol';
import './libs/SafeBEP20.sol';
import './libs/IReferral.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import './libs/IFarmToken.sol';

// MasterChef is responsable for managing the deposits, withdraws, harvests and distribute token rewards.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract MasterChef is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;

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

    // Info of each pool.
    struct PoolInfo {
        IBEP20 lpToken; // Address of LP token contract.
        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 accTokensPerShare; // Accumulated tokens per share, times 1e12. See below.
        uint16 depositFeeBP; // Deposit fee in basis points
        uint256 tokensPerBlock; // Tokens per block on the last updatePool
    }

    // The TOKEN!
    IFarmToken public token;
    // Dev address.
    address public devAddr;

    // Tokens created per block depending on each block breakpoint
    uint256[] public tokenPerBlockPhases;
    // Block number breakpoints for each emission rate
    uint256[] public tokenPerBlockBreakpoints;

    // Deposit Fee address
    address public feeAddress;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when mining starts.
    uint256 public startBlock;

    // Referral contract address.
    IReferral public referral;
    // Referral commission rate in basis points.
    uint16 public referralCommissionRate;

    // Burn address
    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
    // Initialize is called by the factory right after construction, isInitialized is used to ensure it can't be called again
    bool public isInitialized = false;
    // Fee cap in basis points
    uint16 public depositFeeCap;
    // PlatformFee
    uint16 public platformFee;
    // Platform address
    address public platformFeeAddress;
    // Devs comision
    uint16 public devCommission;
    // Percentage of dev deposit fees used for buy-backs
    uint16 public buyBackRate;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event SetFeeAddress(address indexed user, address indexed newAddress);
    event SetDevAddress(address indexed user, address indexed newAddress);
    event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount);
    event StartBlockChanged(uint256 previousStartTime, uint256 newStartTime);

    function initialize(
        IFarmToken _token,
        address[3] memory _addresses,
        uint16[5] memory _fees,
        uint256[] memory _tokenPerBlockPhases,
        uint256[] memory _tokenPerBlockBreakpoints,
        uint256 _startBlock
    ) external onlyOwner {
        require(!isInitialized, 'initialize: already initialized');
        require(
            _tokenPerBlockPhases.length == _tokenPerBlockBreakpoints.length + 1,
            'initialize: token per block length mismatch'
        );
        token = _token;
        feeAddress = _addresses[0];
        devAddr = _addresses[1];
        platformFeeAddress = _addresses[2];
        depositFeeCap = _fees[0];
        referralCommissionRate = _fees[1];
        devCommission = _fees[2];
        buyBackRate = _fees[3];
        platformFee = _fees[4];
        tokenPerBlockPhases = _tokenPerBlockPhases;
        tokenPerBlockBreakpoints = _tokenPerBlockBreakpoints;
        startBlock = _startBlock;
        isInitialized = true;
    }

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

    mapping(IBEP20 => bool) public poolExistence;
    modifier nonDuplicated(IBEP20 _lpToken) {
        require(poolExistence[_lpToken] == false, 'nonDuplicated: duplicated');
        _;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(
        uint256 _allocPoint,
        IBEP20 _lpToken,
        uint16 _depositFeeBP,
        bool _withUpdate
    ) public onlyOwner nonDuplicated(_lpToken) {
        require(_depositFeeBP <= depositFeeCap, 'add: invalid deposit fee basis points');
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolExistence[_lpToken] = true;
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accTokensPerShare: 0,
                depositFeeBP: _depositFeeBP,
                tokensPerBlock: tokensPerBlock()
            })
        );
    }

    function multiAdd(
        uint256[] memory _allocPoints,
        IBEP20[] memory _lpTokens,
        uint16[] memory _depositFeesBP,
        bool _withUpdate
    ) public onlyOwner {
        require(
            _allocPoints.length == _lpTokens.length && _lpTokens.length == _depositFeesBP.length,
            'multiAdd: length mismatch'
        );
        if (_withUpdate) {
            massUpdatePools();
        }
        for (uint256 i = 0; i < _allocPoints.length; i++) {
            add(_allocPoints[i], _lpTokens[i], _depositFeesBP[i], false);
        }
    }

    // Update the given pool's token allocation point and deposit fee. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        uint16 _depositFeeBP,
        bool _withUpdate
    ) public onlyOwner {
        require(_depositFeeBP <= depositFeeCap, 'set: invalid deposit fee basis points');
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
    }

    // View function to see pending tokens on frontend.
    function pendingTokens(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accTokensPerShare = pool.accTokensPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 tokenReward = tokensBetweenBlocks(pool.lastRewardBlock, block.number).mul(pool.allocPoint).div(
                totalAllocPoint
            );
            accTokensPerShare = accTokensPerShare.add(tokenReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accTokensPerShare).div(1e12).sub(user.rewardDebt);
    }

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 tokenReward = tokensBetweenBlocks(pool.lastRewardBlock, block.number).mul(pool.allocPoint).div(
            totalAllocPoint
        );
        token.mint(devAddr, tokenReward.mul(devCommission).div(10000));
        token.mint(address(this), tokenReward);
        pool.accTokensPerShare = pool.accTokensPerShare.add(tokenReward.mul(1e12).div(lpSupply));
        pool.tokensPerBlock = this.tokensPerBlock();
        pool.lastRewardBlock = block.number;
    }

    function tokensBetweenBlocks(uint256 from, uint256 to) public view returns (uint256) {
        uint256 tokens = 0;
        uint256 fromLast = from;
        for (uint256 i = 0; i < tokenPerBlockBreakpoints.length; i++) {
            if (tokenPerBlockBreakpoints[i] > fromLast) {
                uint256 toLast = to > tokenPerBlockBreakpoints[i] ? tokenPerBlockBreakpoints[i] : to;
                tokens = tokens.add(toLast.sub(fromLast).mul(tokenPerBlockPhases[i]));
                if (tokenPerBlockBreakpoints[i] > to) {
                    return tokens;
                }
                fromLast = toLast;
            }
        }
        return tokens.add(to.sub(fromLast).mul(tokenPerBlockPhases[tokenPerBlockPhases.length - 1]));
    }

    function deposit(
        uint256 _pid,
        uint256 _amount,
        address _referrer
    ) public nonReentrant {
        _deposit(_pid, _amount, _referrer);
    }

    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        _deposit(_pid, _amount, address(0));
    }

    function _deposit(
        uint256 _pid,
        uint256 _amount,
        address _referrer
    ) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);

        // Calculate the difference in balance before and after the deposit to account for tokens with tax
        // Thanks for RugDoc advice
        if (_amount > 0) {
            uint256 balanceBefore = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            uint256 balanceAfter = pool.lpToken.balanceOf(address(this));
            _amount = balanceAfter.sub(balanceBefore);
        }

        if (_amount > 0 && address(referral) != address(0) && _referrer != address(0) && _referrer != msg.sender) {
            referral.recordReferral(msg.sender, _referrer);
        }

        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accTokensPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                safeTokenTransfer(msg.sender, pending);
                payReferralCommission(msg.sender, pending);
            }
        }
        if (_amount > 0) {
            if (pool.depositFeeBP > 0) {
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                uint256 platformAmount = depositFee.mul(platformFee).div(10000);
                uint256 devAmount = depositFee.sub(platformAmount);
                uint256 buyBackAmount = devAmount.mul(buyBackRate).div(10000);
                pool.lpToken.safeTransfer(feeAddress, devAmount.sub(buyBackAmount));
                pool.lpToken.safeTransfer(address(token), buyBackAmount);
                pool.lpToken.safeTransfer(platformFeeAddress, platformAmount);
                user.amount = user.amount.add(_amount).sub(depositFee);
            } else {
                user.amount = user.amount.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accTokensPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, 'withdraw: not good');
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accTokensPerShare).div(1e12).sub(user.rewardDebt);
        if (pending > 0) {
            safeTokenTransfer(msg.sender, pending);
            payReferralCommission(msg.sender, pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accTokensPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

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

    // 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));
        bool transferSuccess = false;
        if (_amount > tokenBal) {
            transferSuccess = token.transfer(_to, tokenBal);
        } else {
            transferSuccess = token.transfer(_to, _amount);
        }
        require(transferSuccess, 'safeTokenTransfer: transfer failed');
    }

    function tokensPerBlock() public view returns (uint256) {
        for (uint256 i = 0; i < tokenPerBlockBreakpoints.length; i++) {
            if (tokenPerBlockBreakpoints[i] > block.number) {
                return tokenPerBlockPhases[i];
            }
        }
        return tokenPerBlockPhases[tokenPerBlockPhases.length - 1];
    }

    function setFeeAddress(address _feeAddress) public {
        require(_feeAddress != address(0), 'setFeeAddress: bad address');
        require(msg.sender == feeAddress, 'setFeeAddress: FORBIDDEN');
        feeAddress = _feeAddress;
        emit SetFeeAddress(msg.sender, _feeAddress);
    }

    // Update dev address by the previous dev.
    function dev(address _devAddr) public {
        require(_devAddr != address(0), 'dev: bad address');
        require(msg.sender == devAddr, 'dev: wut?');
        devAddr = _devAddr;
        emit SetDevAddress(msg.sender, _devAddr);
    }

    // Allow to update the start block before the farm starts.
    // Emergency only (like if the network becomes oversaturated just before the launch)
    // Devaddr is used instead of owner to bypass the 24 hours timelock
    function setStartBlock(uint256 _startBlock) external {
        require(msg.sender == devAddr, 'setStartBlock: not allowed');
        require(startBlock > block.number, 'setStartBlock: farm already started');
        require(_startBlock > block.number, 'setStartBlock: new start must be a future block');

        uint256 previous = startBlock;
        startBlock = _startBlock;

        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; pid++) {
            PoolInfo storage pool = poolInfo[pid];
            pool.lastRewardBlock = startBlock;
        }

        emit StartBlockChanged(previous, _startBlock);
    }

    // Allows to update the referral contract.
    function setReferral(IReferral _referral) public onlyOwner {
        referral = _referral;
    }

    // Pay referral commission to the referrer who referred this user.
    function payReferralCommission(address _user, uint256 _pending) internal {
        if (address(referral) != address(0) && referralCommissionRate > 0) {
            address referrer = referral.getReferrer(_user);
            uint256 commissionAmount = _pending.mul(referralCommissionRate).div(10000);

            if (referrer != address(0) && commissionAmount > 0) {
                token.mint(referrer, commissionAmount);
                emit ReferralCommissionPaid(_user, referrer, commissionAmount);
            }
        }
    }
}

File 2 of 10 : 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 10 : IBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.4;

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 10 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IBEP20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

    function safeTransferFrom(IBEP20 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
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IBEP20 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),
            "SafeBEP20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IBEP20 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(IBEP20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeBEP20: 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(IBEP20 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, "SafeBEP20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeBEP20: BEP20 operation did not succeed");
        }
    }
}

File 5 of 10 : IReferral.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IReferral {
    /**
     * @dev Record referral.
     */
    function recordReferral(address user, address referrer) external;

    /**
     * @dev Get the referrer address that referred the user.
     */
    function getReferrer(address user) external view returns (address);

    /**
     * @dev Update the status of the operator.
     */
    function updateOperator(address _operator, bool _status) external;
}

File 6 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 10 : IFarmToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface IFarmToken {
    function initialize(
        string memory _name,
        string memory _symbol,
        uint16 _transferTaxRate,
        uint16 _burnRate,
        uint16 _maxTransferAmountRate,
        bool _swapAndLiquifyEnabled,
        uint256 _minAmountToLiquify
    ) external;

    function transferOwnership(address newOwner) external;

    function mint(address _to, uint256 _amount) external;

    function balanceOf(address account) external view returns (uint256);

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) external;

    function transfer(address recipient, uint256 amount) external returns (bool);

    function setExcludedFromAntiWhale(address _account, bool _excluded) external;

    function setExcludedFromTax(address _account, bool _excluded) external;
}

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

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"commissionAmount","type":"uint256"}],"name":"ReferralCommissionPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetDevAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"StartBlockChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyBackRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFeeCap","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_devAddr","type":"address"}],"name":"dev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devCommission","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IFarmToken","name":"_token","type":"address"},{"internalType":"address[3]","name":"_addresses","type":"address[3]"},{"internalType":"uint16[5]","name":"_fees","type":"uint16[5]"},{"internalType":"uint256[]","name":"_tokenPerBlockPhases","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokenPerBlockBreakpoints","type":"uint256[]"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"contract IBEP20[]","name":"_lpTokens","type":"address[]"},{"internalType":"uint16[]","name":"_depositFeesBP","type":"uint16[]"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"multiAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFeeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accTokensPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"tokensPerBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referral","outputs":[{"internalType":"contract IReferral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralCommissionRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IReferral","name":"_referral","type":"address"}],"name":"setReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"setStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IFarmToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPerBlockBreakpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPerBlockPhases","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"tokensBetweenBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600955600b805460ff60b01b1916905534801561002257600080fd5b50600061002d610080565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055610084565b3390565b612f5a80620000946000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c806384e82a331161013b578063d9638422116100b8578063f2fde38b1161007c578063f2fde38b14610926578063f35e4a6e1461094c578063fc0c546a14610969578063fccc281314610971578063ffcd42631461097957610248565b8063d963842214610717578063da09c72c1461074c578063e2bbb15814610754578063e9fa1ac814610777578063ed14834f1461091e57610248565b80638dbdbe6d116100ff5780638dbdbe6d1461064c57806393f1a40b1461067e5780639e5914da146106c3578063cbd258b5146106e9578063d30ef61b1461070f57610248565b806384e82a331461059757806385efc8e9146105d55780638705fcd4146105f85780638d88a90e1461061e5780638da5cb5b1461064457610248565b8063441a3e70116101c95780635312ea8e1161018d5780635312ea8e1461053057806359e5e9ed1461054d578063630b5ba11461056a578063715018a6146105725780637f2173801461057a57610248565b8063441a3e701461034c57806344fe052f1461037157806348cd4cb1146103795780634dd28c421461038157806351eb05a61461051357610248565b806317caf6f11161021057806317caf6f1146103105780631a1cb01f1461031857806326232a2e14610320578063392e53cd14610328578063412753581461034457610248565b8063081e3eda1461024d5780630a32e91e146102675780631441a5a9146102865780631526fe27146102aa578063178a8d0714610308575b600080fd5b6102556109a5565b60408051918252519081900360200190f35b61026f6109ac565b6040805161ffff9092168252519081900360200190f35b61028e6109bd565b604080516001600160a01b039092168252519081900360200190f35b6102c7600480360360208110156102c057600080fd5b50356109cc565b604080516001600160a01b039097168752602087019590955285850193909352606085019190915261ffff16608084015260a0830152519081900360c00190f35b61026f610a20565b610255610a31565b610255610a37565b61026f610aaf565b610330610ac0565b604080519115158252519081900360200190f35b61028e610ad0565b61036f6004803603604081101561036257600080fd5b5080359060200135610adf565b005b61026f610c9a565b610255610cab565b61036f600480360361018081101561039857600080fd5b6040805160608181019092526001600160a01b0384351693928301929160808301919060208401906003908390839080828437600092019190915250506040805160a08181019092529295949381810193925090600590839083908082843760009201919091525091949392602081019250359050600160201b81111561041e57600080fd5b82018360208201111561043057600080fd5b803590602001918460208302840111600160201b8311171561045157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156104a057600080fd5b8201836020820111156104b257600080fd5b803590602001918460208302840111600160201b831117156104d357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250610cb1915050565b61036f6004803603602081101561052957600080fd5b5035610edb565b61036f6004803603602081101561054657600080fd5b503561117a565b6102556004803603602081101561056357600080fd5b5035611268565b61036f611286565b61036f6112a9565b6102556004803603602081101561059057600080fd5b5035611355565b61036f600480360360808110156105ad57600080fd5b508035906001600160a01b036020820135169061ffff60408201351690606001351515611362565b610255600480360360408110156105eb57600080fd5b508035906020013561159c565b61036f6004803603602081101561060e57600080fd5b50356001600160a01b03166116b7565b61036f6004803603602081101561063457600080fd5b50356001600160a01b03166117bd565b61028e6118a2565b61036f6004803603606081101561066257600080fd5b50803590602081013590604001356001600160a01b03166118b1565b6106aa6004803603604081101561069457600080fd5b50803590602001356001600160a01b0316611910565b6040805192835260208301919091528051918290030190f35b61036f600480360360208110156106d957600080fd5b50356001600160a01b0316611934565b610330600480360360208110156106ff57600080fd5b50356001600160a01b03166119b8565b61026f6119cd565b61036f6004803603608081101561072d57600080fd5b5080359060208101359061ffff604082013516906060013515156119de565b61028e611b43565b61036f6004803603604081101561076a57600080fd5b5080359060200135611b52565b61036f6004803603608081101561078d57600080fd5b810190602081018135600160201b8111156107a757600080fd5b8201836020820111156107b957600080fd5b803590602001918460208302840111600160201b831117156107da57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561082957600080fd5b82018360208201111561083b57600080fd5b803590602001918460208302840111600160201b8311171561085c57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460208302840111600160201b831117156108de57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505050503515159050611bb1565b61028e611ce5565b61036f6004803603602081101561093c57600080fd5b50356001600160a01b0316611cf4565b61036f6004803603602081101561096257600080fd5b5035611df6565b61028e611f59565b61028e611f68565b6102556004803603604081101561098f57600080fd5b50803590602001356001600160a01b0316611f6e565b6007545b90565b600c54600160a01b900461ffff1681565b600b546001600160a01b031681565b600781815481106109d957fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909261ffff9091169086565b600c54600160b01b900461ffff1681565b60095481565b6000805b600554811015610a8c574360058281548110610a5357fe5b90600052602060002001541115610a845760048181548110610a7157fe5b90600052602060002001549150506109a9565b600101610a3b565b50600480546000198101908110610a9f57fe5b9060005260206000200154905090565b600b54600160c81b900461ffff1681565b600b54600160b01b900460ff1681565b6006546001600160a01b031681565b60026001541415610b25576040805162461bcd60e51b815260206004820152601f6024820152600080516020612d65833981519152604482015290519081900360640190fd5b6002600181905550600060078381548110610b3c57fe5b600091825260208083208684526008825260408085203386529092529220805460069092029092019250831115610baf576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b610bb884610edb565b6000610bf28260010154610bec64e8d4a51000610be6876003015487600001546120b290919063ffffffff16565b90612112565b90612179565b90508015610c0e57610c0433826121d6565b610c0e33826123a9565b8315610c38578154610c209085612179565b82558254610c38906001600160a01b0316338661254c565b60038301548254610c539164e8d4a5100091610be6916120b2565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505060018055505050565b600b54600160b81b900461ffff1681565b600a5481565b610cb96125a3565b6001600160a01b0316610cca6118a2565b6001600160a01b031614610d13576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b600b54600160b01b900460ff1615610d72576040805162461bcd60e51b815260206004820152601f60248201527f696e697469616c697a653a20616c726561647920696e697469616c697a656400604482015290519081900360640190fd5b8151600101835114610db55760405162461bcd60e51b815260040180806020018281038252602b815260200180612dfa602b913960400191505060405180910390fd5b600280546001600160a01b03199081166001600160a01b03898116919091179092558651600680548316918416919091179055602080880151600380548416918516919091179055604080890151600c80548a51600b80548d880151968e015160608f015161ffff908116600160b01b02600160a01b928216830296909b1697909b169690961761ffff60a01b199081169490941761ffff60b01b19169890981790935560808c0151948816909302928716600160b81b0261ffff60b81b19909616959095179094161761ffff60c81b1916600160c81b91909416029290921790558351610ea99160049190860190612d04565b508151610ebd906005906020850190612d04565b50600a555050600b805460ff60b01b1916600160b01b179055505050565b600060078281548110610eea57fe5b9060005260206000209060060201905080600201544311610f0b5750611177565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d6020811015610f7f57600080fd5b50519050801580610f9257506001820154155b15610fa4575043600290910155611177565b6000610fc8600954610be68560010154610fc287600201544361159c565b906120b2565b600254600354600c549293506001600160a01b03918216926340c10f1992909116906110089061271090610be6908790600160a01b900461ffff166120b2565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561104e57600080fd5b505af1158015611062573d6000803e3d6000fd5b5050600254604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b1580156110b957600080fd5b505af11580156110cd573d6000803e3d6000fd5b505050506110fb6110f083610be664e8d4a51000856120b290919063ffffffff16565b6003850154906125a7565b8360030181905550306001600160a01b0316631a1cb01f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561113c57600080fd5b505afa158015611150573d6000803e3d6000fd5b505050506040513d602081101561116657600080fd5b505160058401555050436002909101555b50565b600260015414156111c0576040805162461bcd60e51b815260206004820152601f6024820152600080516020612d65833981519152604482015290519081900360640190fd5b60026001819055506000600782815481106111d757fe5b600091825260208083208584526008825260408085203380875293528420805485825560018201959095556006909302018054909450919291611227916001600160a01b0391909116908361254c565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a35050600180555050565b6004818154811061127557fe5b600091825260209091200154905081565b60075460005b818110156112a55761129d81610edb565b60010161128c565b5050565b6112b16125a3565b6001600160a01b03166112c26118a2565b6001600160a01b03161461130b576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6005818154811061127557fe5b61136a6125a3565b6001600160a01b031661137b6118a2565b6001600160a01b0316146113c4576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b6001600160a01b0383166000908152600d6020526040902054839060ff1615611434576040805162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c69636174656400000000000000604482015290519081900360640190fd5b600b5461ffff600160b81b909104811690841611156114845760405162461bcd60e51b8152600401808060200182810382526025815260200180612d856025913960400191505060405180910390fd5b811561149257611492611286565b6000600a5443116114a557600a546114a7565b435b6009549091506114b790876125a7565b6009556001600160a01b0385166000818152600d60209081526040808320805460ff19166001179055805160c0810182529384529083018990528201839052606082015261ffff8516608082015260079060a08101611514610a37565b90528154600180820184556000938452602093849020835160069093020180546001600160a01b0319166001600160a01b0390931692909217825592820151928101929092556040810151600283015560608101516003830155608081015160048301805461ffff191661ffff90921691909117905560a00151600590910155505050505050565b60008083815b6005548110156116745781600582815481106115ba57fe5b9060005260206000200154111561166c576000600582815481106115da57fe5b906000526020600020015486116115f1578561160a565b600582815481106115fe57fe5b90600052602060002001545b905061163c6116356004848154811061161f57fe5b600091825260209091200154610fc28487612179565b85906125a7565b9350856005838154811061164c57fe5b9060005260206000200154111561166957839450505050506116b1565b91505b6001016115a2565b50600480546116ac916116a591600019810190811061168f57fe5b600091825260209091200154610fc28785612179565b83906125a7565b925050505b92915050565b6001600160a01b038116611712576040805162461bcd60e51b815260206004820152601a60248201527f736574466565416464726573733a206261642061646472657373000000000000604482015290519081900360640190fd5b6006546001600160a01b03163314611771576040805162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b6001600160a01b03811661180b576040805162461bcd60e51b815260206004820152601060248201526f6465763a20626164206164647265737360801b604482015290519081900360640190fd5b6003546001600160a01b03163314611856576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b03831690811790915560405133907f618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e790600090a350565b6000546001600160a01b031690565b600260015414156118f7576040805162461bcd60e51b815260206004820152601f6024820152600080516020612d65833981519152604482015290519081900360640190fd5b6002600155611907838383612601565b50506001805550565b60086020908152600092835260408084209091529082529020805460019091015482565b61193c6125a3565b6001600160a01b031661194d6118a2565b6001600160a01b031614611996576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b600d6020526000908152604090205460ff1681565b600b54600160a01b900461ffff1681565b6119e66125a3565b6001600160a01b03166119f76118a2565b6001600160a01b031614611a40576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b600b5461ffff600160b81b90910481169083161115611a905760405162461bcd60e51b8152600401808060200182810382526025815260200180612e8e6025913960400191505060405180910390fd5b8015611a9e57611a9e611286565b611adb83611ad560078781548110611ab257fe5b90600052602060002090600602016001015460095461217990919063ffffffff16565b906125a7565b6009819055508260078581548110611aef57fe5b9060005260206000209060060201600101819055508160078581548110611b1257fe5b906000526020600020906006020160040160006101000a81548161ffff021916908361ffff16021790555050505050565b6003546001600160a01b031681565b60026001541415611b98576040805162461bcd60e51b815260206004820152601f6024820152600080516020612d65833981519152604482015290519081900360640190fd5b6002600155611ba982826000612601565b505060018055565b611bb96125a3565b6001600160a01b0316611bca6118a2565b6001600160a01b031614611c13576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b82518451148015611c25575081518351145b611c76576040805162461bcd60e51b815260206004820152601960248201527f6d756c74694164643a206c656e677468206d69736d6174636800000000000000604482015290519081900360640190fd5b8015611c8457611c84611286565b60005b8451811015611cde57611cd6858281518110611c9f57fe5b6020026020010151858381518110611cb357fe5b6020026020010151858481518110611cc757fe5b60200260200101516000611362565b600101611c87565b5050505050565b600c546001600160a01b031681565b611cfc6125a3565b6001600160a01b0316611d0d6118a2565b6001600160a01b031614611d56576040805162461bcd60e51b81526020600482018190526024820152600080516020612eb3833981519152604482015290519081900360640190fd5b6001600160a01b038116611d9b5760405162461bcd60e51b8152600401808060200182810382526026815260200180612dd46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314611e55576040805162461bcd60e51b815260206004820152601a60248201527f7365745374617274426c6f636b3a206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b43600a5411611e955760405162461bcd60e51b8152600401808060200182810382526023815260200180612ed36023913960400191505060405180910390fd5b438111611ed35760405162461bcd60e51b815260040180806020018281038252602f815260200180612ef6602f913960400191505060405180910390fd5b600a80549082905560075460005b81811015611f1857600060078281548110611ef857fe5b60009182526020909120600a546006909202016002015550600101611ee1565b50604080518381526020810185905281517f8774aa9221f02a7971c04902013456be92b6a521a2347a44ec6610e4b9a5d8fc929181900390910190a1505050565b6002546001600160a01b031681565b61dead81565b60008060078481548110611f7e57fe5b600091825260208083208784526008825260408085206001600160a01b0389811687529084528186206006959095029092016003810154815483516370a0823160e01b815230600482015293519298509596909590949316926370a082319260248082019391829003018186803b158015611ff857600080fd5b505afa15801561200c573d6000803e3d6000fd5b505050506040513d602081101561202257600080fd5b505160028501549091504311801561203957508015155b1561207f57600061205c600954610be68760010154610fc289600201544361159c565b905061207b61207483610be68464e8d4a510006120b2565b84906125a7565b9250505b6120a78360010154610bec64e8d4a51000610be68688600001546120b290919063ffffffff16565b979650505050505050565b6000826120c1575060006116b1565b828202828482816120ce57fe5b041461210b5760405162461bcd60e51b8152600401808060200182810382526021815260200180612e6d6021913960400191505060405180910390fd5b9392505050565b6000808211612168576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161217157fe5b049392505050565b6000828211156121d0576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561222157600080fd5b505afa158015612235573d6000803e3d6000fd5b505050506040513d602081101561224b57600080fd5b505190506000818311156122e2576002546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156122af57600080fd5b505af11580156122c3573d6000803e3d6000fd5b505050506040513d60208110156122d957600080fd5b50519050612367565b6002546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561233857600080fd5b505af115801561234c573d6000803e3d6000fd5b505050506040513d602081101561236257600080fd5b505190505b806123a35760405162461bcd60e51b8152600401808060200182810382526022815260200180612e4b6022913960400191505060405180910390fd5b50505050565b600b546001600160a01b0316158015906123cf5750600b54600160a01b900461ffff1615155b156112a557600b5460408051634a9fefc760e01b81526001600160a01b03858116600483015291516000939290921691634a9fefc791602480820192602092909190829003018186803b15801561242557600080fd5b505afa158015612439573d6000803e3d6000fd5b505050506040513d602081101561244f57600080fd5b5051600b549091506000906124789061271090610be6908690600160a01b900461ffff166120b2565b90506001600160a01b038216158015906124925750600081115b156123a357600254604080516340c10f1960e01b81526001600160a01b03858116600483015260248201859052915191909216916340c10f1991604480830192600092919082900301818387803b1580156124ec57600080fd5b505af1158015612500573d6000803e3d6000fd5b50506040805184815290516001600160a01b038087169450881692507f86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b9181900360200190a350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261259e9084906129e7565b505050565b3390565b60008282018381101561210b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006007848154811061261057fe5b6000918252602080832087845260088252604080852033865290925292206006909102909101915061264185610edb565b831561275e578154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561269157600080fd5b505afa1580156126a5573d6000803e3d6000fd5b505050506040513d60208110156126bb57600080fd5b505183549091506126d7906001600160a01b0316333088612a98565b8254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561272157600080fd5b505afa158015612735573d6000803e3d6000fd5b505050506040513d602081101561274b57600080fd5b505190506127598183612179565b955050505b6000841180156127785750600b546001600160a01b031615155b801561278c57506001600160a01b03831615155b80156127a157506001600160a01b0383163314155b1561281357600b5460408051630c7f7b6b60e01b81523360048201526001600160a01b03868116602483015291519190921691630c7f7b6b91604480830192600092919082900301818387803b1580156127fa57600080fd5b505af115801561280e573d6000803e3d6000fd5b505050505b8054156128665760006128488260010154610bec64e8d4a51000610be6876003015487600001546120b290919063ffffffff16565b905080156128645761285a33826121d6565b61286433826123a9565b505b831561298957600482015461ffff161561297a5760048201546000906128999061271090610be690889061ffff166120b2565b600b549091506000906128c09061271090610be6908590600160c81b900461ffff166120b2565b905060006128ce8383612179565b600c549091506000906128f59061271090610be6908590600160b01b900461ffff166120b2565b600654909150612924906001600160a01b03166129128484612179565b88546001600160a01b0316919061254c565b6002548654612940916001600160a01b0391821691168361254c565b600c54865461295c916001600160a01b0391821691168561254c565b845461296e908590610bec908b6125a7565b85555061298992505050565b805461298690856125a7565b81555b600382015481546129a49164e8d4a5100091610be6916120b2565b6001820155604080518581529051869133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b6060612a3c826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612af29092919063ffffffff16565b80519091501561259e57808060200190516020811015612a5b57600080fd5b505161259e5760405162461bcd60e51b815260040180806020018281038252602a815260200180612daa602a913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526123a39085906129e7565b6060612b018484600085612b09565b949350505050565b606082471015612b4a5760405162461bcd60e51b8152600401808060200182810382526026815260200180612e256026913960400191505060405180910390fd5b612b5385612c5a565b612ba4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612be35780518252601f199092019160209182019101612bc4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612c45576040519150601f19603f3d011682016040523d82523d6000602084013e612c4a565b606091505b50915091506120a7828286612c60565b3b151590565b60608315612c6f57508161210b565b825115612c7f5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612cc9578181015183820152602001612cb1565b50505050905090810190601f168015612cf65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215612d3f579160200282015b82811115612d3f578251825591602001919060010190612d24565b50612d4b929150612d4f565b5090565b5b80821115612d4b5760008155600101612d5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c006164643a20696e76616c6964206465706f7369742066656520626173697320706f696e74735361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373696e697469616c697a653a20746f6b656e2070657220626c6f636b206c656e677468206d69736d61746368416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c73616665546f6b656e5472616e736665723a207472616e73666572206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777365743a20696e76616c6964206465706f7369742066656520626173697320706f696e74734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727365745374617274426c6f636b3a206661726d20616c726561647920737461727465647365745374617274426c6f636b3a206e6577207374617274206d75737420626520612066757475726520626c6f636ba26469706673582212209c300a6cadde8f47a214e772e3356ce470a9476636721f3439de4d0ba322f26d64736f6c634300060c0033

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.