ETH Price: $2,002.39 (+1.97%)
 

Overview

Max Total Supply

1,019.30196543368651916 flETH

Holders

1,058 (0.00%)

Transfers

-
11,101 ( 101.21%)

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

flayer: A novel NFT liquidity protocol.

Contract Source Code Verified (Exact Match)

Contract Name:
flETH

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

import {Ownable} from '@solady/auth/Ownable.sol';

import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';

import {IFLETH} from '@fleth-interfaces/IFLETH.sol';
import {IFLETHStrategy} from '@fleth-interfaces/IFLETHStrategy.sol';
import {IWETH} from '@fleth-interfaces/IWETH.sol';


/**
 * The flETH token.

   ______/\\\\\__/\\\\\\_____/\\\\\\\\\\\\\\\__/\\\\\\\\\\\\\\\___/\\\________/\\\__________
   _____/\\\///__\////\\\____\/\\\///////////__\///////\\\/////___\/\\\_______\/\\\_________
   _____/\\\_________\/\\\____\/\\\___________________\/\\\________\/\\\_______\/\\\________
   ___/\\\\\\\\\______\/\\\____\/\\\\\\\\\\\___________\/\\\________\/\\\\\\\\\\\\\\\_______
   ___\////\\\//_______\/\\\____\/\\\///////____________\/\\\________\/\\\/////////\\\______
   _______\/\\\_________\/\\\____\/\\\___________________\/\\\________\/\\\_______\/\\\_____
   ________\/\\\_________\/\\\____\/\\\___________________\/\\\________\/\\\_______\/\\\____
   _________\/\\\_______/\\\\\\\\\_\/\\\\\\\\\\\\\\\_______\/\\\________\/\\\_______\/\\\___
   __________\///_______\/////////__\///////////////________\///_________\///________\///___

 */
contract flETH is IFLETH, ERC20, Ownable {

    error YieldReceiverIsZero();
    error RebalanceThresholdExceedsMax();

    /// The WETH token address
    IWETH public immutable override weth;

    /// A raw ETH balance of say 10% and above that should trigger rebalance into LSTs
    uint public override rebalanceThreshold = 0.10 ether; // 10%

    /// The maximum rebalance threshold value
    uint internal constant MAX_REBALANCE_THRESHOLD = 1 ether;

    /// The FLETH strategy being used to generate yield
    IFLETHStrategy public override strategy;

    /// The recipient address for any yield generated
    address public yieldReceiver;

    /**
     * Set up our contract dependencies and initialise our flETH ERC20.
     *
     * @param weth_ The WETH token address
     * @param yieldReceiver_ The recipient address of yield
     */
    constructor (IWETH weth_, address yieldReceiver_) ERC20('flETH', 'flETH') {
        weth = weth_;

        // Ensure that our yield receiver is a non-zero address and set it
        if (yieldReceiver_ == address(0)) revert YieldReceiverIsZero();
        yieldReceiver = yieldReceiver_;

        // Set our {Ownable} owner address
        _initializeOwner(msg.sender);
    }

    /**
     * Makes a deposit into the contract, taking ETH and/or WETH and returning flETH.
     *
     * @dev This function can receive ETH and will give an amount of flETH equal to ETH + WETH.
     *
     * @param wethAmount The amount of WETH to transfer into the function
     */
    function deposit(uint wethAmount) external payable override {
        uint ethToDeposit = msg.value;

        // If we have WETH specified, then transfer it into the contract and unwrap into ETH
        if (wethAmount != 0) {
            weth.transferFrom(msg.sender, address(this), wethAmount);
            weth.withdraw(wethAmount);
            ethToDeposit += wethAmount;
        }

        _mintFLETHAndRebalance(msg.sender, ethToDeposit);
    }

    /**
     * Rebalances our position against our strategy.
     */
    function rebalance() public override {
        // If we don't have a strategy, or it is currently unwinding, then we can't process further
        if (address(strategy) == address(0) || strategy.isUnwinding()) return;

        uint ethBalance = address(this).balance;
        uint ethThreshold = (rebalanceThreshold * totalSupply()) / 1 ether;

        // If the raw ETH balance is more than the threshold, convert the excess to LSTs
        if (ethBalance > ethThreshold) {
            unchecked {
                strategy.convertETHToLST{value: ethBalance - ethThreshold}();
            }
        }
    }

    /**
     * Withdraw ETH by sending in flETH.
     */
    function withdraw(uint amount) external override {
        // Burn flETH tokens. This will lower the total supply.
        _burn(msg.sender, amount);

        // Capture the current ETH balance held by the contract
        uint currentEthBalance = address(this).balance;

        // Check if we are requesting more ETH than is currently held in the contract
        if (amount > currentEthBalance) {
            // This is only possible when the strategy exists
            if (address(strategy) == address(0))
                revert AmountExceedsETHBalance();

            // We are forced to withdraw from the strategy in this case. So withdawing more such
            // that the raw eth balance stays at the threshold, post withdrawal.
            uint newTotalSupply = totalSupply();
            uint expectedNewEthBalance;
            unchecked {
                expectedNewEthBalance = (rebalanceThreshold * newTotalSupply) / 1 ether;
            }

            // If the new ETH balance should be less than the current ETH balance, then this
            // contract can transfer some ETH directly to the user and only the remaining amount
            // is withdrawn from the strategy.
            if (expectedNewEthBalance <= currentEthBalance) {
                // The amount of raw ETH to directly transfer to the user
                uint rawEthToTransfer;
                unchecked {
                    rawEthToTransfer = currentEthBalance - expectedNewEthBalance;
                }

                // Get the remaining amount to withdraw from the strategy
                uint strategyETHToWithdraw = amount - rawEthToTransfer;

                // Transfer the raw ETH to the user
                _transferETH(msg.sender, rawEthToTransfer);

                // Transfer the remaining amount from the strategy to the user
                strategy.withdrawETH(strategyETHToWithdraw, msg.sender);
            }
            // If the new ETH balance should be more than the current ETH balance, we need to
            // withdraw the entire amount from the strategy to:
            // 1. Bring the raw ETH balance to the threshold
            // 2. Also to also fulfill the user's request
            else {
                uint rawEthRequiredToReachThreshold = expectedNewEthBalance - currentEthBalance;

                // Withdraw ETH to this contract
                strategy.withdrawETH(amount + rawEthRequiredToReachThreshold, address(this));

                // Transferring the requested amount to the user, leaving the raw ETH balance
                // at the threshold.
                _transferETH(msg.sender, amount);
            }
        } else {
            // If the amount to withdraw is less than the current ETH balance, then the contract
            // can directly transfer the ETH to the user.
            _transferETH(msg.sender, amount);
        }
    }

    /**
     * Harvest yield from the strategy and send it to our yield recipient
     */
    function harvest() external override {
        uint ethYield = yieldAccumulated();
        uint strategyETHBalance = strategy.balanceInETH();

        // If strategy has enough balance, then withdraw from there
        if (strategyETHBalance >= ethYield) {
            strategy.withdrawETH(ethYield, yieldReceiver);
        } else {
            // Otherwise, withdraw the remaining from the raw ETH balance
            uint delta = ethYield - strategyETHBalance;
            strategy.withdrawETH(strategyETHBalance, yieldReceiver);
            _transferETH(yieldReceiver, delta);
        }
    }

    /**
     * Helper function to find the amount of yield accumulated.
     *
     * @return uint Yield accumulated
     */
    function yieldAccumulated() public view override returns (uint) {
        // `totalSupply` represents the total ETH deposited by the users
        return underlyingETHBalance() - totalSupply();
    }

    /**
     * Finds the amount of underlying ETH balance by finding current held amounts, as well as the
     * amount held in the strategy.
     *
     * @return uint The amount of underlying ETH held
     */
    function underlyingETHBalance() public view override returns (uint) {
        return address(this).balance + strategy.balanceInETH();
    }

    /**
     * The owner of the contract that has {Ownable} permissions.
     */
    function owner() public view override(IFLETH, Ownable) returns (address) {
        return Ownable.owner();
    }

    /**
     * Override to return true to make `_initializeOwner` prevent double-initialization.
     *
     * @return bool Set to `true` to prevent owner being reinitialized.
     */
    function _guardInitializeOwner() internal pure override returns (bool) {
        return true;
    }

    /**
     * Mints the flETH token to the receiver and rebalances our strategy position.
     *
     * @param receiver The recipient of the {flETH} token(s)
     * @param amount The amount of {flETH} to mint
     */
    function _mintFLETHAndRebalance(address receiver, uint amount) internal {
        _mint(receiver, amount);
        rebalance();
    }

    /**
     * Transfers ETH to the `receiver`, ensuring that the call is successful.
     *
     * @param receiver The recipient of the ETH
     * @param amount The amount of ETH to transfer
     */
    function _transferETH(address receiver, uint amount) internal {
        (bool success, ) = receiver.call{value: amount}('');
        if (!success) revert UnableToSendETH();
    }

    /**
     * Allows the `rebalanceThreshold` to be updated by the contract owner.
     *
     * @param rebalanceThreshold_ The new `rebalanceThreshold` value
     */
    function setRebalanceThreshold(uint rebalanceThreshold_) external override onlyOwner {
        if (rebalanceThreshold_ > MAX_REBALANCE_THRESHOLD) revert RebalanceThresholdExceedsMax();
        rebalanceThreshold = rebalanceThreshold_;
    }

    /**
     * Allows the `yieldReceiver` to be updated by the contract owner.
     *
     * @param yieldReceiver_ The new `yieldReceiver` address
     */
    function setYieldReceiver(address yieldReceiver_) external override onlyOwner {
        if (yieldReceiver_ == address(0)) revert YieldReceiverIsZero();
        yieldReceiver = yieldReceiver_;
    }

    /**
     * Allows the strategy to be updated. This validates that there is no ETH currently held in
     * the strategy to prevent loss of ETH.
     *
     * @param strategy_ The new {IFLETHStrategy} strategy to be used
     */
    function changeStrategy(IFLETHStrategy strategy_) external override onlyOwner {
        if (address(strategy) != address(0) && strategy.balanceInETH() != 0) {
            revert CurrentStrategyHasBalance();
        }

        strategy = strategy_;
    }

    /**
     * Allows potentially trapped ETH funds to be rescued from the contract.
     *
     * @param amount The amount of ETH to rescue
     */
    function emergencyRescue(uint amount) external override onlyOwner {
        _transferETH(msg.sender, amount);
    }

    /**
     * Receives ETH from contracts like WETH and strategy.
     */
    receive() external payable {}

}

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

/// @notice Simple single owner authorization mixin.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol)
///
/// @dev Note:
/// This implementation does NOT auto-initialize the owner to `msg.sender`.
/// You MUST call the `_initializeOwner` in the constructor / initializer.
///
/// While the ownable portion follows
/// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility,
/// the nomenclature for the 2-step ownership handover may be unique to this codebase.
abstract contract Ownable {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The caller is not authorized to call the function.
    error Unauthorized();

    /// @dev The `newOwner` cannot be the zero address.
    error NewOwnerIsZeroAddress();

    /// @dev The `pendingOwner` does not have a valid handover request.
    error NoHandoverRequest();

    /// @dev Cannot double-initialize.
    error AlreadyInitialized();

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                           EVENTS                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The ownership is transferred from `oldOwner` to `newOwner`.
    /// This event is intentionally kept the same as OpenZeppelin's Ownable to be
    /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173),
    /// despite it not being as lightweight as a single argument event.
    event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);

    /// @dev An ownership handover to `pendingOwner` has been requested.
    event OwnershipHandoverRequested(address indexed pendingOwner);

    /// @dev The ownership handover to `pendingOwner` has been canceled.
    event OwnershipHandoverCanceled(address indexed pendingOwner);

    /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`.
    uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =
        0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;

    /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =
        0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;

    /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =
        0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          STORAGE                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The owner slot is given by:
    /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`.
    /// It is intentionally chosen to be a high value
    /// to avoid collision with lower slots.
    /// The choice of manual storage layout is to enable compatibility
    /// with both regular and upgradeable contracts.
    bytes32 internal constant _OWNER_SLOT =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927;

    /// The ownership handover slot of `newOwner` is given by:
    /// ```
    ///     mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED))
    ///     let handoverSlot := keccak256(0x00, 0x20)
    /// ```
    /// It stores the expiry timestamp of the two-step ownership handover.
    uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                     INTERNAL FUNCTIONS                     */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Override to return true to make `_initializeOwner` prevent double-initialization.
    function _guardInitializeOwner() internal pure virtual returns (bool guard) {}

    /// @dev Initializes the owner directly without authorization guard.
    /// This function must be called upon initialization,
    /// regardless of whether the contract is upgradeable or not.
    /// This is to enable generalization to both regular and upgradeable contracts,
    /// and to save gas in case the initial owner is not the caller.
    /// For performance reasons, this function will not check if there
    /// is an existing owner.
    function _initializeOwner(address newOwner) internal virtual {
        if (_guardInitializeOwner()) {
            /// @solidity memory-safe-assembly
            assembly {
                let ownerSlot := _OWNER_SLOT
                if sload(ownerSlot) {
                    mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`.
                    revert(0x1c, 0x04)
                }
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Store the new value.
                sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner))))
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
            }
        } else {
            /// @solidity memory-safe-assembly
            assembly {
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Store the new value.
                sstore(_OWNER_SLOT, newOwner)
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
            }
        }
    }

    /// @dev Sets the owner directly without authorization guard.
    function _setOwner(address newOwner) internal virtual {
        if (_guardInitializeOwner()) {
            /// @solidity memory-safe-assembly
            assembly {
                let ownerSlot := _OWNER_SLOT
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
                // Store the new value.
                sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner))))
            }
        } else {
            /// @solidity memory-safe-assembly
            assembly {
                let ownerSlot := _OWNER_SLOT
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
                // Store the new value.
                sstore(ownerSlot, newOwner)
            }
        }
    }

    /// @dev Throws if the sender is not the owner.
    function _checkOwner() internal view virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // If the caller is not the stored owner, revert.
            if iszero(eq(caller(), sload(_OWNER_SLOT))) {
                mstore(0x00, 0x82b42900) // `Unauthorized()`.
                revert(0x1c, 0x04)
            }
        }
    }

    /// @dev Returns how long a two-step ownership handover is valid for in seconds.
    /// Override to return a different value if needed.
    /// Made internal to conserve bytecode. Wrap it in a public function if needed.
    function _ownershipHandoverValidFor() internal view virtual returns (uint64) {
        return 48 * 3600;
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  PUBLIC UPDATE FUNCTIONS                   */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Allows the owner to transfer the ownership to `newOwner`.
    function transferOwnership(address newOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            if iszero(shl(96, newOwner)) {
                mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`.
                revert(0x1c, 0x04)
            }
        }
        _setOwner(newOwner);
    }

    /// @dev Allows the owner to renounce their ownership.
    function renounceOwnership() public payable virtual onlyOwner {
        _setOwner(address(0));
    }

    /// @dev Request a two-step ownership handover to the caller.
    /// The request will automatically expire in 48 hours (172800 seconds) by default.
    function requestOwnershipHandover() public payable virtual {
        unchecked {
            uint256 expires = block.timestamp + _ownershipHandoverValidFor();
            /// @solidity memory-safe-assembly
            assembly {
                // Compute and set the handover slot to `expires`.
                mstore(0x0c, _HANDOVER_SLOT_SEED)
                mstore(0x00, caller())
                sstore(keccak256(0x0c, 0x20), expires)
                // Emit the {OwnershipHandoverRequested} event.
                log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())
            }
        }
    }

    /// @dev Cancels the two-step ownership handover to the caller, if any.
    function cancelOwnershipHandover() public payable virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, caller())
            sstore(keccak256(0x0c, 0x20), 0)
            // Emit the {OwnershipHandoverCanceled} event.
            log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())
        }
    }

    /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`.
    /// Reverts if there is no existing ownership handover requested by `pendingOwner`.
    function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            let handoverSlot := keccak256(0x0c, 0x20)
            // If the handover does not exist, or has expired.
            if gt(timestamp(), sload(handoverSlot)) {
                mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`.
                revert(0x1c, 0x04)
            }
            // Set the handover slot to 0.
            sstore(handoverSlot, 0)
        }
        _setOwner(pendingOwner);
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                   PUBLIC READ FUNCTIONS                    */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns the owner of the contract.
    function owner() public view virtual returns (address result) {
        /// @solidity memory-safe-assembly
        assembly {
            result := sload(_OWNER_SLOT)
        }
    }

    /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.
    function ownershipHandoverExpiresAt(address pendingOwner)
        public
        view
        virtual
        returns (uint256 result)
    {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute the handover slot.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            // Load the handover slot.
            result := sload(keccak256(0x0c, 0x20))
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                         MODIFIERS                          */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Marks a function as only callable by the owner.
    modifier onlyOwner() virtual {
        _checkOwner();
        _;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.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 ERC-20
 * applications.
 */
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}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * 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:
     *
     * ```solidity
     * 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
pragma solidity ^0.8.22;

import {IFLETHStrategy} from "@fleth-interfaces/IFLETHStrategy.sol";
import {IWETH} from "@fleth-interfaces/IWETH.sol";

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

interface IFLETH is IERC20 {
    error UnableToSendETH();
    error CurrentStrategyHasBalance();
    error AmountExceedsETHBalance();

    function weth() external view returns (IWETH);

    function rebalanceThreshold() external view returns (uint256);

    function strategy() external view returns (IFLETHStrategy);

    function yieldReceiver() external view returns (address);

    function deposit(uint256 wethAmount) external payable;

    /**
     * @notice Rebalances ETH balance above the threshold into LSTs
     */
    function rebalance() external;

    function withdraw(uint256 amount) external;

    function harvest() external;

    function yieldAccumulated() external view returns (uint256);

    function underlyingETHBalance() external view returns (uint256);

    function owner() external view returns (address);

    function setRebalanceThreshold(uint256 rebalanceThreshold_) external;

    function setYieldReceiver(address yieldReceiver_) external;

    function changeStrategy(IFLETHStrategy strategy_) external;

    function emergencyRescue(uint256 amount) external;
}

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

interface IFLETHStrategy {
    /// @notice Returns true if the strategy is unwinding, and no new deposits are expected
    function isUnwinding() external view returns (bool);

    /// @notice Converts ETH to LSTs. The LSTs remain in the strategy contract
    function convertETHToLST() external payable;

    /// @notice Converts the strategy's LSTs into ETH and sends it to the receiver
    function withdrawETH(uint256 amount, address receiver) external;

    /// @notice The strategy's LST balance, converted to ETH
    function balanceInETH() external view returns (uint256);

    /// @notice Allows the owner to set the unwinding flag
    function setIsUnwinding(bool isUnwinding_) external;

    /// @notice Allows the owner to unwind the strategy in small amounts into ETH (to avoid price impact)
    function unwindToETH(uint256 ethAmount) external;

    function emergencyRescue() external;
}

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

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

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint wad) external;
}

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

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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.1.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 ERC-20 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.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 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 ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@solady/=lib/solady/src/",
    "@uniswap/v4-core/=lib/v4-core/",
    "@uniswap-periphery/=lib/v4-periphery/src/",
    "@aave/v3-core/=lib/aave-v3-core/contracts/",
    "@aave/v3-periphery/=lib/aave-v3-periphery/contracts/",
    "@aave/address-book/=lib/aave-address-book/src/",
    "@fleth/=src/",
    "@fleth-interfaces/=src/interfaces/",
    "@fleth-scripts/=script/",
    "@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
    "aave-address-book/=lib/aave-address-book/src/",
    "aave-v3-core/=lib/aave-v3-core/",
    "aave-v3-origin/=lib/aave-address-book/lib/aave-v3-origin/",
    "aave-v3-periphery/=lib/aave-v3-periphery/contracts/",
    "ds-test/=lib/v4-core/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/v4-periphery/lib/v4-core/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "hardhat/=lib/v4-core/node_modules/hardhat/",
    "openzeppelin-contracts-upgradeable/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "permit2/=lib/v4-periphery/lib/permit2/",
    "solady/=lib/solady/src/",
    "solidity-utils/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/",
    "solmate/=lib/v4-core/lib/solmate/",
    "v4-core/=lib/v4-core/src/",
    "v4-periphery/=lib/v4-periphery/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "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 IWETH","name":"weth_","type":"address"},{"internalType":"address","name":"yieldReceiver_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"AmountExceedsETHBalance","type":"error"},{"inputs":[],"name":"CurrentStrategyHasBalance","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":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"RebalanceThresholdExceedsMax","type":"error"},{"inputs":[],"name":"UnableToSendETH","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"YieldReceiverIsZero","type":"error"},{"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":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":[{"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":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IFLETHStrategy","name":"strategy_","type":"address"}],"name":"changeStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"wethAmount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyRescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rebalanceThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rebalanceThreshold_","type":"uint256"}],"name":"setRebalanceThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"yieldReceiver_","type":"address"}],"name":"setYieldReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IFLETHStrategy","name":"","type":"address"}],"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":"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"underlyingETHBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldAccumulated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405267016345785d8a000060055534801561001b575f80fd5b5060405161194138038061194183398101604081905261003a9161014c565b6040805180820182526005808252640ccd88aa8960db1b6020808401829052845180860190955291845290830152906003610075838261021c565b506004610082828261021c565b5050506001600160a01b0380831660805281166100b257604051631ecd712960e31b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0383161790556100d6336100dd565b50506102d6565b638b78c6d8198054156100f757630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b50565b6001600160a01b0381168114610135575f80fd5b5f806040838503121561015d575f80fd5b825161016881610138565b602084015190925061017981610138565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806101ac57607f821691505b6020821081036101ca57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561021757805f5260205f20601f840160051c810160208510156101f55750805b601f840160051c820191505b81811015610214575f8155600101610201565b50505b505050565b81516001600160401b0381111561023557610235610184565b610249816102438454610198565b846101d0565b6020601f82116001811461027b575f83156102645750848201515b5f19600385901b1c1916600184901b178455610214565b5f84815260208120601f198516915b828110156102aa578785015182556020948501946001909201910161028a565b50848210156102c757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6080516116456102fc5f395f81816102d301528181610cee0152610d9001526116455ff3fe6080604052600436106101c8575f3560e01c80637d7c2a1c116100f2578063b6b55f2511610092578063f04e283e11610062578063f04e283e146104da578063f2fde38b146104ed578063f8d2066514610500578063fee81cf41461051f575f80fd5b8063b6b55f2514610450578063be390e8c14610463578063dd62ed3e14610477578063ed6efec8146104bb575f80fd5b806395d89b41116100cd57806395d89b41146103ea57806397cecc86146103fe578063a8c62e7614610412578063a9059cbb14610431575f80fd5b80637d7c2a1c146103a35780638da5cb5b146103b75780638f8b6515146103cb575f80fd5b80633dfe9f6a11610168578063672634be11610138578063672634be1461032957806370a0823114610348578063715018a61461037c5780637a9024bd14610384575f80fd5b80633dfe9f6a146102ad5780633fc8cef3146102c25780634641257d1461030d57806354d1f13d14610321575f80fd5b806323b872dd116101a357806323b872dd1461024a57806325692962146102695780632e1a7d4d14610273578063313ce56714610292575f80fd5b806306fdde03146101d3578063095ea7b3146101fd57806318160ddd1461022c575f80fd5b366101cf57005b5f80fd5b3480156101de575f80fd5b506101e7610550565b6040516101f49190611425565b60405180910390f35b348015610208575f80fd5b5061021c61021736600461146e565b6105e0565b60405190151581526020016101f4565b348015610237575f80fd5b506002545b6040519081526020016101f4565b348015610255575f80fd5b5061021c610264366004611498565b6105f9565b61027161061c565b005b34801561027e575f80fd5b5061027161028d3660046114d6565b610669565b34801561029d575f80fd5b50604051601281526020016101f4565b3480156102b8575f80fd5b5061023c60055481565b3480156102cd575f80fd5b506102f57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f4565b348015610318575f80fd5b50610271610823565b61027161099f565b348015610334575f80fd5b506007546102f5906001600160a01b031681565b348015610353575f80fd5b5061023c6103623660046114ed565b6001600160a01b03165f9081526020819052604090205490565b6102716109d8565b34801561038f575f80fd5b5061027161039e3660046114ed565b6109eb565b3480156103ae575f80fd5b50610271610ae5565b3480156103c2575f80fd5b506102f5610c12565b3480156103d6575f80fd5b506102716103e53660046114d6565b610c25565b3480156103f5575f80fd5b506101e7610c74565b348015610409575f80fd5b5061023c610c83565b34801561041d575f80fd5b506006546102f5906001600160a01b031681565b34801561043c575f80fd5b5061021c61044b36600461146e565b610c9f565b61027161045e3660046114d6565b610cac565b34801561046e575f80fd5b5061023c610e08565b348015610482575f80fd5b5061023c61049136600461150f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b3480156104c6575f80fd5b506102716104d53660046114ed565b610e96565b6102716104e83660046114ed565b610f0d565b6102716104fb3660046114ed565b610f4a565b34801561050b575f80fd5b5061027161051a3660046114d6565b610f70565b34801561052a575f80fd5b5061023c6105393660046114ed565b63389a75e1600c9081525f91909152602090205490565b60606003805461055f90611546565b80601f016020809104026020016040519081016040528092919081815260200182805461058b90611546565b80156105d65780601f106105ad576101008083540402835291602001916105d6565b820191905f5260205f20905b8154815290600101906020018083116105b957829003601f168201915b5050505050905090565b5f336105ed818585610f82565b60019150505b92915050565b5f33610606858285610f8f565b610611858585611022565b506001949350505050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610673338261107f565b4780821115610815576006546001600160a01b03166106be576040517fbd42298500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6106c860025490565b90505f670de0b6b3a76400008260055402816106e6576106e661157e565b049050828111610770578083035f6106fe82876115a6565b905061070a33836110b3565b600654604051631b08c5a960e11b8152600481018390523360248201526001600160a01b03909116906336118b52906044015f604051808303815f87803b158015610753575f80fd5b505af1158015610765573d5f803e3d5ffd5b50505050505061080f565b5f61077b84836115a6565b6006549091506001600160a01b03166336118b5261079983886115b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091523060248201526044015f604051808303815f87803b1580156107ed575f80fd5b505af11580156107ff573d5f803e3d5ffd5b5050505061080d33866110b3565b505b50505050565b61081f33836110b3565b5050565b5f61082c610c83565b90505f60065f9054906101000a90046001600160a01b03166001600160a01b031663a303b72d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108a391906115cc565b905081811061091357600654600754604051631b08c5a960e11b8152600481018590526001600160a01b0391821660248201529116906336118b52906044015f604051808303815f87803b1580156108f9575f80fd5b505af115801561090b573d5f803e3d5ffd5b505050505050565b5f61091e82846115a6565b600654600754604051631b08c5a960e11b8152600481018690526001600160a01b03918216602482015292935016906336118b52906044015f604051808303815f87803b15801561096d575f80fd5b505af115801561097f573d5f803e3d5ffd5b505060075461099a92506001600160a01b03169050826110b3565b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6109e061113c565b6109e95f611156565b565b6109f361113c565b6006546001600160a01b031615801590610a7f575060065f9054906101000a90046001600160a01b03166001600160a01b031663a303b72d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a58573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a7c91906115cc565b15155b15610ab6576040517f5ae6ea7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6006546001600160a01b03161580610b6c575060065f9054906101000a90046001600160a01b03166001600160a01b0316639a9168ab6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b48573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b6c91906115e3565b15610b7357565b475f670de0b6b3a7640000610b8760025490565b600554610b949190611602565b610b9e9190611619565b90508082111561081f5760065f9054906101000a90046001600160a01b03166001600160a01b031663d2fd99408284036040518263ffffffff1660e01b81526004015f604051808303818588803b158015610bf7575f80fd5b505af1158015610c09573d5f803e3d5ffd5b50505050505050565b5f610c20638b78c6d8195490565b905090565b610c2d61113c565b670de0b6b3a7640000811115610c6f576040517f261c1b7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600555565b60606004805461055f90611546565b5f610c8d60025490565b610c95610e08565b610c2091906115a6565b5f336105ed818585611022565b348115610dfe576040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303815f875af1158015610d3c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d6091906115e3565b506040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015610dd9575f80fd5b505af1158015610deb573d5f803e3d5ffd5b505050508181610dfb91906115b9565b90505b61081f338261119c565b600654604080517fa303b72d00000000000000000000000000000000000000000000000000000000815290515f926001600160a01b03169163a303b72d9160048083019260209291908290030181865afa158015610e68573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e8c91906115cc565b610c2090476115b9565b610e9e61113c565b6001600160a01b038116610ede576040517ff66b894800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610f1561113c565b63389a75e1600c52805f526020600c208054421115610f3b57636f5e88185f526004601cfd5b5f9055610f4781611156565b50565b610f5261113c565b8060601b610f6757637448fbae5f526004601cfd5b610f4781611156565b610f7861113c565b610f4733826110b3565b61099a83838360016111ae565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461080f5781811015611014576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61080f84848484035f6111ae565b6001600160a01b03831661104b57604051634b637e8f60e11b81525f600482015260240161100b565b6001600160a01b0382166110745760405163ec442f0560e01b81525f600482015260240161100b565b61099a8383836112b2565b6001600160a01b0382166110a857604051634b637e8f60e11b81525f600482015260240161100b565b61081f825f836112b2565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f81146110fc576040519150601f19603f3d011682016040523d82523d5f602084013e611101565b606091505b505090508061099a576040517f4c1cfab600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b638b78c6d8195433146109e9576382b429005f526004601cfd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b6111a682826113f1565b61081f610ae5565b6001600160a01b0384166111f0576040517fe602df050000000000000000000000000000000000000000000000000000000081525f600482015260240161100b565b6001600160a01b038316611232576040517f94280d620000000000000000000000000000000000000000000000000000000081525f600482015260240161100b565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561080f57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516112a491815260200190565b60405180910390a350505050565b6001600160a01b0383166112dc578060025f8282546112d191906115b9565b909155506113659050565b6001600160a01b0383165f9081526020819052604090205481811015611347576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602481018290526044810183905260640161100b565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166113815760028054829003905561139f565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516113e491815260200190565b60405180910390a3505050565b6001600160a01b03821661141a5760405163ec442f0560e01b81525f600482015260240161100b565b61081f5f83836112b2565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b0381168114610f47575f80fd5b5f806040838503121561147f575f80fd5b823561148a8161145a565b946020939093013593505050565b5f805f606084860312156114aa575f80fd5b83356114b58161145a565b925060208401356114c58161145a565b929592945050506040919091013590565b5f602082840312156114e6575f80fd5b5035919050565b5f602082840312156114fd575f80fd5b81356115088161145a565b9392505050565b5f8060408385031215611520575f80fd5b823561152b8161145a565b9150602083013561153b8161145a565b809150509250929050565b600181811c9082168061155a57607f821691505b60208210810361157857634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156105f3576105f3611592565b808201808211156105f3576105f3611592565b5f602082840312156115dc575f80fd5b5051919050565b5f602082840312156115f3575f80fd5b81518015158114611508575f80fd5b80820281158282048414176105f3576105f3611592565b5f8261163357634e487b7160e01b5f52601260045260245ffd5b50049056fea164736f6c634300081a000a0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000673a039f6a959fa9db65d16781e6defde30375d9

Deployed Bytecode

0x6080604052600436106101c8575f3560e01c80637d7c2a1c116100f2578063b6b55f2511610092578063f04e283e11610062578063f04e283e146104da578063f2fde38b146104ed578063f8d2066514610500578063fee81cf41461051f575f80fd5b8063b6b55f2514610450578063be390e8c14610463578063dd62ed3e14610477578063ed6efec8146104bb575f80fd5b806395d89b41116100cd57806395d89b41146103ea57806397cecc86146103fe578063a8c62e7614610412578063a9059cbb14610431575f80fd5b80637d7c2a1c146103a35780638da5cb5b146103b75780638f8b6515146103cb575f80fd5b80633dfe9f6a11610168578063672634be11610138578063672634be1461032957806370a0823114610348578063715018a61461037c5780637a9024bd14610384575f80fd5b80633dfe9f6a146102ad5780633fc8cef3146102c25780634641257d1461030d57806354d1f13d14610321575f80fd5b806323b872dd116101a357806323b872dd1461024a57806325692962146102695780632e1a7d4d14610273578063313ce56714610292575f80fd5b806306fdde03146101d3578063095ea7b3146101fd57806318160ddd1461022c575f80fd5b366101cf57005b5f80fd5b3480156101de575f80fd5b506101e7610550565b6040516101f49190611425565b60405180910390f35b348015610208575f80fd5b5061021c61021736600461146e565b6105e0565b60405190151581526020016101f4565b348015610237575f80fd5b506002545b6040519081526020016101f4565b348015610255575f80fd5b5061021c610264366004611498565b6105f9565b61027161061c565b005b34801561027e575f80fd5b5061027161028d3660046114d6565b610669565b34801561029d575f80fd5b50604051601281526020016101f4565b3480156102b8575f80fd5b5061023c60055481565b3480156102cd575f80fd5b506102f57f000000000000000000000000420000000000000000000000000000000000000681565b6040516001600160a01b0390911681526020016101f4565b348015610318575f80fd5b50610271610823565b61027161099f565b348015610334575f80fd5b506007546102f5906001600160a01b031681565b348015610353575f80fd5b5061023c6103623660046114ed565b6001600160a01b03165f9081526020819052604090205490565b6102716109d8565b34801561038f575f80fd5b5061027161039e3660046114ed565b6109eb565b3480156103ae575f80fd5b50610271610ae5565b3480156103c2575f80fd5b506102f5610c12565b3480156103d6575f80fd5b506102716103e53660046114d6565b610c25565b3480156103f5575f80fd5b506101e7610c74565b348015610409575f80fd5b5061023c610c83565b34801561041d575f80fd5b506006546102f5906001600160a01b031681565b34801561043c575f80fd5b5061021c61044b36600461146e565b610c9f565b61027161045e3660046114d6565b610cac565b34801561046e575f80fd5b5061023c610e08565b348015610482575f80fd5b5061023c61049136600461150f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b3480156104c6575f80fd5b506102716104d53660046114ed565b610e96565b6102716104e83660046114ed565b610f0d565b6102716104fb3660046114ed565b610f4a565b34801561050b575f80fd5b5061027161051a3660046114d6565b610f70565b34801561052a575f80fd5b5061023c6105393660046114ed565b63389a75e1600c9081525f91909152602090205490565b60606003805461055f90611546565b80601f016020809104026020016040519081016040528092919081815260200182805461058b90611546565b80156105d65780601f106105ad576101008083540402835291602001916105d6565b820191905f5260205f20905b8154815290600101906020018083116105b957829003601f168201915b5050505050905090565b5f336105ed818585610f82565b60019150505b92915050565b5f33610606858285610f8f565b610611858585611022565b506001949350505050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610673338261107f565b4780821115610815576006546001600160a01b03166106be576040517fbd42298500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6106c860025490565b90505f670de0b6b3a76400008260055402816106e6576106e661157e565b049050828111610770578083035f6106fe82876115a6565b905061070a33836110b3565b600654604051631b08c5a960e11b8152600481018390523360248201526001600160a01b03909116906336118b52906044015f604051808303815f87803b158015610753575f80fd5b505af1158015610765573d5f803e3d5ffd5b50505050505061080f565b5f61077b84836115a6565b6006549091506001600160a01b03166336118b5261079983886115b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091523060248201526044015f604051808303815f87803b1580156107ed575f80fd5b505af11580156107ff573d5f803e3d5ffd5b5050505061080d33866110b3565b505b50505050565b61081f33836110b3565b5050565b5f61082c610c83565b90505f60065f9054906101000a90046001600160a01b03166001600160a01b031663a303b72d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108a391906115cc565b905081811061091357600654600754604051631b08c5a960e11b8152600481018590526001600160a01b0391821660248201529116906336118b52906044015f604051808303815f87803b1580156108f9575f80fd5b505af115801561090b573d5f803e3d5ffd5b505050505050565b5f61091e82846115a6565b600654600754604051631b08c5a960e11b8152600481018690526001600160a01b03918216602482015292935016906336118b52906044015f604051808303815f87803b15801561096d575f80fd5b505af115801561097f573d5f803e3d5ffd5b505060075461099a92506001600160a01b03169050826110b3565b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6109e061113c565b6109e95f611156565b565b6109f361113c565b6006546001600160a01b031615801590610a7f575060065f9054906101000a90046001600160a01b03166001600160a01b031663a303b72d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a58573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a7c91906115cc565b15155b15610ab6576040517f5ae6ea7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6006546001600160a01b03161580610b6c575060065f9054906101000a90046001600160a01b03166001600160a01b0316639a9168ab6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b48573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b6c91906115e3565b15610b7357565b475f670de0b6b3a7640000610b8760025490565b600554610b949190611602565b610b9e9190611619565b90508082111561081f5760065f9054906101000a90046001600160a01b03166001600160a01b031663d2fd99408284036040518263ffffffff1660e01b81526004015f604051808303818588803b158015610bf7575f80fd5b505af1158015610c09573d5f803e3d5ffd5b50505050505050565b5f610c20638b78c6d8195490565b905090565b610c2d61113c565b670de0b6b3a7640000811115610c6f576040517f261c1b7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600555565b60606004805461055f90611546565b5f610c8d60025490565b610c95610e08565b610c2091906115a6565b5f336105ed818585611022565b348115610dfe576040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390527f00000000000000000000000042000000000000000000000000000000000000066001600160a01b0316906323b872dd906064016020604051808303815f875af1158015610d3c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d6091906115e3565b506040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000042000000000000000000000000000000000000066001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015610dd9575f80fd5b505af1158015610deb573d5f803e3d5ffd5b505050508181610dfb91906115b9565b90505b61081f338261119c565b600654604080517fa303b72d00000000000000000000000000000000000000000000000000000000815290515f926001600160a01b03169163a303b72d9160048083019260209291908290030181865afa158015610e68573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e8c91906115cc565b610c2090476115b9565b610e9e61113c565b6001600160a01b038116610ede576040517ff66b894800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610f1561113c565b63389a75e1600c52805f526020600c208054421115610f3b57636f5e88185f526004601cfd5b5f9055610f4781611156565b50565b610f5261113c565b8060601b610f6757637448fbae5f526004601cfd5b610f4781611156565b610f7861113c565b610f4733826110b3565b61099a83838360016111ae565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461080f5781811015611014576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61080f84848484035f6111ae565b6001600160a01b03831661104b57604051634b637e8f60e11b81525f600482015260240161100b565b6001600160a01b0382166110745760405163ec442f0560e01b81525f600482015260240161100b565b61099a8383836112b2565b6001600160a01b0382166110a857604051634b637e8f60e11b81525f600482015260240161100b565b61081f825f836112b2565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f81146110fc576040519150601f19603f3d011682016040523d82523d5f602084013e611101565b606091505b505090508061099a576040517f4c1cfab600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b638b78c6d8195433146109e9576382b429005f526004601cfd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b6111a682826113f1565b61081f610ae5565b6001600160a01b0384166111f0576040517fe602df050000000000000000000000000000000000000000000000000000000081525f600482015260240161100b565b6001600160a01b038316611232576040517f94280d620000000000000000000000000000000000000000000000000000000081525f600482015260240161100b565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561080f57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516112a491815260200190565b60405180910390a350505050565b6001600160a01b0383166112dc578060025f8282546112d191906115b9565b909155506113659050565b6001600160a01b0383165f9081526020819052604090205481811015611347576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602481018290526044810183905260640161100b565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166113815760028054829003905561139f565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516113e491815260200190565b60405180910390a3505050565b6001600160a01b03821661141a5760405163ec442f0560e01b81525f600482015260240161100b565b61081f5f83836112b2565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b0381168114610f47575f80fd5b5f806040838503121561147f575f80fd5b823561148a8161145a565b946020939093013593505050565b5f805f606084860312156114aa575f80fd5b83356114b58161145a565b925060208401356114c58161145a565b929592945050506040919091013590565b5f602082840312156114e6575f80fd5b5035919050565b5f602082840312156114fd575f80fd5b81356115088161145a565b9392505050565b5f8060408385031215611520575f80fd5b823561152b8161145a565b9150602083013561153b8161145a565b809150509250929050565b600181811c9082168061155a57607f821691505b60208210810361157857634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156105f3576105f3611592565b808201808211156105f3576105f3611592565b5f602082840312156115dc575f80fd5b5051919050565b5f602082840312156115f3575f80fd5b81518015158114611508575f80fd5b80820281158282048414176105f3576105f3611592565b5f8261163357634e487b7160e01b5f52601260045260245ffd5b50049056fea164736f6c634300081a000a

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

0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000673a039f6a959fa9db65d16781e6defde30375d9

-----Decoded View---------------
Arg [0] : weth_ (address): 0x4200000000000000000000000000000000000006
Arg [1] : yieldReceiver_ (address): 0x673A039f6a959Fa9dB65D16781e6deFDe30375D9

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [1] : 000000000000000000000000673a039f6a959fa9db65d16781e6defde30375d9


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.