ETH Price: $3,342.30 (-3.61%)

Contract

0xCf09245838bc76F64e19739EbcCa1445968d6573
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw210884842024-10-31 22:02:4755 days ago1730412167IN
0xCf092458...5968d6573
0 ETH0.000853467.97988759
Withdraw184990242023-11-04 13:39:59418 days ago1699105199IN
0xCf092458...5968d6573
0 ETH0.0018522517.31853891
Withdraw182698382023-10-03 11:53:35450 days ago1696334015IN
0xCf092458...5968d6573
0 ETH0.001131288.74889152
Withdraw182634672023-10-02 14:32:35451 days ago1696257155IN
0xCf092458...5968d6573
0 ETH0.0036198928
Withdraw182592052023-10-02 0:16:35451 days ago1696205795IN
0xCf092458...5968d6573
0 ETH0.0013562110.48843017
Withdraw182486432023-09-30 12:52:47453 days ago1696078367IN
0xCf092458...5968d6573
0 ETH0.0009200310.24218409
Withdraw182390572023-09-29 4:40:59454 days ago1695962459IN
0xCf092458...5968d6573
0 ETH0.000577196.42386756
Withdraw182387922023-09-29 3:47:23454 days ago1695959243IN
0xCf092458...5968d6573
0 ETH0.000873948.17228697
Withdraw182351942023-09-28 15:42:11455 days ago1695915731IN
0xCf092458...5968d6573
0 ETH0.0020438319.10981487
Deposit182223392023-09-26 20:29:59456 days ago1695760199IN
0xCf092458...5968d6573
0 ETH0.0021187213.41024918
Withdraw182059752023-09-24 13:32:35459 days ago1695562355IN
0xCf092458...5968d6573
0 ETH0.000723366.76493896
Withdraw181991422023-09-23 14:33:47460 days ago1695479627IN
0xCf092458...5968d6573
0 ETH0.000961037.9202175
Deposit181858782023-09-21 17:56:59461 days ago1695319019IN
0xCf092458...5968d6573
0 ETH0.0014876511.28071006
Deposit181664122023-09-19 0:31:59464 days ago1695083519IN
0xCf092458...5968d6573
0 ETH0.001003189.126451
Deposit181663682023-09-19 0:23:11464 days ago1695082991IN
0xCf092458...5968d6573
0 ETH0.001341349.81973368
Deposit181565752023-09-17 15:15:59466 days ago1694963759IN
0xCf092458...5968d6573
0 ETH0.0018281511.37147793
Deposit181545082023-09-17 8:13:35466 days ago1694938415IN
0xCf092458...5968d6573
0 ETH0.000944518.23402656
Deposit181538502023-09-17 5:58:35466 days ago1694930315IN
0xCf092458...5968d6573
0 ETH0.001030367.8170753
Deposit181469022023-09-16 6:20:47467 days ago1694845247IN
0xCf092458...5968d6573
0 ETH0.0012688111.06112759
Deposit181468112023-09-16 6:02:35467 days ago1694844155IN
0xCf092458...5968d6573
0 ETH0.000937728.17399222
Deposit180820732023-09-07 4:09:11476 days ago1694059751IN
0xCf092458...5968d6573
0 ETH0.0010776310.09923624
Deposit180748272023-09-06 3:46:23477 days ago1693971983IN
0xCf092458...5968d6573
0 ETH0.0015742811.93543529
Withdraw178310042023-08-03 0:50:11511 days ago1691023811IN
0xCf092458...5968d6573
0 ETH0.0021025218.28981682
Withdraw178309292023-08-03 0:35:11511 days ago1691022911IN
0xCf092458...5968d6573
0 ETH0.0023362118.05870459
Withdraw178083812023-07-30 20:59:35514 days ago1690750775IN
0xCf092458...5968d6573
0 ETH0.0034701723.69625545
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:
BentSingleStakingV2

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 1000 runs

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

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

import "../libraries/Errors.sol";
import "../interfaces/IBentToken.sol";
import "../interfaces/IBentStaking.sol";
import "../interfaces/IBentRewarder.sol";

contract BentSingleStakingV2 is Ownable, ReentrancyGuard, IBentStaking {
    using SafeERC20 for IERC20;

    event AddRewarder(address indexed rewarder);
    event RemoveRewarder(address indexed rewarder);
    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event ClaimAll(address indexed user);
    event Claim(address indexed user, uint256[][] indexes);
    event OnReward();

    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;

    IERC20 public BENT;
    IBentRewarder[] public rewarders;
    mapping(address => bool) public isRewarder;

    constructor(address _BENT) {
        BENT = IERC20(_BENT);
    }

    function addRewarder(address _rewarder) external onlyOwner {
        require(isRewarder[_rewarder] == false, Errors.INVALID_REQUEST);

        rewarders.push(IBentRewarder(_rewarder));
        isRewarder[_rewarder] = true;

        emit AddRewarder(_rewarder);
    }

    function removeRewarder(uint256 _index) external onlyOwner {
        require(
            _index < rewarders.length && isRewarder[address(rewarders[_index])],
            Errors.INVALID_INDEX
        );

        emit RemoveRewarder(address(rewarders[_index]));

        isRewarder[address(rewarders[_index])] = false;
        rewarders[_index] = IBentRewarder(address(0));
    }

    function deposit(uint256 _amount) external {
        depositFor(msg.sender, _amount);
    }

    function depositFor(address _user, uint256 _amount)
        public
        override
        nonReentrant
    {
        require(_amount != 0, Errors.ZERO_AMOUNT);

        BENT.safeTransferFrom(msg.sender, address(this), _amount);

        _mint(_user, _amount);

        for (uint256 i = 0; i < rewarders.length; ++i) {
            if (address(rewarders[i]) == address(0)) {
                continue;
            }

            rewarders[i].deposit(_user, _amount);
        }

        emit Deposit(_user, _amount);
    }

    function withdraw(uint256 _amount) external {
        withdrawTo(msg.sender, _amount);
    }

    function withdrawTo(address _recipient, uint256 _amount)
        public
        override
        nonReentrant
    {
        require(
            balanceOf[msg.sender] >= _amount && _amount != 0,
            Errors.INVALID_AMOUNT
        );

        for (uint256 i = 0; i < rewarders.length; ++i) {
            if (address(rewarders[i]) == address(0)) {
                continue;
            }

            rewarders[i].withdraw(msg.sender, _amount);
        }

        _burn(msg.sender, _amount);

        // transfer to _recipient
        BENT.safeTransfer(_recipient, _amount);

        emit Withdraw(msg.sender, _amount);
    }

    function claimAll() external virtual {
        claimAllFor(msg.sender);
    }

    function claimAllFor(address _user) public virtual override nonReentrant {
        bool claimed = false;

        for (uint256 i = 0; i < rewarders.length; ++i) {
            if (address(rewarders[i]) == address(0)) {
                continue;
            }

            if (rewarders[i].claimAll(_user)) {
                claimed = true;
            }
        }

        require(claimed, Errors.NO_PENDING_REWARD);

        emit ClaimAll(_user);
    }

    function claim(uint256[][] memory _indexes) external {
        claimFor(msg.sender, _indexes);
    }

    function claimFor(address _user, uint256[][] memory _indexes)
        public
        nonReentrant
    {
        require(_indexes.length == rewarders.length, Errors.INVALID_INDEX);

        bool claimed = false;
        for (uint256 i = 0; i < _indexes.length; ++i) {
            if (address(rewarders[i]) == address(0)) {
                continue;
            }

            if (rewarders[i].claim(_user, _indexes[i])) {
                claimed = true;
            }
        }
        require(claimed, Errors.NO_PENDING_REWARD);

        emit Claim(_user, _indexes);
    }

    function _mint(address _user, uint256 _amount) internal {
        balanceOf[_user] += _amount;
        totalSupply += _amount;
    }

    function _burn(address _user, uint256 _amount) internal {
        balanceOf[_user] -= _amount;
        totalSupply -= _amount;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 3 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

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 making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

    function _nonReentrantAfter() private {
        // 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 12 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 5 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 6 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 9 of 12 : IBentRewarder.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface IBentRewarder {
    function deposit(address _user, uint256 _amount) external;

    function withdraw(address _user, uint256 _amount) external;

    function claimAll(address _user) external returns (bool claimed);

    function claim(address _user, uint256[] memory pids)
        external
        returns (bool claimed);
}

File 10 of 12 : IBentStaking.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

interface IBentStaking {
    function depositFor(address _user, uint256 _amount) external;

    function withdrawTo(address _recipient, uint256 _amount) external;

    function claimAllFor(address _user) external;
}

File 11 of 12 : IBentToken.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IBentToken {
    function mint(address user, uint256 cvxAmount) external;
}

File 12 of 12 : 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";
    string public constant INVALID_WINDOW_LENGTH = "116";
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_BENT","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rewarder","type":"address"}],"name":"AddRewarder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[][]","name":"indexes","type":"uint256[][]"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"ClaimAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[],"name":"OnReward","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":"rewarder","type":"address"}],"name":"RemoveRewarder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BENT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewarder","type":"address"}],"name":"addRewarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[][]","name":"_indexes","type":"uint256[][]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimAllFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256[][]","name":"_indexes","type":"uint256[][]"}],"name":"claimFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isRewarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"removeRewarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewarders","outputs":[{"internalType":"contract IBentRewarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161187738038061187783398101604081905261002f916100b1565b61003833610061565b60018055600480546001600160a01b0319166001600160a01b03929092169190911790556100df565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100c2578081fd5b81516001600160a01b03811681146100d8578182fd5b9392505050565b611789806100ee6000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063715018a6116100b2578063a2df129d11610081578063d1058e5911610066578063d1058e591461029b578063f2fde38b146102a3578063fcf8770f146102b657600080fd5b8063a2df129d14610275578063b6b55f251461028857600080fd5b8063715018a61461021657806373cb55341461021e5780638da5cb5b146102315780638e478cab1461024257600080fd5b80632e1a7d4d1161010957806356d3590b116100ee57806356d3590b146101d057806358c96996146101e357806370a08231146101f657600080fd5b80632e1a7d4d146101aa5780632f4f21e2146101bd57600080fd5b8063090f85d41461013b5780630eeb7b571461016b57806318160ddd14610180578063205c287814610197575b600080fd5b60045461014e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61017e610179366004611538565b6102c9565b005b61018960025481565b604051908152602001610162565b61017e6101a53660046114bc565b61047c565b61017e6101b8366004611538565b61066d565b61017e6101cb3660046114bc565b61067a565b61017e6101de36600461144f565b610846565b61017e6101f1366004611470565b61095d565b61018961020436600461144f565b60036020526000908152604090205481565b61017e610b81565b61017e61022c3660046114e5565b610b95565b6000546001600160a01b031661014e565b61026561025036600461144f565b60066020526000908152604090205460ff1681565b6040519015158152602001610162565b61017e61028336600461144f565b610b9f565b61017e610296366004611538565b610d55565b61017e610d5f565b61017e6102b136600461144f565b610d68565b61014e6102c4366004611538565b610df5565b6102d1610e1f565b6005548110801561032b5750600660006005838154811061030257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff165b604051806040016040528060038152602001620c4c4d60ea1b8152509061036e5760405162461bcd60e51b81526004016103659190611629565b60405180910390fd5b506005818154811061039057634e487b7160e01b600052603260045260246000fd5b60009182526020822001546040516001600160a01b03909116917fb44a6e63a78b67293eb03a44f7ef453221c66176d6e64eb52cfa999809cdf9b091a2600060066000600584815481106103f457634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546001600160a01b031683528201929092526040018120805460ff191692151592909217909155600580548390811061044b57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b610484610e79565b3360009081526003602052604090205481118015906104a257508015155b6040518060400160405280600381526020017f3130330000000000000000000000000000000000000000000000000000000000815250906104f65760405162461bcd60e51b81526004016103659190611629565b5060005b6005548110156106085760006001600160a01b03166005828154811061053057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610550576105f8565b6005818154811061057157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517ff3fef3a3000000000000000000000000000000000000000000000000000000008152336004820152602481018490526001600160a01b039091169063f3fef3a390604401600060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050505b6106018161170c565b90506104fa565b506106133382610ed3565b60045461062a906001600160a01b03168383610f1d565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a261066960018055565b5050565b610677338261047c565b50565b610682610e79565b60408051808201909152600381527f31303100000000000000000000000000000000000000000000000000000000006020820152816106d45760405162461bcd60e51b81526004016103659190611629565b506004546106ed906001600160a01b0316333084610fcb565b6106f78282611022565b60005b60055481101561080a5760006001600160a01b03166005828154811061073057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610750576107fa565b6005818154811061077157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517f47e7ef240000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201859052909116906347e7ef2490604401600060405180830381600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b505050505b6108038161170c565b90506106fa565b50816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8260405161065891815260200190565b61084e610e1f565b6001600160a01b038116600090815260066020908152604091829020548251808401909352600383527f31313500000000000000000000000000000000000000000000000000000000009183019190915260ff16156108c05760405162461bcd60e51b81526004016103659190611629565b506005805460018082019092557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155600081815260066020526040808220805460ff1916909417909355915190917f7aefe99f53658ca02b9d6b2fba6c5a0cb1751fc0fde01636c238431954cf5d2391a250565b610965610e79565b60055481516040805180820190915260038152620c4c4d60ea1b602082015291146109a35760405162461bcd60e51b81526004016103659190611629565b506000805b8251811015610afc5760006001600160a01b0316600582815481106109dd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156109fd57610aec565b60058181548110610a1e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b0316634571827885858481518110610a6b57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610a909291906115a6565b602060405180830381600087803b158015610aaa57600080fd5b505af1158015610abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae29190611518565b15610aec57600191505b610af58161170c565b90506109a8565b506040805180820190915260038152620c4c0d60ea1b602082015281610b355760405162461bcd60e51b81526004016103659190611629565b50826001600160a01b03167fd970e9ee33bc4c905e32e922e61fd97b08ffcdbc1f9c151dae38f2e132c36d8483604051610b6f91906115c8565b60405180910390a25061066960018055565b610b89610e1f565b610b936000611063565b565b610677338261095d565b610ba7610e79565b6000805b600554811015610cdd5760006001600160a01b031660058281548110610be157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c0157610ccd565b60058181548110610c2257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517f77329f350000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906377329f3590602401602060405180830381600087803b158015610c8b57600080fd5b505af1158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190611518565b15610ccd57600191505b610cd68161170c565b9050610bab565b506040805180820190915260038152620c4c0d60ea1b602082015281610d165760405162461bcd60e51b81526004016103659190611629565b506040516001600160a01b038316907f35c46ad0a3be0baa9f2efefd524536899a004933e4fd4c13a81a0e1a38f5511590600090a25061067760018055565b610677338261067a565b610b9333610b9f565b610d70610e1f565b6001600160a01b038116610dec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610365565b61067781611063565b60058181548110610e0557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610b935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610365565b60026001541415610ecc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610365565b6002600155565b6001600160a01b03821660009081526003602052604081208054839290610efb9084906116c9565b925050819055508060026000828254610f1491906116c9565b90915550505050565b6040516001600160a01b038316602482015260448101829052610fc69084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526110c0565b505050565b6040516001600160a01b038085166024830152831660448201526064810182905261101c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610f62565b50505050565b6001600160a01b0382166000908152600360205260408120805483929061104a9084906116b1565b925050819055508060026000828254610f1491906116b1565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611115826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111a59092919063ffffffff16565b805190915015610fc657808060200190518101906111339190611518565b610fc65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610365565b60606111b484846000856111bc565b949350505050565b6060824710156112345760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610365565b600080866001600160a01b03168587604051611250919061158a565b60006040518083038185875af1925050503d806000811461128d576040519150601f19603f3d011682016040523d82523d6000602084013e611292565b606091505b50915091506112a3878383876112ae565b979650505050505050565b6060831561131a578251611313576001600160a01b0385163b6113135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610365565b50816111b4565b6111b4838381511561132f5781518083602001fd5b8060405162461bcd60e51b81526004016103659190611629565b80356001600160a01b038116811461136057600080fd5b919050565b600082601f830112611375578081fd5b8135602061138a6113858361168d565b61165c565b82815281810190858301600585811b880185018910156113a8578687fd5b865b8681101561144157823567ffffffffffffffff8111156113c8578889fd5b8901603f81018b136113d8578889fd5b8681013560406113ea6113858361168d565b808382528a820191508285018f84868a1b8801011115611408578d8efd5b8d95505b8486101561142a578035835260019590950194918b01918b0161140c565b5089525050509486019450918501916001016113aa565b509198975050505050505050565b600060208284031215611460578081fd5b61146982611349565b9392505050565b60008060408385031215611482578081fd5b61148b83611349565b9150602083013567ffffffffffffffff8111156114a6578182fd5b6114b285828601611365565b9150509250929050565b600080604083850312156114ce578182fd5b6114d783611349565b946020939093013593505050565b6000602082840312156114f6578081fd5b813567ffffffffffffffff81111561150c578182fd5b6111b484828501611365565b600060208284031215611529578081fd5b81518015158114611469578182fd5b600060208284031215611549578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561157f57815187529582019590820190600101611563565b509495945050505050565b6000825161159c8184602087016116e0565b9190910192915050565b6001600160a01b03831681526040602082015260006111b46040830184611550565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561161c57603f1988860301845261160a858351611550565b945092850192908501906001016115ee565b5092979650505050505050565b60208152600082518060208401526116488160408501602087016116e0565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff811182821017156116855761168561173d565b604052919050565b600067ffffffffffffffff8211156116a7576116a761173d565b5060051b60200190565b600082198211156116c4576116c4611727565b500190565b6000828210156116db576116db611727565b500390565b60005b838110156116fb5781810151838201526020016116e3565b8381111561101c5750506000910152565b600060001982141561172057611720611727565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212207e551be00f461f1c63e1f2820b60dfd9781c5aae68f1b81074e22cf47d0a5ba564736f6c6343000804003300000000000000000000000001597e397605bf280674bf292623460b4204c375

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063715018a6116100b2578063a2df129d11610081578063d1058e5911610066578063d1058e591461029b578063f2fde38b146102a3578063fcf8770f146102b657600080fd5b8063a2df129d14610275578063b6b55f251461028857600080fd5b8063715018a61461021657806373cb55341461021e5780638da5cb5b146102315780638e478cab1461024257600080fd5b80632e1a7d4d1161010957806356d3590b116100ee57806356d3590b146101d057806358c96996146101e357806370a08231146101f657600080fd5b80632e1a7d4d146101aa5780632f4f21e2146101bd57600080fd5b8063090f85d41461013b5780630eeb7b571461016b57806318160ddd14610180578063205c287814610197575b600080fd5b60045461014e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61017e610179366004611538565b6102c9565b005b61018960025481565b604051908152602001610162565b61017e6101a53660046114bc565b61047c565b61017e6101b8366004611538565b61066d565b61017e6101cb3660046114bc565b61067a565b61017e6101de36600461144f565b610846565b61017e6101f1366004611470565b61095d565b61018961020436600461144f565b60036020526000908152604090205481565b61017e610b81565b61017e61022c3660046114e5565b610b95565b6000546001600160a01b031661014e565b61026561025036600461144f565b60066020526000908152604090205460ff1681565b6040519015158152602001610162565b61017e61028336600461144f565b610b9f565b61017e610296366004611538565b610d55565b61017e610d5f565b61017e6102b136600461144f565b610d68565b61014e6102c4366004611538565b610df5565b6102d1610e1f565b6005548110801561032b5750600660006005838154811061030257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff165b604051806040016040528060038152602001620c4c4d60ea1b8152509061036e5760405162461bcd60e51b81526004016103659190611629565b60405180910390fd5b506005818154811061039057634e487b7160e01b600052603260045260246000fd5b60009182526020822001546040516001600160a01b03909116917fb44a6e63a78b67293eb03a44f7ef453221c66176d6e64eb52cfa999809cdf9b091a2600060066000600584815481106103f457634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546001600160a01b031683528201929092526040018120805460ff191692151592909217909155600580548390811061044b57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b610484610e79565b3360009081526003602052604090205481118015906104a257508015155b6040518060400160405280600381526020017f3130330000000000000000000000000000000000000000000000000000000000815250906104f65760405162461bcd60e51b81526004016103659190611629565b5060005b6005548110156106085760006001600160a01b03166005828154811061053057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610550576105f8565b6005818154811061057157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517ff3fef3a3000000000000000000000000000000000000000000000000000000008152336004820152602481018490526001600160a01b039091169063f3fef3a390604401600060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050505b6106018161170c565b90506104fa565b506106133382610ed3565b60045461062a906001600160a01b03168383610f1d565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a261066960018055565b5050565b610677338261047c565b50565b610682610e79565b60408051808201909152600381527f31303100000000000000000000000000000000000000000000000000000000006020820152816106d45760405162461bcd60e51b81526004016103659190611629565b506004546106ed906001600160a01b0316333084610fcb565b6106f78282611022565b60005b60055481101561080a5760006001600160a01b03166005828154811061073057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610750576107fa565b6005818154811061077157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517f47e7ef240000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201859052909116906347e7ef2490604401600060405180830381600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b505050505b6108038161170c565b90506106fa565b50816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8260405161065891815260200190565b61084e610e1f565b6001600160a01b038116600090815260066020908152604091829020548251808401909352600383527f31313500000000000000000000000000000000000000000000000000000000009183019190915260ff16156108c05760405162461bcd60e51b81526004016103659190611629565b506005805460018082019092557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155600081815260066020526040808220805460ff1916909417909355915190917f7aefe99f53658ca02b9d6b2fba6c5a0cb1751fc0fde01636c238431954cf5d2391a250565b610965610e79565b60055481516040805180820190915260038152620c4c4d60ea1b602082015291146109a35760405162461bcd60e51b81526004016103659190611629565b506000805b8251811015610afc5760006001600160a01b0316600582815481106109dd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156109fd57610aec565b60058181548110610a1e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b0316634571827885858481518110610a6b57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610a909291906115a6565b602060405180830381600087803b158015610aaa57600080fd5b505af1158015610abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae29190611518565b15610aec57600191505b610af58161170c565b90506109a8565b506040805180820190915260038152620c4c0d60ea1b602082015281610b355760405162461bcd60e51b81526004016103659190611629565b50826001600160a01b03167fd970e9ee33bc4c905e32e922e61fd97b08ffcdbc1f9c151dae38f2e132c36d8483604051610b6f91906115c8565b60405180910390a25061066960018055565b610b89610e1f565b610b936000611063565b565b610677338261095d565b610ba7610e79565b6000805b600554811015610cdd5760006001600160a01b031660058281548110610be157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c0157610ccd565b60058181548110610c2257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517f77329f350000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906377329f3590602401602060405180830381600087803b158015610c8b57600080fd5b505af1158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190611518565b15610ccd57600191505b610cd68161170c565b9050610bab565b506040805180820190915260038152620c4c0d60ea1b602082015281610d165760405162461bcd60e51b81526004016103659190611629565b506040516001600160a01b038316907f35c46ad0a3be0baa9f2efefd524536899a004933e4fd4c13a81a0e1a38f5511590600090a25061067760018055565b610677338261067a565b610b9333610b9f565b610d70610e1f565b6001600160a01b038116610dec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610365565b61067781611063565b60058181548110610e0557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610b935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610365565b60026001541415610ecc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610365565b6002600155565b6001600160a01b03821660009081526003602052604081208054839290610efb9084906116c9565b925050819055508060026000828254610f1491906116c9565b90915550505050565b6040516001600160a01b038316602482015260448101829052610fc69084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526110c0565b505050565b6040516001600160a01b038085166024830152831660448201526064810182905261101c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610f62565b50505050565b6001600160a01b0382166000908152600360205260408120805483929061104a9084906116b1565b925050819055508060026000828254610f1491906116b1565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611115826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111a59092919063ffffffff16565b805190915015610fc657808060200190518101906111339190611518565b610fc65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610365565b60606111b484846000856111bc565b949350505050565b6060824710156112345760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610365565b600080866001600160a01b03168587604051611250919061158a565b60006040518083038185875af1925050503d806000811461128d576040519150601f19603f3d011682016040523d82523d6000602084013e611292565b606091505b50915091506112a3878383876112ae565b979650505050505050565b6060831561131a578251611313576001600160a01b0385163b6113135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610365565b50816111b4565b6111b4838381511561132f5781518083602001fd5b8060405162461bcd60e51b81526004016103659190611629565b80356001600160a01b038116811461136057600080fd5b919050565b600082601f830112611375578081fd5b8135602061138a6113858361168d565b61165c565b82815281810190858301600585811b880185018910156113a8578687fd5b865b8681101561144157823567ffffffffffffffff8111156113c8578889fd5b8901603f81018b136113d8578889fd5b8681013560406113ea6113858361168d565b808382528a820191508285018f84868a1b8801011115611408578d8efd5b8d95505b8486101561142a578035835260019590950194918b01918b0161140c565b5089525050509486019450918501916001016113aa565b509198975050505050505050565b600060208284031215611460578081fd5b61146982611349565b9392505050565b60008060408385031215611482578081fd5b61148b83611349565b9150602083013567ffffffffffffffff8111156114a6578182fd5b6114b285828601611365565b9150509250929050565b600080604083850312156114ce578182fd5b6114d783611349565b946020939093013593505050565b6000602082840312156114f6578081fd5b813567ffffffffffffffff81111561150c578182fd5b6111b484828501611365565b600060208284031215611529578081fd5b81518015158114611469578182fd5b600060208284031215611549578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561157f57815187529582019590820190600101611563565b509495945050505050565b6000825161159c8184602087016116e0565b9190910192915050565b6001600160a01b03831681526040602082015260006111b46040830184611550565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561161c57603f1988860301845261160a858351611550565b945092850192908501906001016115ee565b5092979650505050505050565b60208152600082518060208401526116488160408501602087016116e0565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff811182821017156116855761168561173d565b604052919050565b600067ffffffffffffffff8211156116a7576116a761173d565b5060051b60200190565b600082198211156116c4576116c4611727565b500190565b6000828210156116db576116db611727565b500390565b60005b838110156116fb5781810151838201526020016116e3565b8381111561101c5750506000910152565b600060001982141561172057611720611727565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212207e551be00f461f1c63e1f2820b60dfd9781c5aae68f1b81074e22cf47d0a5ba564736f6c63430008040033

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

00000000000000000000000001597e397605bf280674bf292623460b4204c375

-----Decoded View---------------
Arg [0] : _BENT (address): 0x01597E397605Bf280674Bf292623460b4204C375

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000001597e397605bf280674bf292623460b4204c375


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
Loading...
Loading
[ 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.