Contract 0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe6498c180c5f5f5c03c5f36db4b1fe2828e061a1f13579d76056c9e2f78fff0aDeposit204773632021-10-22 5:48:2734 mins ago0x3a93840e05b688aef3a445d4a826355829469b10 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00239178
0x5b1fc39b198f9734d16813738488ec99824536681f1ffe4d3103262cbe5aabe2Withdraw204769202021-10-22 5:32:5949 mins ago0x136200e3728ffdc1688e9df19f0b6878422c0fbf IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00203571
0x0e11d04762a6032ca3f95ce33b94e7680dd7692b8f03045ea1d8ee2b9564c400Withdraw204761972021-10-22 5:04:071 hr 18 mins ago0x935993809d9a53ca47f0cc63e33047aa7c11e7e2 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.01493118
0xa0f2d1b532fffbf7ab60743045bf3b0672e6c43147c7173f59dee6874fd436d2Withdraw204761702021-10-22 5:03:131 hr 19 mins ago0x935993809d9a53ca47f0cc63e33047aa7c11e7e2 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.02019644
0xb21fdee50c3b896d63bca548e3de27c4a9729569f029363f209b237d696530ffDeposit204755532021-10-22 4:37:431 hr 45 mins ago0x37d5dec664b22f42bed151629c6951fd8f4fb0fb IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00209877
0x6f221e97199632f8b23d18803f079f8fea313c3b35595ba02d80e1b0283669dfWithdraw204755292021-10-22 4:36:551 hr 46 mins ago0x37d5dec664b22f42bed151629c6951fd8f4fb0fb IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00203607
0xecbf8524bf548b7756ffdd539b496636c361ee8828df97a0cb25f074aae826f1Withdraw204754422021-10-22 4:33:531 hr 49 mins ago0x07c6a338cbc1e4e7118d52499dbb2678a2f5458a IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00203643
0x91a880a52d196d552b5133955f1c55c38c0ddd6aa8ddcb841bf653a7187592d1Withdraw204753342021-10-22 4:30:131 hr 52 mins ago0x354029b0d5c417fed5f22522d3a1325b5397df8e IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00203607
0x5ad3bd848422a60edc8232e0040d03b1095aa79c9882539ec5927176b5a37326Deposit204750262021-10-22 4:17:292 hrs 5 mins ago0x68acfbdd46c24c67116355a1d068ff69fcc332df IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00209877
0xcef320a2fa95ca3062c041947c11ddf0defad8ea4d12444d69d2c3d5dd26d224Withdraw204750212021-10-22 4:17:192 hrs 5 mins ago0x68acfbdd46c24c67116355a1d068ff69fcc332df IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00254907
0xb39e57311712df3f950eaca1d75fac58f2ce141cb990e3ea51d4f83202cb33b5Withdraw204746892021-10-22 4:01:392 hrs 21 mins ago0xb68e51e7f98b39b03088e582eb041f4c8c8cfd59 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.0027537
0x71416de931571440225068ddbae9c0049bd740b28062ddcae9c761176c369462Withdraw204746262021-10-22 3:59:292 hrs 23 mins ago0xb68e51e7f98b39b03088e582eb041f4c8c8cfd59 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00203571
0xe403a75a831620d27e939182c5ded30fbc3934776570577050648f6afb1a8ad6Withdraw204734322021-10-22 3:12:513 hrs 10 mins ago0x7db61a1e07599ec8160fc6c187ce4152998bc05b IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.0018981333
0x1cac7aed4b3df022f9a1ee413ef9b218ce35986de4b2294814b41470e46f0066Deposit204734272021-10-22 3:12:313 hrs 10 mins ago0x7db61a1e07599ec8160fc6c187ce4152998bc05b IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.0032329638
0x3fb3d14e5ccade71fef5d4362980829365980b72bda84790e1e268e42a72070dWithdraw204733652021-10-22 3:09:433 hrs 13 mins ago0x1230f0bd310c10a8843a1011b1524506f9e43931 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.0031083
0x11de337b2c2d0a412a72e02d4a36d358cab96ac58580699929c61b833a931597Withdraw204733542021-10-22 3:09:213 hrs 13 mins ago0x1230f0bd310c10a8843a1011b1524506f9e43931 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00260967
0x16724c3083ada51e497cb28d51b01f084338e117acfde6ee582b313680d38ecbDeposit204733432021-10-22 3:08:553 hrs 14 mins ago0x1230f0bd310c10a8843a1011b1524506f9e43931 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00291258
0x9b851e176a79ab7dd4145353b7114fd9e85a6130abd56ec8ec976b1646f24364Deposit204733332021-10-22 3:08:353 hrs 14 mins ago0x1230f0bd310c10a8843a1011b1524506f9e43931 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00296052
0xcd0bee69400da99d793cc5bd4f6fa251cd35cb2046c34bb0dd7e5e161f54667dWithdraw204733132021-10-22 3:07:553 hrs 15 mins ago0xead347dacb03d3b3eda676382950f9e9d8276bc6 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00170967
0x7cce45e555e1b386e5bf514d22b984ae432d336a582090da66b5f5c2cc792c92Deposit204732712021-10-22 3:06:273 hrs 16 mins ago0xead347dacb03d3b3eda676382950f9e9d8276bc6 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00316782
0x05685c5c9c981c3541248262d0ebc4f5ed0085cb3e701dfd035eae43fd524c05Deposit204730422021-10-22 2:56:293 hrs 26 mins ago0xc9d3db1578ac46a918b79d8a6e02e62f1751f75b IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00296052
0x3c4fb485d00377334448199251ca31e53233e0b0ad6ff1596a6e47bd8da5622fDeposit204727052021-10-22 2:42:513 hrs 40 mins ago0x7b22e3304cd6c64183196057a449f5bc8e57efcd IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00209877
0xc1063cbc3cb4eeef7bbfd986a24e700bea772bc95cb5e3430300ed9c32a36b0fWithdraw204726982021-10-22 2:42:293 hrs 40 mins ago0x7b22e3304cd6c64183196057a449f5bc8e57efcd IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00254943
0x14070aa5d57c33b9f46ebd5f7994ec8fc454f799d1b91999a40c04a0f19c8a8cWithdraw204725922021-10-22 2:38:533 hrs 44 mins ago0x983830536419e28623128eccbc22fee4e4a146c6 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.0016953
0x1a085953c18a6c71b743f336cf675b5ab18a7e9588695cbdb15cbb924c2644caDeposit204725752021-10-22 2:38:153 hrs 44 mins ago0x983830536419e28623128eccbc22fee4e4a146c6 IN  0x43d78ba76dc2c5df8c1cf3423c5b8db7f476f33a0 MATIC0.00296052
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChef

Compiler Version
v0.8.4+commit.c7e474f2

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.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./interfaces/IConsolidatedFund.sol";

// MasterChef is the master of IVORY. He can make IVORY 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 IVORY 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, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    // 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 IVORYs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accSushiPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accSushiPerShare` (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 {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. IVORYs to distribute per block.
        uint256 lastRewardBlock; // Last block number that IVORYs distribution occurs.
        uint256 accRewardPerShare; // Accumulated IVORYs per share, times 1e12. See below.
    }
    // The reward TOKEN!
    IERC20 public rewardToken;
    // reward tokens created per block.
    uint256 public rewardPerBlock;
    uint256 public BONUS_MULTIPLIER = 1;
    address public fund;
    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when reward mining starts.
    uint256 public startBlock;
    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 Add(address lpToken, uint256 allocPoint);
    event Set(uint256 indexed pid, uint256 allocPoint);
    event FundUpdated(address indexed fund);
    event RewardPerBlockUpdated(uint newRewardPerBlock);
    event StartBlockSet(uint256 startBlock);

    mapping(IERC20 => bool) public poolExistence;
    modifier nonDuplicated(IERC20 _lpToken) {
        // Check if the given lpToken already exists in the pool.
        require(poolExistence[_lpToken] == false, "nonDuplicated: duplicated");
        _;
    }

    constructor(
        IERC20 _rewardToken,
        address _fund,
        uint256 _rewardPerBlock,
        uint256 _startBlock
    ) {
        rewardToken = _rewardToken;
        rewardPerBlock = _rewardPerBlock;
        startBlock = _startBlock;
        fund = _fund;
    }

    function fundBalance() external view returns (uint256) {
        return IConsolidatedFund(fund).balance(address(rewardToken));
    }

    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,
        IERC20 _lpToken
    ) public onlyOwner nonDuplicated(_lpToken) {
        massUpdatePools();
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accRewardPerShare: 0
            })
        );
        poolExistence[_lpToken] = true;
        emit Add(address(_lpToken), _allocPoint);
    }

    // Update the given pool's reward allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint
    ) public onlyOwner {
        massUpdatePools();
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        emit Set(_pid, _allocPoint);
    }

    function setfund(address _fund) external onlyOwner {
        require(_fund != address(0), "Invalid zero address");
        fund = _fund;
        emit FundUpdated(fund);
    }

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

    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        return _to.sub(_from).mul(BONUS_MULTIPLIER);
    }

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

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

    // Deposit LP tokens to MasterChef for reward token allocation.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);
            safeRewardTransfer(msg.sender, pending);
        }
        pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
        user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);
        safeRewardTransfer(msg.sender, pending);
        user.amount = user.amount.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);
        pool.lpToken.safeTransfer(address(msg.sender), _amount);
        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];
        pool.lpToken.safeTransfer(address(msg.sender), user.amount);
        emit EmergencyWithdraw(msg.sender, _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
    }

    // Safe rewward token transfer function, just in case if rounding error causes pool to not have enough reward tokens.
    function safeRewardTransfer(address _to, uint256 _amount) internal {
        IConsolidatedFund(fund).transferTo(address(rewardToken), _to, _amount);
    }

    function setRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner {
        massUpdatePools();
        rewardPerBlock = _rewardPerBlock;
        emit RewardPerBlockUpdated(rewardPerBlock);
    }

    function setStartBlockOnce(uint256 _startBlock) external onlyOwner {
        require(startBlock == 0, "Already Set");
        startBlock = _startBlock;
        emit StartBlockSet(startBlock);
    }
}

File 2 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

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

File 5 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity 0.8.4;

interface IConsolidatedFund {
    function balance(address _token) external view returns (uint256);

    function transferTo(
        address _token,
        address _receiver,
        uint256 _amount
    ) external;
}

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

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

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",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_fund","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"Add","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":"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":"fund","type":"address"}],"name":"FundUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRewardPerBlock","type":"uint256"}],"name":"RewardPerBlockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"StartBlockSet","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 IERC20","name":"_lpToken","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundBalance","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":[],"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":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"setRewardPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"setStartBlockOnce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fund","type":"address"}],"name":"setfund","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600160045560006008553480156200001b57600080fd5b50604051620018c3380380620018c38339810160408190526200003e91620000d8565b620000493362000088565b60018055600280546001600160a01b039586166001600160a01b031991821617909155600392909255600955600580549290931691161790556200013d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008060808587031215620000ee578384fd5b8451620000fb8162000124565b60208601519094506200010e8162000124565b6040860151606090960151949790965092505050565b6001600160a01b03811681146200013a57600080fd5b50565b611776806200014d6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638aa28550116100de578063b60d428811610097578063cbd258b511610071578063cbd258b514610362578063e2bbb15814610395578063f2fde38b146103a8578063f7c618c1146103bb57600080fd5b8063b60d428814610329578063bb872b4a1461033c578063be5215021461034f57600080fd5b80638aa28550146102855780638ae39cac1461028e5780638da5cb5b146102975780638dbb1e3a146102bc57806393f1a40b146102cf57806398969e821461031657600080fd5b8063441a3e701161014b5780635312ea8e116101255780635312ea8e1461024f578063581f416614610262578063630b5ba114610275578063715018a61461027d57600080fd5b8063441a3e701461022057806348cd4cb11461023357806351eb05a61461023c57600080fd5b8063081e3eda146101935780631526fe27146101aa57806317caf6f1146101e75780631ab06ee5146101f05780632b8bbbe8146102055780633c06794514610218575b600080fd5b6006545b6040519081526020015b60405180910390f35b6101bd6101b8366004611513565b6103ce565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101a1565b61019760085481565b6102036101fe366004611584565b610412565b005b610203610213366004611572565b610519565b610197610723565b61020361022e366004611584565b6107ac565b61019760095481565b61020361024a366004611513565b61093d565b61020361025d366004611513565b610a81565b6102036102703660046114d7565b610b5e565b610203610c1f565b610203610c4a565b61019760045481565b61019760035481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101a1565b6101976102ca366004611584565b610c80565b6103016102dd366004611543565b60076020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101a1565b610197610324366004611543565b610c9b565b6005546102a4906001600160a01b031681565b61020361034a366004611513565b610e15565b61020361035d366004611513565b610e83565b6103856103703660046114d7565b600a6020526000908152604090205460ff1681565b60405190151581526020016101a1565b6102036103a3366004611584565b610f20565b6102036103b63660046114d7565b611068565b6002546102a4906001600160a01b031681565b600681815481106103de57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b031633146104455760405162461bcd60e51b815260040161043c906115f4565b60405180910390fd5b61044d610c1f565b61049e816104986006858154811061047557634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402016001015460085461110390919063ffffffff16565b9061110f565b60088190555080600683815481106104c657634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010181905550817f545b620a3000f6303b158b321f06b4e95e28a27d70aecac8c6bdac4f48a9f6b38260405161050d91815260200190565b60405180910390a25050565b6000546001600160a01b031633146105435760405162461bcd60e51b815260040161043c906115f4565b6001600160a01b0381166000908152600a6020526040902054819060ff16156105ae5760405162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c69636174656400000000000000604482015260640161043c565b6105b6610c1f565b600060095443116105c9576009546105cb565b435b6008549091506105db908561110f565b600855604080516080810182526001600160a01b038581168083526020808401898152848601878152600060608701818152600680546001808201835591845298517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f6004909a02998a0180546001600160a01b031916919099161790975592517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4088015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4187015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4290950194909455818452600a815292849020805460ff191690921790915582519081529081018690527f2728c9d3205d667bbc0eefdfeda366261b4d021949630c047f3e5834b30611ab910160405180910390a150505050565b60055460025460405163e3d670d760e01b81526001600160a01b039182166004820152600092919091169063e3d670d79060240160206040518083038186803b15801561076f57600080fd5b505afa158015610783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a7919061152b565b905090565b600260015414156107cf5760405162461bcd60e51b815260040161043c90611629565b60026001819055506000600683815481106107fa57634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260078252604080852033865290925292208054600490920290920192508311156108685760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015260640161043c565b6108718461093d565b60006108ab82600101546108a564e8d4a5100061089f8760030154876000015461111b90919063ffffffff16565b90611127565b90611103565b90506108b73382611133565b81546108c39085611103565b80835560038401546108e09164e8d4a510009161089f919061111b565b600183015582546108fb906001600160a01b031633866111a7565b604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b60006006828154811061096057634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020190508060020154431161097f575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156109c257600080fd5b505afa1580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fa919061152b565b905080610a0c57504360029091015550565b6000610a1c836002015443610c80565b90506000610a4960085461089f8660010154610a436003548761111b90919063ffffffff16565b9061111b565b9050610a6c610a618461089f8464e8d4a5100061111b565b60038601549061110f565b60038501555050436002909201919091555050565b60026001541415610aa45760405162461bcd60e51b815260040161043c90611629565b6002600181905550600060068281548110610acf57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600782526040808520338087529352909320805460049093029093018054909450610b14926001600160a01b039190911691906111a7565b8054604051908152839033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3600080825560019182015580555050565b6000546001600160a01b03163314610b885760405162461bcd60e51b815260040161043c906115f4565b6001600160a01b038116610bd55760405162461bcd60e51b8152602060048201526014602482015273496e76616c6964207a65726f206164647265737360601b604482015260640161043c565b600580546001600160a01b0319166001600160a01b0383169081179091556040517f135892bfc091a8631bea211a7015284a89a3017545f624c0a913d8bd2c936dc090600090a250565b60065460005b81811015610c4657610c368161093d565b610c3f816116fa565b9050610c25565b5050565b6000546001600160a01b03163314610c745760405162461bcd60e51b815260040161043c906115f4565b610c7e600061120f565b565b600454600090610c9490610a438486611103565b9392505050565b60008060068481548110610cbf57634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526007825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610d3657600080fd5b505afa158015610d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6e919061152b565b9050836002015443118015610d8257508015155b15610de2576000610d97856002015443610c80565b90506000610dbe60085461089f8860010154610a436003548761111b90919063ffffffff16565b9050610ddd610dd68461089f8464e8d4a5100061111b565b859061110f565b935050505b610e0a83600101546108a564e8d4a5100061089f86886000015461111b90919063ffffffff16565b979650505050505050565b6000546001600160a01b03163314610e3f5760405162461bcd60e51b815260040161043c906115f4565b610e47610c1f565b60038190556040518181527f5ed0ffa545a9eae0edd36b74378d16454cf385281383c7632ad5b2ebf3ab2b92906020015b60405180910390a150565b6000546001600160a01b03163314610ead5760405162461bcd60e51b815260040161043c906115f4565b60095415610eeb5760405162461bcd60e51b815260206004820152600b60248201526a105b1c9958591e4814d95d60aa1b604482015260640161043c565b60098190556040518181527fc9071777b7b8965ca4af12d74bba5af5f2932e988111a30eeca0afd6ff922f2790602001610e78565b60026001541415610f435760405162461bcd60e51b815260040161043c90611629565b6002600181905550600060068381548110610f6e57634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600782526040808520338652909252922060049091029091019150610f9f8461093d565b805415610fe2576000610fd482600101546108a564e8d4a5100061089f8760030154876000015461111b90919063ffffffff16565b9050610fe03382611133565b505b8154610ff9906001600160a01b031633308661125f565b8054611005908461110f565b80825560038301546110229164e8d4a510009161089f919061111b565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a35050600180555050565b6000546001600160a01b031633146110925760405162461bcd60e51b815260040161043c906115f4565b6001600160a01b0381166110f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161043c565b6111008161120f565b50565b6000610c9482846116b7565b6000610c948284611660565b6000610c948284611698565b6000610c948284611678565b6005546002546040516352f950a960e11b81526001600160a01b03918216600482015284821660248201526044810184905291169063a5f2a15290606401600060405180830381600087803b15801561118b57600080fd5b505af115801561119f573d6000803e3d6000fd5b505050505050565b6040516001600160a01b03831660248201526044810182905261120a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261129d565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526112979085906323b872dd60e01b906084016111d3565b50505050565b60006112f2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661136f9092919063ffffffff16565b80519091501561120a578080602001905181019061131091906114f3565b61120a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161043c565b606061137e8484600085611386565b949350505050565b6060824710156113e75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161043c565b843b6114355760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161043c565b600080866001600160a01b0316858760405161145191906115a5565b60006040518083038185875af1925050503d806000811461148e576040519150601f19603f3d011682016040523d82523d6000602084013e611493565b606091505b5091509150610e0a828286606083156114ad575081610c94565b8251156114bd5782518084602001fd5b8160405162461bcd60e51b815260040161043c91906115c1565b6000602082840312156114e8578081fd5b8135610c948161172b565b600060208284031215611504578081fd5b81518015158114610c94578182fd5b600060208284031215611524578081fd5b5035919050565b60006020828403121561153c578081fd5b5051919050565b60008060408385031215611555578081fd5b8235915060208301356115678161172b565b809150509250929050565b60008060408385031215611555578182fd5b60008060408385031215611596578182fd5b50508035926020909101359150565b600082516115b78184602087016116ce565b9190910192915050565b60208152600082518060208401526115e08160408501602087016116ce565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561167357611673611715565b500190565b60008261169357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156116b2576116b2611715565b500290565b6000828210156116c9576116c9611715565b500390565b60005b838110156116e95781810151838201526020016116d1565b838111156112975750506000910152565b600060001982141561170e5761170e611715565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461110057600080fdfea26469706673582212200c3f5f958ca0515dff546d268955678dee3e47855b578b6a6cde86fd1b9176c364736f6c6343000804003300000000000000000000000088a3acac5c48f93121d4d7771a068a1fcde078bc000000000000000000000000d568a7109799124b74b4c715035dd7fd05471cb500000000000000000000000000000000000000000000000052251ab8e4ffeaaa0000000000000000000000000000000000000000000000000000000000000000

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

00000000000000000000000088a3acac5c48f93121d4d7771a068a1fcde078bc000000000000000000000000d568a7109799124b74b4c715035dd7fd05471cb500000000000000000000000000000000000000000000000052251ab8e4ffeaaa0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x88a3acac5c48f93121d4d7771a068a1fcde078bc
Arg [1] : _fund (address): 0xd568a7109799124b74b4c715035dd7fd05471cb5
Arg [2] : _rewardPerBlock (uint256): 5919166666666666666
Arg [3] : _startBlock (uint256): 0

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000088a3acac5c48f93121d4d7771a068a1fcde078bc
Arg [1] : 000000000000000000000000d568a7109799124b74b4c715035dd7fd05471cb5
Arg [2] : 00000000000000000000000000000000000000000000000052251ab8e4ffeaaa
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000


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.