ETH Price: $2,044.97 (+0.89%)

Contract

0xbc2C4880115Cb2E67aDF5BaBD8B2b3a5D32EC5f4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Roll Deposit219338312025-02-26 23:36:23378 days ago1740612983IN
0xbc2C4880...5D32EC5f4
0 ETH0.000174040.75254503
Roll Deposit217829792025-02-05 21:27:35399 days ago1738790855IN
0xbc2C4880...5D32EC5f4
0 ETH0.000278741.20523508
Roll Deposit217779942025-02-05 4:45:47399 days ago1738730747IN
0xbc2C4880...5D32EC5f4
0 ETH0.000401961.73799398
Roll Deposit217676922025-02-03 18:12:35401 days ago1738606355IN
0xbc2C4880...5D32EC5f4
0 ETH0.002887412.48444424
Roll Deposit217525392025-02-01 15:22:35403 days ago1738423355IN
0xbc2C4880...5D32EC5f4
0 ETH0.000809913.50187234
Roll Deposit217503172025-02-01 7:56:47403 days ago1738396607IN
0xbc2C4880...5D32EC5f4
0 ETH0.000530272.31799853
Roll Deposit217495462025-02-01 5:21:11403 days ago1738387271IN
0xbc2C4880...5D32EC5f4
0 ETH0.000380641.64580937
Roll Deposit217481462025-02-01 0:39:47404 days ago1738370387IN
0xbc2C4880...5D32EC5f4
0 ETH0.000419921.81565917
Roll Deposit216259142025-01-14 23:10:11421 days ago1736896211IN
0xbc2C4880...5D32EC5f4
0 ETH0.001198035.17981379
Roll Deposit216143932025-01-13 8:32:59422 days ago1736757179IN
0xbc2C4880...5D32EC5f4
0 ETH0.001515486.55231899
Roll Deposit216023192025-01-11 16:05:11424 days ago1736611511IN
0xbc2C4880...5D32EC5f4
0 ETH0.001230855.32170885
Roll Deposit215979952025-01-11 1:35:35425 days ago1736559335IN
0xbc2C4880...5D32EC5f4
0 ETH0.000946424.0919476
Roll Deposit215673152025-01-06 18:48:59429 days ago1736189339IN
0xbc2C4880...5D32EC5f4
0 ETH0.0040289319.04256549
Roll Deposit215547822025-01-05 0:45:11431 days ago1736037911IN
0xbc2C4880...5D32EC5f4
0 ETH0.001506136.51190744
Roll Deposit215530872025-01-04 19:04:35431 days ago1736017475IN
0xbc2C4880...5D32EC5f4
0 ETH0.001866888.07162236
Roll Deposit215405662025-01-03 1:06:47433 days ago1735866407IN
0xbc2C4880...5D32EC5f4
0 ETH0.0022554910.66051752
Roll Deposit215353142025-01-02 7:32:47433 days ago1735803167IN
0xbc2C4880...5D32EC5f4
0 ETH0.0028911212.5
Roll Deposit215280182025-01-01 7:07:23434 days ago1735715243IN
0xbc2C4880...5D32EC5f4
0 ETH0.000588342.54374697
Roll Deposit215277562025-01-01 6:14:23434 days ago1735712063IN
0xbc2C4880...5D32EC5f4
0 ETH0.000795713.44035553
Roll Deposit215259532025-01-01 0:12:35435 days ago1735690355IN
0xbc2C4880...5D32EC5f4
0 ETH0.001293855.28170204
Roll Deposit215257882024-12-31 23:39:23435 days ago1735688363IN
0xbc2C4880...5D32EC5f4
0 ETH0.001236225.34489252
Roll Deposit215156042024-12-30 13:31:11436 days ago1735565471IN
0xbc2C4880...5D32EC5f4
0 ETH0.001932398.35485178
Roll Deposit214051452024-12-15 3:10:11451 days ago1734232211IN
0xbc2C4880...5D32EC5f4
0 ETH0.001529547.22967255
Roll Deposit213062122024-12-01 7:37:35465 days ago1733038655IN
0xbc2C4880...5D32EC5f4
0 ETH0.0025212410.90078354
Roll Deposit213056622024-12-01 5:46:59465 days ago1733032019IN
0xbc2C4880...5D32EC5f4
0 ETH0.001875358.10824321
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DepositRollover

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 100000 runs

Other Settings:
cancun EvmVersion
File 1 of 7 : DepositRollover.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@interfaces/IHourglassDepositor.sol";

/// @title DepositRollover
/// @notice Contract to roll a matured deposit into a new deposit
/// - converts matured deposits into a new timestamp of the same deposit
/// - redeems the matured deposits from the earlier depositor and depositing directly into the specified later maturity

contract DepositRollover {
    using SafeERC20 for IERC20;

    /// @notice Roll a matured deposit into a new deposit
    /// @param underlyingToken The address of the underlying token
    /// @param maturedDepositor The address of the matured depositor
    /// @param maturedTimestamp The maturity timestamp of the matured depositor
    /// @param maturedAmount The amount of the matured depositor to roll
    /// @param maturedToken The address of the token to roll, either the principal or combined token
    /// @param isCombinedToken Whether the token is a combined token
    /// @param newDepositor The address of the new depositor
    /// @param newTimestamp The maturity timestamp of the new depositor
    /// @param receiveSplit Whether to receive the split of the deposit
    /// @return amountUnderlyingRolled The amount of the underlying token rolled
    function rollDeposit(
        address underlyingToken,
        address maturedDepositor,
        uint256 maturedTimestamp,
        uint256 maturedAmount,
        address maturedToken,
        bool isCombinedToken,
        address newDepositor,
        uint256 newTimestamp,
        bool receiveSplit
    ) external returns (uint256 amountUnderlyingRolled) {
        // check that the maturities are the correct values for the respective depositors as a sanity check
        if (IHourglassDepositor(maturedDepositor).maturity() != maturedTimestamp) revert MaturedDepositorMismatch();
        if (IHourglassDepositor(newDepositor).maturity() != newTimestamp) revert NewDepositorMismatch();
        if (newTimestamp < block.timestamp) revert NewDepositorMatured();

        // transfer `maturedAmount` of the correct token from caller
        IERC20(maturedToken).safeTransferFrom(msg.sender, address(this), maturedAmount);

        // `maturedToken` token must be either the combined token or the principal token, but will fail at depositor level if not

        // if this is the combined token, call the redeem combined function on the matured depositor
        if (isCombinedToken) {
            IHourglassDepositor(maturedDepositor).redeem(maturedAmount);
            // transfer the minted yield token to the caller
            IERC20(IHourglassDepositor(maturedDepositor).getPointToken()).safeTransfer(msg.sender, maturedAmount);
        } else {
            // if this is the principal token, call the redeem principal function on the matured depositor
            IHourglassDepositor(maturedDepositor).redeemPrincipal(maturedAmount);
        }

        // this address should now have the underlying deposit token for both depositors, if crossing depositors to new asset type, this will already revert
        amountUnderlyingRolled = IERC20(underlyingToken).balanceOf(address(this));

        // enter and utilize depositTo such that the token(s) mint directly to the user
        IHourglassDepositor(newDepositor).enter(amountUnderlyingRolled);
        // push in the deposit token to the new depositor
        IERC20(underlyingToken).safeTransfer(newDepositor, amountUnderlyingRolled);
        IHourglassDepositor(newDepositor).depositTo(msg.sender, msg.sender, amountUnderlyingRolled, receiveSplit);

        emit DepositRolled(msg.sender, maturedDepositor, maturedAmount, newDepositor, amountUnderlyingRolled);
    }

    ///// EVENTS /////
    event DepositRolled(
        address user, address maturedDepositor, uint256 maturedAmount, address newDepositor, uint256 newAmount
    );

    ///// ERRORS /////
    error MaturedDepositorMismatch();
    error NewDepositorMismatch();
    error NewDepositorMatured();
}

File 2 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IHourglassDepositor {
    // deposit
    function depositFor(address _account, uint256 _amount, bool receiveSplit) external;
    function depositTo(address principalRecipient, address pointRecipient, uint256 amount, bool receiveSplit)
        external;
    function enter(uint256 amount) external;

    function redeem(uint256 amount) external;
    function redeemPrincipal(uint256 amount) external;

    // getters
    function maturity() external view returns (uint256);
    function getUnderlying() external view returns (address);
    function getPointToken() external view returns (address);
    function getPrincipalToken() external view returns (address);
    function getTokens() external view returns (address[] memory);

    // admin
    function setMaxDeposits(uint256 _maxDeposits) external;
    function recoverToken(address _token, address _rewardsDistributor) external returns (uint256 amount);
}

interface IEthFiLUSDDepositor {
    function mintLockedUnderlying(uint256 minMintReceivedSlippageBps, address lusdDepositAsset, address sourceOfFunds)
        external
        returns (uint256 amountDepositAssetMinted);
}

interface IEthFiLiquidDepositor {
    function mintLockedUnderlying(uint256 minMintReceivedSlippageBps, address lusdDepositAsset, address sourceOfFunds)
        external
        returns (uint256 amountDepositAssetMinted);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
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].
     *
     * CAUTION: See Security Considerations above.
     */
    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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "safe-tools/=lib/safe-tools/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "@interfaces/=src/interfaces/",
    "@mocks/=test/mocks/",
    "@script/=script/",
    "safe/=lib/safer/lib/safe-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "safer/=lib/safer/",
    "@balancer-labs/v2-interfaces/=lib/ion-protocol/lib/balancer-v2-monorepo/pkg/interfaces/",
    "@balancer-labs/v2-pool-stable/=lib/ion-protocol/lib/balancer-v2-monorepo/pkg/pool-stable/",
    "@chainlink/contracts/=lib/ion-protocol/lib/chainlink/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@uniswap/v3-core/=lib/ion-protocol/lib/v3-core/",
    "@uniswap/v3-periphery/=lib/ion-protocol/lib/v3-periphery/",
    "addresses/=lib/addresses/src/",
    "balancer-v2-monorepo/=lib/ion-protocol/lib/",
    "chainlink/=lib/ion-protocol/lib/chainlink/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-safe/=lib/ion-protocol/lib/forge-safe/",
    "ion-protocol/=lib/ion-protocol/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/addresses/lib/openzeppelin-contracts-upgradeable/contracts/",
    "seaport-core/=lib/seaport-core/",
    "seaport-types/=lib/seaport-types/",
    "solady/=lib/ion-protocol/lib/solady/",
    "solarray/=lib/ion-protocol/lib/solarray/src/",
    "solidity-stringutils/=lib/ion-protocol/lib/forge-safe/lib/surl/lib/solidity-stringutils/",
    "solmate/=lib/addresses/lib/solmate/src/",
    "surl/=lib/ion-protocol/lib/forge-safe/lib/surl/",
    "transient-goodies/=lib/transient-goodies/src/",
    "v3-core/=lib/ion-protocol/lib/v3-core/",
    "v3-periphery/=lib/ion-protocol/lib/v3-periphery/contracts/",
    "pendle-core-v2-public/=lib/ion-protocol/lib/pendle-core-v2-public/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000,
    "details": {
      "jumpdestRemover": true,
      "orderLiterals": true,
      "deduplicate": true,
      "cse": true,
      "constantOptimizer": true,
      "yul": true,
      "yulDetails": {
        "stackAllocation": true
      }
    }
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"MaturedDepositorMismatch","type":"error"},{"inputs":[],"name":"NewDepositorMatured","type":"error"},{"inputs":[],"name":"NewDepositorMismatch","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"maturedDepositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"maturedAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"newDepositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"DepositRolled","type":"event"},{"inputs":[{"internalType":"address","name":"underlyingToken","type":"address"},{"internalType":"address","name":"maturedDepositor","type":"address"},{"internalType":"uint256","name":"maturedTimestamp","type":"uint256"},{"internalType":"uint256","name":"maturedAmount","type":"uint256"},{"internalType":"address","name":"maturedToken","type":"address"},{"internalType":"bool","name":"isCombinedToken","type":"bool"},{"internalType":"address","name":"newDepositor","type":"address"},{"internalType":"uint256","name":"newTimestamp","type":"uint256"},{"internalType":"bool","name":"receiveSplit","type":"bool"}],"name":"rollDeposit","outputs":[{"internalType":"uint256","name":"amountUnderlyingRolled","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60808060405234601557610a5d908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f803560e01c6307bfc3aa14610025575f80fd5b346105a2576101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105a25760043573ffffffffffffffffffffffffffffffffffffffff811681036105a2576024359173ffffffffffffffffffffffffffffffffffffffff831683036105a25760843573ffffffffffffffffffffffffffffffffffffffff811681036105a25760a435151560a435036105a25773ffffffffffffffffffffffffffffffffffffffff60c4351660c435036105a257610104359081151582036105a2577f204f83f900000000000000000000000000000000000000000000000000000000608052602060806004608073ffffffffffffffffffffffffffffffffffffffff89165afa80156106ac575f90610794575b6044350361076a576040517f204f83f900000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff60c435165afa9081156106ac575f91610738575b5060e4350361070e574260e435106106e4576040517f23b872dd00000000000000000000000000000000000000000000000000000000602082015233602482015230604482015260643560648201526064815260a0810181811067ffffffffffffffff8211176106b75760405261022d9173ffffffffffffffffffffffffffffffffffffffff1661088c565b60a4351561061e5773ffffffffffffffffffffffffffffffffffffffff84163b1561054c576040517fdb006a75000000000000000000000000000000000000000000000000000000008152606435600482015282816024818373ffffffffffffffffffffffffffffffffffffffff8a165af180156105ae5790839161060a575b50506040517fe07cd09400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff89165afa80156105ae5783906105b9575b61032791506064359073ffffffffffffffffffffffffffffffffffffffff339116610817565b604051927f70a0823100000000000000000000000000000000000000000000000000000000845230600485015260208460248173ffffffffffffffffffffffffffffffffffffffff85165afa9384156105ae578394610576575b5073ffffffffffffffffffffffffffffffffffffffff60c435163b15610567576040517fa59f3e0c00000000000000000000000000000000000000000000000000000000815284600482015283816024818373ffffffffffffffffffffffffffffffffffffffff60c435165af1801561056b5785918591610550575b50506104229173ffffffffffffffffffffffffffffffffffffffff60c4359116610817565b73ffffffffffffffffffffffffffffffffffffffff60c435163b1561054c57604051907f658c31970000000000000000000000000000000000000000000000000000000082523360048301523360248301528360448301521515606482015281816084818373ffffffffffffffffffffffffffffffffffffffff60c435165af180156105415761052a575b6020837fbcf1a322b81fabc86c87e213c2f09770a10f5fe67c30cc51de6e8fb498dd841160a08773ffffffffffffffffffffffffffffffffffffffff604051913383521685820152606435604082015273ffffffffffffffffffffffffffffffffffffffff60c435166060820152836080820152a1604051908152f35b61053482916107c2565b61053e57806104ad565b80fd5b6040513d84823e3d90fd5b5080fd5b61055b9192506107c2565b6105675783835f6103fd565b8280fd5b6040513d86823e3d90fd5b9093506020813d6020116105a6575b81610592602093836107d6565b810103126105a25751925f610381565b5f80fd5b3d9150610585565b6040513d85823e3d90fd5b506020813d602011610602575b816105d3602093836107d6565b81010312610567575173ffffffffffffffffffffffffffffffffffffffff811681036105675761032790610301565b3d91506105c6565b610613906107c2565b61054c57815f6102ad565b73ffffffffffffffffffffffffffffffffffffffff84163b156105a2576040517f4bf1836900000000000000000000000000000000000000000000000000000000815260643560048201525f816024818373ffffffffffffffffffffffffffffffffffffffff8a165af180156106ac57610699575b50610327565b6106a49192506107c2565b5f905f610693565b6040513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60046040517fae728894000000000000000000000000000000000000000000000000000000008152fd5b60046040517f27e8975b000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011610762575b81610753602093836107d6565b810103126105a257515f6101a1565b3d9150610746565b60046040517fbcd2e19d000000000000000000000000000000000000000000000000000000008152fd5b5060203d6020116107bb575b806107ae60209260806107d6565b126105a257608051610144565b503d6107a0565b67ffffffffffffffff81116106b757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106b757604052565b9173ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000006020850152166024830152604482015260448152608081019181831067ffffffffffffffff8411176106b75761088a9260405261088c565b565b5f73ffffffffffffffffffffffffffffffffffffffff8192169260208151910182855af13d1561097b573d67ffffffffffffffff81116106b757610910916040519161090060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846107d6565b82523d5f602084013e5b83610987565b8051908115159182610957575b50506109265750565b602490604051907f5274afe70000000000000000000000000000000000000000000000000000000082526004820152fd5b81925090602091810103126105a257602001518015908115036105a2575f8061091d565b6109109060609061090a565b906109c6575080511561099c57805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580610a1e575b6109d7575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b156109cf56fea26469706673582212204f4270c47883de81f8fbb0beb700247abab8e576bd274acfe241f6729c5f7be064736f6c63430008190033

Deployed Bytecode

0x60806040526004361015610011575f80fd5b5f803560e01c6307bfc3aa14610025575f80fd5b346105a2576101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105a25760043573ffffffffffffffffffffffffffffffffffffffff811681036105a2576024359173ffffffffffffffffffffffffffffffffffffffff831683036105a25760843573ffffffffffffffffffffffffffffffffffffffff811681036105a25760a435151560a435036105a25773ffffffffffffffffffffffffffffffffffffffff60c4351660c435036105a257610104359081151582036105a2577f204f83f900000000000000000000000000000000000000000000000000000000608052602060806004608073ffffffffffffffffffffffffffffffffffffffff89165afa80156106ac575f90610794575b6044350361076a576040517f204f83f900000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff60c435165afa9081156106ac575f91610738575b5060e4350361070e574260e435106106e4576040517f23b872dd00000000000000000000000000000000000000000000000000000000602082015233602482015230604482015260643560648201526064815260a0810181811067ffffffffffffffff8211176106b75760405261022d9173ffffffffffffffffffffffffffffffffffffffff1661088c565b60a4351561061e5773ffffffffffffffffffffffffffffffffffffffff84163b1561054c576040517fdb006a75000000000000000000000000000000000000000000000000000000008152606435600482015282816024818373ffffffffffffffffffffffffffffffffffffffff8a165af180156105ae5790839161060a575b50506040517fe07cd09400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff89165afa80156105ae5783906105b9575b61032791506064359073ffffffffffffffffffffffffffffffffffffffff339116610817565b604051927f70a0823100000000000000000000000000000000000000000000000000000000845230600485015260208460248173ffffffffffffffffffffffffffffffffffffffff85165afa9384156105ae578394610576575b5073ffffffffffffffffffffffffffffffffffffffff60c435163b15610567576040517fa59f3e0c00000000000000000000000000000000000000000000000000000000815284600482015283816024818373ffffffffffffffffffffffffffffffffffffffff60c435165af1801561056b5785918591610550575b50506104229173ffffffffffffffffffffffffffffffffffffffff60c4359116610817565b73ffffffffffffffffffffffffffffffffffffffff60c435163b1561054c57604051907f658c31970000000000000000000000000000000000000000000000000000000082523360048301523360248301528360448301521515606482015281816084818373ffffffffffffffffffffffffffffffffffffffff60c435165af180156105415761052a575b6020837fbcf1a322b81fabc86c87e213c2f09770a10f5fe67c30cc51de6e8fb498dd841160a08773ffffffffffffffffffffffffffffffffffffffff604051913383521685820152606435604082015273ffffffffffffffffffffffffffffffffffffffff60c435166060820152836080820152a1604051908152f35b61053482916107c2565b61053e57806104ad565b80fd5b6040513d84823e3d90fd5b5080fd5b61055b9192506107c2565b6105675783835f6103fd565b8280fd5b6040513d86823e3d90fd5b9093506020813d6020116105a6575b81610592602093836107d6565b810103126105a25751925f610381565b5f80fd5b3d9150610585565b6040513d85823e3d90fd5b506020813d602011610602575b816105d3602093836107d6565b81010312610567575173ffffffffffffffffffffffffffffffffffffffff811681036105675761032790610301565b3d91506105c6565b610613906107c2565b61054c57815f6102ad565b73ffffffffffffffffffffffffffffffffffffffff84163b156105a2576040517f4bf1836900000000000000000000000000000000000000000000000000000000815260643560048201525f816024818373ffffffffffffffffffffffffffffffffffffffff8a165af180156106ac57610699575b50610327565b6106a49192506107c2565b5f905f610693565b6040513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60046040517fae728894000000000000000000000000000000000000000000000000000000008152fd5b60046040517f27e8975b000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011610762575b81610753602093836107d6565b810103126105a257515f6101a1565b3d9150610746565b60046040517fbcd2e19d000000000000000000000000000000000000000000000000000000008152fd5b5060203d6020116107bb575b806107ae60209260806107d6565b126105a257608051610144565b503d6107a0565b67ffffffffffffffff81116106b757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106b757604052565b9173ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000006020850152166024830152604482015260448152608081019181831067ffffffffffffffff8411176106b75761088a9260405261088c565b565b5f73ffffffffffffffffffffffffffffffffffffffff8192169260208151910182855af13d1561097b573d67ffffffffffffffff81116106b757610910916040519161090060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846107d6565b82523d5f602084013e5b83610987565b8051908115159182610957575b50506109265750565b602490604051907f5274afe70000000000000000000000000000000000000000000000000000000082526004820152fd5b81925090602091810103126105a257602001518015908115036105a2575f8061091d565b6109109060609061090a565b906109c6575080511561099c57805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580610a1e575b6109d7575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b156109cf56fea26469706673582212204f4270c47883de81f8fbb0beb700247abab8e576bd274acfe241f6729c5f7be064736f6c63430008190033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.