ETH Price: $3,205.72 (-3.62%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x68747470225482832025-05-23 21:36:11201 days ago1748036171IN
Level Money: lvlwaUSDT Token
0 ETH0.000052962
0x68747470225479112025-05-23 20:21:11201 days ago1748031671IN
Level Money: lvlwaUSDT Token
0 ETH0.000052962
0x68747470225475432025-05-23 19:06:11201 days ago1748027171IN
Level Money: lvlwaUSDT Token
0 ETH0.000052962
0x68747470224134982025-05-04 22:54:35220 days ago1746399275IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224131302025-05-04 21:40:11220 days ago1746394811IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224127362025-05-04 20:20:23220 days ago1746390023IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224123402025-05-04 19:00:11220 days ago1746385211IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224119452025-05-04 17:41:11220 days ago1746380471IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224115752025-05-04 16:26:59220 days ago1746376019IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224112012025-05-04 15:11:23220 days ago1746371483IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224108312025-05-04 13:56:11220 days ago1746366971IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224104602025-05-04 12:41:23220 days ago1746362483IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224100932025-05-04 11:26:35220 days ago1746357995IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224097222025-05-04 10:11:47220 days ago1746353507IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224093502025-05-04 8:56:47220 days ago1746349007IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224089822025-05-04 7:41:47220 days ago1746344507IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224086092025-05-04 6:26:35221 days ago1746339995IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224082362025-05-04 5:11:35221 days ago1746335495IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224078652025-05-04 3:56:47221 days ago1746331007IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
0x68747470224074962025-05-04 2:42:11221 days ago1746326531IN
Level Money: lvlwaUSDT Token
0 ETH0.000022941
Deposit For217018162025-01-25 13:28:11319 days ago1737811691IN
Level Money: lvlwaUSDT Token
0 ETH0.000966396.61488113
Transfer Admin211593212024-11-10 19:19:59395 days ago1731266399IN
Level Money: lvlwaUSDT Token
0 ETH0.0022430331.07691934
Grant Role211593212024-11-10 19:19:59395 days ago1731266399IN
Level Money: lvlwaUSDT Token
0 ETH0.0015359431.07691934

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
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:
WrappedRebasingERC20

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: BUSL-1.1
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Wrapper.sol)

pragma solidity ^0.8.20;

import {IERC20, IERC20Metadata, ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./auth/v5/SingleAdminAccessControl.sol";
import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol";
import "./interfaces/aave/IRewardsController.sol";

/**
 * @dev Extension of the ERC-20 token contract to support token wrapping.
 *
 * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful
 * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the
 * wrapping of an existing "basic" ERC-20 into a governance token.
 *
 * WARNING: Any mechanism in which the underlying token changes the {balanceOf} of an account without an explicit transfer
 * may desynchronize this contract's supply and its underlying balance. Please exercise caution when wrapping tokens that
 * may undercollateralize the wrapper (i.e. wrapper's total supply is higher than its underlying balance). See {claimAllRewards}
 * for recovering value accrued to the wrapper.
 */
contract WrappedRebasingERC20 is ERC20, SingleAdminAccessControl {
    using SafeERC20 for IERC20;
    IERC20 private immutable _underlying;

    bytes32 public RECOVERER_ROLE = keccak256("RECOVERER_ROLE");

    /**
     * @dev The underlying token couldn't be wrapped.
     */
    error ERC20InvalidUnderlying(address token);

    constructor(
        IERC20 underlyingToken,
        string memory name,
        string memory symbol
    ) ERC20(name, symbol) {
        if (underlyingToken == this) {
            revert ERC20InvalidUnderlying(address(this));
        }
        _underlying = underlyingToken;
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /**
     * @dev See {ERC20-decimals}.
     */
    function decimals() public view virtual override returns (uint8) {
        try IERC20Metadata(address(_underlying)).decimals() returns (
            uint8 value
        ) {
            return value;
        } catch {
            return super.decimals();
        }
    }

    /**
     * @dev Returns the address of the underlying ERC-20 token that is being wrapped.
     */
    function underlying() public view returns (IERC20) {
        return _underlying;
    }

    /**
     * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens.
     */
    function depositFor(
        address account,
        uint256 value
    ) public virtual returns (bool) {
        address sender = _msgSender();
        if (sender == address(this)) {
            revert IERC20Errors.ERC20InvalidSender(address(this));
        }
        if (account == address(this)) {
            revert IERC20Errors.ERC20InvalidReceiver(account);
        }
        SafeERC20.safeTransferFrom(_underlying, sender, address(this), value);
        _mint(account, value);
        return true;
    }

    /**
     * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens.
     */
    function withdrawTo(
        address account,
        uint256 value
    ) public virtual returns (bool) {
        if (account == address(this)) {
            revert IERC20Errors.ERC20InvalidReceiver(account);
        }
        _burn(_msgSender(), value);
        SafeERC20.safeTransfer(_underlying, account, value);
        return true;
    }

    /**
     * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake or acquired from
     * rebasing mechanisms. Internal function that can be exposed with access control if desired.
     */
    function recoverUnderlying()
        external
        onlyRole(RECOVERER_ROLE)
        returns (uint256)
    {
        address sender = _msgSender();
        uint256 value = _underlying.balanceOf(address(this)) - totalSupply();
        if (value > 0) {
            SafeERC20.safeTransfer(_underlying, sender, value);
        }
        return value;
    }

    /**
     * @dev Recover any ERC20 tokens that were accidentally sent to this contract.
     * Can only be called by admin. Cannot recover the underlying token - use claimAllRewards() for that.
     * @param tokenAddress The token contract address to recover
     * @param tokenReceiver The address to send the tokens to
     * @param tokenAmount The amount of tokens to recover
     */
    function transferERC20(
        address tokenAddress,
        address tokenReceiver,
        uint256 tokenAmount
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(
            tokenAddress != address(_underlying),
            "Use recover instead of transferERC20 to recover underlying."
        );
        require(tokenReceiver != address(0), "Invalid recipient");
        IERC20(tokenAddress).safeTransfer(tokenReceiver, tokenAmount);
    }

    /**
     * @dev Recover ETH that was accidentally sent to this contract.
     * Can only be called by admin.
     * @param _to The address to send the ETH to
     */
    function transferEth(
        address payable _to,
        uint256 _amount
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        (bool success, ) = _to.call{value: _amount}("");
        require(success, "Failed to send Ether");
    }

    /**
     * @dev Claim Aave rewards
     * @param rewardsController Aave rewards controller contract
     * @param assets tokens to claim
     * @param to The address to send the rewards to
     */
    function claimAllRewards(
        address rewardsController,
        address[] calldata assets,
        address to
    )
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
        returns (address[] memory rewardsList, uint256[] memory claimedAmounts)
    {
        return
            IRewardsController(rewardsController).claimAllRewards(assets, to);
    }
}

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

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

// 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: GPL-3.0
pragma solidity >=0.8.19;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/interfaces/IERC5313.sol";
import "../../interfaces/ISingleAdminAccessControl.sol";

/**
 * @title SingleAdminAccessControl
 * @notice SingleAdminAccessControl is a contract that provides a single admin role with timelock
 * @notice This contract is a simplified alternative to OpenZeppelin's AccessControlDefaultAdminRules
 * @dev Added 3-day timelock for admin transfers
 */
abstract contract SingleAdminAccessControl is
    IERC5313,
    ISingleAdminAccessControl,
    AccessControl
{
    address private _currentDefaultAdmin;
    address private _pendingDefaultAdmin;

    // New variables for timelock
    uint256 public constant TIMELOCK_DELAY = 3 days;
    uint256 private _transferRequestTime;

    error TimelockNotExpired(uint256 remainingTime);
    error NoActiveTransferRequest();
    error TransferAlreadyInProgress();

    // Add this event to ISingleAdminAccessControl.sol
    event AdminTransferCancelled(
        address indexed currentAdmin,
        address indexed pendingAdmin
    );

    modifier notAdmin(bytes32 role) {
        if (role == DEFAULT_ADMIN_ROLE) revert InvalidAdminChange();
        _;
    }

    /// @notice Transfer the admin role to a new address
    /// @notice This can ONLY be executed by the current admin
    /// @notice Initiates a transfer request with a 3-day timelock
    /// @param newAdmin address of the new admin
    function transferAdmin(
        address newAdmin
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (newAdmin == msg.sender) revert InvalidAdminChange();
        if (newAdmin == address(0)) revert InvalidAdminChange();
        if (_transferRequestTime != 0) revert TransferAlreadyInProgress();

        _pendingDefaultAdmin = newAdmin;
        _transferRequestTime = block.timestamp;

        emit AdminTransferRequested(_currentDefaultAdmin, newAdmin);
    }

    /// @notice Cancel a pending admin transfer request
    /// @notice Can only be called by the current admin
    function cancelTransferAdmin() external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_pendingDefaultAdmin == address(0))
            revert NoActiveTransferRequest();

        delete _pendingDefaultAdmin;
        delete _transferRequestTime;

        emit AdminTransferCancelled(_currentDefaultAdmin, _pendingDefaultAdmin);
    }

    /// @notice Accept the admin role transfer after timelock expires
    /// @notice Can only be called by the pending admin after the timelock period
    function acceptAdmin() external {
        if (msg.sender != _pendingDefaultAdmin) revert NotPendingAdmin();
        if (_transferRequestTime == 0) revert NoActiveTransferRequest();

        uint256 timeElapsed = block.timestamp - _transferRequestTime;
        if (timeElapsed < TIMELOCK_DELAY) {
            revert TimelockNotExpired(TIMELOCK_DELAY - timeElapsed);
        }

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /// @notice Check the remaining time until a transfer can be accepted
    /// @return remaining time in seconds, 0 if no active transfer or if timelock has expired
    function getTransferTimelockStatus() external view returns (uint256) {
        if (_pendingDefaultAdmin == address(0) || _transferRequestTime == 0) {
            return 0;
        }

        uint256 timeElapsed = block.timestamp - _transferRequestTime;
        if (timeElapsed >= TIMELOCK_DELAY) {
            return 0;
        }

        return TIMELOCK_DELAY - timeElapsed;
    }

    /// @notice grant a role
    /// @notice can only be executed by the current single admin
    /// @notice admin role cannot be granted externally
    /// @param role bytes32
    /// @param account address
    function grantRole(
        bytes32 role,
        address account
    ) public override onlyRole(DEFAULT_ADMIN_ROLE) notAdmin(role) {
        _grantRole(role, account);
    }

    /// @notice revoke a role
    /// @notice can only be executed by the current admin
    /// @notice admin role cannot be revoked
    /// @param role bytes32
    /// @param account address
    function revokeRole(
        bytes32 role,
        address account
    ) public override onlyRole(DEFAULT_ADMIN_ROLE) notAdmin(role) {
        _revokeRole(role, account);
    }

    /// @notice renounce the role of msg.sender
    /// @notice admin role cannot be renounced
    /// @param role bytes32
    /// @param account address
    function renounceRole(
        bytes32 role,
        address account
    ) public virtual override notAdmin(role) {
        super.renounceRole(role, account);
    }

    /**
     * @dev See {IERC5313-owner}.
     */
    function owner() public view virtual returns (address) {
        return _currentDefaultAdmin;
    }

    /**
     * @notice no way to change admin without removing old admin first
     */
    function _grantRole(
        bytes32 role,
        address account
    ) internal override returns (bool) {
        if (role == DEFAULT_ADMIN_ROLE) {
            emit AdminTransferred(_currentDefaultAdmin, account);
            _revokeRole(DEFAULT_ADMIN_ROLE, _currentDefaultAdmin);
            _currentDefaultAdmin = account;
            delete _pendingDefaultAdmin;
            delete _transferRequestTime;
        }
        return super._grantRole(role, account);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.10;

import {IRewardsDistributor} from "./IRewardsDistributor.sol";
import {ITransferStrategyBase} from "./ITransferStrategyBase.sol";
import {IEACAggregatorProxy} from "./IEACAggregatorProxy.sol";
import {RewardsDataTypes} from "./RewardsDataTypes.sol";

/**
 * @title IRewardsController
 * @author Aave
 * @notice Defines the basic interface for a Rewards Controller.
 */
interface IRewardsController is IRewardsDistributor {
    /**
     * @dev Emitted when a new address is whitelisted as claimer of rewards on behalf of a user
     * @param user The address of the user
     * @param claimer The address of the claimer
     */
    event ClaimerSet(address indexed user, address indexed claimer);

    /**
     * @dev Emitted when rewards are claimed
     * @param user The address of the user rewards has been claimed on behalf of
     * @param reward The address of the token reward is claimed
     * @param to The address of the receiver of the rewards
     * @param claimer The address of the claimer
     * @param amount The amount of rewards claimed
     */
    event RewardsClaimed(
        address indexed user,
        address indexed reward,
        address indexed to,
        address claimer,
        uint256 amount
    );

    /**
     * @dev Emitted when a transfer strategy is installed for the reward distribution
     * @param reward The address of the token reward
     * @param transferStrategy The address of TransferStrategy contract
     */
    event TransferStrategyInstalled(
        address indexed reward,
        address indexed transferStrategy
    );

    /**
     * @dev Emitted when the reward oracle is updated
     * @param reward The address of the token reward
     * @param rewardOracle The address of oracle
     */
    event RewardOracleUpdated(
        address indexed reward,
        address indexed rewardOracle
    );

    /**
     * @dev Whitelists an address to claim the rewards on behalf of another address
     * @param user The address of the user
     * @param claimer The address of the claimer
     */
    function setClaimer(address user, address claimer) external;

    /**
     * @dev Sets a TransferStrategy logic contract that determines the logic of the rewards transfer
     * @param reward The address of the reward token
     * @param transferStrategy The address of the TransferStrategy logic contract
     */
    function setTransferStrategy(
        address reward,
        ITransferStrategyBase transferStrategy
    ) external;

    /**
     * @dev Sets an Aave Oracle contract to enforce rewards with a source of value.
     * @notice At the moment of reward configuration, the Incentives Controller performs
     * a check to see if the reward asset oracle is compatible with IEACAggregator proxy.
     * This check is enforced for integrators to be able to show incentives at
     * the current Aave UI without the need to setup an external price registry
     * @param reward The address of the reward to set the price aggregator
     * @param rewardOracle The address of price aggregator that follows IEACAggregatorProxy interface
     */
    function setRewardOracle(
        address reward,
        IEACAggregatorProxy rewardOracle
    ) external;

    /**
     * @dev Get the price aggregator oracle address
     * @param reward The address of the reward
     * @return The price oracle of the reward
     */
    function getRewardOracle(address reward) external view returns (address);

    /**
     * @dev Returns the whitelisted claimer for a certain address (0x0 if not set)
     * @param user The address of the user
     * @return The claimer address
     */
    function getClaimer(address user) external view returns (address);

    /**
     * @dev Returns the Transfer Strategy implementation contract address being used for a reward address
     * @param reward The address of the reward
     * @return The address of the TransferStrategy contract
     */
    function getTransferStrategy(
        address reward
    ) external view returns (address);

    /**
     * @dev Configure assets to incentivize with an emission of rewards per second until the end of distribution.
     * @param config The assets configuration input, the list of structs contains the following fields:
     *   uint104 emissionPerSecond: The emission per second following rewards unit decimals.
     *   uint256 totalSupply: The total supply of the asset to incentivize
     *   uint40 distributionEnd: The end of the distribution of the incentives for an asset
     *   address asset: The asset address to incentivize
     *   address reward: The reward token address
     *   ITransferStrategy transferStrategy: The TransferStrategy address with the install hook and claim logic.
     *   IEACAggregatorProxy rewardOracle: The Price Oracle of a reward to visualize the incentives at the UI Frontend.
     *                                     Must follow Chainlink Aggregator IEACAggregatorProxy interface to be compatible.
     */
    function configureAssets(
        RewardsDataTypes.RewardsConfigInput[] memory config
    ) external;

    /**
     * @dev Called by the corresponding asset on transfer hook in order to update the rewards distribution.
     * @dev The units of `totalSupply` and `userBalance` should be the same.
     * @param user The address of the user whose asset balance has changed
     * @param totalSupply The total supply of the asset prior to user balance change
     * @param userBalance The previous user balance prior to balance change
     **/
    function handleAction(
        address user,
        uint256 totalSupply,
        uint256 userBalance
    ) external;

    /**
     * @dev Claims reward for a user to the desired address, on all the assets of the pool, accumulating the pending rewards
     * @param assets List of assets to check eligible distributions before claiming rewards
     * @param amount The amount of rewards to claim
     * @param to The address that will be receiving the rewards
     * @param reward The address of the reward token
     * @return The amount of rewards claimed
     **/
    function claimRewards(
        address[] calldata assets,
        uint256 amount,
        address to,
        address reward
    ) external returns (uint256);

    /**
     * @dev Claims reward for a user on behalf, on all the assets of the pool, accumulating the pending rewards. The
     * caller must be whitelisted via "allowClaimOnBehalf" function by the RewardsAdmin role manager
     * @param assets The list of assets to check eligible distributions before claiming rewards
     * @param amount The amount of rewards to claim
     * @param user The address to check and claim rewards
     * @param to The address that will be receiving the rewards
     * @param reward The address of the reward token
     * @return The amount of rewards claimed
     **/
    function claimRewardsOnBehalf(
        address[] calldata assets,
        uint256 amount,
        address user,
        address to,
        address reward
    ) external returns (uint256);

    /**
     * @dev Claims reward for msg.sender, on all the assets of the pool, accumulating the pending rewards
     * @param assets The list of assets to check eligible distributions before claiming rewards
     * @param amount The amount of rewards to claim
     * @param reward The address of the reward token
     * @return The amount of rewards claimed
     **/
    function claimRewardsToSelf(
        address[] calldata assets,
        uint256 amount,
        address reward
    ) external returns (uint256);

    /**
     * @dev Claims all rewards for a user to the desired address, on all the assets of the pool, accumulating the pending rewards
     * @param assets The list of assets to check eligible distributions before claiming rewards
     * @param to The address that will be receiving the rewards
     * @return rewardsList List of addresses of the reward tokens
     * @return claimedAmounts List that contains the claimed amount per reward, following same order as "rewardList"
     **/
    function claimAllRewards(
        address[] calldata assets,
        address to
    )
        external
        returns (address[] memory rewardsList, uint256[] memory claimedAmounts);

    /**
     * @dev Claims all rewards for a user on behalf, on all the assets of the pool, accumulating the pending rewards. The caller must
     * be whitelisted via "allowClaimOnBehalf" function by the RewardsAdmin role manager
     * @param assets The list of assets to check eligible distributions before claiming rewards
     * @param user The address to check and claim rewards
     * @param to The address that will be receiving the rewards
     * @return rewardsList List of addresses of the reward tokens
     * @return claimedAmounts List that contains the claimed amount per reward, following same order as "rewardsList"
     **/
    function claimAllRewardsOnBehalf(
        address[] calldata assets,
        address user,
        address to
    )
        external
        returns (address[] memory rewardsList, uint256[] memory claimedAmounts);

    /**
     * @dev Claims all reward for msg.sender, on all the assets of the pool, accumulating the pending rewards
     * @param assets The list of assets to check eligible distributions before claiming rewards
     * @return rewardsList List of addresses of the reward tokens
     * @return claimedAmounts List that contains the claimed amount per reward, following same order as "rewardsList"
     **/
    function claimAllRewardsToSelf(
        address[] calldata assets
    )
        external
        returns (address[] memory rewardsList, uint256[] memory claimedAmounts);
}

// 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/IERC20Metadata.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// 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();
        }
    }
}

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

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 13 of 21 : IERC5313.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface for the Light Contract Ownership Standard.
 *
 * A standardized minimal interface required to identify an account that controls a contract
 */
interface IERC5313 {
    /**
     * @dev Gets the address of the owner.
     */
    function owner() external view returns (address);
}

File 14 of 21 : ISingleAdminAccessControl.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface ISingleAdminAccessControl {
    error InvalidAdminChange();
    error NotPendingAdmin();

    event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);
    event AdminTransferRequested(
        address indexed oldAdmin,
        address indexed newAdmin
    );
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.10;

/**
 * @title IRewardsDistributor
 * @author Aave
 * @notice Defines the basic interface for a Rewards Distributor.
 */
interface IRewardsDistributor {
    /**
     * @dev Emitted when the configuration of the rewards of an asset is updated.
     * @param asset The address of the incentivized asset
     * @param reward The address of the reward token
     * @param oldEmission The old emissions per second value of the reward distribution
     * @param newEmission The new emissions per second value of the reward distribution
     * @param oldDistributionEnd The old end timestamp of the reward distribution
     * @param newDistributionEnd The new end timestamp of the reward distribution
     * @param assetIndex The index of the asset distribution
     */
    event AssetConfigUpdated(
        address indexed asset,
        address indexed reward,
        uint256 oldEmission,
        uint256 newEmission,
        uint256 oldDistributionEnd,
        uint256 newDistributionEnd,
        uint256 assetIndex
    );

    /**
     * @dev Emitted when rewards of an asset are accrued on behalf of a user.
     * @param asset The address of the incentivized asset
     * @param reward The address of the reward token
     * @param user The address of the user that rewards are accrued on behalf of
     * @param assetIndex The index of the asset distribution
     * @param userIndex The index of the asset distribution on behalf of the user
     * @param rewardsAccrued The amount of rewards accrued
     */
    event Accrued(
        address indexed asset,
        address indexed reward,
        address indexed user,
        uint256 assetIndex,
        uint256 userIndex,
        uint256 rewardsAccrued
    );

    /**
     * @dev Sets the end date for the distribution
     * @param asset The asset to incentivize
     * @param reward The reward token that incentives the asset
     * @param newDistributionEnd The end date of the incentivization, in unix time format
     **/
    function setDistributionEnd(
        address asset,
        address reward,
        uint32 newDistributionEnd
    ) external;

    /**
     * @dev Sets the emission per second of a set of reward distributions
     * @param asset The asset is being incentivized
     * @param rewards List of reward addresses are being distributed
     * @param newEmissionsPerSecond List of new reward emissions per second
     */
    function setEmissionPerSecond(
        address asset,
        address[] calldata rewards,
        uint88[] calldata newEmissionsPerSecond
    ) external;

    /**
     * @dev Gets the end date for the distribution
     * @param asset The incentivized asset
     * @param reward The reward token of the incentivized asset
     * @return The timestamp with the end of the distribution, in unix time format
     **/
    function getDistributionEnd(
        address asset,
        address reward
    ) external view returns (uint256);

    /**
     * @dev Returns the index of a user on a reward distribution
     * @param user Address of the user
     * @param asset The incentivized asset
     * @param reward The reward token of the incentivized asset
     * @return The current user asset index, not including new distributions
     **/
    function getUserAssetIndex(
        address user,
        address asset,
        address reward
    ) external view returns (uint256);

    /**
     * @dev Returns the configuration of the distribution reward for a certain asset
     * @param asset The incentivized asset
     * @param reward The reward token of the incentivized asset
     * @return The index of the asset distribution
     * @return The emission per second of the reward distribution
     * @return The timestamp of the last update of the index
     * @return The timestamp of the distribution end
     **/
    function getRewardsData(
        address asset,
        address reward
    ) external view returns (uint256, uint256, uint256, uint256);

    /**
     * @dev Calculates the next value of an specific distribution index, with validations.
     * @param asset The incentivized asset
     * @param reward The reward token of the incentivized asset
     * @return The old index of the asset distribution
     * @return The new index of the asset distribution
     **/
    function getAssetIndex(
        address asset,
        address reward
    ) external view returns (uint256, uint256);

    /**
     * @dev Returns the list of available reward token addresses of an incentivized asset
     * @param asset The incentivized asset
     * @return List of rewards addresses of the input asset
     **/
    function getRewardsByAsset(
        address asset
    ) external view returns (address[] memory);

    /**
     * @dev Returns the list of available reward addresses
     * @return List of rewards supported in this contract
     **/
    function getRewardsList() external view returns (address[] memory);

    /**
     * @dev Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.
     * @param user The address of the user
     * @param reward The address of the reward token
     * @return Unclaimed rewards, not including new distributions
     **/
    function getUserAccruedRewards(
        address user,
        address reward
    ) external view returns (uint256);

    /**
     * @dev Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.
     * @param assets List of incentivized assets to check eligible distributions
     * @param user The address of the user
     * @param reward The address of the reward token
     * @return The rewards amount
     **/
    function getUserRewards(
        address[] calldata assets,
        address user,
        address reward
    ) external view returns (uint256);

    /**
     * @dev Returns a list all rewards of a user, including already accrued and unrealized claimable rewards
     * @param assets List of incentivized assets to check eligible distributions
     * @param user The address of the user
     * @return The list of reward addresses
     * @return The list of unclaimed amount of rewards
     **/
    function getAllUserRewards(
        address[] calldata assets,
        address user
    ) external view returns (address[] memory, uint256[] memory);

    /**
     * @dev Returns the decimals of an asset to calculate the distribution delta
     * @param asset The address to retrieve decimals
     * @return The decimals of an underlying asset
     */
    function getAssetDecimals(address asset) external view returns (uint8);

    /**
     * @dev Returns the address of the emission manager
     * @return The address of the EmissionManager
     */
    function EMISSION_MANAGER() external view returns (address);

    /**
     * @dev Returns the address of the emission manager.
     * Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.
     * @return The address of the EmissionManager
     */
    function getEmissionManager() external view returns (address);
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.10;

interface ITransferStrategyBase {
    event EmergencyWithdrawal(
        address indexed caller,
        address indexed token,
        address indexed to,
        uint256 amount
    );

    /**
     * @dev Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation
     * @param to Account to transfer rewards
     * @param reward Address of the reward token
     * @param amount Amount to transfer to the "to" address parameter
     * @return Returns true bool if transfer logic succeeds
     */
    function performTransfer(
        address to,
        address reward,
        uint256 amount
    ) external returns (bool);

    /**
     * @return Returns the address of the Incentives Controller
     */
    function getIncentivesController() external view returns (address);

    /**
     * @return Returns the address of the Rewards admin
     */
    function getRewardsAdmin() external view returns (address);

    /**
     * @dev Perform an emergency token withdrawal only callable by the Rewards admin
     * @param token Address of the token to withdraw funds from this contract
     * @param to Address of the recipient of the withdrawal
     * @param amount Amount of the withdrawal
     */
    function emergencyWithdrawal(
        address token,
        address to,
        uint256 amount
    ) external;
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.10;

interface IEACAggregatorProxy {
    function decimals() external view returns (uint8);

    function latestAnswer() external view returns (int256);

    function latestTimestamp() external view returns (uint256);

    function latestRound() external view returns (uint256);

    function getAnswer(uint256 roundId) external view returns (int256);

    function getTimestamp(uint256 roundId) external view returns (uint256);

    event AnswerUpdated(
        int256 indexed current,
        uint256 indexed roundId,
        uint256 timestamp
    );
    event NewRound(uint256 indexed roundId, address indexed startedBy);
}

File 18 of 21 : RewardsDataTypes.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.10;

import {ITransferStrategyBase} from "./ITransferStrategyBase.sol";
import {IEACAggregatorProxy} from "./IEACAggregatorProxy.sol";

library RewardsDataTypes {
    struct RewardsConfigInput {
        uint88 emissionPerSecond;
        uint256 totalSupply;
        uint32 distributionEnd;
        address asset;
        address reward;
        ITransferStrategyBase transferStrategy;
        IEACAggregatorProxy rewardOracle;
    }

    struct UserAssetBalance {
        address asset;
        uint256 userBalance;
        uint256 totalSupply;
    }

    struct UserData {
        // Liquidity index of the reward distribution for the user
        uint104 index;
        // Amount of accrued rewards for the user since last user index update
        uint128 accrued;
    }

    struct RewardData {
        // Liquidity index of the reward distribution
        uint104 index;
        // Amount of reward tokens distributed per second
        uint88 emissionPerSecond;
        // Timestamp of the last reward index update
        uint32 lastUpdateTimestamp;
        // The end of the distribution of rewards (in seconds)
        uint32 distributionEnd;
        // Map of user addresses and their rewards data (userAddress => userData)
        mapping(address => UserData) usersData;
    }

    struct AssetData {
        // Map of reward token addresses and their data (rewardTokenAddress => rewardData)
        mapping(address => RewardData) rewards;
        // List of reward token addresses for the asset
        mapping(uint128 => address) availableRewards;
        // Count of reward tokens for the asset
        uint128 availableRewardsCount;
        // Number of decimals of the asset
        uint8 decimals;
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

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

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "ds-test/=lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin-4.9.0/contracts/=lib/openzeppelin-contracts-4.9.0/contracts/",
    "@solmate/=lib/solmate/",
    "aave-v3-core/=lib/aave-v3-core/",
    "erc4626-tests/=lib/openzeppelin-contracts-4.9.0/lib/erc4626-tests/",
    "openzeppelin-contracts-4.9.0/=lib/openzeppelin-contracts-4.9.0/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-4.9.0/contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20","name":"underlyingToken","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"ERC20InvalidUnderlying","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidAdminChange","type":"error"},{"inputs":[],"name":"NoActiveTransferRequest","type":"error"},{"inputs":[],"name":"NotPendingAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"uint256","name":"remainingTime","type":"uint256"}],"name":"TimelockNotExpired","type":"error"},{"inputs":[],"name":"TransferAlreadyInProgress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currentAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"pendingAdmin","type":"address"}],"name":"AdminTransferCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECOVERER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIMELOCK_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelTransferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"rewardsController","type":"address"},{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"address","name":"to","type":"address"}],"name":"claimAllRewards","outputs":[{"internalType":"address[]","name":"rewardsList","type":"address[]"},{"internalType":"uint256[]","name":"claimedAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"depositFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferTimelockStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoverUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"tokenReceiver","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"transferERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"withdrawTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60a06040527fb3e25b5404b87e5a838579cb5d7481d61ad96ee284d38ec1e97c07ba64e7f6fc600955348015610033575f80fd5b50604051611f16380380611f1683398101604081905261005291610322565b818160036100608382610422565b50600461006d8282610422565b5050306001600160a01b0385160390506100a05760405163438d6fe360e01b815230600482015260240160405180910390fd5b6001600160a01b0383166080526100b75f336100c0565b505050506104e1565b5f82610143576006546040516001600160a01b038085169216907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6905f90a3600654610116905f906001600160a01b0316610156565b50600680546001600160a01b0384166001600160a01b0319918216179091556007805490911690555f6008555b61014d83836101e2565b90505b92915050565b5f8281526005602090815260408083206001600160a01b038516845290915281205460ff16156101db575f8381526005602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610150565b505f610150565b5f8281526005602090815260408083206001600160a01b038516845290915281205460ff166101db575f8381526005602090815260408083206001600160a01b03861684529091529020805460ff1916600117905561023e3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610150565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126102a9575f80fd5b81516001600160401b03808211156102c3576102c3610286565b604051601f8301601f19908116603f011681019082821181831017156102eb576102eb610286565b81604052838152866020858801011115610303575f80fd5b8360208701602083015e5f602085830101528094505050505092915050565b5f805f60608486031215610334575f80fd5b83516001600160a01b038116811461034a575f80fd5b60208501519093506001600160401b0380821115610366575f80fd5b6103728783880161029a565b93506040860151915080821115610387575f80fd5b506103948682870161029a565b9150509250925092565b600181811c908216806103b257607f821691505b6020821081036103d057634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561041d57805f5260205f20601f840160051c810160208510156103fb5750805b601f840160051c820191505b8181101561041a575f8155600101610407565b50505b505050565b81516001600160401b0381111561043b5761043b610286565b61044f81610449845461039e565b846103d6565b602080601f831160018114610482575f841561046b5750858301515b5f19600386901b1c1916600185901b1785556104d9565b5f85815260208120601f198616915b828110156104b057888601518255948401946001909101908401610491565b50858210156104cd57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b6080516119f36105235f395f81816102f00152818161061e015281816107090152818161073d01528181610a1801528181610b570152610bdf01526119f35ff3fe608060405234801561000f575f80fd5b50600436106101d1575f3560e01c806370a08231116100fe578063a217fddf1161009e578063b55dd2561161006e578063b55dd256146103ee578063d547741f146103f6578063dd62ed3e14610409578063e9bb84c214610441575f80fd5b8063a217fddf146103c3578063a9059cbb146103ca578063acf1c948146103dd578063b2de2a43146103e6575f80fd5b80638da5cb5b116100d95780638da5cb5b1461038457806391d148541461039557806395d89b41146103a85780639db5dbe4146103b0575f80fd5b806370a082311461032857806375829def146103505780638491ba3c14610363575f80fd5b8063248a9ca31161017457806336568abe1161014457806336568abe146102c95780635ba1c1a9146102dc578063662d2ebf146102e65780636f307dc3146102ee575f80fd5b8063248a9ca3146102675780632f2ff15d146102895780632f4f21e21461029c578063313ce567146102af575f80fd5b80630e18b681116101af5780630e18b6811461022557806318160ddd1461022f578063205c28781461024157806323b872dd14610254575f80fd5b806301ffc9a7146101d557806306fdde03146101fd578063095ea7b314610212575b5f80fd5b6101e86101e3366004611470565b610454565b60405190151581526020015b60405180910390f35b61020561048a565b6040516101f49190611497565b6101e86102203660046114e0565b61051a565b61022d610531565b005b6002545b6040519081526020016101f4565b6101e861024f3660046114e0565b6105da565b6101e861026236600461150a565b61064d565b610233610275366004611548565b5f9081526005602052604090206001015490565b61022d61029736600461155f565b610672565b6101e86102aa3660046114e0565b6106ac565b6102b761073a565b60405160ff90911681526020016101f4565b61022d6102d736600461155f565b6107c4565b6102336203f48081565b61022d6107f2565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016101f4565b61023361033636600461158d565b6001600160a01b03165f9081526020819052604090205490565b61022d61035e36600461158d565b610875565b6103766103713660046115a8565b610946565b6040516101f492919061163c565b6006546001600160a01b0316610310565b6101e86103a336600461155f565b6109d3565b6102056109fd565b61022d6103be36600461150a565b610a0c565b6102335f81565b6101e86103d83660046114e0565b610b21565b61023360095481565b610233610b2e565b610233610c0c565b61022d61040436600461155f565b610c65565b6102336104173660046116be565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61022d61044f3660046114e0565b610c98565b5f6001600160e01b03198216637965db0b60e01b148061048457506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060038054610499906116ea565b80601f01602080910402602001604051908101604052809291908181526020018280546104c5906116ea565b80156105105780601f106104e757610100808354040283529160200191610510565b820191905f5260205f20905b8154815290600101906020018083116104f357829003601f168201915b5050505050905090565b5f33610527818585610d38565b5060019392505050565b6007546001600160a01b0316331461055c5760405163058d9a1b60e01b815260040160405180910390fd5b6008545f0361057e57604051632becf27f60e21b815260040160405180910390fd5b5f6008544261058d9190611736565b90506203f4808110156105cc576105a7816203f480611736565b6040516396a5c63160e01b81526004016105c391815260200190565b60405180910390fd5b6105d65f33610d45565b5050565b5f306001600160a01b0384160361060f5760405163ec442f0560e01b81526001600160a01b03841660048201526024016105c3565b6106193383610dd2565b6106447f00000000000000000000000000000000000000000000000000000000000000008484610e06565b50600192915050565b5f3361065a858285610e65565b610665858585610eda565b60019150505b9392505050565b5f61067c81610f37565b828061069b5760405163318bd07d60e11b815260040160405180910390fd5b6106a58484610d45565b5050505050565b5f333081036106d057604051634b637e8f60e11b81523060048201526024016105c3565b306001600160a01b038516036107045760405163ec442f0560e01b81526001600160a01b03851660048201526024016105c3565b6107307f0000000000000000000000000000000000000000000000000000000000000000823086610f44565b6105278484610f7d565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156107b5575060408051601f3d908101601f191682019092526107b291810190611749565b60015b6107bf5750601290565b919050565b81806107e35760405163318bd07d60e11b815260040160405180910390fd5b6107ed8383610fb1565b505050565b5f6107fc81610f37565b6007546001600160a01b031661082557604051632becf27f60e21b815260040160405180910390fd5b600780546001600160a01b03191690555f60088190556006546040516001600160a01b03909116907f3793833b9ab43215ac21b7766b4196d31276ccf43ec6edeade82fbd6946aac0a908390a350565b5f61087f81610f37565b336001600160a01b038316036108a85760405163318bd07d60e11b815260040160405180910390fd5b6001600160a01b0382166108cf5760405163318bd07d60e11b815260040160405180910390fd5b600854156108f057604051633a76bcd760e11b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0384811691821790925542600855600654604051919216907fefdcbba819467e00b0262c12892dda980bac68580b72178e57a162368b808766905f90a35050565b6060805f61095381610f37565b60405163bb492bf560e01b81526001600160a01b0388169063bb492bf59061098390899089908990600401611769565b5f604051808303815f875af115801561099e573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526109c5919081019061189f565b925092505094509492505050565b5f9182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060048054610499906116ea565b5f610a1681610f37565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610abd5760405162461bcd60e51b815260206004820152603b60248201527f557365207265636f76657220696e7374656164206f66207472616e736665724560448201527f5243323020746f207265636f76657220756e6465726c79696e672e000000000060648201526084016105c3565b6001600160a01b038316610b075760405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b60448201526064016105c3565b610b1b6001600160a01b0385168484610e06565b50505050565b5f33610527818585610eda565b5f600954610b3b81610f37565b60025433905f906040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610ba4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc8919061195e565b610bd29190611736565b90508015610c0557610c057f00000000000000000000000000000000000000000000000000000000000000008383610e06565b9250505090565b6007545f906001600160a01b03161580610c265750600854155b15610c3057505f90565b5f60085442610c3f9190611736565b90506203f4808110610c52575f91505090565b610c5f816203f480611736565b91505090565b5f610c6f81610f37565b8280610c8e5760405163318bd07d60e11b815260040160405180910390fd5b6106a58484610fe0565b5f610ca281610f37565b5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610ceb576040519150601f19603f3d011682016040523d82523d5f602084013e610cf0565b606091505b5050905080610b1b5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064016105c3565b6107ed8383836001611052565b5f82610dc8576006546040516001600160a01b038085169216907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6905f90a3600654610d9b905f906001600160a01b0316610fe0565b50600680546001600160a01b0384166001600160a01b0319918216179091556007805490911690555f6008555b61066b8383611124565b6001600160a01b038216610dfb57604051634b637e8f60e11b81525f60048201526024016105c3565b6105d6825f836111ae565b6040516001600160a01b038381166024830152604482018390526107ed91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506112d4565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114610b1b5781811015610ecc57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105c3565b610b1b84848484035f611052565b6001600160a01b038316610f0357604051634b637e8f60e11b81525f60048201526024016105c3565b6001600160a01b038216610f2c5760405163ec442f0560e01b81525f60048201526024016105c3565b6107ed8383836111ae565b610f418133611335565b50565b6040516001600160a01b038481166024830152838116604483015260648201839052610b1b9186918216906323b872dd90608401610e33565b6001600160a01b038216610fa65760405163ec442f0560e01b81525f60048201526024016105c3565b6105d65f83836111ae565b6001600160a01b0381163314610fda5760405163334bd91960e11b815260040160405180910390fd5b6107ed82825b5f610feb83836109d3565b1561104b575f8381526005602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610484565b505f610484565b6001600160a01b03841661107b5760405163e602df0560e01b81525f60048201526024016105c3565b6001600160a01b0383166110a457604051634a1406b160e11b81525f60048201526024016105c3565b6001600160a01b038085165f9081526001602090815260408083209387168352929052208290558015610b1b57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161111691815260200190565b60405180910390a350505050565b5f61112f83836109d3565b61104b575f8381526005602090815260408083206001600160a01b03861684529091529020805460ff191660011790556111663390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610484565b6001600160a01b0383166111d8578060025f8282546111cd9190611975565b909155506112489050565b6001600160a01b0383165f908152602081905260409020548181101561122a5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016105c3565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661126457600280548290039055611282565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112c791815260200190565b60405180910390a3505050565b5f6112e86001600160a01b0384168361136e565b905080515f1415801561130c57508080602001905181019061130a9190611988565b155b156107ed57604051635274afe760e01b81526001600160a01b03841660048201526024016105c3565b61133f82826109d3565b6105d65760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016105c3565b606061066b83835f845f80856001600160a01b0316848660405161139291906119a7565b5f6040518083038185875af1925050503d805f81146113cc576040519150601f19603f3d011682016040523d82523d5f602084013e6113d1565b606091505b50915091506113e18683836113eb565b9695505050505050565b606082611400576113fb82611447565b61066b565b815115801561141757506001600160a01b0384163b155b1561144057604051639996b31560e01b81526001600160a01b03851660048201526024016105c3565b508061066b565b8051156114575780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f60208284031215611480575f80fd5b81356001600160e01b03198116811461066b575f80fd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b0381168114610f41575f80fd5b5f80604083850312156114f1575f80fd5b82356114fc816114cc565b946020939093013593505050565b5f805f6060848603121561151c575f80fd5b8335611527816114cc565b92506020840135611537816114cc565b929592945050506040919091013590565b5f60208284031215611558575f80fd5b5035919050565b5f8060408385031215611570575f80fd5b823591506020830135611582816114cc565b809150509250929050565b5f6020828403121561159d575f80fd5b813561066b816114cc565b5f805f80606085870312156115bb575f80fd5b84356115c6816114cc565b9350602085013567ffffffffffffffff808211156115e2575f80fd5b818701915087601f8301126115f5575f80fd5b813581811115611603575f80fd5b8860208260051b8501011115611617575f80fd5b6020830195508094505050506040850135611631816114cc565b939692955090935050565b604080825283519082018190525f906020906060840190828701845b8281101561167d5781516001600160a01b031684529284019290840190600101611658565b505050838103828501528451808252858301918301905f5b818110156116b157835183529284019291840191600101611695565b5090979650505050505050565b5f80604083850312156116cf575f80fd5b82356116da816114cc565b91506020830135611582816114cc565b600181811c908216806116fe57607f821691505b60208210810361171c57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561048457610484611722565b5f60208284031215611759575f80fd5b815160ff8116811461066b575f80fd5b604080825281018390525f8460608301825b868110156117ab57823561178e816114cc565b6001600160a01b031682526020928301929091019060010161177b565b506001600160a01b03949094166020939093019290925250909392505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611808576118086117cb565b604052919050565b5f67ffffffffffffffff821115611829576118296117cb565b5060051b60200190565b5f82601f830112611842575f80fd5b8151602061185761185283611810565b6117df565b8083825260208201915060208460051b870101935086841115611878575f80fd5b602086015b84811015611894578051835291830191830161187d565b509695505050505050565b5f80604083850312156118b0575f80fd5b825167ffffffffffffffff808211156118c7575f80fd5b818501915085601f8301126118da575f80fd5b815160206118ea61185283611810565b82815260059290921b84018101918181019089841115611908575f80fd5b948201945b8386101561192f578551611920816114cc565b8252948201949082019061190d565b91880151919650909350505080821115611947575f80fd5b5061195485828601611833565b9150509250929050565b5f6020828403121561196e575f80fd5b5051919050565b8082018082111561048457610484611722565b5f60208284031215611998575f80fd5b8151801515811461066b575f80fd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220c98ed3a361fbf9c139af95a873470b0bbc953b280d755037848cc07bcbc2904564736f6c6343000819003300000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000134c6576656c20577261707065642061555344540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096c766c7761555344540000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106101d1575f3560e01c806370a08231116100fe578063a217fddf1161009e578063b55dd2561161006e578063b55dd256146103ee578063d547741f146103f6578063dd62ed3e14610409578063e9bb84c214610441575f80fd5b8063a217fddf146103c3578063a9059cbb146103ca578063acf1c948146103dd578063b2de2a43146103e6575f80fd5b80638da5cb5b116100d95780638da5cb5b1461038457806391d148541461039557806395d89b41146103a85780639db5dbe4146103b0575f80fd5b806370a082311461032857806375829def146103505780638491ba3c14610363575f80fd5b8063248a9ca31161017457806336568abe1161014457806336568abe146102c95780635ba1c1a9146102dc578063662d2ebf146102e65780636f307dc3146102ee575f80fd5b8063248a9ca3146102675780632f2ff15d146102895780632f4f21e21461029c578063313ce567146102af575f80fd5b80630e18b681116101af5780630e18b6811461022557806318160ddd1461022f578063205c28781461024157806323b872dd14610254575f80fd5b806301ffc9a7146101d557806306fdde03146101fd578063095ea7b314610212575b5f80fd5b6101e86101e3366004611470565b610454565b60405190151581526020015b60405180910390f35b61020561048a565b6040516101f49190611497565b6101e86102203660046114e0565b61051a565b61022d610531565b005b6002545b6040519081526020016101f4565b6101e861024f3660046114e0565b6105da565b6101e861026236600461150a565b61064d565b610233610275366004611548565b5f9081526005602052604090206001015490565b61022d61029736600461155f565b610672565b6101e86102aa3660046114e0565b6106ac565b6102b761073a565b60405160ff90911681526020016101f4565b61022d6102d736600461155f565b6107c4565b6102336203f48081565b61022d6107f2565b7f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a5b6040516001600160a01b0390911681526020016101f4565b61023361033636600461158d565b6001600160a01b03165f9081526020819052604090205490565b61022d61035e36600461158d565b610875565b6103766103713660046115a8565b610946565b6040516101f492919061163c565b6006546001600160a01b0316610310565b6101e86103a336600461155f565b6109d3565b6102056109fd565b61022d6103be36600461150a565b610a0c565b6102335f81565b6101e86103d83660046114e0565b610b21565b61023360095481565b610233610b2e565b610233610c0c565b61022d61040436600461155f565b610c65565b6102336104173660046116be565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61022d61044f3660046114e0565b610c98565b5f6001600160e01b03198216637965db0b60e01b148061048457506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060038054610499906116ea565b80601f01602080910402602001604051908101604052809291908181526020018280546104c5906116ea565b80156105105780601f106104e757610100808354040283529160200191610510565b820191905f5260205f20905b8154815290600101906020018083116104f357829003601f168201915b5050505050905090565b5f33610527818585610d38565b5060019392505050565b6007546001600160a01b0316331461055c5760405163058d9a1b60e01b815260040160405180910390fd5b6008545f0361057e57604051632becf27f60e21b815260040160405180910390fd5b5f6008544261058d9190611736565b90506203f4808110156105cc576105a7816203f480611736565b6040516396a5c63160e01b81526004016105c391815260200190565b60405180910390fd5b6105d65f33610d45565b5050565b5f306001600160a01b0384160361060f5760405163ec442f0560e01b81526001600160a01b03841660048201526024016105c3565b6106193383610dd2565b6106447f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a8484610e06565b50600192915050565b5f3361065a858285610e65565b610665858585610eda565b60019150505b9392505050565b5f61067c81610f37565b828061069b5760405163318bd07d60e11b815260040160405180910390fd5b6106a58484610d45565b5050505050565b5f333081036106d057604051634b637e8f60e11b81523060048201526024016105c3565b306001600160a01b038516036107045760405163ec442f0560e01b81526001600160a01b03851660048201526024016105c3565b6107307f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a823086610f44565b6105278484610f7d565b5f7f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a6001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156107b5575060408051601f3d908101601f191682019092526107b291810190611749565b60015b6107bf5750601290565b919050565b81806107e35760405163318bd07d60e11b815260040160405180910390fd5b6107ed8383610fb1565b505050565b5f6107fc81610f37565b6007546001600160a01b031661082557604051632becf27f60e21b815260040160405180910390fd5b600780546001600160a01b03191690555f60088190556006546040516001600160a01b03909116907f3793833b9ab43215ac21b7766b4196d31276ccf43ec6edeade82fbd6946aac0a908390a350565b5f61087f81610f37565b336001600160a01b038316036108a85760405163318bd07d60e11b815260040160405180910390fd5b6001600160a01b0382166108cf5760405163318bd07d60e11b815260040160405180910390fd5b600854156108f057604051633a76bcd760e11b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0384811691821790925542600855600654604051919216907fefdcbba819467e00b0262c12892dda980bac68580b72178e57a162368b808766905f90a35050565b6060805f61095381610f37565b60405163bb492bf560e01b81526001600160a01b0388169063bb492bf59061098390899089908990600401611769565b5f604051808303815f875af115801561099e573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526109c5919081019061189f565b925092505094509492505050565b5f9182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060048054610499906116ea565b5f610a1681610f37565b7f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a6001600160a01b0316846001600160a01b031603610abd5760405162461bcd60e51b815260206004820152603b60248201527f557365207265636f76657220696e7374656164206f66207472616e736665724560448201527f5243323020746f207265636f76657220756e6465726c79696e672e000000000060648201526084016105c3565b6001600160a01b038316610b075760405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b60448201526064016105c3565b610b1b6001600160a01b0385168484610e06565b50505050565b5f33610527818585610eda565b5f600954610b3b81610f37565b60025433905f906040516370a0823160e01b81523060048201527f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a6001600160a01b0316906370a0823190602401602060405180830381865afa158015610ba4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc8919061195e565b610bd29190611736565b90508015610c0557610c057f00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a8383610e06565b9250505090565b6007545f906001600160a01b03161580610c265750600854155b15610c3057505f90565b5f60085442610c3f9190611736565b90506203f4808110610c52575f91505090565b610c5f816203f480611736565b91505090565b5f610c6f81610f37565b8280610c8e5760405163318bd07d60e11b815260040160405180910390fd5b6106a58484610fe0565b5f610ca281610f37565b5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610ceb576040519150601f19603f3d011682016040523d82523d5f602084013e610cf0565b606091505b5050905080610b1b5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064016105c3565b6107ed8383836001611052565b5f82610dc8576006546040516001600160a01b038085169216907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6905f90a3600654610d9b905f906001600160a01b0316610fe0565b50600680546001600160a01b0384166001600160a01b0319918216179091556007805490911690555f6008555b61066b8383611124565b6001600160a01b038216610dfb57604051634b637e8f60e11b81525f60048201526024016105c3565b6105d6825f836111ae565b6040516001600160a01b038381166024830152604482018390526107ed91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506112d4565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114610b1b5781811015610ecc57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105c3565b610b1b84848484035f611052565b6001600160a01b038316610f0357604051634b637e8f60e11b81525f60048201526024016105c3565b6001600160a01b038216610f2c5760405163ec442f0560e01b81525f60048201526024016105c3565b6107ed8383836111ae565b610f418133611335565b50565b6040516001600160a01b038481166024830152838116604483015260648201839052610b1b9186918216906323b872dd90608401610e33565b6001600160a01b038216610fa65760405163ec442f0560e01b81525f60048201526024016105c3565b6105d65f83836111ae565b6001600160a01b0381163314610fda5760405163334bd91960e11b815260040160405180910390fd5b6107ed82825b5f610feb83836109d3565b1561104b575f8381526005602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610484565b505f610484565b6001600160a01b03841661107b5760405163e602df0560e01b81525f60048201526024016105c3565b6001600160a01b0383166110a457604051634a1406b160e11b81525f60048201526024016105c3565b6001600160a01b038085165f9081526001602090815260408083209387168352929052208290558015610b1b57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161111691815260200190565b60405180910390a350505050565b5f61112f83836109d3565b61104b575f8381526005602090815260408083206001600160a01b03861684529091529020805460ff191660011790556111663390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610484565b6001600160a01b0383166111d8578060025f8282546111cd9190611975565b909155506112489050565b6001600160a01b0383165f908152602081905260409020548181101561122a5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016105c3565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661126457600280548290039055611282565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112c791815260200190565b60405180910390a3505050565b5f6112e86001600160a01b0384168361136e565b905080515f1415801561130c57508080602001905181019061130a9190611988565b155b156107ed57604051635274afe760e01b81526001600160a01b03841660048201526024016105c3565b61133f82826109d3565b6105d65760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016105c3565b606061066b83835f845f80856001600160a01b0316848660405161139291906119a7565b5f6040518083038185875af1925050503d805f81146113cc576040519150601f19603f3d011682016040523d82523d5f602084013e6113d1565b606091505b50915091506113e18683836113eb565b9695505050505050565b606082611400576113fb82611447565b61066b565b815115801561141757506001600160a01b0384163b155b1561144057604051639996b31560e01b81526001600160a01b03851660048201526024016105c3565b508061066b565b8051156114575780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f60208284031215611480575f80fd5b81356001600160e01b03198116811461066b575f80fd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b0381168114610f41575f80fd5b5f80604083850312156114f1575f80fd5b82356114fc816114cc565b946020939093013593505050565b5f805f6060848603121561151c575f80fd5b8335611527816114cc565b92506020840135611537816114cc565b929592945050506040919091013590565b5f60208284031215611558575f80fd5b5035919050565b5f8060408385031215611570575f80fd5b823591506020830135611582816114cc565b809150509250929050565b5f6020828403121561159d575f80fd5b813561066b816114cc565b5f805f80606085870312156115bb575f80fd5b84356115c6816114cc565b9350602085013567ffffffffffffffff808211156115e2575f80fd5b818701915087601f8301126115f5575f80fd5b813581811115611603575f80fd5b8860208260051b8501011115611617575f80fd5b6020830195508094505050506040850135611631816114cc565b939692955090935050565b604080825283519082018190525f906020906060840190828701845b8281101561167d5781516001600160a01b031684529284019290840190600101611658565b505050838103828501528451808252858301918301905f5b818110156116b157835183529284019291840191600101611695565b5090979650505050505050565b5f80604083850312156116cf575f80fd5b82356116da816114cc565b91506020830135611582816114cc565b600181811c908216806116fe57607f821691505b60208210810361171c57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561048457610484611722565b5f60208284031215611759575f80fd5b815160ff8116811461066b575f80fd5b604080825281018390525f8460608301825b868110156117ab57823561178e816114cc565b6001600160a01b031682526020928301929091019060010161177b565b506001600160a01b03949094166020939093019290925250909392505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611808576118086117cb565b604052919050565b5f67ffffffffffffffff821115611829576118296117cb565b5060051b60200190565b5f82601f830112611842575f80fd5b8151602061185761185283611810565b6117df565b8083825260208201915060208460051b870101935086841115611878575f80fd5b602086015b84811015611894578051835291830191830161187d565b509695505050505050565b5f80604083850312156118b0575f80fd5b825167ffffffffffffffff808211156118c7575f80fd5b818501915085601f8301126118da575f80fd5b815160206118ea61185283611810565b82815260059290921b84018101918181019089841115611908575f80fd5b948201945b8386101561192f578551611920816114cc565b8252948201949082019061190d565b91880151919650909350505080821115611947575f80fd5b5061195485828601611833565b9150509250929050565b5f6020828403121561196e575f80fd5b5051919050565b8082018082111561048457610484611722565b5f60208284031215611998575f80fd5b8151801515811461066b575f80fd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220c98ed3a361fbf9c139af95a873470b0bbc953b280d755037848cc07bcbc2904564736f6c63430008190033

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

00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000134c6576656c20577261707065642061555344540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096c766c7761555344540000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : underlyingToken (address): 0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a
Arg [1] : name (string): Level Wrapped aUSDT
Arg [2] : symbol (string): lvlwaUSDT

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000023878914efe38d27c4d67ab83ed1b93a74d4086a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [4] : 4c6576656c205772617070656420615553445400000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [6] : 6c766c7761555344540000000000000000000000000000000000000000000000


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.