ETH Price: $3,457.90 (-1.83%)
Gas: 3 Gwei

Contract

0x46E16f8F03687f877bD97830a9331aD915274d0D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit203734132024-07-24 2:28:116 hrs ago1721788091IN
0x46E16f8F...915274d0D
0 ETH0.000338792.56876985
Deposit203733822024-07-24 2:21:596 hrs ago1721787719IN
0x46E16f8F...915274d0D
0 ETH0.000380472.88479485
Deposit202371572024-07-05 1:55:2319 days ago1720144523IN
0x46E16f8F...915274d0D
0 ETH0.001132457.25703161
Deposit202230822024-07-03 2:44:4721 days ago1719974687IN
0x46E16f8F...915274d0D
0 ETH0.000731164.54597183
Deposit202230542024-07-03 2:39:1121 days ago1719974351IN
0x46E16f8F...915274d0D
0 ETH0.000496033.76096284
Deposit202230302024-07-03 2:34:2321 days ago1719974063IN
0x46E16f8F...915274d0D
0 ETH0.00062915.48044888
Deposit202230012024-07-03 2:28:3521 days ago1719973715IN
0x46E16f8F...915274d0D
0 ETH0.000612934.64729687
Deposit202229502024-07-03 2:18:2321 days ago1719973103IN
0x46E16f8F...915274d0D
0 ETH0.00067834.9623085
Deposit201752452024-06-26 10:24:1127 days ago1719397451IN
0x46E16f8F...915274d0D
0 ETH0.000571523.61556095
Deposit201750962024-06-26 9:54:2327 days ago1719395663IN
0x46E16f8F...915274d0D
0 ETH0.000361223.38306973
Deposit201290112024-06-19 23:16:5934 days ago1718839019IN
0x46E16f8F...915274d0D
0 ETH0.000535285.01322927
Withdraw198460732024-05-11 10:03:4773 days ago1715421827IN
0x46E16f8F...915274d0D
0 ETH0.000558485.35590863
Withdraw198174952024-05-07 10:08:3577 days ago1715076515IN
0x46E16f8F...915274d0D
0 ETH0.000246668.42524015
Withdraw198174902024-05-07 10:07:3577 days ago1715076455IN
0x46E16f8F...915274d0D
0 ETH0.000928578.06969949
Withdraw194890832024-03-22 8:49:59124 days ago1711097399IN
0x46E16f8F...915274d0D
0 ETH0.002969822.46973194
Withdraw194073292024-03-10 21:18:23135 days ago1710105503IN
0x46E16f8F...915274d0D
0 ETH0.0089890661.37809069
Withdraw193975562024-03-09 12:31:35136 days ago1709987495IN
0x46E16f8F...915274d0D
0 ETH0.0068686852
Withdraw193621472024-03-04 13:38:35141 days ago1709559515IN
0x46E16f8F...915274d0D
0 ETH0.0093143570.5216117
Withdraw193620992024-03-04 13:28:47141 days ago1709558927IN
0x46E16f8F...915274d0D
0 ETH0.010238377.51707788
Withdraw193620942024-03-04 13:27:47141 days ago1709558867IN
0x46E16f8F...915274d0D
0 ETH0.0112711676.7388082
Withdraw193620102024-03-04 13:10:59141 days ago1709557859IN
0x46E16f8F...915274d0D
0 ETH0.008141461.6409128
Withdraw191889242024-02-09 6:55:47166 days ago1707461747IN
0x46E16f8F...915274d0D
0 ETH0.0048792742.43657152
Deposit191657582024-02-06 0:54:11169 days ago1707180851IN
0x46E16f8F...915274d0D
0 ETH0.0028653817.81414391
Deposit191402282024-02-02 10:50:59172 days ago1706871059IN
0x46E16f8F...915274d0D
0 ETH0.0027508617.62954993
Deposit191402012024-02-02 10:45:35172 days ago1706870735IN
0x46E16f8F...915274d0D
0 ETH0.0030041318.67672983
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:
BentCVXStakingV2

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 12 : BentCVXStakingV2.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/IBentCVX.sol";
import "../interfaces/IBentCVXStaking.sol";
import "../interfaces/IBentCVXRewarder.sol";

contract BentCVXStakingV2 is Ownable, ReentrancyGuard, IBentCVXStaking {
    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 CVX;
    IERC20 public bentCVX;
    IBentCVXRewarder[] public rewarders;
    mapping(address => bool) public isRewarder;

    constructor(address _CVX, address _bentCVX) {
        CVX = IERC20(_CVX);
        bentCVX = IERC20(_bentCVX);
    }

    function mintAndStake(uint256 _amount) external nonReentrant {
        require(_amount != 0, Errors.ZERO_AMOUNT);
        CVX.safeTransferFrom(msg.sender, address(this), _amount);
        CVX.safeApprove(address(bentCVX), _amount);
        IBentCVX(address(bentCVX)).deposit(_amount);

        _mint(msg.sender, _amount);

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

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

        emit Deposit(msg.sender, _amount);
    }

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

        rewarders.push(IBentCVXRewarder(_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] = IBentCVXRewarder(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);

        bentCVX.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
        bentCVX.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 : IBentCVX.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface IBentCVX {
    function deposit(uint256 _amount) external;
}

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

interface IBentCVXRewarder {
    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 11 of 12 : IBentCVXStaking.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

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

    function withdrawTo(address _recipient, uint256 _amount) external;

    function claimAllFor(address _user) 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":"_CVX","type":"address"},{"internalType":"address","name":"_bentCVX","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":"CVX","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":[],"name":"bentCVX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintAndStake","outputs":[],"stateMutability":"nonpayable","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 IBentCVXRewarder","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"}]

60806040523480156200001157600080fd5b5060405162001c7e38038062001c7e8339810160408190526200003491620000e2565b6200003f3362000075565b60018055600480546001600160a01b039384166001600160a01b0319918216179091556005805492909316911617905562000119565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000dd57600080fd5b919050565b60008060408385031215620000f5578182fd5b6200010083620000c5565b91506200011060208401620000c5565b90509250929050565b611b5580620001296000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063759cb53b116100cd578063c365388411610081578063d960b37a11610066578063d960b37a146102ec578063f2fde38b146102ff578063fcf8770f1461031257600080fd5b8063c3653884146102d1578063d1058e59146102e457600080fd5b80638e478cab116100b25780638e478cab14610278578063a2df129d146102ab578063b6b55f25146102be57600080fd5b8063759cb53b1461023c5780638da5cb5b1461026757600080fd5b806356d3590b1161012457806370a082311161010957806370a0823114610201578063715018a61461022157806373cb55341461022957600080fd5b806356d3590b146101db57806358c96996146101ee57600080fd5b8063205c287811610155578063205c2878146101a25780632e1a7d4d146101b55780632f4f21e2146101c857600080fd5b80630eeb7b571461017157806318160ddd14610186575b600080fd5b61018461017f3660046118ec565b610325565b005b61018f60025481565b6040519081526020015b60405180910390f35b6101846101b0366004611870565b6104d8565b6101846101c33660046118ec565b6106c9565b6101846101d6366004611870565b6106d6565b6101846101e9366004611803565b61086f565b6101846101fc366004611824565b610986565b61018f61020f366004611803565b60036020526000908152604090205481565b610184610baa565b610184610237366004611899565b610bbe565b60045461024f906001600160a01b031681565b6040516001600160a01b039091168152602001610199565b6000546001600160a01b031661024f565b61029b610286366004611803565b60076020526000908152604090205460ff1681565b6040519015158152602001610199565b6101846102b9366004611803565b610bc8565b6101846102cc3660046118ec565b610d7e565b60055461024f906001600160a01b031681565b610184610d88565b6101846102fa3660046118ec565b610d91565b61018461030d366004611803565b610fbf565b61024f6103203660046118ec565b61104c565b61032d611076565b600654811080156103875750600760006006838154811061035e57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff165b604051806040016040528060038152602001620c4c4d60ea1b815250906103ca5760405162461bcd60e51b81526004016103c191906119f5565b60405180910390fd5b50600681815481106103ec57634e487b7160e01b600052603260045260246000fd5b60009182526020822001546040516001600160a01b03909116917fb44a6e63a78b67293eb03a44f7ef453221c66176d6e64eb52cfa999809cdf9b091a26000600760006006848154811061045057634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546001600160a01b031683528201929092526040018120805460ff19169215159290921790915560068054839081106104a757634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b6104e06110d0565b3360009081526003602052604090205481118015906104fe57508015155b6040518060400160405280600381526020017f3130330000000000000000000000000000000000000000000000000000000000815250906105525760405162461bcd60e51b81526004016103c191906119f5565b5060005b6006548110156106645760006001600160a01b03166006828154811061058c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156105ac57610654565b600681815481106105cd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517ff3fef3a3000000000000000000000000000000000000000000000000000000008152336004820152602481018490526001600160a01b039091169063f3fef3a390604401600060405180830381600087803b15801561063b57600080fd5b505af115801561064f573d6000803e3d6000fd5b505050505b61065d81611ad8565b9050610556565b5061066f338261112a565b600554610686906001600160a01b03168383611174565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a26106c560018055565b5050565b6106d333826104d8565b50565b6106de6110d0565b60408051808201909152600381526231303160e81b6020820152816107165760405162461bcd60e51b81526004016103c191906119f5565b5060055461072f906001600160a01b0316333084611222565b6107398282611279565b60005b6006548110156108335760006001600160a01b03166006828154811061077257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316141561079257610823565b600681815481106107b357634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516311f9fbc960e21b81526001600160a01b03858116600483015260248201859052909116906347e7ef2490604401600060405180830381600087803b15801561080a57600080fd5b505af115801561081e573d6000803e3d6000fd5b505050505b61082c81611ad8565b905061073c565b50816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c826040516106b491815260200190565b610877611076565b6001600160a01b038116600090815260076020908152604091829020548251808401909352600383527f31313500000000000000000000000000000000000000000000000000000000009183019190915260ff16156108e95760405162461bcd60e51b81526004016103c191906119f5565b506006805460018082019092557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155600081815260076020526040808220805460ff1916909417909355915190917f7aefe99f53658ca02b9d6b2fba6c5a0cb1751fc0fde01636c238431954cf5d2391a250565b61098e6110d0565b60065481516040805180820190915260038152620c4c4d60ea1b602082015291146109cc5760405162461bcd60e51b81526004016103c191906119f5565b506000805b8251811015610b255760006001600160a01b031660068281548110610a0657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610a2657610b15565b60068181548110610a4757634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b0316634571827885858481518110610a9457634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610ab9929190611972565b602060405180830381600087803b158015610ad357600080fd5b505af1158015610ae7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0b91906118cc565b15610b1557600191505b610b1e81611ad8565b90506109d1565b506040805180820190915260038152620c4c0d60ea1b602082015281610b5e5760405162461bcd60e51b81526004016103c191906119f5565b50826001600160a01b03167fd970e9ee33bc4c905e32e922e61fd97b08ffcdbc1f9c151dae38f2e132c36d8483604051610b989190611994565b60405180910390a2506106c560018055565b610bb2611076565b610bbc60006112ba565b565b6106d33382610986565b610bd06110d0565b6000805b600654811015610d065760006001600160a01b031660068281548110610c0a57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c2a57610cf6565b60068181548110610c4b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517f77329f350000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906377329f3590602401602060405180830381600087803b158015610cb457600080fd5b505af1158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec91906118cc565b15610cf657600191505b610cff81611ad8565b9050610bd4565b506040805180820190915260038152620c4c0d60ea1b602082015281610d3f5760405162461bcd60e51b81526004016103c191906119f5565b506040516001600160a01b038316907f35c46ad0a3be0baa9f2efefd524536899a004933e4fd4c13a81a0e1a38f5511590600090a2506106d360018055565b6106d333826106d6565b610bbc33610bc8565b610d996110d0565b60408051808201909152600381526231303160e81b602082015281610dd15760405162461bcd60e51b81526004016103c191906119f5565b50600454610dea906001600160a01b0316333084611222565b600554600454610e07916001600160a01b03918216911683611317565b6005546040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b158015610e6657600080fd5b505af1158015610e7a573d6000803e3d6000fd5b50505050610e883382611279565b60005b600654811015610f805760006001600160a01b031660068281548110610ec157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610ee157610f70565b60068181548110610f0257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516311f9fbc960e21b8152336004820152602481018490526001600160a01b03909116906347e7ef2490604401600060405180830381600087803b158015610f5757600080fd5b505af1158015610f6b573d6000803e3d6000fd5b505050505b610f7981611ad8565b9050610e8b565b5060405181815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a26106d360018055565b610fc7611076565b6001600160a01b0381166110435760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103c1565b6106d3816112ba565b6006818154811061105c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610bbc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c1565b600260015414156111235760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103c1565b6002600155565b6001600160a01b03821660009081526003602052604081208054839290611152908490611a95565b92505081905550806002600082825461116b9190611a95565b90915550505050565b6040516001600160a01b03831660248201526044810182905261121d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611474565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526112739085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016111b9565b50505050565b6001600160a01b038216600090815260036020526040812080548392906112a1908490611a7d565b92505081905550806002600082825461116b9190611a7d565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015806113b957506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561137f57600080fd5b505afa158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b79190611904565b155b61142b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016103c1565b6040516001600160a01b03831660248201526044810182905261121d9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016111b9565b60006114c9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115599092919063ffffffff16565b80519091501561121d57808060200190518101906114e791906118cc565b61121d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103c1565b60606115688484600085611570565b949350505050565b6060824710156115e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103c1565b600080866001600160a01b031685876040516116049190611956565b60006040518083038185875af1925050503d8060008114611641576040519150601f19603f3d011682016040523d82523d6000602084013e611646565b606091505b509150915061165787838387611662565b979650505050505050565b606083156116ce5782516116c7576001600160a01b0385163b6116c75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c1565b5081611568565b61156883838151156116e35781518083602001fd5b8060405162461bcd60e51b81526004016103c191906119f5565b80356001600160a01b038116811461171457600080fd5b919050565b600082601f830112611729578081fd5b8135602061173e61173983611a59565b611a28565b82815281810190858301600585811b8801850189101561175c578687fd5b865b868110156117f557823567ffffffffffffffff81111561177c578889fd5b8901603f81018b1361178c578889fd5b86810135604061179e61173983611a59565b808382528a820191508285018f84868a1b88010111156117bc578d8efd5b8d95505b848610156117de578035835260019590950194918b01918b016117c0565b50895250505094860194509185019160010161175e565b509198975050505050505050565b600060208284031215611814578081fd5b61181d826116fd565b9392505050565b60008060408385031215611836578081fd5b61183f836116fd565b9150602083013567ffffffffffffffff81111561185a578182fd5b61186685828601611719565b9150509250929050565b60008060408385031215611882578182fd5b61188b836116fd565b946020939093013593505050565b6000602082840312156118aa578081fd5b813567ffffffffffffffff8111156118c0578182fd5b61156884828501611719565b6000602082840312156118dd578081fd5b8151801515811461181d578182fd5b6000602082840312156118fd578081fd5b5035919050565b600060208284031215611915578081fd5b5051919050565b6000815180845260208085019450808401835b8381101561194b5781518752958201959082019060010161192f565b509495945050505050565b60008251611968818460208701611aac565b9190910192915050565b6001600160a01b0383168152604060208201526000611568604083018461191c565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b828110156119e857603f198886030184526119d685835161191c565b945092850192908501906001016119ba565b5092979650505050505050565b6020815260008251806020840152611a14816040850160208701611aac565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a5157611a51611b09565b604052919050565b600067ffffffffffffffff821115611a7357611a73611b09565b5060051b60200190565b60008219821115611a9057611a90611af3565b500190565b600082821015611aa757611aa7611af3565b500390565b60005b83811015611ac7578181015183820152602001611aaf565b838111156112735750506000910152565b6000600019821415611aec57611aec611af3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220fa314c8834099ef771ef2991adb324c20dd71045161371b03207fcbedd7ca2e364736f6c634300080400330000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b0000000000000000000000009e0441e084f5db0606565737158aa6ab6b970fe0

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061016c5760003560e01c8063759cb53b116100cd578063c365388411610081578063d960b37a11610066578063d960b37a146102ec578063f2fde38b146102ff578063fcf8770f1461031257600080fd5b8063c3653884146102d1578063d1058e59146102e457600080fd5b80638e478cab116100b25780638e478cab14610278578063a2df129d146102ab578063b6b55f25146102be57600080fd5b8063759cb53b1461023c5780638da5cb5b1461026757600080fd5b806356d3590b1161012457806370a082311161010957806370a0823114610201578063715018a61461022157806373cb55341461022957600080fd5b806356d3590b146101db57806358c96996146101ee57600080fd5b8063205c287811610155578063205c2878146101a25780632e1a7d4d146101b55780632f4f21e2146101c857600080fd5b80630eeb7b571461017157806318160ddd14610186575b600080fd5b61018461017f3660046118ec565b610325565b005b61018f60025481565b6040519081526020015b60405180910390f35b6101846101b0366004611870565b6104d8565b6101846101c33660046118ec565b6106c9565b6101846101d6366004611870565b6106d6565b6101846101e9366004611803565b61086f565b6101846101fc366004611824565b610986565b61018f61020f366004611803565b60036020526000908152604090205481565b610184610baa565b610184610237366004611899565b610bbe565b60045461024f906001600160a01b031681565b6040516001600160a01b039091168152602001610199565b6000546001600160a01b031661024f565b61029b610286366004611803565b60076020526000908152604090205460ff1681565b6040519015158152602001610199565b6101846102b9366004611803565b610bc8565b6101846102cc3660046118ec565b610d7e565b60055461024f906001600160a01b031681565b610184610d88565b6101846102fa3660046118ec565b610d91565b61018461030d366004611803565b610fbf565b61024f6103203660046118ec565b61104c565b61032d611076565b600654811080156103875750600760006006838154811061035e57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff165b604051806040016040528060038152602001620c4c4d60ea1b815250906103ca5760405162461bcd60e51b81526004016103c191906119f5565b60405180910390fd5b50600681815481106103ec57634e487b7160e01b600052603260045260246000fd5b60009182526020822001546040516001600160a01b03909116917fb44a6e63a78b67293eb03a44f7ef453221c66176d6e64eb52cfa999809cdf9b091a26000600760006006848154811061045057634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546001600160a01b031683528201929092526040018120805460ff19169215159290921790915560068054839081106104a757634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b6104e06110d0565b3360009081526003602052604090205481118015906104fe57508015155b6040518060400160405280600381526020017f3130330000000000000000000000000000000000000000000000000000000000815250906105525760405162461bcd60e51b81526004016103c191906119f5565b5060005b6006548110156106645760006001600160a01b03166006828154811061058c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156105ac57610654565b600681815481106105cd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517ff3fef3a3000000000000000000000000000000000000000000000000000000008152336004820152602481018490526001600160a01b039091169063f3fef3a390604401600060405180830381600087803b15801561063b57600080fd5b505af115801561064f573d6000803e3d6000fd5b505050505b61065d81611ad8565b9050610556565b5061066f338261112a565b600554610686906001600160a01b03168383611174565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a26106c560018055565b5050565b6106d333826104d8565b50565b6106de6110d0565b60408051808201909152600381526231303160e81b6020820152816107165760405162461bcd60e51b81526004016103c191906119f5565b5060055461072f906001600160a01b0316333084611222565b6107398282611279565b60005b6006548110156108335760006001600160a01b03166006828154811061077257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316141561079257610823565b600681815481106107b357634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516311f9fbc960e21b81526001600160a01b03858116600483015260248201859052909116906347e7ef2490604401600060405180830381600087803b15801561080a57600080fd5b505af115801561081e573d6000803e3d6000fd5b505050505b61082c81611ad8565b905061073c565b50816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c826040516106b491815260200190565b610877611076565b6001600160a01b038116600090815260076020908152604091829020548251808401909352600383527f31313500000000000000000000000000000000000000000000000000000000009183019190915260ff16156108e95760405162461bcd60e51b81526004016103c191906119f5565b506006805460018082019092557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155600081815260076020526040808220805460ff1916909417909355915190917f7aefe99f53658ca02b9d6b2fba6c5a0cb1751fc0fde01636c238431954cf5d2391a250565b61098e6110d0565b60065481516040805180820190915260038152620c4c4d60ea1b602082015291146109cc5760405162461bcd60e51b81526004016103c191906119f5565b506000805b8251811015610b255760006001600160a01b031660068281548110610a0657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610a2657610b15565b60068181548110610a4757634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b0316634571827885858481518110610a9457634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610ab9929190611972565b602060405180830381600087803b158015610ad357600080fd5b505af1158015610ae7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0b91906118cc565b15610b1557600191505b610b1e81611ad8565b90506109d1565b506040805180820190915260038152620c4c0d60ea1b602082015281610b5e5760405162461bcd60e51b81526004016103c191906119f5565b50826001600160a01b03167fd970e9ee33bc4c905e32e922e61fd97b08ffcdbc1f9c151dae38f2e132c36d8483604051610b989190611994565b60405180910390a2506106c560018055565b610bb2611076565b610bbc60006112ba565b565b6106d33382610986565b610bd06110d0565b6000805b600654811015610d065760006001600160a01b031660068281548110610c0a57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c2a57610cf6565b60068181548110610c4b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040517f77329f350000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906377329f3590602401602060405180830381600087803b158015610cb457600080fd5b505af1158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec91906118cc565b15610cf657600191505b610cff81611ad8565b9050610bd4565b506040805180820190915260038152620c4c0d60ea1b602082015281610d3f5760405162461bcd60e51b81526004016103c191906119f5565b506040516001600160a01b038316907f35c46ad0a3be0baa9f2efefd524536899a004933e4fd4c13a81a0e1a38f5511590600090a2506106d360018055565b6106d333826106d6565b610bbc33610bc8565b610d996110d0565b60408051808201909152600381526231303160e81b602082015281610dd15760405162461bcd60e51b81526004016103c191906119f5565b50600454610dea906001600160a01b0316333084611222565b600554600454610e07916001600160a01b03918216911683611317565b6005546040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b158015610e6657600080fd5b505af1158015610e7a573d6000803e3d6000fd5b50505050610e883382611279565b60005b600654811015610f805760006001600160a01b031660068281548110610ec157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610ee157610f70565b60068181548110610f0257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516311f9fbc960e21b8152336004820152602481018490526001600160a01b03909116906347e7ef2490604401600060405180830381600087803b158015610f5757600080fd5b505af1158015610f6b573d6000803e3d6000fd5b505050505b610f7981611ad8565b9050610e8b565b5060405181815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a26106d360018055565b610fc7611076565b6001600160a01b0381166110435760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103c1565b6106d3816112ba565b6006818154811061105c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610bbc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c1565b600260015414156111235760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103c1565b6002600155565b6001600160a01b03821660009081526003602052604081208054839290611152908490611a95565b92505081905550806002600082825461116b9190611a95565b90915550505050565b6040516001600160a01b03831660248201526044810182905261121d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611474565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526112739085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016111b9565b50505050565b6001600160a01b038216600090815260036020526040812080548392906112a1908490611a7d565b92505081905550806002600082825461116b9190611a7d565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015806113b957506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561137f57600080fd5b505afa158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b79190611904565b155b61142b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016103c1565b6040516001600160a01b03831660248201526044810182905261121d9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016111b9565b60006114c9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115599092919063ffffffff16565b80519091501561121d57808060200190518101906114e791906118cc565b61121d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103c1565b60606115688484600085611570565b949350505050565b6060824710156115e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103c1565b600080866001600160a01b031685876040516116049190611956565b60006040518083038185875af1925050503d8060008114611641576040519150601f19603f3d011682016040523d82523d6000602084013e611646565b606091505b509150915061165787838387611662565b979650505050505050565b606083156116ce5782516116c7576001600160a01b0385163b6116c75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c1565b5081611568565b61156883838151156116e35781518083602001fd5b8060405162461bcd60e51b81526004016103c191906119f5565b80356001600160a01b038116811461171457600080fd5b919050565b600082601f830112611729578081fd5b8135602061173e61173983611a59565b611a28565b82815281810190858301600585811b8801850189101561175c578687fd5b865b868110156117f557823567ffffffffffffffff81111561177c578889fd5b8901603f81018b1361178c578889fd5b86810135604061179e61173983611a59565b808382528a820191508285018f84868a1b88010111156117bc578d8efd5b8d95505b848610156117de578035835260019590950194918b01918b016117c0565b50895250505094860194509185019160010161175e565b509198975050505050505050565b600060208284031215611814578081fd5b61181d826116fd565b9392505050565b60008060408385031215611836578081fd5b61183f836116fd565b9150602083013567ffffffffffffffff81111561185a578182fd5b61186685828601611719565b9150509250929050565b60008060408385031215611882578182fd5b61188b836116fd565b946020939093013593505050565b6000602082840312156118aa578081fd5b813567ffffffffffffffff8111156118c0578182fd5b61156884828501611719565b6000602082840312156118dd578081fd5b8151801515811461181d578182fd5b6000602082840312156118fd578081fd5b5035919050565b600060208284031215611915578081fd5b5051919050565b6000815180845260208085019450808401835b8381101561194b5781518752958201959082019060010161192f565b509495945050505050565b60008251611968818460208701611aac565b9190910192915050565b6001600160a01b0383168152604060208201526000611568604083018461191c565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b828110156119e857603f198886030184526119d685835161191c565b945092850192908501906001016119ba565b5092979650505050505050565b6020815260008251806020840152611a14816040850160208701611aac565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a5157611a51611b09565b604052919050565b600067ffffffffffffffff821115611a7357611a73611b09565b5060051b60200190565b60008219821115611a9057611a90611af3565b500190565b600082821015611aa757611aa7611af3565b500390565b60005b83811015611ac7578181015183820152602001611aaf565b838111156112735750506000910152565b6000600019821415611aec57611aec611af3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220fa314c8834099ef771ef2991adb324c20dd71045161371b03207fcbedd7ca2e364736f6c63430008040033

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

0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b0000000000000000000000009e0441e084f5db0606565737158aa6ab6b970fe0

-----Decoded View---------------
Arg [0] : _CVX (address): 0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B
Arg [1] : _bentCVX (address): 0x9E0441E084F5dB0606565737158aa6Ab6B970fE0

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b
Arg [1] : 0000000000000000000000009e0441e084f5db0606565737158aa6ab6b970fe0


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.