ETH Price: $3,457.96 (+1.54%)
Gas: 8 Gwei

Contract

0x0B80b9E59fb2B1262cdbe3AFEf5ce52cb0521653
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw193334782024-02-29 13:30:11138 days ago1709213411IN
0x0B80b9E5...cb0521653
0 ETH0.0083930877.94760333
Withdraw192770822024-02-21 16:00:35146 days ago1708531235IN
0x0B80b9E5...cb0521653
0 ETH0.0047836152.82028395
Withdraw189979602024-01-13 12:26:23186 days ago1705148783IN
0x0B80b9E5...cb0521653
0 ETH0.0013803716.18068077
Claim189048032023-12-31 10:15:23199 days ago1704017723IN
0x0B80b9E5...cb0521653
0 ETH0.0009653712.13585046
Withdraw189048002023-12-31 10:14:47199 days ago1704017687IN
0x0B80b9E5...cb0521653
0 ETH0.001223413.5087303
Withdraw188584482023-12-24 21:58:11205 days ago1703455091IN
0x0B80b9E5...cb0521653
0 ETH0.0015441818.10084663
Claim188584432023-12-24 21:57:11205 days ago1703455031IN
0x0B80b9E5...cb0521653
0 ETH0.0019690419.32082195
Claim188476842023-12-23 9:41:11207 days ago1703324471IN
0x0B80b9E5...cb0521653
0 ETH0.0018029718.65527921
Claim187329782023-12-07 7:38:23223 days ago1701934703IN
0x0B80b9E5...cb0521653
0 ETH0.002997731.01703002
Withdraw187128292023-12-04 11:53:47226 days ago1701690827IN
0x0B80b9E5...cb0521653
0 ETH0.00382942.27390955
Claim186911612023-12-01 11:07:11229 days ago1701428831IN
0x0B80b9E5...cb0521653
0 ETH0.0027924528.88975555
Claim186693752023-11-28 9:57:47232 days ago1701165467IN
0x0B80b9E5...cb0521653
0 ETH0.0027582128.53555924
Withdraw186693682023-11-28 9:56:23232 days ago1701165383IN
0x0B80b9E5...cb0521653
0 ETH0.0028364226.34515021
Claim186476362023-11-25 8:51:47235 days ago1700902307IN
0x0B80b9E5...cb0521653
0 ETH0.0023320823.34117157
Claim185870192023-11-16 21:04:59243 days ago1700168699IN
0x0B80b9E5...cb0521653
0 ETH0.0035503536.73075138
Claim185272922023-11-08 12:39:23251 days ago1699447163IN
0x0B80b9E5...cb0521653
0 ETH0.0027064528
Withdraw185265972023-11-08 10:19:11252 days ago1699438751IN
0x0B80b9E5...cb0521653
0 ETH0.0019651323.03195989
Claim185265882023-11-08 10:17:23252 days ago1699438643IN
0x0B80b9E5...cb0521653
0 ETH0.0023763723.31767625
Withdraw185130722023-11-06 12:54:59253 days ago1699275299IN
0x0B80b9E5...cb0521653
0 ETH0.0019220522.53335749
Claim185130692023-11-06 12:54:23253 days ago1699275263IN
0x0B80b9E5...cb0521653
0 ETH0.0024241723.78675364
Claim184579902023-10-29 19:42:23261 days ago1698608543IN
0x0B80b9E5...cb0521653
0 ETH0.0012576313.01101184
Withdraw184579762023-10-29 19:39:35261 days ago1698608375IN
0x0B80b9E5...cb0521653
0 ETH0.0014952213.88946137
Claim184380462023-10-27 0:44:11264 days ago1698367451IN
0x0B80b9E5...cb0521653
0 ETH0.0011684814.68706273
Withdraw184289482023-10-25 18:10:35265 days ago1698257435IN
0x0B80b9E5...cb0521653
0 ETH0.0057000652.93719655
Withdraw183754872023-10-18 6:34:35273 days ago1697610875IN
0x0B80b9E5...cb0521653
0 ETH0.000591236.93040841
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BentMasterChef

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 8 : BentMasterChef.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

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

import "../libraries/Errors.sol";

contract BentMasterChef is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Address for address;

    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        //   pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accRewardPerShare` (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.
    }

    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. Rewards to distribute per block.
        uint256 lastRewardBlock; // Last block number that Rewards distribution occurs.
        uint256 accRewardPerShare; // Accumulated Rewards per share, times 1e36. See below.
    }

    // BENT
    IERC20 public bent;
    // BENT tokens reward per block.
    uint256 public rewardPerBlock;
    // max BENT tokens reward per block. 20M / 4 years
    uint256 public maxRewardPerBlock;

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

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

    constructor(
        IERC20 _bent,
        uint256 _rewardPerBlock,
        uint256 _startBlock
    ) Ownable() ReentrancyGuard() {
        bent = _bent;
        // rewardPerBlock at deployment will be max reward per block
        maxRewardPerBlock = _rewardPerBlock;
        rewardPerBlock = _rewardPerBlock;
        startBlock = _startBlock;
    }

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

    function updateRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner {
        require(
            _rewardPerBlock <= maxRewardPerBlock,
            Errors.INVALID_REWARD_PER_BLOCK
        );

        massUpdatePools();
        rewardPerBlock = _rewardPerBlock;
    }

    // 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,
        bool _withUpdate
    ) external onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock
            ? block.number
            : startBlock;
        totalAllocPoint = totalAllocPoint + _allocPoint;
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accRewardPerShare: 0
            })
        );
    }

    // Update the given pool's BENT allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) external onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint =
            totalAllocPoint -
            poolInfo[_pid].allocPoint +
            _allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // View function to see pending BENT 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 bentReward = ((block.number - pool.lastRewardBlock) *
                rewardPerBlock *
                pool.allocPoint) / totalAllocPoint;
            accRewardPerShare += (bentReward * 1e36) / lpSupply;
        }
        return
            userRewards[_pid][_user] +
            (user.amount * accRewardPerShare) /
            1e36 -
            user.rewardDebt;
    }

    // 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 bentReward = ((block.number - pool.lastRewardBlock) *
            rewardPerBlock *
            pool.allocPoint) / totalAllocPoint;
        pool.accRewardPerShare += (bentReward * 1e36) / lpSupply;
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for BENT allocation.
    function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
        require(_amount > 0, Errors.INVALID_AMOUNT);

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        queueRewards(_pid, msg.sender);

        pool.lpToken.safeTransferFrom(
            address(msg.sender),
            address(this),
            _amount
        );
        user.amount += _amount;
        user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e36;

        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
        require(_amount > 0, Errors.INVALID_AMOUNT);

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, Errors.INVALID_AMOUNT);

        updatePool(_pid);
        queueRewards(_pid, msg.sender);

        user.amount -= _amount;
        user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e36;
        pool.lpToken.safeTransfer(address(msg.sender), _amount);

        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Claim Bent from MasterChef
    function claim(uint256 _pid, address _account) external nonReentrant {
        updatePool(_pid);
        queueRewards(_pid, _account);

        uint256 pending = userRewards[_pid][_account];
        require(pending > 0, Errors.NO_PENDING_REWARD);

        userRewards[_pid][_account] = 0;
        userInfo[_pid][_account].rewardDebt =
            (userInfo[_pid][_account].amount *
                poolInfo[_pid].accRewardPerShare) /
            (1e36);

        bent.safeTransfer(_account, pending);

        emit RewardPaid(_account, _pid, pending);
    }

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

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

    // Queue rewards - increase pending rewards
    function queueRewards(uint256 _pid, address _account) internal {
        UserInfo memory user = userInfo[_pid][_account];
        uint256 pending = (user.amount * poolInfo[_pid].accRewardPerShare) /
            (1e36) -
            user.rewardDebt;
        if (pending > 0) {
            userRewards[_pid][_account] += pending;
        }
    }

    // owner can force withdraw bent tokens
    function forceWithdrawBent(uint256 _amount)
        external
        onlyOwner
        nonReentrant
    {
        bent.safeTransfer(msg.sender, _amount);
    }
}

File 2 of 8 : 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 3 of 8 : 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 4 of 8 : 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 5 of 8 : 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 6 of 8 : 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 7 of 8 : Errors.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

library Errors {
    string public constant ZERO_ADDRESS = "100";
    string public constant ZERO_AMOUNT = "101";
    string public constant INVALID_ADDRESS = "102";
    string public constant INVALID_AMOUNT = "103";
    string public constant NO_PENDING_REWARD = "104";
    string public constant INVALID_PID = "105";
    string public constant INVALID_POOL_ADDRESS = "106";
    string public constant UNAUTHORIZED = "107";
    string public constant ALREADY_EXISTS = "108";
    string public constant SAME_ALLOCPOINT = "109";
    string public constant INVALID_REWARD_PER_BLOCK = "110";
    string public constant INSUFFICIENT_REWARDS = "111";
    string public constant EXCEED_MAX_HARVESTER_FEE = "112";
    string public constant EXCEED_MAX_FEE = "113";
    string public constant INVALID_INDEX = "114";
    string public constant INVALID_REQUEST = "115";
}

File 8 of 8 : 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": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_bent","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","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":"RewardPaid","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":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bent","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"claim","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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"forceWithdrawBent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxRewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"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":[{"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":[],"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":"_rewardPerBlock","type":"uint256"}],"name":"updateRewardPerBlock","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"}]

6080604052600060085534801561001557600080fd5b5060405162001b2038038062001b20833981016040819052610036916100c4565b61003f33610074565b60018055600280546001600160a01b0319166001600160a01b0394909416939093179092556004819055600355600955610105565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156100d8578283fd5b83516001600160a01b03811681146100ee578384fd5b602085015160409095015190969495509392505050565b611a0b80620001156000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806364482f79116100d857806398969e821161008c578063e2bbb15811610066578063e2bbb15814610332578063f2fde38b14610345578063ffd14bc21461035857600080fd5b806398969e82146102f9578063b3b7f9431461030c578063ddd5e1b21461031f57600080fd5b80638ae39cac116100bd5780638ae39cac146102845780638da5cb5b1461028d57806393f1a40b146102b257600080fd5b806364482f7914610269578063715018a61461027c57600080fd5b8063373302191161013a57806351eb05a61161011457806351eb05a61461023b5780635312ea8e1461024e578063630b5ba11461026157600080fd5b8063373302191461020c578063441a3e701461021f57806348cd4cb11461023257600080fd5b80631526fe271161016b5780631526fe27146101b357806317caf6f1146101f05780631eaaa045146101f957600080fd5b806301f8a97614610187578063081e3eda1461019c575b600080fd5b61019a6101953660046117aa565b610361565b005b6005545b6040519081526020015b60405180910390f35b6101c66101c13660046117aa565b610428565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101aa565b6101a060085481565b61019a610207366004611809565b61046c565b61019a61021a3660046117aa565b6105f6565b61019a61022d36600461184a565b6106c6565b6101a060095481565b61019a6102493660046117aa565b610895565b61019a61025c3660046117aa565b6109ec565b61019a610b18565b61019a61027736600461186b565b610b43565b61019a610c38565b6101a060035481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101aa565b6102e46102c03660046117da565b60066020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101aa565b6101a06103073660046117da565b610c9e565b60025461029a906001600160a01b031681565b61019a61032d3660046117da565b610e68565b61019a61034036600461184a565b611060565b61019a610353366004611772565b6111e3565b6101a060045481565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6004548111156040518060400160405280600381526020017f31313000000000000000000000000000000000000000000000000000000000008152509061041a5760405162461bcd60e51b81526004016103b791906118b4565b50610423610b18565b600355565b6005818154811061043857600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b80156104d4576104d4610b18565b600060095443116104e7576009546104e9565b435b9050836008546104f991906118e7565b600855604080516080810182526001600160a01b0394851681526020810195865290810191825260006060820181815260058054600181018255925291517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06004909202918201805473ffffffffffffffffffffffffffffffffffffffff1916919096161790945593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db28301555090517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db390910155565b6000546001600160a01b031633146106505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b600260015414156106a35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b60026001819055546106bf906001600160a01b031633836112c5565b5060018055565b600260015414156107195760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816107565760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061077a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865283529384902080548551808701909652600386526231303360e81b9386019390935260049093020193509091908411156107e05760405162461bcd60e51b81526004016103b791906118b4565b506107ea84610895565b6107f48433611373565b82816000016000828254610808919061193e565b9091555050600382015481546ec097ce7bc90715b34b9f10000000009161082e9161191f565b61083891906118ff565b60018201558154610853906001600160a01b031633856112c5565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b6000600582815481106108b857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402019050806002015443116108d7575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561091a57600080fd5b505afa15801561092e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095291906117c2565b90508061096457504360029091015550565b60006008548360010154600354856002015443610981919061193e565b61098b919061191f565b610995919061191f565b61099f91906118ff565b9050816109bb826ec097ce7bc90715b34b9f100000000061191f565b6109c591906118ff565b8360030160008282546109d891906118e7565b909155505043600290930192909255505050565b60026001541415610a3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600181905550600060058281548110610a6a57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600682526040808520338087529352909320805460049093029093018054909450610aaf926001600160a01b039190911691906112c5565b6000808255600182018190558381526007602090815260408083203380855292528083208390555185927fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059591610b0791815260200190565b60405180910390a350506001805550565b60055460005b81811015610b3f57610b2f81610895565b610b3881611981565b9050610b1e565b5050565b6000546001600160a01b03163314610b9d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b8015610bab57610bab610b18565b8160058481548110610bcd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010154600854610bec919061193e565b610bf691906118e7565b6008819055508160058481548110610c1e57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010181905550505050565b6000546001600160a01b03163314610c925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b610c9c600061145e565b565b60008060058481548110610cc257634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526006825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610d3957600080fd5b505afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7191906117c2565b9050836002015443118015610d8557508015155b15610df95760006008548560010154600354876002015443610da7919061193e565b610db1919061191f565b610dbb919061191f565b610dc591906118ff565b905081610de1826ec097ce7bc90715b34b9f100000000061191f565b610deb91906118ff565b610df590846118e7565b9250505b600183015483546ec097ce7bc90715b34b9f100000000090610e1c90859061191f565b610e2691906118ff565b60008981526007602090815260408083206001600160a01b038c168452909152902054610e5391906118e7565b610e5d919061193e565b979650505050505050565b60026001541415610ebb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600155610ec982610895565b610ed38282611373565b60008281526007602090815260408083206001600160a01b0385168452825291829020548251808401909352600383527f3130340000000000000000000000000000000000000000000000000000000000918301919091529081610f4a5760405162461bcd60e51b81526004016103b791906118b4565b5060008381526007602090815260408083206001600160a01b0386168452909152812055600580546ec097ce7bc90715b34b9f1000000000919085908110610fa257634e487b7160e01b600052603260045260246000fd5b60009182526020808320600360049093020191909101548683526006825260408084206001600160a01b0388168552909252912054610fe1919061191f565b610feb91906118ff565b60008481526006602090815260408083206001600160a01b038088168552925290912060010191909155600254611024911683836112c5565b82826001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f5183604051610b0791815260200190565b600260015414156110b35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816110f05760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061111457634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865290925292206004909102909101915061114584610895565b61114f8433611373565b8154611166906001600160a01b03163330866114bb565b8281600001600082825461117a91906118e7565b9091555050600382015481546ec097ce7bc90715b34b9f1000000000916111a09161191f565b6111aa91906118ff565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610883565b6000546001600160a01b0316331461123d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b6001600160a01b0381166112b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103b7565b6112c28161145e565b50565b6040516001600160a01b03831660248201526044810182905261136e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261150c565b505050565b60008281526006602090815260408083206001600160a01b038516845282528083208151808301909252805482526001015491810182905260058054919392916ec097ce7bc90715b34b9f10000000009190879081106113e357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600301548460000151611404919061191f565b61140e91906118ff565b611418919061193e565b905080156114585760008481526007602090815260408083206001600160a01b0387168452909152812080548392906114529084906118e7565b90915550505b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114589085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161130a565b6000611561826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f19092919063ffffffff16565b80519091501561136e578080602001905181019061157f919061178e565b61136e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103b7565b6060611600848460008561160a565b90505b9392505050565b6060824710156116825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103b7565b843b6116d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b7565b600080866001600160a01b031685876040516116ec9190611898565b60006040518083038185875af1925050503d8060008114611729576040519150601f19603f3d011682016040523d82523d6000602084013e61172e565b606091505b5091509150610e5d82828660608315611748575081611603565b8251156117585782518084602001fd5b8160405162461bcd60e51b81526004016103b791906118b4565b600060208284031215611783578081fd5b8135611603816119b2565b60006020828403121561179f578081fd5b8151611603816119c7565b6000602082840312156117bb578081fd5b5035919050565b6000602082840312156117d3578081fd5b5051919050565b600080604083850312156117ec578081fd5b8235915060208301356117fe816119b2565b809150509250929050565b60008060006060848603121561181d578081fd5b83359250602084013561182f816119b2565b9150604084013561183f816119c7565b809150509250925092565b6000806040838503121561185c578182fd5b50508035926020909101359150565b60008060006060848603121561187f578283fd5b8335925060208401359150604084013561183f816119c7565b600082516118aa818460208701611955565b9190910192915050565b60208152600082518060208401526118d3816040850160208701611955565b601f01601f19169190910160400192915050565b600082198211156118fa576118fa61199c565b500190565b60008261191a57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119395761193961199c565b500290565b6000828210156119505761195061199c565b500390565b60005b83811015611970578181015183820152602001611958565b838111156114585750506000910152565b60006000198214156119955761199561199c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146112c257600080fd5b80151581146112c257600080fdfea2646970667358221220b647c00a4b6c3f1d139a6deb4bc0fb9c90f2f350267a2d0fff728ecd2fb921a964736f6c6343000804003300000000000000000000000001597e397605bf280674bf292623460b4204c37500000000000000000000000000000000000000000000000011d28f74bf4cb2d90000000000000000000000000000000000000000000000000000000000dd8d7e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101825760003560e01c806364482f79116100d857806398969e821161008c578063e2bbb15811610066578063e2bbb15814610332578063f2fde38b14610345578063ffd14bc21461035857600080fd5b806398969e82146102f9578063b3b7f9431461030c578063ddd5e1b21461031f57600080fd5b80638ae39cac116100bd5780638ae39cac146102845780638da5cb5b1461028d57806393f1a40b146102b257600080fd5b806364482f7914610269578063715018a61461027c57600080fd5b8063373302191161013a57806351eb05a61161011457806351eb05a61461023b5780635312ea8e1461024e578063630b5ba11461026157600080fd5b8063373302191461020c578063441a3e701461021f57806348cd4cb11461023257600080fd5b80631526fe271161016b5780631526fe27146101b357806317caf6f1146101f05780631eaaa045146101f957600080fd5b806301f8a97614610187578063081e3eda1461019c575b600080fd5b61019a6101953660046117aa565b610361565b005b6005545b6040519081526020015b60405180910390f35b6101c66101c13660046117aa565b610428565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101aa565b6101a060085481565b61019a610207366004611809565b61046c565b61019a61021a3660046117aa565b6105f6565b61019a61022d36600461184a565b6106c6565b6101a060095481565b61019a6102493660046117aa565b610895565b61019a61025c3660046117aa565b6109ec565b61019a610b18565b61019a61027736600461186b565b610b43565b61019a610c38565b6101a060035481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101aa565b6102e46102c03660046117da565b60066020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101aa565b6101a06103073660046117da565b610c9e565b60025461029a906001600160a01b031681565b61019a61032d3660046117da565b610e68565b61019a61034036600461184a565b611060565b61019a610353366004611772565b6111e3565b6101a060045481565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6004548111156040518060400160405280600381526020017f31313000000000000000000000000000000000000000000000000000000000008152509061041a5760405162461bcd60e51b81526004016103b791906118b4565b50610423610b18565b600355565b6005818154811061043857600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b80156104d4576104d4610b18565b600060095443116104e7576009546104e9565b435b9050836008546104f991906118e7565b600855604080516080810182526001600160a01b0394851681526020810195865290810191825260006060820181815260058054600181018255925291517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06004909202918201805473ffffffffffffffffffffffffffffffffffffffff1916919096161790945593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db28301555090517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db390910155565b6000546001600160a01b031633146106505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b600260015414156106a35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b60026001819055546106bf906001600160a01b031633836112c5565b5060018055565b600260015414156107195760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816107565760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061077a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865283529384902080548551808701909652600386526231303360e81b9386019390935260049093020193509091908411156107e05760405162461bcd60e51b81526004016103b791906118b4565b506107ea84610895565b6107f48433611373565b82816000016000828254610808919061193e565b9091555050600382015481546ec097ce7bc90715b34b9f10000000009161082e9161191f565b61083891906118ff565b60018201558154610853906001600160a01b031633856112c5565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b6000600582815481106108b857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402019050806002015443116108d7575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561091a57600080fd5b505afa15801561092e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095291906117c2565b90508061096457504360029091015550565b60006008548360010154600354856002015443610981919061193e565b61098b919061191f565b610995919061191f565b61099f91906118ff565b9050816109bb826ec097ce7bc90715b34b9f100000000061191f565b6109c591906118ff565b8360030160008282546109d891906118e7565b909155505043600290930192909255505050565b60026001541415610a3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600181905550600060058281548110610a6a57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600682526040808520338087529352909320805460049093029093018054909450610aaf926001600160a01b039190911691906112c5565b6000808255600182018190558381526007602090815260408083203380855292528083208390555185927fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059591610b0791815260200190565b60405180910390a350506001805550565b60055460005b81811015610b3f57610b2f81610895565b610b3881611981565b9050610b1e565b5050565b6000546001600160a01b03163314610b9d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b8015610bab57610bab610b18565b8160058481548110610bcd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010154600854610bec919061193e565b610bf691906118e7565b6008819055508160058481548110610c1e57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160010181905550505050565b6000546001600160a01b03163314610c925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b610c9c600061145e565b565b60008060058481548110610cc257634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526006825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610d3957600080fd5b505afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7191906117c2565b9050836002015443118015610d8557508015155b15610df95760006008548560010154600354876002015443610da7919061193e565b610db1919061191f565b610dbb919061191f565b610dc591906118ff565b905081610de1826ec097ce7bc90715b34b9f100000000061191f565b610deb91906118ff565b610df590846118e7565b9250505b600183015483546ec097ce7bc90715b34b9f100000000090610e1c90859061191f565b610e2691906118ff565b60008981526007602090815260408083206001600160a01b038c168452909152902054610e5391906118e7565b610e5d919061193e565b979650505050505050565b60026001541415610ebb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b6002600155610ec982610895565b610ed38282611373565b60008281526007602090815260408083206001600160a01b0385168452825291829020548251808401909352600383527f3130340000000000000000000000000000000000000000000000000000000000918301919091529081610f4a5760405162461bcd60e51b81526004016103b791906118b4565b5060008381526007602090815260408083206001600160a01b0386168452909152812055600580546ec097ce7bc90715b34b9f1000000000919085908110610fa257634e487b7160e01b600052603260045260246000fd5b60009182526020808320600360049093020191909101548683526006825260408084206001600160a01b0388168552909252912054610fe1919061191f565b610feb91906118ff565b60008481526006602090815260408083206001600160a01b038088168552925290912060010191909155600254611024911683836112c5565b82826001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f5183604051610b0791815260200190565b600260015414156110b35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b7565b600260015560408051808201909152600381526231303360e81b6020820152816110f05760405162461bcd60e51b81526004016103b791906118b4565b5060006005838154811061111457634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865290925292206004909102909101915061114584610895565b61114f8433611373565b8154611166906001600160a01b03163330866114bb565b8281600001600082825461117a91906118e7565b9091555050600382015481546ec097ce7bc90715b34b9f1000000000916111a09161191f565b6111aa91906118ff565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610883565b6000546001600160a01b0316331461123d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b7565b6001600160a01b0381166112b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103b7565b6112c28161145e565b50565b6040516001600160a01b03831660248201526044810182905261136e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261150c565b505050565b60008281526006602090815260408083206001600160a01b038516845282528083208151808301909252805482526001015491810182905260058054919392916ec097ce7bc90715b34b9f10000000009190879081106113e357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600301548460000151611404919061191f565b61140e91906118ff565b611418919061193e565b905080156114585760008481526007602090815260408083206001600160a01b0387168452909152812080548392906114529084906118e7565b90915550505b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114589085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161130a565b6000611561826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f19092919063ffffffff16565b80519091501561136e578080602001905181019061157f919061178e565b61136e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103b7565b6060611600848460008561160a565b90505b9392505050565b6060824710156116825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103b7565b843b6116d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b7565b600080866001600160a01b031685876040516116ec9190611898565b60006040518083038185875af1925050503d8060008114611729576040519150601f19603f3d011682016040523d82523d6000602084013e61172e565b606091505b5091509150610e5d82828660608315611748575081611603565b8251156117585782518084602001fd5b8160405162461bcd60e51b81526004016103b791906118b4565b600060208284031215611783578081fd5b8135611603816119b2565b60006020828403121561179f578081fd5b8151611603816119c7565b6000602082840312156117bb578081fd5b5035919050565b6000602082840312156117d3578081fd5b5051919050565b600080604083850312156117ec578081fd5b8235915060208301356117fe816119b2565b809150509250929050565b60008060006060848603121561181d578081fd5b83359250602084013561182f816119b2565b9150604084013561183f816119c7565b809150509250925092565b6000806040838503121561185c578182fd5b50508035926020909101359150565b60008060006060848603121561187f578283fd5b8335925060208401359150604084013561183f816119c7565b600082516118aa818460208701611955565b9190910192915050565b60208152600082518060208401526118d3816040850160208701611955565b601f01601f19169190910160400192915050565b600082198211156118fa576118fa61199c565b500190565b60008261191a57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119395761193961199c565b500290565b6000828210156119505761195061199c565b500390565b60005b83811015611970578181015183820152602001611958565b838111156114585750506000910152565b60006000198214156119955761199561199c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146112c257600080fd5b80151581146112c257600080fdfea2646970667358221220b647c00a4b6c3f1d139a6deb4bc0fb9c90f2f350267a2d0fff728ecd2fb921a964736f6c63430008040033

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

00000000000000000000000001597e397605bf280674bf292623460b4204c37500000000000000000000000000000000000000000000000011d28f74bf4cb2d90000000000000000000000000000000000000000000000000000000000dd8d7e

-----Decoded View---------------
Arg [0] : _bent (address): 0x01597E397605Bf280674Bf292623460b4204C375
Arg [1] : _rewardPerBlock (uint256): 1284246575342465753
Arg [2] : _startBlock (uint256): 14519678

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000001597e397605bf280674bf292623460b4204c375
Arg [1] : 00000000000000000000000000000000000000000000000011d28f74bf4cb2d9
Arg [2] : 0000000000000000000000000000000000000000000000000000000000dd8d7e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.