Contract 0xec318dedef59cfec0ffa0702d5846bc3f1e37ae4

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xdeca6f8c67d46cc8cb59bf9a746ffae31a0449e85885b572cc4404712ed8633eDeposit121445812021-10-27 20:24:3131 mins ago0xc8e4cbafde05358db46a1eb7eaaad80bef1c39ce IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000926415
0x6c99ec33ddf7fafc320578b4f94a5c0e876128f92af308d89f0f97dd567f8b13Deposit121445752021-10-27 20:24:1331 mins ago0xc8e4cbafde05358db46a1eb7eaaad80bef1c39ce IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0xa4efd895fd43d97021bd11d1059432e9119cfb932eb08e545501871a54424bb3Withdraw121438712021-10-27 19:48:581 hr 6 mins ago0xf82ec560ebb1199bf8f6e13819151795ea3c5e27 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.001599855
0x90050666abb8a311e514b28d8527cab863f09ab868a63dfe248e90d3adbc6fb3Deposit121438692021-10-27 19:48:521 hr 6 mins ago0xf82ec560ebb1199bf8f6e13819151795ea3c5e27 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000890895
0x710c168b3493bf0db96cb5302eccc9e136aadce793e62502725cd9004f0c3dc2Deposit121435032021-10-27 19:30:331 hr 25 mins ago0x478173ccc4fafa69210093df992d17b5f2c2da63 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000772365
0x03c4b0cd00ab58988714a864d8c0c0aa569d697e89292f46be80969a192b825cDeposit121434672021-10-27 19:28:451 hr 27 mins ago0x8c60298483890ebfcdf90712db9af0e668fb1d7c IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000926415
0x7e5eeecb6029c25e8b246086f69c5aeb2ac1e6dbcfb15a1cc311706394df1a6eDeposit121434232021-10-27 19:26:271 hr 29 mins ago0x8c60298483890ebfcdf90712db9af0e668fb1d7c IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0xcf0d7500271fc266ede559e2a1358df9e0f99cd264ad2c48d9c573c08ed80078Deposit121433552021-10-27 19:23:011 hr 32 mins ago0x8c60298483890ebfcdf90712db9af0e668fb1d7c IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000772305
0xafe65697807c875500069342f0e59dcc082183a827716f10172642537474d1a2Withdraw121432802021-10-27 19:19:161 hr 36 mins ago0x3c61db7245d23ec82028fdabd03cb5f9732f0732 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000864125
0x033020b77af5e1b9735b771f85fd03b7938a55d5ccceb2671c7f28987309b411Deposit121429892021-10-27 19:04:431 hr 51 mins ago0x1624c5a877d104164d1fca3b79b252dc231f04aa IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000772365
0xd37c066b1ea70507a2935946d902cacde6f586cdfbcbc59140cb65842157b328Withdraw121429522021-10-27 19:02:521 hr 52 mins ago0x1f69aac710dffe1249e5cbb93989f647fd9a0301 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.001722455
0xe846b1abac6400fc01dd70d9604a49c720f05fa77b251ddf57fcfb20645bdafbDeposit121429022021-10-27 19:00:221 hr 55 mins ago0x1f69aac710dffe1249e5cbb93989f647fd9a0301 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0x0cc811891ae47323d319ae579fd671073eef851d526a45cbca0b226dcc7f69f1Deposit121427072021-10-27 18:50:362 hrs 5 mins ago0xf5c792fe98168e689b948f5771170d423819c1cf IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0x423786e4f7903597f8a6c10d5b1e044483d16f0216500d53e1e0f65e89c0ccc7Withdraw121418242021-10-27 18:06:222 hrs 49 mins ago0x0210fa3772c1befd0bf94333e272da97f5bf4248 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.00086385
0xf17ae8da043e0ad8ad7b07d12a2f8e78cf8ece7f77195e60b50cbc3d1133c90eDeposit121413882021-10-27 17:44:343 hrs 11 mins ago0x48e713a4d2193b4d3acff0ab9dfaae1a86c1111e IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000902275
0x442ef36b6c717713ba082e4b6ec8aab1de14e983a4b04df50b4213f4614876a6Withdraw121404542021-10-27 16:57:493 hrs 58 mins ago0xbe802efadf5a2242ab3b30119e4bdfb46fd809c6 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.00078885
0x45540bfa6234a12c2846b55ae5bf06b735a3c77d430a4c06bc28f7b641490cfbWithdraw121381562021-10-27 15:00:195 hrs 55 mins ago0x68f5403319c41efc48e60dc3b67e472d3562cfc4 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000867365
0x00432640816e74a23de719f8b03ad40213ad60c9ea34b02e8d29e8cfad7a4a73Withdraw121379192021-10-27 14:48:236 hrs 7 mins ago0x9ebe827e86d08cc1983343f6fdafadea37c801e4 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.00091167
0x7325916c0304e1bd8e89fe8a28c53b34fda21a2c31d584cf602f5f5fa46c9514Deposit121366112021-10-27 13:39:597 hrs 15 mins ago0x09968aeef11ad0f62fec33ac5c5a489651c80e54 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.001084585
0xf3a7130c8475dacfdfa59020ce9c9ec6dcff7290901161eff4a1fa1d57816934Withdraw121359632021-10-27 13:06:337 hrs 49 mins ago0x1f6eddc497035cc35e8947c5f49c799b64a82e53 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.00078913
0xf1d1bd2ba4571f6aee3abc54d180aaca7a372dfb242701510957ddfe93f577c4Deposit121359562021-10-27 13:06:127 hrs 49 mins ago0x1f6eddc497035cc35e8947c5f49c799b64a82e53 IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0x1e0ca91754caf9acc65c8236fa4c3c4dacd1d26ae8e01310a0a64e19a9e978aeDeposit121355822021-10-27 12:44:578 hrs 10 mins ago0x8ff03762add0092dd086e7c8cbfa0c6680d733ad IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0x0e02f2335580a6f5824732887142db5f1d1366090dba94cb4dceb101b5a9ad23Deposit121355782021-10-27 12:44:458 hrs 11 mins ago0x8ff03762add0092dd086e7c8cbfa0c6680d733ad IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
0xa0d532b1092f8def6cd7905bbc1b098712e4df5f3c410a11b6dfe109c3342cfaDeposit121352182021-10-27 12:25:048 hrs 30 mins ago0xf886b127d4e381e7619d2af1617476fef0d04f8c IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000902215
0x60b981d60efca4098a990861249c3717b624ba0d014c3aa420ca25612f080db4Deposit121351762021-10-27 12:22:398 hrs 33 mins ago0xf886b127d4e381e7619d2af1617476fef0d04f8c IN  0xec318dedef59cfec0ffa0702d5846bc3f1e37ae40 BNB0.000697365
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterZai

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 9 : MasterZai.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

/*
 * ZaigarFinance 
 */

import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol';


// File @openzeppelin/contracts/utils/[email protected]


/**
 * @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;
    }
}

import "./ZafiraToken.sol";



// import "@nomiclabs/buidler/console.sol";

// MasterZai is the master of ZFAI 
// He can make ZFAI and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once ZFAI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract MasterZai 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 ZFAIs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accZfaiPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accZfaiPerShare` (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. ZFAIs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that ZFAIs distribution occurs.
        uint256 accZfaiPerShare; // Accumulated ZFAIs per share, times 1e12. See below.
        uint16 depositFeeBP;      // Deposit fee in basis points
        uint256 totalLp;            // Total Token in Pool
    }

    // The Zafira TOKEN!
    ZafiraToken public zfai;

    //On Distribution Dev address.
    address public devaddr;
    // Deposit Fee address
    address public feeAddress;
    //On Distribution Marketing Address
    address public marktAddress;
    //On Distribution Staff team Address
    address public staffAddress; 
    // ZFAI tokens created per block.
    uint256 public zfaiPerBlock;
    // Bonus muliplier for early zfai makers.
    uint256 public BONUS_MULTIPLIER = 1;

    
    // 10% for Marketing on distribution
    uint16 public constant blockMktFee = 1000;

    // 4% for staff on distribution
    uint16 public constant blockStaffFee = 400;

    // 1% for development on distribution
    uint16 public constant blockDevFee = 100;

    uint256 currentDevFee = 0;
    uint256 currentStaffFee = 0;
    uint256 currentMarketingFee = 0;


    // 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 ZFAI mining starts.
    uint256 public startBlock;
    // Total ZFAI in ZFAI Pools (can be multiple pools)
    uint256 public totalZfaiInPools = 0;

    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 EmissionRateUpdated(address indexed caller, uint256 previousAmount, uint256 newAmount);

    constructor(
        ZafiraToken _zfai,
        address _devaddr,
        address _feeAddress,
        address _marktAddress,
        address _staffAddress,
        uint256 _zfaiPerBlock,
        uint256 _startBlock,
        uint256 _multiplier

    ) public {
        zfai = _zfai;
        devaddr = _devaddr;
        feeAddress = _feeAddress;
        marktAddress = _marktAddress;
        staffAddress = _staffAddress;
        zfaiPerBlock = _zfaiPerBlock;
        startBlock = _startBlock;
        BONUS_MULTIPLIER = _multiplier;

        totalAllocPoint = 0;

    }

    modifier validatePool(uint256 _pid) {
        require(_pid < poolInfo.length, "validatePool: pool exists?");
        _;
    }

    function updateMultiplier(uint256 multiplierNumber) public onlyOwner {
        BONUS_MULTIPLIER = multiplierNumber;
    }

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

    // Detects whether the given pool already exists
    function checkPoolDuplicate(IBEP20 _lpToken) public view {
        uint256 length = poolInfo.length;
        for (uint256 _pid = 0; _pid < length; _pid++) {
            require(poolInfo[_pid].lpToken != _lpToken, "add: existing pool");
        }
    }

    fallback() external payable {

    }


    //actual Zfai left in MasterChef can be used in rewards, must excluding all in zfai pools
    //this function is for safety check 
    function remainRewards() public view returns (uint256) {
        return zfai.balanceOf(address(this)).sub(totalZfaiInPools);
    }

    //All Zfais that are not in pools or masterchef reward stack
    function getCirculatingSupply() external view returns(uint256) {
        uint256 tSupply = zfai.totalSupply();
        uint256 zfaiBalance = zfai.balanceOf(address(this));

        return tSupply.sub(zfaiBalance);    
    }


     // Add a new lp to the pool. Can only be called by the owner.
    // Can add multiple pool with same lp token without messing up rewards, because each pool's balance is tracked using its own totalLp
    function add(uint256 _allocPoint, IBEP20 _lpToken, uint16 _depositFeeBP, bool _withUpdate) public onlyOwner {
       require(_depositFeeBP <= 10000, "add: invalid deposit fee basis points");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
        lpToken: _lpToken,
        allocPoint: _allocPoint,
        lastRewardBlock: lastRewardBlock,
        accZfaiPerShare: 0,
        depositFeeBP: _depositFeeBP,
        totalLp : 0
        }));
    }

    // Update the given pool's ZFAI allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP, bool _withUpdate) public onlyOwner {
        require(_depositFeeBP <= 10000, "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;
    }


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

    // View function to see pending ZFAIs on frontend.
    function pendingZfai(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accZfaiPerShare = pool.accZfaiPerShare;
        //uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        uint256 lpSupply = pool.totalLp;

        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 zfaiReward = multiplier.mul(zfaiPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            uint256 totalRewardFees = zfaiReward.mul(1500).div(10000);
            uint256 zfaiRewardUsers = zfaiReward.sub(totalRewardFees);

            uint256 totalminted = zfai.totalMinted();
             
        if(totalminted >= 159000000000000000000000000){
         
            accZfaiPerShare = accZfaiPerShare;

            }else{
                accZfaiPerShare = accZfaiPerShare.add(zfaiRewardUsers.mul(1e12).div(lpSupply));
            }

        }
  
         return user.amount.mul(accZfaiPerShare).div(1e12).sub(user.rewardDebt);

    }

        // View function to see all locked ZFAIs on frontend.
        function lockedZfai() external view returns (uint256) {
            return totalZfaiInPools;
        }

    // 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 validatePool(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
       
        if (block.number <= pool.lastRewardBlock) {
            return;
        }

        if (pool.totalLp == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }

        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 zfaiReward = multiplier.mul(zfaiPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
    
        uint256 totalRewardFees = zfaiReward.mul(1500).div(10000);

        //Total - 15% fees
        uint256 zfaiRewardUsers = zfaiReward.sub(totalRewardFees);
       
        uint256 totalminted = zfai.totalMinted();
       
        if(totalminted >= 159000000000000000000000000){
         
            if(currentDevFee > 0 || currentStaffFee > 0 || currentMarketingFee > 0){

             safeZfaiTransfer(devaddr,currentDevFee);
             safeZfaiTransfer(staffAddress,currentStaffFee);
             safeZfaiTransfer(marktAddress,currentMarketingFee);

            }
  
            pool.accZfaiPerShare = pool.accZfaiPerShare;

            currentDevFee = 0;
            currentMarketingFee = 0;
            currentStaffFee = 0;

        }else{
             
             zfai.mint(address(this),zfaiReward);

                if(currentDevFee > 1100000000000000000000){
                
                    safeZfaiTransfer(devaddr,currentDevFee);
                    currentDevFee = 0;

                } else if(currentStaffFee > 1100000000000000000000){
                    
                    safeZfaiTransfer(staffAddress,currentStaffFee);
                    currentStaffFee = 0;

                } else if(currentMarketingFee > 2000000000000000000000){
                    
                    safeZfaiTransfer(marktAddress,currentMarketingFee);
                    currentMarketingFee = 0;

                }

             }

            //1% dev fee
            currentDevFee = currentDevFee.add(zfaiReward.mul(blockDevFee).div(10000));

            //4% staff fee
            currentStaffFee = currentStaffFee.add(zfaiReward.mul(blockStaffFee).div(10000));
            
            //10% marketing fee
            currentMarketingFee = currentMarketingFee.add(zfaiReward.div(10));
 
            pool.accZfaiPerShare = pool.accZfaiPerShare.add(zfaiRewardUsers.mul(1e12).div(pool.totalLp));
            pool.lastRewardBlock = block.number;

   }         
        

    // Deposit LP tokens to MasterZai for ZFAI allocation.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
       // require(block.number >= startBlock, "MasterChef:: Can not deposit before farm start");

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
       

        updatePool(_pid);      
        

        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accZfaiPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                uint256 currentRewardBalance = remainRewards();
                if(currentRewardBalance > 0) {
                    if(pending > currentRewardBalance) {
                        safeZfaiTransfer(msg.sender, currentRewardBalance);
                    } else {
                        safeZfaiTransfer(msg.sender, pending);
                    }
                }
            }
        }
        
        if (_amount > 0) {
            //Security Check in Tokens with Tax Fees
            uint256 beforeDeposit = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            uint256 afterDeposit = pool.lpToken.balanceOf(address(this));

            _amount = afterDeposit.sub(beforeDeposit);

            if (pool.depositFeeBP > 0) {

                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);

                if (address(pool.lpToken) == address(zfai)) {
                    totalZfaiInPools = totalZfaiInPools.add(_amount).sub(depositFee);   
                } 

                pool.lpToken.safeTransfer(feeAddress, depositFee);

                user.amount = user.amount.add(_amount).sub(depositFee);
                pool.totalLp = pool.totalLp.add(_amount).sub(depositFee);

            } else {
                user.amount = user.amount.add(_amount);
                pool.totalLp = pool.totalLp.add(_amount);

                if (address(pool.lpToken) == address(zfai)) {
                    totalZfaiInPools = totalZfaiInPools.add(_amount);
                }
                                
           }
        }

        user.rewardDebt = user.amount.mul(pool.accZfaiPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterZai.
    function withdraw(uint256 _pid, uint256 _amount) public validatePool(_pid) nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        //this will make sure that user can only withdraw from his pool
        //cannot withdraw more than pool's balance and from MasterChef's token
        require(pool.totalLp >= _amount, "Withdraw: Pool total LP not enough");


        updatePool(_pid);      
        

        uint256 pending = user.amount.mul(pool.accZfaiPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                uint256 currentRewardBalance = remainRewards();
                //additional checkings
                if(currentRewardBalance > 0) {
                    if(pending > currentRewardBalance) {
                        safeZfaiTransfer(msg.sender, currentRewardBalance);
                    } else {
                        safeZfaiTransfer(msg.sender, pending);
                    }
                }
            }
            
        if(_amount > 0) {
                
             if (address(pool.lpToken) == address(zfai)) {
      
                 uint256 zfaiBal = zfai.balanceOf(address(this));

                 require(_amount <= zfaiBal,'withdraw: not good');    

                if(_amount >= totalZfaiInPools){
                    totalZfaiInPools = 0;
                }else{
                    require(totalZfaiInPools >= _amount,'amount bigger than pool wut?');
                    totalZfaiInPools = totalZfaiInPools.sub(_amount);
                }  

                pool.lpToken.safeTransfer(address(msg.sender), _amount);
                
            } else {
                pool.lpToken.safeTransfer(address(msg.sender), _amount);
            }
        }
        
        user.amount = user.amount.sub(_amount);
        pool.totalLp = pool.totalLp.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accZfaiPerShare).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;
        require(pool.totalLp >= amount, "EmergencyWithdraw: Pool total LP not enough");

        if (address(pool.lpToken) == address(zfai)) {
          
            uint256 zfaiBal = zfai.balanceOf(address(this));

            require(amount <= zfaiBal,'withdraw: not good'); 

            if(amount >= totalZfaiInPools){
                totalZfaiInPools = 0;
            }else{
                require(totalZfaiInPools >= amount,'amount bigger than pool wut?');
                totalZfaiInPools = totalZfaiInPools.sub(amount);
            }  

            pool.lpToken.safeTransfer(address(msg.sender), amount);

        }else{ 
            pool.lpToken.safeTransfer(address(msg.sender), amount);
        }

        user.amount = 0;
        user.rewardDebt = 0;
        pool.totalLp = pool.totalLp.sub(amount);

        emit EmergencyWithdraw(msg.sender, _pid, amount);

    }

    function getPoolInfo(uint256 _pid) public view
    returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accZfaiPerShare, uint16 depositFeeBP, uint256 totalLp) {
        return (address(poolInfo[_pid].lpToken),
             poolInfo[_pid].allocPoint,
             poolInfo[_pid].lastRewardBlock,
             poolInfo[_pid].accZfaiPerShare,
             poolInfo[_pid].depositFeeBP,
             poolInfo[_pid].totalLp);
    }

    // Safe zfai transfer function, just in case if rounding error causes pool to not have enough ZFAIs.
    function safeZfaiTransfer(address _to, uint256 _amount) internal {
        if(zfai.balanceOf(address(this)) > totalZfaiInPools){
            //zfaiBal = total zfai in MasterChef - total zfai in zfai pools, this will make sure that MasterChef never transfer rewards from deposited zfai pools
            uint256 zfaiBal = zfai.balanceOf(address(this)).sub(totalZfaiInPools);
            if (_amount >= zfaiBal) {
                zfai.transfer(_to, zfaiBal);
            } else if (_amount > 0) {
                zfai.transfer(_to, _amount);
            }
        }
    }

    // Update dev address by the previous dev.
    function dev(address _devaddr) public {
        require(msg.sender == devaddr, "dev: wut?");
        devaddr = _devaddr;
    }

     //update address that receive deposit fee in pools
     function setFeeAddress(address _feeAddress) public {
        require(msg.sender == feeAddress, "setFeeAddress: FORBIDDEN");
        feeAddress = _feeAddress;
    }

    // Pancake has to add hidden dummy pools in order to alter the emission, here we make it simple and transparent to all.
    function updateEmissionRate(uint256 _zfaiPerBlock) public onlyOwner {
        massUpdatePools();
        emit EmissionRateUpdated(msg.sender, zfaiPerBlock, _zfaiPerBlock);
        zfaiPerBlock = _zfaiPerBlock;
    }

}

File 2 of 9 : ZafiraToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;

/*
 * Zaigar Finance Farm Token
 */
 
import './libs/BEP20.sol';


// ZafiraToken token with Governance 
contract ZafiraToken is BEP20('Zafira', 'ZFAI') {

    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

    // Copied and modified from YAM code:
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
    // Which is copied and modified from COMPOUND:
    // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol

    /// @notice A record of each accounts delegate
    mapping (address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

      /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegator The address to get delegatee for
     */
    function delegates(address delegator)
        external
        view
        returns (address)
    {
        return _delegates[delegator];
    }

   /**
    * @notice Delegate votes from `msg.sender` to `delegatee`
    * @param delegatee The address to delegate votes to
    */
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint nonce,
        uint expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
    {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(
                DELEGATION_TYPEHASH,
                delegatee,
                nonce,
                expiry
            )
        );

        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                structHash
            )
        );

        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "ZFAI::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "ZFAI::delegateBySig: invalid nonce");
        require(now <= expiry, "ZFAI::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account)
        external
        view
        returns (uint256)
    {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint blockNumber)
        external
        view
        returns (uint256)
    {
        require(blockNumber < block.number, "ZFAI::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee)
        internal
    {
        address currentDelegate = _delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator); // balance of underlying ZFAIs (not scaled);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                // decrease old representative
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                // increase new representative
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    )
        internal
    {
        uint32 blockNumber = safe32(block.number, "ZFAI::_writeCheckpoint: block number exceeds 32 bits");

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function getChainId() internal pure returns (uint) {
        uint256 chainId;
        assembly { chainId := chainid() }
        return chainId;
    }
}

File 3 of 9 : BEP20.sol
// SPDX-License-Identifier: MIT

// Test Finance //

// Farm Token //

pragma solidity >=0.6.0;



import '@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol';
import '@pancakeswap/pancake-swap-lib/contracts/GSN/Context.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import '@pancakeswap/pancake-swap-lib/contracts/utils/Address.sol';

/**
 * @dev Implementation of the {IBEP20} 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 {BEP20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-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 BEP20 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 {IBEP20-approve}.
 */
contract BEP20 is Context, IBEP20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    // The operator can only update the tokenomics functions to protect tokenomics
    //i.e some wrong setting and a pools get too much allocation accidentally
    address private _operator;

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


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

    // Burn address
    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
   
    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);

    uint256 public constant _maxSupply = 180 * 10**9 * 10**18;
    uint256 public _totalMinted = 0;

    uint256 private _maxMintable = 159000000 * 10 ** 18; // 159 million max mintable (180 million max - 21 million premined)
    uint256 private _totalSupply = 21000000 * 10 ** 18; // 10 million airdrop + 10 million locked liquidity + 1 million marketing/partnership
    
    uint256 private dropLiqAmount = 10000000 * 10 ** 18;
    uint256 private marketingAmount = 1000000 * 10 ** 18;

    address private airdropAddress = 0x7448343B38a224C639c81767095DCF7dBC7A2d3d;
    
    address private liquiditylockAddress = 0x0000a97418E2161634c90c8a06a2E18000223B95;
    
    address private marketingAddress = 0xB59448fBa4D9d8241a403e9Da7da11856EaaA0B1;
    
    // Events

    /**
     * @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;
      
        _operator = msg.sender; 
        


         _balances[airdropAddress] = dropLiqAmount;
         _balances[liquiditylockAddress] = dropLiqAmount;
         _balances[marketingAddress] = marketingAmount;

         emit Transfer(address(0), airdropAddress, dropLiqAmount);
         emit Transfer(address(0), liquiditylockAddress, dropLiqAmount);
         emit Transfer(address(0), marketingAddress, marketingAmount);

    }



    modifier onlyOperator() {
        require(_operator == msg.sender, "Operator: caller is not the operator");
        _;
    }

    function operator() public view returns (address) {
        return _operator;
    }

    function transferOperator(address newOperator) public onlyOperator {
        require(newOperator != address(0), "TransferOperator: new operator is the zero address");
        emit OperatorTransferred(_operator, newOperator);
        _operator = newOperator;
    }

    function renounceOperation() public onlyOperator {
        emit OperatorTransferred(_operator, address(0));
        _operator = address(0);
    }

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

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

    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    function maxSupply() public view returns (uint256) {
        return _maxSupply;
    }

    function totalMinted() public view returns (uint256) {
        return _totalMinted;
    }

    
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance')
        );
        return true;
    }

    //

        /** @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 {
        require(account != address(0), 'BEP20: mint to the zero address');
       
       uint256 predictedTotal = _totalMinted.add(amount);

        if (predictedTotal >= _maxMintable) {    
            amount = _maxMintable.sub(_totalMinted);
        } 
        
        require(_totalMinted <= _maxMintable , 'BEP20: Max Amount minted reached');
               
        require(_totalSupply.add(amount) <= _maxSupply, 'Amount Exceeds Max Supply');
        
        _totalSupply = _totalSupply.add(amount);
        _totalMinted = _totalMinted.add(amount);
        
        _balances[account] = _balances[account].add(amount);

        emit Transfer(address(0), account, amount);

    }

    //Burn Tokens that are stuck on contract with no owner
    function burn(uint256 _amount) public onlyOperator {     
        require(_balances[address(this)] >= _amount,'Burning more than the current tokens on contract!');
        _transfer(address(this), BURN_ADDRESS, _amount);
        _totalSupply = _totalSupply.sub(_amount);
        _balances[address(this)].sub(_amount);

    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    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;
    }
    
    
    function _approve(address owner, address spender, uint256 amount) private {
        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 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 {
        require(sender != address(0), 'BEP20: transfer from the zero address');
        require(recipient != address(0), 'BEP20: transfer to the zero address');

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

File 4 of 9 : Context.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor() internal {}

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

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

File 5 of 9 : Ownable.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

import '../GSN/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.
 */
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 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 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 onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), 'Ownable: new owner is the zero address');
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 6 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.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, 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) {
        return sub(a, b, 'SafeMath: subtraction overflow');
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, 'SafeMath: multiplication overflow');

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, 'SafeMath: division by zero');
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, 'SafeMath: modulo by zero');
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 7 of 9 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

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 8 of 9 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import './IBEP20.sol';
import '../../math/SafeMath.sol';
import '../../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 9 of 9 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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');
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        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
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ZafiraToken","name":"_zfai","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"address","name":"_marktAddress","type":"address"},{"internalType":"address","name":"_staffAddress","type":"address"},{"internalType":"uint256","name":"_zfaiPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_multiplier","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"EmissionRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"blockDevFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockMktFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockStaffFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBEP20","name":"_lpToken","type":"address"}],"name":"checkPoolDuplicate","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":[{"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":[],"name":"getCirculatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"getPoolInfo","outputs":[{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accZfaiPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"totalLp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedZfai","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marktAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingZfai","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"accZfaiPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"totalLp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"staffAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalZfaiInPools","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":"_zfaiPerBlock","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"multiplierNumber","type":"uint256"}],"name":"updateMultiplier","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"},{"inputs":[],"name":"zfai","outputs":[{"internalType":"contract ZafiraToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"zfaiPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052600160085560006009556000600a556000600b556000600e55600060105534801561002e57600080fd5b5060405162002d2738038062002d27833981810160405261010081101561005457600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e0909701519596949593949293919290916000610091610153565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055600280546001600160a01b03199081166001600160a01b039a8b1617909155600380548216988a16989098179097556004805488169689169690961790955560058054871694881694909417909355600680549095169190951617909255600792909255600f556008556000600e55610157565b3390565b612bc080620001676000396000f3fe60806040526004361061021a5760003560e01c806369330e37116101235780638da5cb5b116100ab578063cdecefdf1161006f578063cdecefdf146106e7578063d49e77cd146106fc578063d963842214610711578063e2bbb15814610753578063f2fde38b146107835761021a565b80638da5cb5b146106025780638dbb1e3a1461061757806393f1a40b14610647578063a9c190c114610699578063c54e8b3b146106ae5761021a565b806384e82a33116100f257806384e82a33146105275780638705fcd414610572578063871815ce146105a55780638aa28550146105ba5780638d88a90e146105cf5761021a565b806369330e37146104d3578063715018a6146104e857806378a66273146104fd5780637f2e0ec2146105125761021a565b8063322d0d4a116101a657806348cd4cb11161017557806348cd4cb11461042b57806351eb05a6146104405780635312ea8e1461046a5780635ffe614614610494578063630b5ba1146104be5761021a565b8063322d0d4a14610387578063326bb941146103ba57806341275358146103e6578063441a3e70146103fb5761021a565b80631526fe27116101ed5780631526fe27146102b357806317caf6f11461031e5780632b112e49146103335780632ef0fdeb146103485780632f380b351461035d5761021a565b806307c426e21461021c578063081e3eda146102435780630a0920ff146102585780630ba84cd214610289575b005b34801561022857600080fd5b506102316107b6565b60408051918252519081900360200190f35b34801561024f57600080fd5b506102316107bc565b34801561026457600080fd5b5061026d6107c2565b604080516001600160a01b039092168252519081900360200190f35b34801561029557600080fd5b5061021a600480360360208110156102ac57600080fd5b50356107d1565b3480156102bf57600080fd5b506102dd600480360360208110156102d657600080fd5b5035610874565b604080516001600160a01b039097168752602087019590955285850193909352606085019190915261ffff16608084015260a0830152519081900360c00190f35b34801561032a57600080fd5b506102316108c8565b34801561033f57600080fd5b506102316108ce565b34801561035457600080fd5b506102316109db565b34801561036957600080fd5b506102dd6004803603602081101561038057600080fd5b50356109e1565b34801561039357600080fd5b5061021a600480360360208110156103aa57600080fd5b50356001600160a01b0316610ad3565b3480156103c657600080fd5b506103cf610b67565b6040805161ffff9092168252519081900360200190f35b3480156103f257600080fd5b5061026d610b6d565b34801561040757600080fd5b5061021a6004803603604081101561041e57600080fd5b5080359060200135610b7c565b34801561043757600080fd5b50610231610f8c565b34801561044c57600080fd5b5061021a6004803603602081101561046357600080fd5b5035610f92565b34801561047657600080fd5b5061021a6004803603602081101561048d57600080fd5b503561135c565b3480156104a057600080fd5b5061021a600480360360208110156104b757600080fd5b5035611621565b3480156104ca57600080fd5b5061021a61167e565b3480156104df57600080fd5b5061023161169d565b3480156104f457600080fd5b5061021a6116a3565b34801561050957600080fd5b506103cf611745565b34801561051e57600080fd5b5061023161174b565b34801561053357600080fd5b5061021a6004803603608081101561054a57600080fd5b508035906001600160a01b036020820135169061ffff604082013516906060013515156117d9565b34801561057e57600080fd5b5061021a6004803603602081101561059557600080fd5b50356001600160a01b0316611a08565b3480156105b157600080fd5b506103cf611a89565b3480156105c657600080fd5b50610231611a8e565b3480156105db57600080fd5b5061021a600480360360208110156105f257600080fd5b50356001600160a01b0316611a94565b34801561060e57600080fd5b5061026d611b01565b34801561062357600080fd5b506102316004803603604081101561063a57600080fd5b5080359060200135611b10565b34801561065357600080fd5b506106806004803603604081101561066a57600080fd5b50803590602001356001600160a01b0316611b2d565b6040805192835260208301919091528051918290030190f35b3480156106a557600080fd5b5061026d611b51565b3480156106ba57600080fd5b50610231600480360360408110156106d157600080fd5b50803590602001356001600160a01b0316611b60565b3480156106f357600080fd5b5061026d611d11565b34801561070857600080fd5b5061026d611d20565b34801561071d57600080fd5b5061021a6004803603608081101561073457600080fd5b5080359060208101359061ffff60408201351690606001351515611d2f565b34801561075f57600080fd5b5061021a6004803603604081101561077657600080fd5b5080359060200135611e7f565b34801561078f57600080fd5b5061021a600480360360208110156107a657600080fd5b50356001600160a01b0316612212565b60105481565b600c5490565b6002546001600160a01b031681565b6107d9612276565b6000546001600160a01b03908116911614610829576040805162461bcd60e51b81526020600482018190526024820152600080516020612b40833981519152604482015290519081900360640190fd5b61083161167e565b6007546040805191825260208201839052805133927feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d951192908290030190a2600755565b600c818154811061088157fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909261ffff9091169086565b600e5481565b600080600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561091f57600080fd5b505afa158015610933573d6000803e3d6000fd5b505050506040513d602081101561094957600080fd5b5051600254604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561099c57600080fd5b505afa1580156109b0573d6000803e3d6000fd5b505050506040513d60208110156109c657600080fd5b505190506109d4828261227a565b9250505090565b60105490565b600080600080600080600c87815481106109f757fe5b6000918252602090912060069091020154600c80546001600160a01b039092169189908110610a2257fe5b906000526020600020906006020160010154600c8981548110610a4157fe5b906000526020600020906006020160020154600c8a81548110610a6057fe5b906000526020600020906006020160030154600c8b81548110610a7f57fe5b906000526020600020906006020160040160009054906101000a900461ffff16600c8c81548110610aac57fe5b90600052602060002090600602016005015495509550955095509550955091939550919395565b600c5460005b81811015610b6257826001600160a01b0316600c8281548110610af857fe5b60009182526020909120600690910201546001600160a01b03161415610b5a576040805162461bcd60e51b81526020600482015260126024820152711859190e88195e1a5cdd1a5b99c81c1bdbdb60721b604482015290519081900360640190fd5b600101610ad9565b505050565b6103e881565b6004546001600160a01b031681565b600c5482908110610bd4576040805162461bcd60e51b815260206004820152601a60248201527f76616c6964617465506f6f6c3a20706f6f6c206578697374733f000000000000604482015290519081900360640190fd5b60026001541415610c2c576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001819055506000600c8481548110610c4357fe5b60009182526020808320878452600d825260408085203386529092529220805460069092029092019250841115610cb6576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b8382600501541015610cf95760405162461bcd60e51b8152600401808060200182810382526022815260200180612ad86022913960400191505060405180910390fd5b610d0285610f92565b6000610d3c8260010154610d3664e8d4a51000610d30876003015487600001546122bc90919063ffffffff16565b90612315565b9061227a565b90508015610d79576000610d4e61174b565b90508015610d775780821115610d6d57610d683382612357565b610d77565b610d773383612357565b505b8415610f075760025483546001600160a01b0390811691161415610ef157600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610de257600080fd5b505afa158015610df6573d6000803e3d6000fd5b505050506040513d6020811015610e0c57600080fd5b5051905080861115610e5a576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b6010548610610e6d576000601055610ed5565b856010541015610ec4576040805162461bcd60e51b815260206004820152601c60248201527f616d6f756e7420626967676572207468616e20706f6f6c207775743f00000000604482015290519081900360640190fd5b601054610ed1908761227a565b6010555b8354610eeb906001600160a01b0316338861254c565b50610f07565b8254610f07906001600160a01b0316338761254c565b8154610f13908661227a565b82556005830154610f24908661227a565b600584015560038301548254610f449164e8d4a5100091610d30916122bc565b6001830155604080518681529051879133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350506001805550505050565b600f5481565b600c5481908110610fea576040805162461bcd60e51b815260206004820152601a60248201527f76616c6964617465506f6f6c3a20706f6f6c206578697374733f000000000000604482015290519081900360640190fd5b6000600c8381548110610ff957fe5b906000526020600020906006020190508060020154431161101a5750611358565b6005810154158061102d57506001810154155b1561103e5743600290910155611358565b600061104e826002015443611b10565b9050600061107b600e54610d308560010154611075600754876122bc90919063ffffffff16565b906122bc565b90506000611091612710610d30846105dc6122bc565b9050600061109f838361227a565b90506000600260009054906101000a90046001600160a01b03166001600160a01b031663a2309ff86040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f157600080fd5b505afa158015611105573d6000803e3d6000fd5b505050506040513d602081101561111b57600080fd5b505190506a83858f45714796ff00000081106111b5576000600954118061114457506000600a54115b8061115157506000600b54115b156111a15760035460095461116f916001600160a01b031690612357565b600654600a54611188916001600160a01b031690612357565b600554600b546111a1916001600160a01b031690612357565b60006009819055600b819055600a556112be565b600254604080516340c10f1960e01b81523060048201526024810187905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b15801561120857600080fd5b505af115801561121c573d6000803e3d6000fd5b50505050683ba1910bf341b0000060095411156112565760035460095461124c916001600160a01b031690612357565b60006009556112be565b683ba1910bf341b00000600a54111561128c57600654600a54611282916001600160a01b031690612357565b6000600a556112be565b686c6b935b8bbd400000600b5411156112be57600554600b546112b8916001600160a01b031690612357565b6000600b555b6112db6112d2612710610d308760646122bc565b6009549061259e565b6009556112fc6112f3612710610d30876101906122bc565b600a549061259e565b600a90815561131990611310908690612315565b600b549061259e565b600b5560058601546113439061133890610d308564e8d4a510006122bc565b60038801549061259e565b60038701555050436002909401939093555050505b5050565b600260015414156113b4576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001819055506000600c82815481106113cb57fe5b60009182526020808320858452600d8252604080852033865290925292208054600692909202909201600581015490935081111561143a5760405162461bcd60e51b815260040180806020018281038252602b815260200180612b60602b913960400191505060405180910390fd5b60025483546001600160a01b03908116911614156115ac57600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561149d57600080fd5b505afa1580156114b1573d6000803e3d6000fd5b505050506040513d60208110156114c757600080fd5b5051905080821115611515576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b6010548210611528576000601055611590565b81601054101561157f576040805162461bcd60e51b815260206004820152601c60248201527f616d6f756e7420626967676572207468616e20706f6f6c207775743f00000000604482015290519081900360640190fd5b60105461158c908361227a565b6010555b83546115a6906001600160a01b0316338461254c565b506115c2565b82546115c2906001600160a01b0316338361254c565b6000808355600183015560058301546115db908261227a565b6005840155604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a35050600180555050565b611629612276565b6000546001600160a01b03908116911614611679576040805162461bcd60e51b81526020600482018190526024820152600080516020612b40833981519152604482015290519081900360640190fd5b600855565b600c5460005b818110156113585761169581610f92565b600101611684565b60075481565b6116ab612276565b6000546001600160a01b039081169116146116fb576040805162461bcd60e51b81526020600482018190526024820152600080516020612b40833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61019081565b601054600254604080516370a0823160e01b815230600482015290516000936117d49390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156117a257600080fd5b505afa1580156117b6573d6000803e3d6000fd5b505050506040513d60208110156117cc57600080fd5b50519061227a565b905090565b6117e1612276565b6000546001600160a01b03908116911614611831576040805162461bcd60e51b81526020600482018190526024820152600080516020612b40833981519152604482015290519081900360640190fd5b6127108261ffff1611156118765760405162461bcd60e51b8152600401808060200182810382526025815260200180612a636025913960400191505060405180910390fd5b80156118845761188461167e565b6000600f54431161189757600f54611899565b435b600e549091506118a9908661259e565b600e556040805160c0810182526001600160a01b0395861681526020810196875290810191825260006060820181815261ffff9586166080840190815260a08401838152600c8054600181018255945293517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7600690940293840180546001600160a01b031916919099161790975596517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c882015591517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c983015594517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca82015592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8cb8401805461ffff191691909316179091555090517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8cc90910155565b6004546001600160a01b03163314611a67576040805162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b606481565b60085481565b6003546001600160a01b03163314611adf576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b600854600090611b2490611075848661227a565b90505b92915050565b600d6020908152600092835260408084209091529082529020805460019091015482565b6006546001600160a01b031681565b600080600c8481548110611b7057fe5b60009182526020808320878452600d825260408085206001600160a01b03891686529092529220600360069092029092019081015460058201546002830154929450909143118015611bc157508015155b15611cde576000611bd6856002015443611b10565b90506000611bfd600e54610d308860010154611075600754876122bc90919063ffffffff16565b90506000611c13612710610d30846105dc6122bc565b90506000611c21838361227a565b90506000600260009054906101000a90046001600160a01b03166001600160a01b031663a2309ff86040518163ffffffff1660e01b815260040160206040518083038186803b158015611c7357600080fd5b505afa158015611c87573d6000803e3d6000fd5b505050506040513d6020811015611c9d57600080fd5b505190506a83858f45714796ff0000008110611cb857611cd8565b611cd5611cce87610d308564e8d4a510006122bc565b889061259e565b96505b50505050505b611d068360010154610d3664e8d4a51000610d308688600001546122bc90919063ffffffff16565b979650505050505050565b6005546001600160a01b031681565b6003546001600160a01b031681565b611d37612276565b6000546001600160a01b03908116911614611d87576040805162461bcd60e51b81526020600482018190526024820152600080516020612b40833981519152604482015290519081900360640190fd5b6127108261ffff161115611dcc5760405162461bcd60e51b8152600401808060200182810382526025815260200180612b1b6025913960400191505060405180910390fd5b8015611dda57611dda61167e565b611e1783611e11600c8781548110611dee57fe5b906000526020600020906006020160010154600e5461227a90919063ffffffff16565b9061259e565b600e8190555082600c8581548110611e2b57fe5b90600052602060002090600602016001018190555081600c8581548110611e4e57fe5b906000526020600020906006020160040160006101000a81548161ffff021916908361ffff16021790555050505050565b60026001541415611ed7576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001819055506000600c8381548110611eee57fe5b60009182526020808320868452600d82526040808520338652909252922060069091029091019150611f1f84610f92565b805415611f93576000611f548260010154610d3664e8d4a51000610d30876003015487600001546122bc90919063ffffffff16565b90508015611f91576000611f6661174b565b90508015611f8f5780821115611f8557611f803382612357565b611f8f565b611f8f3383612357565b505b505b82156121b1578154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611fe357600080fd5b505afa158015611ff7573d6000803e3d6000fd5b505050506040513d602081101561200d57600080fd5b50518354909150612029906001600160a01b03163330876125f8565b8254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561207357600080fd5b505afa158015612087573d6000803e3d6000fd5b505050506040513d602081101561209d57600080fd5b505190506120ab818361227a565b600485015490955061ffff16156121635760048401546000906120db9061271090610d3090899061ffff166122bc565b60025486549192506001600160a01b03918216911614156121135761210f81610d368860105461259e90919063ffffffff16565b6010555b600454855461212f916001600160a01b0391821691168361254c565b8354612141908290610d36908961259e565b84556005850154612158908290610d36908961259e565b6005860155506121ae565b825461216f908661259e565b83556005840154612180908661259e565b600585015560025484546001600160a01b03908116911614156121ae576010546121aa908661259e565b6010555b50505b600382015481546121cc9164e8d4a5100091610d30916122bc565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050600180555050565b61221a612276565b6000546001600160a01b0390811691161461226a576040805162461bcd60e51b81526020600482018190526024820152600080516020612b40833981519152604482015290519081900360640190fd5b61227381612658565b50565b3390565b6000611b2483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506126f8565b6000826122cb57506000611b27565b828202828482816122d857fe5b0414611b245760405162461bcd60e51b8152600401808060200182810382526021815260200180612afa6021913960400191505060405180910390fd5b6000611b2483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061278f565b601054600254604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156123a557600080fd5b505afa1580156123b9573d6000803e3d6000fd5b505050506040513d60208110156123cf57600080fd5b5051111561135857601054600254604080516370a0823160e01b8152306004820152905160009361242e9390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156117a257600080fd5b90508082106124bf576002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561248d57600080fd5b505af11580156124a1573d6000803e3d6000fd5b505050506040513d60208110156124b757600080fd5b50610b629050565b8115610b62576002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561251b57600080fd5b505af115801561252f573d6000803e3d6000fd5b505050506040513d602081101561254557600080fd5b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b629084906127f4565b600082820183811015611b24576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526126529085906127f4565b50505050565b6001600160a01b03811661269d5760405162461bcd60e51b8152600401808060200182810382526026815260200180612ab26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156127875760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561274c578181015183820152602001612734565b50505050905090810190601f1680156127795780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836127de5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561274c578181015183820152602001612734565b5060008385816127ea57fe5b0495945050505050565b6060612849826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128a59092919063ffffffff16565b805190915015610b625780806020019051602081101561286857600080fd5b5051610b625760405162461bcd60e51b815260040180806020018281038252602a815260200180612a88602a913960400191505060405180910390fd5b60606128b484846000856128bc565b949350505050565b60606128c785612a29565b612918576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106129575780518252601f199092019160209182019101612938565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146129b9576040519150601f19603f3d011682016040523d82523d6000602084013e6129be565b606091505b509150915081156129d25791506128b49050565b8051156129e25780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561274c578181015183820152602001612734565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906128b457505015159291505056fe6164643a20696e76616c6964206465706f7369742066656520626173697320706f696e74735361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737357697468647261773a20506f6f6c20746f74616c204c50206e6f7420656e6f756768536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777365743a20696e76616c6964206465706f7369742066656520626173697320706f696e74734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572456d657267656e637957697468647261773a20506f6f6c20746f74616c204c50206e6f7420656e6f756768a2646970667358221220dc289ffafc69493cd520ed4d2ddd43d43434106ec19d4979c8d3558ba63ae20664736f6c634300060c0033000000000000000000000000205cd59eea8e8c5083f16d20e1050fd4a7d72037000000000000000000000000c609a3b0e0aa77ffcfc4e5226f1fbb45698a2c430000000000000000000000000000a97418e2161634c90c8a06a2e18000223b95000000000000000000000000b59448fba4d9d8241a403e9da7da11856eaaa0b1000000000000000000000000bd759d8e21412bea5876c377de9a718ff7d3f8700000000000000000000000000000000000000000000000003782dace9d90000000000000000000000000000000000000000000000000000000000000009542f00000000000000000000000000000000000000000000000000000000000000001

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

000000000000000000000000205cd59eea8e8c5083f16d20e1050fd4a7d72037000000000000000000000000c609a3b0e0aa77ffcfc4e5226f1fbb45698a2c430000000000000000000000000000a97418e2161634c90c8a06a2e18000223b95000000000000000000000000b59448fba4d9d8241a403e9da7da11856eaaa0b1000000000000000000000000bd759d8e21412bea5876c377de9a718ff7d3f8700000000000000000000000000000000000000000000000003782dace9d90000000000000000000000000000000000000000000000000000000000000009542f00000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _zfai (address): 0x205cd59eea8e8c5083f16d20e1050fd4a7d72037
Arg [1] : _devaddr (address): 0xc609a3b0e0aa77ffcfc4e5226f1fbb45698a2c43
Arg [2] : _feeAddress (address): 0x0000a97418e2161634c90c8a06a2e18000223b95
Arg [3] : _marktAddress (address): 0xb59448fba4d9d8241a403e9da7da11856eaaa0b1
Arg [4] : _staffAddress (address): 0xbd759d8e21412bea5876c377de9a718ff7d3f870
Arg [5] : _zfaiPerBlock (uint256): 4000000000000000000
Arg [6] : _startBlock (uint256): 9782000
Arg [7] : _multiplier (uint256): 1

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000205cd59eea8e8c5083f16d20e1050fd4a7d72037
Arg [1] : 000000000000000000000000c609a3b0e0aa77ffcfc4e5226f1fbb45698a2c43
Arg [2] : 0000000000000000000000000000a97418e2161634c90c8a06a2e18000223b95
Arg [3] : 000000000000000000000000b59448fba4d9d8241a403e9da7da11856eaaa0b1
Arg [4] : 000000000000000000000000bd759d8e21412bea5876c377de9a718ff7d3f870
Arg [5] : 0000000000000000000000000000000000000000000000003782dace9d900000
Arg [6] : 00000000000000000000000000000000000000000000000000000000009542f0
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001


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.