Contract 0x33141e87ad2DFae5FBd12Ed6e61Fa2374aAeD029

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x82a4b2f8bd33ecf4e4727604365d325af0ed17d059932e65a7f8c46291ea67f3Leave Staking447667872022-12-09 5:25:077 secs ago0x5cde5305e46c6f6044c84ae500f5147c3b24d1d6 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00005026
0x13fb9eda6cd4c2b8f7199cb7381347bde5b6920312ebf6a9dae547147f59d907Deposit447667752022-12-09 5:25:0311 secs ago0x2b185c762f6fb49a07116ec06b238b58fe2bec53 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002764
0x1a253012b53e6c01e79382fdb4ee85eb2a27fbe3828ccfd3fabf739bfa0ddc88Leave Staking447667602022-12-09 5:24:5420 secs ago0xd7a9bd6a8feb9b8d71688b42ee03831e7f6bfec4 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002426
0xd610cd2c484a681ac448f63add598d27672ce22418b8f57aa9657753b065b719Deposit447666052022-12-09 5:23:481 min ago0x39e7f44aea61c5aad77590f41f97d5c06022055d IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002935
0xc12d18a3632d4192461f7c4abdb21b8ffc89c60c9bcacb2ff11b3b3e87e58f92Leave Staking447665622022-12-09 5:23:311 min ago0xab1e23d650ad5df561be86ee521f33afcf70d798 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002666
0x8de7c074d0644fb8fba89c7ba3cf1497fa57378f2b862a92ccd70ac5e9b58f3aWithdraw447665152022-12-09 5:23:102 mins ago0x034dfc5dcaa498d6fc10650f9f37a83a663c1e29 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00003229
0x6dd23ef733dae0ad2651e02d431f3fa27194f606d490b9034ec0d7c4917c0fadEnter Staking447664172022-12-09 5:22:312 mins ago0x09cc15dda77789d42c0133c909e88fb6e3af793a IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002709
0x473542c5976886bddf81de2053b165ab826b2133ff61e352db77de81f88a8eb1Deposit447663852022-12-09 5:22:182 mins ago0x09cc15dda77789d42c0133c909e88fb6e3af793a IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002846
0x25ddad1a0a44bacefa016373f1b2523eb0aed8363ad364ccd33c94471104ce65Leave Staking447663492022-12-09 5:22:043 mins ago0x7163f6daf6b9500828293f5af6f0971676394b64 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002666
0xb7acfb07af536c97cead89948acf4fa1e0f2c78a36609ab954d2202e76c2c195Deposit447661452022-12-09 5:20:364 mins ago0x2b185c762f6fb49a07116ec06b238b58fe2bec53 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002826
0x310ba11d73900790c758138847d680791d7c67968e41a60f07accb492faa4582Leave Staking447660642022-12-09 5:19:595 mins ago0x31650d0c865ca2a210801629c833c6c9f565c1e3 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00005126
0x3d1417e0bd5094a5a6490b9bef1f4912eaf4073fd93ca32c13a153455b853d03Enter Staking447660112022-12-09 5:19:365 mins ago0xab1e23d650ad5df561be86ee521f33afcf70d798 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002937
0xe1bf797de67ef7dd54e6ef2f9d34ea3d049905130f09810e95815214a3566dbcLeave Staking447658172022-12-09 5:18:206 mins ago0x888fd0e2170f0e649cfc20be4e39caa1eb76551b IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002563
0xccbad3ec1d59cc56754b8333c0b1044729921953b9376a5c17cae8b8c0af4f82Deposit447657902022-12-09 5:18:097 mins ago0x888fd0e2170f0e649cfc20be4e39caa1eb76551b IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002968
0x615fbec24f3564908b31e002b5097dd5556f2c644453277344b62fa8e49302bdWithdraw447655022022-12-09 5:16:129 mins ago0x0340ead03ae07ab1c50731af5a4279ccf266e91d IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00003285
0x3948b3cf1c340daa69738a4af82192d3dbbf357b5ab2fc0e49ea192661d154e8Deposit447654062022-12-09 5:15:299 mins ago0x0340ead03ae07ab1c50731af5a4279ccf266e91d IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00003183
0xd1c566b1650c8b9bcb38998dcf9e1392cae3a846c306b118721035326d29aab6Enter Staking447652832022-12-09 5:14:3410 mins ago0xe808f4fc87097434263c9d375396d6993c7217e1 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002667
0x647386d0477b2a3f4af36f8ea2d14856eb83122add6a1d020b160bf2d6b6ff0fDeposit447652712022-12-09 5:14:2910 mins ago0x2b185c762f6fb49a07116ec06b238b58fe2bec53 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002775
0x8a1da442bdeb9d3ad48a07301fa50504a0467846e2c5d26d045faa6f26b88d6dDeposit447651822022-12-09 5:13:5111 mins ago0xe808f4fc87097434263c9d375396d6993c7217e1 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002785
0x20ee5798f0f38c7282bc6b41e1d04ebeaa37a605177d4efcbca559cf4c53f01aLeave Staking447651542022-12-09 5:13:4011 mins ago0xe808f4fc87097434263c9d375396d6993c7217e1 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002445
0xe4f1e94c933f261a4491a2ec2c0107d7485a7e581732ee600ce32a8e67ccc0bdDeposit447651322022-12-09 5:13:3111 mins ago0x6326880b7b16ba98791c86cf82d4e7d6995cc358 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00003173
0xd90982ba7705c20db1f233e6cf499440993321826031175f8b1cf51c36cc3b12Leave Staking447649802022-12-09 5:12:3112 mins ago0x11ab1c5524378e98299ca44d67c1abb17586e574 IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002436
0xb666aaf381c8a165d3cf2c301afe378b2b9bb35931f1f88eecb8848536f97853Enter Staking447646542022-12-09 5:10:1215 mins ago0x6c500247b8c5d6d9f8b4ec92d064378634ab311f IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002695
0xaf147189d5fb7eaa648a777f65481706bc37874b96a0debfae7a10209fbb1ebeLeave Staking447645642022-12-09 5:09:3715 mins ago0x6c500247b8c5d6d9f8b4ec92d064378634ab311f IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002644
0xcfcda12f4060acc2f94945251f9b9c7aec508cde22ac20c64d1790cf15d24817Enter Staking447644922022-12-09 5:09:0816 mins ago0x53b97188bab1a17083f4ca24baa7c58e2bd5f6db IN  0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH0.00002685
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x82a4b2f8bd33ecf4e4727604365d325af0ed17d059932e65a7f8c46291ea67f3447667872022-12-09 5:25:077 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x82a4b2f8bd33ecf4e4727604365d325af0ed17d059932e65a7f8c46291ea67f3447667872022-12-09 5:25:077 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x82a4b2f8bd33ecf4e4727604365d325af0ed17d059932e65a7f8c46291ea67f3447667872022-12-09 5:25:077 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x82a4b2f8bd33ecf4e4727604365d325af0ed17d059932e65a7f8c46291ea67f3447667872022-12-09 5:25:077 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x82a4b2f8bd33ecf4e4727604365d325af0ed17d059932e65a7f8c46291ea67f3447667872022-12-09 5:25:077 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x13fb9eda6cd4c2b8f7199cb7381347bde5b6920312ebf6a9dae547147f59d907447667752022-12-09 5:25:0311 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x13fb9eda6cd4c2b8f7199cb7381347bde5b6920312ebf6a9dae547147f59d907447667752022-12-09 5:25:0311 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x13fb9eda6cd4c2b8f7199cb7381347bde5b6920312ebf6a9dae547147f59d907447667752022-12-09 5:25:0311 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x13fb9eda6cd4c2b8f7199cb7381347bde5b6920312ebf6a9dae547147f59d907447667752022-12-09 5:25:0311 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290xe0a0ede95abe2072cc2091d5c193fd86f740e0570 ETH
0x1a253012b53e6c01e79382fdb4ee85eb2a27fbe3828ccfd3fabf739bfa0ddc88447667602022-12-09 5:24:5420 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x1a253012b53e6c01e79382fdb4ee85eb2a27fbe3828ccfd3fabf739bfa0ddc88447667602022-12-09 5:24:5420 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x1a253012b53e6c01e79382fdb4ee85eb2a27fbe3828ccfd3fabf739bfa0ddc88447667602022-12-09 5:24:5420 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x1a253012b53e6c01e79382fdb4ee85eb2a27fbe3828ccfd3fabf739bfa0ddc88447667602022-12-09 5:24:5420 secs ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0xb900ba6b36e3c1851580bd2e006c64b20f06ab09 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0xb900ba6b36e3c1851580bd2e006c64b20f06ab09 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0xb900ba6b36e3c1851580bd2e006c64b20f06ab09 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed0290 ETH
0x55b7dc99da08881f1af78ec012d96b4805bcb23c1899f263b584288a0eba6f35447666082022-12-09 5:23:481 min ago 0x33141e87ad2dfae5fbd12ed6e61fa2374aaed029 0xb348b87b23d5977e2948e6f36ca07e1ec94d73280 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChef

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

pragma solidity >=0.6.12;

import './libraries/SafeMath.sol';
import './interfaces/IBEP20.sol';
import './token/SafeBEP20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

import "./token/FishToken.sol";

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

// MasterChef is the master of Cake. He can make Cake 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 CAKE is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract MasterChef is Ownable {
    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 CAKEs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accCakePerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accCakePerShare` (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. CAKEs to distribute per block.
        uint256 lastRewardBlockTime;  // Last block number that CAKEs distribution occurs.
        uint256 accCakePerShare; // Accumulated CAKEs per share, times 1e12. See below.
    }

    // The FISH TOKEN!
    FishToken public cake;
    // CAKE tokens created per block - ownerFee.
    uint256 public cakePerSecond;
    // Bonus muliplier for early cake makers.
    uint256 public BONUS_MULTIPLIER = 1;

    // 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;
    // Allocation ratio for pool 0
    uint8 public allocRatio = 2;
    // The block number when CAKE mining starts.
    uint256 public startTime = type(uint256).max;
    // Owner fee
    uint256 public constant ownerFee = 2500; // 20%

    mapping (address => bool) public lpTokenAdded;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    constructor(
        FishToken _cake,
        uint256 _cakePerSecond
    ) {
        cake = _cake;
        cakePerSecond = _cakePerSecond;

        // staking pool
        poolInfo.push(PoolInfo({
            lpToken: _cake,
            allocPoint: 1000,
            lastRewardBlockTime: startTime,
            accCakePerShare: 0
        }));

        totalAllocPoint = 1000;

    }

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

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

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    function add(uint256 _allocPoint, IBEP20 _lpToken, bool _withUpdate) public onlyOwner {
        require(lpTokenAdded[address(_lpToken)] == false, 'Pool for this token already exists!');
        lpTokenAdded[address(_lpToken)] = true;

        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlockTime = block.timestamp > startTime ? block.timestamp : startTime;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlockTime: lastRewardBlockTime,
            accCakePerShare: 0
        }));
        updateStakingPool();
    }

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

    function updateStakingPool() internal {
        uint256 length = poolInfo.length;
        uint256 points = 0;
        for (uint256 pid = 1; pid < length; ++pid) {
            points = points.add(poolInfo[pid].allocPoint);
        }
        if (points != 0) {
            points = points.div(allocRatio);
            totalAllocPoint = totalAllocPoint.sub(poolInfo[0].allocPoint).add(points);
            poolInfo[0].allocPoint = points;
        }
    }

    // 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 CAKEs on frontend.
    function pendingCake(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accCakePerShare = pool.accCakePerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.timestamp > pool.lastRewardBlockTime && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlockTime, block.timestamp);
            uint256 cakeReward = multiplier.mul(cakePerSecond).mul(pool.allocPoint).div(totalAllocPoint);
            accCakePerShare = accCakePerShare.add(cakeReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accCakePerShare).div(1e12).sub(user.rewardDebt);
    }

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


    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardBlockTime) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlockTime = block.timestamp;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlockTime, block.timestamp);
        uint256 cakeReward = multiplier.mul(cakePerSecond).mul(pool.allocPoint).div(totalAllocPoint);
        cake.mint(cakeReward);
        pool.accCakePerShare = pool.accCakePerShare.add(cakeReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlockTime = block.timestamp;

        // mint ownerFee
        cake.mintFor(owner(), cakeReward.mul(ownerFee).div(10000));
    }

    // Deposit LP tokens to MasterChef for CAKE allocation.
    function deposit(uint256 _pid, uint256 _amount) public {

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accCakePerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                safeCakeTransfer(msg.sender, pending);
            }
        }
        if (_amount > 0) {
            // Thanks for RugDoc advice
            uint256 before = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            uint256 _after = pool.lpToken.balanceOf(address(this));
            _amount = _after.sub(before);
            // Thanks for RugDoc advice

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

    // Stake CAKE tokens to MasterChef
    function enterStaking(uint256 _amount) public {
        deposit(0, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public {
        
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");

        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accCakePerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
            safeCakeTransfer(msg.sender, pending);
        }
        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accCakePerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw CAKE tokens from STAKING.
    function leaveStaking(uint256 _amount) public {
        withdraw(0, _amount);
    }

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

    // Safe FISH transfer function, just in case if rounding error causes pool to not have enough FISH.
    function safeCakeTransfer(address _to, uint256 _amount) internal {
        cake.safeCakeTransfer(_to, _amount);
    }

    // Update pool 0 allocation ratio. Can only be called by the owner.
    function setAllocRatio(uint8 _allocRatio) public onlyOwner {
        require(
            _allocRatio >= 1 && _allocRatio <= 10, 
            "Allocation ratio must be in range 1-10"
        );

        allocRatio = _allocRatio;
    }

    // reduce FISH emissions
    function reduceEmissions(uint256 _mintAmt) external onlyOwner {
        require(_mintAmt < cakePerSecond, "Only lower amount allowed.");
        require(_mintAmt.mul(100).div(cakePerSecond) >= 95, "Max 5% decrease per transaction.");
        cakePerSecond = _mintAmt;
    }

    function setStartTime(uint256 _startTime) external onlyOwner {
        require(block.timestamp < startTime && block.timestamp < _startTime);
        startTime = _startTime;

        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            poolInfo[pid].lastRewardBlockTime = startTime;
        }
    }
}

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

pragma solidity >=0.6.0;

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

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

pragma solidity >0.6.6;

import "./BEP20.sol";

contract FishToken is BEP20 {
    using SafeMath for uint256;
    uint256 public constant maxSupply = 99_999_999e18;

    constructor() BEP20('SwapFish', 'FISH') {
        _mint(msg.sender, 99_999_99e16);
    }

    /// @notice Creates `_amount` token to token address. Must only be called by the owner (MasterChef).
    function mint(uint256 _amount) public override onlyOwner returns (bool) {
        return mintFor(address(this), _amount);
    }

    function mintFor(address _address, uint256 _amount) public onlyOwner returns (bool) {
        _mint(_address, _amount);
        require(totalSupply() <= maxSupply, "reach max supply");
        return true;
    }

    // Safe fish transfer function, just in case if rounding error causes pool to not have enough FISH.
    function safeCakeTransfer(address _to, uint256 _amount) public onlyOwner {
        uint256 fishBal = balanceOf(address(this));
        if (_amount > fishBal) {
            _transfer(address(this), _to, fishBal);
        } else {
            _transfer(address(this), _to, _amount);
        }
    }
}

File 6 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity >=0.6.6;

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

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

pragma solidity >=0.4.0;

import '../interfaces/IBEP20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '../libraries/SafeMath.sol';
import '../libraries/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;

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

    /**
     * @dev Returns the token decimals.
     */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

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

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

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

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

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

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

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

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

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

    /**
     * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
     * the total supply.
     *
     * Requirements
     *
     * - `msg.sender` must be the token owner
     */
    function mint(uint256 amount) public virtual onlyOwner returns (bool) {
        _mint(_msgSender(), amount);
        return true;
    }

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

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

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

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

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

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

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

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(
            account,
            _msgSender(),
            _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance')
        );
    }
}

File 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"contract FishToken","name":"_cake","type":"address"},{"internalType":"uint256","name":"_cakePerSecond","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"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":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocRatio","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cake","outputs":[{"internalType":"contract FishToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cakePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enterStaking","outputs":[],"stateMutability":"nonpayable","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":"_amount","type":"uint256"}],"name":"leaveStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lpTokenAdded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"ownerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingCake","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":"lastRewardBlockTime","type":"uint256"},{"internalType":"uint256","name":"accCakePerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmt","type":"uint256"}],"name":"reduceEmissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_allocRatio","type":"uint8"}],"name":"setAllocRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"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"}]

6080604052600160035560006006556007805460ff191660021790556000196008553480156200002e57600080fd5b5060405162001e8a38038062001e8a8339810160408190526200005191620001c8565b620000656200005f62000174565b62000178565b600180546001600160a01b039384166001600160a01b031991821681178355600293909355604080516080810182529384526103e86020850181815260085492860192835260006060870181815260048054978801815591829052965195027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101805496909816959094169490941790955591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e9091015560065562000202565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060408385031215620001db578182fd5b82516001600160a01b0381168114620001f2578283fd5b6020939093015192949293505050565b611c7880620002126000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638dbb1e3a116100a2578063d5b2a01a11610071578063d5b2a01a146103a9578063dce17484146103b1578063e2bbb158146103b9578063f2fde38b146103cc576101cf565b80638dbb1e3a1461034057806393f1a40b14610353578063a38b6f5b14610374578063bb21153014610394576101cf565b8063715018a6116100de578063715018a61461031357806378e979251461031b5780638aa28550146103235780638da5cb5b1461032b576101cf565b80635ffe6146146102e5578063630b5ba1146102f857806364482f7914610300576101cf565b806338adbb9b11610171578063441a3e701161014b578063441a3e70146102a45780634ae81874146102b757806351eb05a6146102bf5780635312ea8e146102d2576101cf565b806338adbb9b1461026b5780633e0a322d1461027e57806341441d3b14610291576101cf565b806314ddd562116101ad57806314ddd5621461021a5780631526fe271461022d57806317caf6f1146102505780631eaaa04514610258576101cf565b8063081e3eda146101d45780631058d281146101f25780631175a1dd14610207575b600080fd5b6101dc6103df565b6040516101e99190611b2f565b60405180910390f35b6102056102003660046116ba565b6103e5565b005b6101dc6102153660046116ea565b6103f3565b6102056102283660046116ba565b610585565b61024061023b3660046116ba565b6105ef565b6040516101e99493929190611841565b6101dc610633565b610205610266366004611719565b610639565b6102056102793660046117a8565b6107cf565b61020561028c3660046116ba565b610821565b61020561029f3660046116ba565b6108a2565b6102056102b236600461175a565b6108ad565b6101dc6109ef565b6102056102cd3660046116ba565b6109f5565b6102056102e03660046116ba565b610c56565b6102056102f33660046116ba565b610d11565b610205610d1e565b61020561030e36600461177b565b610d49565b610205610dfe565b6101dc610e12565b6101dc610e18565b610333610e1e565b6040516101e991906117e5565b6101dc61034e36600461175a565b610e2d565b6103666103613660046116ea565b610e48565b6040516101e9929190611b38565b610387610382366004611682565b610e6c565b6040516101e99190611836565b61039c610e81565b6040516101e99190611b46565b6101dc610e8a565b610333610e90565b6102056103c736600461175a565b610e9f565b6102056103da366004611682565b6110d0565b60045490565b6103f06000826108ad565b50565b6000806004848154811061041757634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526005825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b815291975092959294929391909116916370a082319161047a913091016117e5565b60206040518083038186803b15801561049257600080fd5b505afa1580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca91906116d2565b90508360020154421180156104de57508015155b1561054a5760006104f3856002015442610e2d565b90506000610526600654610520886001015461051a6002548761110790919063ffffffff16565b90611107565b9061114c565b905061054561053e846105208464e8d4a51000611107565b859061118e565b935050505b610578836001015461057264e8d4a5100061052086886000015461110790919063ffffffff16565b906111bd565b9450505050505b92915050565b61058d6111ff565b60025481106105b75760405162461bcd60e51b81526004016105ae90611a4f565b60405180910390fd5b600254605f906105cc90610520846064611107565b10156105ea5760405162461bcd60e51b81526004016105ae9061189a565b600255565b600481815481106105ff57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60065481565b6106416111ff565b6001600160a01b03821660009081526009602052604090205460ff161561067a5760405162461bcd60e51b81526004016105ae90611996565b6001600160a01b0382166000908152600960205260409020805460ff1916600117905580156106ab576106ab610d1e565b600060085442116106be576008546106c0565b425b6006549091506106d0908561118e565b600655604080516080810182526001600160a01b03858116825260208201878152928201848152600060608401818152600480546001810182559281905294517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9290950291820180546001600160a01b031916959094169490941790925592517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e909101556107c961123e565b50505050565b6107d76111ff565b60018160ff16101580156107ef5750600a8160ff1611155b61080b5760405162461bcd60e51b81526004016105ae90611ae9565b6007805460ff191660ff92909216919091179055565b6108296111ff565b6008544210801561083957508042105b61084257600080fd5b600881905560045460005b8181101561089d576008546004828154811061087957634e487b7160e01b600052603260045260246000fd5b600091825260209091206002600490920201015561089681611bee565b905061084d565b505050565b6103f0600082610e9f565b6000600483815481106108d057634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260058252604080852033865290925292208054600490920290920192508311156109195760405162461bcd60e51b81526004016105ae90611abd565b610922846109f5565b6000610950826001015461057264e8d4a510006105208760030154876000015461110790919063ffffffff16565b9050801561096257610962338261134d565b831561098c57815461097490856111bd565b8255825461098c906001600160a01b031633866113ad565b600383015482546109a79164e8d4a510009161052091611107565b6001830155604051859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906109e0908890611b2f565b60405180910390a35050505050565b60025481565b600060048281548110610a1857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201905080600201544211610a3957506103f0565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610a699030906004016117e5565b60206040518083038186803b158015610a8157600080fd5b505afa158015610a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab991906116d2565b905080610acd5750426002909101556103f0565b6000610add836002015442610e2d565b90506000610b04600654610520866001015461051a6002548761110790919063ffffffff16565b60015460405163140e25ad60e31b81529192506001600160a01b03169063a0712d6890610b35908490600401611b2f565b602060405180830381600087803b158015610b4f57600080fd5b505af1158015610b63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b87919061169e565b50610ba9610b9e846105208464e8d4a51000611107565b60038601549061118e565b60038501554260028501556001546001600160a01b031663da1919b3610bcd610e1e565b610bdf612710610520866109c4611107565b6040518363ffffffff1660e01b8152600401610bfc92919061181d565b602060405180830381600087803b158015610c1657600080fd5b505af1158015610c2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4e919061169e565b505050505050565b600060048281548110610c7957634e487b7160e01b600052603260045260246000fd5b600091825260208083208584526005825260408085203380875293528420805485825560018201959095556004909302018054909450919291610cc9916001600160a01b039190911690836113ad565b83336001600160a01b03167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059583604051610d039190611b2f565b60405180910390a350505050565b610d196111ff565b600355565b60045460005b81811015610d4557610d35816109f5565b610d3e81611bee565b9050610d24565b5050565b610d516111ff565b8015610d5f57610d5f610d1e565b600060048481548110610d8257634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402016001015490508260048581548110610db857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101819055508281146107c957610df383610ded836006546111bd90919063ffffffff16565b9061118e565b6006556107c961123e565b610e066111ff565b610e106000611403565b565b60085481565b60035481565b6000546001600160a01b031690565b600354600090610e419061051a84866111bd565b9392505050565b60056020908152600092835260408084209091529082529020805460019091015482565b60096020526000908152604090205460ff1681565b60075460ff1681565b6109c481565b6001546001600160a01b031681565b600060048381548110610ec257634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600582526040808520338652909252922060049091029091019150610ef3846109f5565b805415610f3c576000610f28826001015461057264e8d4a510006105208760030154876000015461110790919063ffffffff16565b90508015610f3a57610f3a338261134d565b505b821561107c5781546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610f729030906004016117e5565b60206040518083038186803b158015610f8a57600080fd5b505afa158015610f9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc291906116d2565b8354909150610fdc906001600160a01b0316333087611453565b82546040516370a0823160e01b81526000916001600160a01b0316906370a082319061100c9030906004016117e5565b60206040518083038186803b15801561102457600080fd5b505afa158015611038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105c91906116d2565b905061106881836111bd565b8354909550611077908661118e565b835550505b600382015481546110979164e8d4a510009161052091611107565b6001820155604051849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590610d03908790611b2f565b6110d86111ff565b6001600160a01b0381166110fe5760405162461bcd60e51b81526004016105ae90611919565b6103f081611403565b6000826111165750600061057f565b60006111228385611b8c565b90508261112f8583611b6c565b14610e415760405162461bcd60e51b81526004016105ae906119d9565b6000610e4183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611474565b60008061119b8385611b54565b905083811015610e415760405162461bcd60e51b81526004016105ae9061195f565b6000610e4183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114ab565b6112076114dc565b6001600160a01b0316611218610e1e565b6001600160a01b031614610e105760405162461bcd60e51b81526004016105ae90611a1a565b600454600060015b828110156112a5576112936004828154811061127257634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101548361118e90919063ffffffff16565b915061129e81611bee565b9050611246565b508015610d45576007546112bd90829060ff1661114c565b905061130b81610ded60046000815481106112e857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101546006546111bd90919063ffffffff16565b60068190555080600460008154811061133457634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101819055505050565b6001546040516328b9b77360e21b81526001600160a01b039091169063a2e6ddcc9061137f908590859060040161181d565b600060405180830381600087803b15801561139957600080fd5b505af1158015610c4e573d6000803e3d6000fd5b61089d8363a9059cbb60e01b84846040516024016113cc92919061181d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114e0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107c9846323b872dd60e01b8585856040516024016113cc939291906117f9565b600081836114955760405162461bcd60e51b81526004016105ae9190611867565b5060006114a28486611b6c565b95945050505050565b600081848411156114cf5760405162461bcd60e51b81526004016105ae9190611867565b5060006114a28486611bab565b3390565b6000611535826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661156f9092919063ffffffff16565b80519091501561089d5780806020019051810190611553919061169e565b61089d5760405162461bcd60e51b81526004016105ae906118cf565b606061157e8484600085611586565b949350505050565b606061159185611649565b6115ad5760405162461bcd60e51b81526004016105ae90611a86565b600080866001600160a01b031685876040516115c991906117c9565b60006040518083038185875af1925050503d8060008114611606576040519150601f19603f3d011682016040523d82523d6000602084013e61160b565b606091505b5091509150811561161f57915061157e9050565b80511561162f5780518082602001fd5b8360405162461bcd60e51b81526004016105ae9190611867565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061157e575050151592915050565b600060208284031215611693578081fd5b8135610e4181611c1f565b6000602082840312156116af578081fd5b8151610e4181611c34565b6000602082840312156116cb578081fd5b5035919050565b6000602082840312156116e3578081fd5b5051919050565b600080604083850312156116fc578081fd5b82359150602083013561170e81611c1f565b809150509250929050565b60008060006060848603121561172d578081fd5b83359250602084013561173f81611c1f565b9150604084013561174f81611c34565b809150509250925092565b6000806040838503121561176c578182fd5b50508035926020909101359150565b60008060006060848603121561178f578283fd5b8335925060208401359150604084013561174f81611c34565b6000602082840312156117b9578081fd5b813560ff81168114610e41578182fd5b600082516117db818460208701611bc2565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b6000602082528251806020840152611886816040850160208701611bc2565b601f01601f19169190910160400192915050565b6020808252818101527f4d617820352520646563726561736520706572207472616e73616374696f6e2e604082015260600190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526023908201527f506f6f6c20666f72207468697320746f6b656e20616c7265616479206578697360408201526274732160e81b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f4f6e6c79206c6f77657220616d6f756e7420616c6c6f7765642e000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601290820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604082015260600190565b60208082526026908201527f416c6c6f636174696f6e20726174696f206d75737420626520696e2072616e6760408201526506520312d31360d41b606082015260800190565b90815260200190565b918252602082015260400190565b60ff91909116815260200190565b60008219821115611b6757611b67611c09565b500190565b600082611b8757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611ba657611ba6611c09565b500290565b600082821015611bbd57611bbd611c09565b500390565b60005b83811015611bdd578181015183820152602001611bc5565b838111156107c95750506000910152565b6000600019821415611c0257611c02611c09565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146103f057600080fd5b80151581146103f057600080fdfea2646970667358221220ef19dc01c877be6c928f8a6d7396ded591775ec342a100e0a3e81fc51469732764736f6c63430008000033000000000000000000000000b348b87b23d5977e2948e6f36ca07e1ec94d73280000000000000000000000000000000000000000000000000e18428f04c7b400

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

000000000000000000000000b348b87b23d5977e2948e6f36ca07e1ec94d73280000000000000000000000000000000000000000000000000e18428f04c7b400

-----Decoded View---------------
Arg [0] : _cake (address): 0xb348b87b23d5977e2948e6f36ca07e1ec94d7328
Arg [1] : _cakePerSecond (uint256): 1015634898000000000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b348b87b23d5977e2948e6f36ca07e1ec94d7328
Arg [1] : 0000000000000000000000000000000000000000000000000e18428f04c7b400


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