Holesky Testnet

Contract

0x2E61527469E3517eac7f9d63b7CCB53ba4D7f3D6

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NativeRebalancer

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : NativeRebalancer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.27;

import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import {IRestakingPool} from "./interfaces/IRestakingPool.sol";
import {IInceptionToken} from "./interfaces/IInceptionToken.sol";
import {IInceptionRatioFeed} from "./interfaces/IInceptionRatioFeed.sol";
import {ICrossChainBridgeL1} from "./interfaces/ICrossChainBridgeL1.sol";
import {INativeRebalancer} from "./interfaces/INativeRebalancer.sol";

/**
 * @author The InceptionLRT team
 * @title NativeRebalancer
 * @dev This contract handles staking, manages treasury data and facilitates cross-chain ETH transfers.
 */
contract NativeRebalancer is
    Initializable,
    Ownable2StepUpgradeable,
    INativeRebalancer
{
    address public inceptionToken;
    address public lockboxAddress;
    address payable public liqPool;
    address public ratioFeed;
    address public operator;
    uint256 public constant MULTIPLIER = 1e18;
    mapping(uint256 => Transaction) public txs;
    mapping(uint256 => address payable) adapters;
    address payable public defaultAdapter;
    uint256[] public chainIds;
    uint256 public syncedSupply;
    bool public updateable;

    modifier onlyOperator() {
        require(
            msg.sender == operator || msg.sender == owner(),
            OnlyOperator()
        );
        _;
    }

    modifier onlyAdapter(uint256 _chainId) {
        require(msg.sender == _getAdapter(_chainId), OnlyAdapter());
        _;
    }

    /**
     * @notice Initializes the contract with essential addresses and parameters.
     * @param _inceptionToken The address of the InceptionToken token.
     * @param _lockbox The address of the lockbox.
     * @param _liqPool The address of the liquidity pool.
     * @param _defaultAdapter The address of the CrossChainBridgeL1.
     * @param _ratioFeed The address of the ratio feed contract.
     * @param _operator The address of the operator who will manage this contract.
     */
    function initialize(
        address _inceptionToken,
        address _lockbox,
        address payable _liqPool,
        address payable _defaultAdapter,
        address _ratioFeed,
        address _operator
    ) public initializer {
        __Ownable_init(msg.sender);

        require(_inceptionToken != address(0), SettingZeroAddress());
        require(_lockbox != address(0), SettingZeroAddress());
        require(_liqPool != address(0), SettingZeroAddress());
        require(_defaultAdapter != address(0), SettingZeroAddress());
        require(_ratioFeed != address(0), SettingZeroAddress());
        require(_operator != address(0), SettingZeroAddress());

        inceptionToken = _inceptionToken;
        lockboxAddress = _lockbox;
        liqPool = _liqPool;
        defaultAdapter = _defaultAdapter;
        ratioFeed = _ratioFeed;
        operator = _operator;
    }

    /**
     * @notice Updates the InceptionToken address.
     * @param _inceptionToken The new InceptionToken address.
     */
    function setInceptionToken(address _inceptionToken) external onlyOwner {
        require(_inceptionToken != address(0), SettingZeroAddress());
        emit InceptionTokenChanged(inceptionToken, _inceptionToken);
        inceptionToken = _inceptionToken;
    }

    /**
     * @notice Updates the Lockbox address.
     * @param _lockboxAddress The new Lockbox address.
     */
    function setLockboxAddress(address _lockboxAddress) external onlyOwner {
        require(_lockboxAddress != address(0), SettingZeroAddress());
        emit LockboxChanged(lockboxAddress, _lockboxAddress);
        lockboxAddress = _lockboxAddress;
    }

    /**
     * @notice Updates the liquidity pool address.
     * @param _liqPool The new liquidity pool address.
     */
    function setLiqPool(address payable _liqPool) external onlyOwner {
        require(_liqPool != address(0), SettingZeroAddress());
        emit LiqPoolChanged(liqPool, _liqPool);
        liqPool = _liqPool;
    }

    /**
     * @notice Updates the operator address.
     * @param _operator The new operator address.
     */
    function setOperator(address _operator) external onlyOwner {
        require(_operator != address(0), SettingZeroAddress());
        emit OperatorChanged(operator, _operator);
        operator = _operator;
    }

    /**
     * @notice Updates the treasury data by comparing the total L2 inETH balance and adjusting the treasury accordingly.
     */
    function updateTreasuryData() public {
        require(updateable, TreasuryUpdatesPaused());
        uint256 totalL2InETH = 0;

        uint256[] memory allChainIds = chainIds;

        require(chainIds.length > 0, NoChainIdsConfigured());

        for (uint i = 0; i < allChainIds.length; i++) {
            uint256 chainId = allChainIds[i];
            Transaction memory txData = getTransactionData(chainId);
            require(
                txData.timestamp != 0,
                MissingOneOrMoreL2Transactions(chainId)
            );
            totalL2InETH += txData.inceptionTokenBalance;
        }

        if (syncedSupply < totalL2InETH) {
            uint256 amountToMint = totalL2InETH - syncedSupply;
            _mintInceptionToken(amountToMint);
            emit SyncedSupplyChanged(syncedSupply, syncedSupply + amountToMint);
            syncedSupply += amountToMint;
        } else if (syncedSupply > totalL2InETH) {
            uint256 amountToBurn = syncedSupply - totalL2InETH;
            _burnInceptionToken(amountToBurn);
            emit SyncedSupplyChanged(syncedSupply, syncedSupply - amountToBurn);
            syncedSupply -= amountToBurn;
        } else {
            revert NoRebalancingRequired();
        }

        uint256 inETHBalance = IERC20(inceptionToken).balanceOf(address(this));
        if (inETHBalance > 0) {
            require(
                IERC20(inceptionToken).transfer(lockboxAddress, inETHBalance),
                TransferToLockboxFailed()
            );
            emit InceptionTokenDepositedToLockbox(inETHBalance);
        }
    }

    function _mintInceptionToken(uint256 _amountToMint) internal {
        require(inceptionToken != address(0), InceptionTokenAddressNotSet());
        IInceptionToken cToken = IInceptionToken(inceptionToken);
        cToken.mint(lockboxAddress, _amountToMint);
        emit TreasuryUpdateMint(_amountToMint);
    }

    function _burnInceptionToken(uint256 _amountToBurn) internal {
        require(inceptionToken != address(0), InceptionTokenAddressNotSet());
        IInceptionToken cToken = IInceptionToken(inceptionToken);
        cToken.burn(lockboxAddress, _amountToBurn);
        emit TreasuryUpdateBurn(_amountToBurn);
    }

    /**
     * @dev Triggered by a cron job.
     * @notice Stakes a specified amount of ETH into the Liquidity Pool.
     * @param _amount The amount of ETH to stake.
     */
    function stake(uint256 _amount) external onlyOperator {
        require(liqPool != address(0), LiquidityPoolNotSet());
        require(
            _amount <= address(this).balance,
            StakeAmountExceedsEthBalance(_amount, address(this).balance)
        );
        // require(
        //     _amount <= IRestakingPool(liqPool).availableToStake(),
        //     StakeAmountExceedsMaxTVL()
        // );
        (bool success, ) = liqPool.call{value: _amount}("");

        require(success, TransferToLockboxFailed());

        emit TransferToLockbox(_amount);
    }

    /**
     * @dev msg.value is used to pay for cross-chain fees (calculated externally)
     * @notice Sends ETH to an L2 chain through a cross-chain defaultAdapter.
     * @param _chainId The ID of the destination L2 chain.
     * @param _callValue The amount of ETH to send to L2.
     */
    function sendEthToL2(
        uint256 _chainId,
        uint256 _callValue,
        bytes memory _options
    ) external payable onlyOperator {
        address payable adapter = payable(_getAdapter(_chainId));
        require(adapter != address(0), CrosschainBridgeNotSet());
        require(
            _callValue + msg.value <= address(this).balance,
            SendAmountExceedsEthBalance(_callValue)
        );

        ICrossChainBridgeL1(adapter).sendEthCrossChain{
            value: _callValue + msg.value
        }(_chainId, _options);
    }

    /**
     * @notice Calculates fees to send ETH to other chain. The `SEND_VALUE` encoded in options is not included in the return
     * @param _chainId chain ID of the network to simulate sending ETH to
     * @param _options encoded params for cross-chain message. Includes `SEND_VALUE` which is substracted from the end result
     * @return fee required to pay for cross-chain transaction, without the value to be sent itself
     */
    function quoteSendEthToL2(
        uint256 _chainId,
        bytes calldata _options
    ) external view returns (uint256 fee) {
        address payable adapter = payable(_getAdapter(_chainId));
        require(adapter != address(0), CrosschainBridgeNotSet());
        return
            ICrossChainBridgeL1(adapter).quoteSendEth(_chainId, _options) -
            ICrossChainBridgeL1(adapter).getValueFromOpts(_options);
    }

    /**
     * @notice Handles Layer 2 information and updates the transaction data for a specific Chain ID.
     * @dev Verifies that the caller is the correct defaultAdapter and that the timestamp is valid.
     * @param _chainId The Chain ID of the transaction.
     * @param _timestamp The timestamp when the transaction occurred.
     * @param _balance The ETH balance involved in the transaction.
     * @param _totalSupply The total inETH supply for the transaction.
     */
    function handleL2Info(
        uint256 _chainId,
        uint256 _timestamp,
        uint256 _balance,
        uint256 _totalSupply
    ) external onlyAdapter(_chainId) {
        require(
            _timestamp <= block.timestamp,
            TimeCannotBeInFuture(_timestamp)
        );

        Transaction memory lastUpdate = txs[_chainId];

        if (lastUpdate.timestamp != 0) {
            require(
                _timestamp > lastUpdate.timestamp,
                TimeBeforePrevRecord(_timestamp)
            );
        }

        Transaction memory newUpdate = Transaction({
            timestamp: _timestamp,
            ethBalance: _balance,
            inceptionTokenBalance: _totalSupply
        });

        txs[_chainId] = newUpdate;

        emit L2InfoReceived(_chainId, _timestamp, _balance, _totalSupply);
    }

    /**
     * @notice Retrieves the transaction for a specific Chain ID. NB! Only one (last) transaction is stored.
     * @param _chainId The Chain ID for which to retrieve the last transaction data.
     * @return The transaction data (timestamp, ETH balance, inETH balance).
     */
    function getTransactionData(
        uint256 _chainId
    ) public view returns (Transaction memory) {
        return txs[_chainId];
    }

    /**
     * @dev Replaces the crosschain bridges
     * @param _newAdapter The address of the defaultAdapter.
     */
    function addAdapter(
        uint256 _chainId,
        address payable _newAdapter
    ) external onlyOwner {
        require(_newAdapter != address(0), SettingZeroAddress());
        adapters[_chainId] = _newAdapter;
        _addChainId(_chainId);

        emit AdapterAdded(_chainId, _newAdapter);
    }

    /**
     * @notice set the so-called defaultAdapter - the adapter to be used for every chain unless a
      specific adapter for specific chainId is set
     * @param _newDefaultAdapter Address of the default cross-chain adapter
     **/
    function setDefaultAdapter(
        address payable _newDefaultAdapter
    ) external override onlyOwner {
        require(_newDefaultAdapter != address(0), SettingZeroAddress());

        emit DefaultBridgeChanged(defaultAdapter, _newDefaultAdapter);
        defaultAdapter = _newDefaultAdapter;
    }

    function addChainId(uint256 _newChainId) external onlyOwner {
        _addChainId(_newChainId);
    }

    /**
     * @notice Removes a specific `chainId` from the `chainIds` array.
     * @param _chainId The Chain ID to delete.
     */
    function deleteChainId(uint256 _chainId) public onlyOwner {
        uint256 index;
        bool found = false;

        // Find the _chainId in the array
        for (uint256 i = 0; i < chainIds.length; i++) {
            if (chainIds[i] == _chainId) {
                index = i;
                found = true;
                break;
            }
        }

        require(found, ChainIdNotFound(_chainId));

        // Move the last element into the place of the one to delete
        chainIds[index] = chainIds[chainIds.length - 1];
        chainIds.pop();
        emit ChainIdDeleted(_chainId, index);
    }

    /**
     * @notice Updates the supply share of the total supply
     * @param _syncedSupply the new synced supply share of the total supply
     */
    function setSyncedSupply(uint256 _syncedSupply) external onlyOwner {
        emit SyncedSupplyChanged(syncedSupply, _syncedSupply);
        syncedSupply = _syncedSupply;
    }

    /**
     * @notice sets updateable value allowing to turn on/off updateTreasuryData
     * @param _updateable the flag which determines if updateTreasuryData is calleable
     */
    function setUpdateable(bool _updateable) external onlyOwner {
        emit UpdateableChanged(updateable, _updateable);
        updateable = _updateable;
    }

    /**
     * @notice Fetches the adapter assigned to a specific chain ID
     * @param _chainId The Chain ID
     * @return adapter address of the adapter for the specified chainId. Returns 0 if non set
     * @return isDefault whether the returned adapter is default or not (from the mapping)
     */
    function getAdapter(
        uint256 _chainId
    ) external view returns (address payable adapter, bool isDefault) {
        adapter = _getAdapter(_chainId);
        if (adapter == defaultAdapter) {
            isDefault = true;
        }
    }

    function _getAdapter(
        uint256 _chainId
    ) internal view returns (address payable adapter) {
        adapter = adapters[_chainId];
        if (adapter == address(0)) {
            adapter = defaultAdapter;
        }

        require(adapter != address(0), NoAdapterAvailable(_chainId));
    }

    /**
     * @notice Adds a new Chain ID to the storage.
     * @dev Ensures that the Chain ID does not already exist in the list.
     * @param _newChainId The Chain ID to add.
     */
    function _addChainId(uint256 _newChainId) internal {
        for (uint i = 0; i < chainIds.length; i++) {
            if (chainIds[i] == _newChainId) {
                return;
            }
        }
        chainIds.push(_newChainId);
        emit ChainIdAdded(_newChainId);
    }

    /**
     * @notice Receives ETH sent to this contract, just in case.
     */
    receive() external payable {
        emit ETHReceived(msg.sender, msg.value);
    }
}

File 2 of 12 : Ownable2StepUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {OwnableUpgradeable} from "./OwnableUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step
    struct Ownable2StepStorage {
        address _pendingOwner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;

    function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) {
        assembly {
            $.slot := Ownable2StepStorageLocation
        }
    }

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

    function __Ownable2Step_init() internal onlyInitializing {
    }

    function __Ownable2Step_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        Ownable2StepStorage storage $ = _getOwnable2StepStorage();
        return $._pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        Ownable2StepStorage storage $ = _getOwnable2StepStorage();
        $._pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        Ownable2StepStorage storage $ = _getOwnable2StepStorage();
        delete $._pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 3 of 12 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable
    struct OwnableStorage {
        address _owner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;

    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
        assembly {
            $.slot := OwnableStorageLocation
        }
    }

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    function __Ownable_init(address initialOwner) internal onlyInitializing {
        __Ownable_init_unchained(initialOwner);
    }

    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 4 of 12 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

File 5 of 12 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 6 of 12 : IERC20.sol
// 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);
}

File 7 of 12 : ICrossChainBridge.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.27;

interface ICrossChainBridge {
    event TargetReceiverChanged(
        address prevTargetReceiver,
        address newTargetReceiver
    );
    event RecoverFundsInitiated(uint256 amount);
    event ReceiveTriggered(address caller, uint256 amount);
    event CrossChainEthDeposit(uint256 chainId, uint256 amount);
    event ChainIdAdded(uint256 _chainId);
    event CrossChainMessageReceived(
        uint256 indexed chainId,
        uint256 value,
        bytes data
    );
    event CrossChainMessageSent(
        uint256 indexed chainId,
        uint256 value,
        bytes data,
        uint256 fee
    );

    error TargetReceiverNotSet();
    error TransferToTargetReceiverFailed();
    error SettingZeroAddress();
    error NotTargetReceiver(address caller);
    error ChainIdNotFound(uint256 chainId);

    function setTargetReceiver(address _newTargetReceiver) external;

    function recoverFunds() external;

    function quoteSendEth(
        uint256 _chainId,
        bytes memory _options
    ) external view returns (uint256);

    function sendEthCrossChain(
        uint256 _chainId,
        bytes memory _options
    ) external payable;

    function getValueFromOpts(
        bytes calldata _options
    ) external view returns (uint256);

    receive() external payable;
}

File 8 of 12 : ICrossChainBridgeL1.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.27;

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

interface ICrossChainBridgeL1 is ICrossChainBridge {
    event CrossChainInfoReceived(
        uint256 indexed chainId,
        uint256 timestamp,
        uint256 balance,
        uint256 totalSupply
    );
}

File 9 of 12 : IInceptionRatioFeed.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IInceptionRatioFeedErrors {
    error OperatorUnauthorizedAccount(address account);

    error InconsistentInputData();

    error NullParams();

    error RatioThresholdNotSet();

    error NewRatioThresholdInvalid();

    error IncorrectDay(uint256 day);

    error IncorrectToken(address token);
}

interface IInceptionRatioFeed {
    event OperatorUpdated(address prevValue, address newValue);

    event RatioUpdated(
        address indexed tokenAddress,
        uint256 prevValue,
        uint256 newValue
    );

    event RatioNotUpdated(
        address indexed tokenAddress,
        uint256 failedRatio,
        string reason
    );

    event RatioThresholdChanged(uint256 prevValue, uint256 newValue);

    function updateRatioBatch(
        address[] calldata addresses,
        uint256[] calldata ratios
    ) external;

    function getRatioFor(address) external view returns (uint256);
}

File 10 of 12 : IInceptionToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IInceptionToken {
    function mint(address account, uint256 shares) external;
    function burn(address account, uint256 shares) external;
    function convertToAmount(uint256 shares) external pure returns (uint256);
    function convertToShares(uint256 amount) external pure returns (uint256);
    function changeName(string memory newName) external;
    function changeSymbol(string memory newSymbol) external;
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function balanceOf(address account) external view returns (uint256);
}

File 11 of 12 : INativeRebalancer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

interface INativeRebalancer {
    struct Transaction {
        uint256 timestamp;
        uint256 ethBalance;
        uint256 inceptionTokenBalance;
    }

    // Events
    event L2InfoReceived(
        uint256 indexed networkId,
        uint256 timestamp,
        uint256 ethBalance,
        uint256 inceptionTokenBalance
    );
    event ETHReceived(address sender, uint256 amount);
    event ETHDepositedToLiquidPool(address liquidPool, uint256 amountETH);
    event InceptionTokenDepositedToLockbox(uint256 mintAmount);
    event TreasuryUpdateMint(uint256 mintAmount);
    event TreasuryUpdateBurn(uint256 mintAmount);
    event LockboxChanged(address prevLockbox, address newLockbox);
    event InceptionTokenChanged(
        address prevInceptionToken,
        address newInceptionToken
    );
    event LiqPoolChanged(address prevLiqPool, address newLiqPool);
    event OperatorChanged(address prevOperator, address newOperator);
    event AdapterAdded(uint256 indexed chainId, address newAdapter);
    event DefaultBridgeChanged(
        address indexed prevDefaultAdapter,
        address indexed newDefaultAdapter
    );
    event SyncedSupplyChanged(
        uint256 prevSyncedSupply,
        uint256 nextSyncedSupply
    );
    event UpdateableChanged(bool prevUpdateable, bool nextUpdateable);
    event ChainIdAdded(uint256 chainId);
    event ChainIdDeleted(uint256 chainId, uint256 index);
    event TransferToLockbox(uint256 amount);

    error MsgNotFromBridge(address caller);
    error ChainIdAlreadyExists(uint256 chainId);
    error ChainIdNotFound(uint256 chainId);
    error BridgeAlreadyExists(uint256 chainId);
    error NoBridgeForThisChainId(uint256 chainId);
    error TimeCannotBeInFuture(uint256 timestamp);
    error TimeBeforePrevRecord(uint256 timestamp);
    error SettingZeroAddress();
    error TransferToLockboxFailed();
    error InceptionTokenAddressNotSet();
    error LiquidityPoolNotSet();
    error CrosschainBridgeNotSet();
    error MissingOneOrMoreL2Transactions(uint256 chainId);
    error StakeAmountExceedsEthBalance(uint256 staked, uint256 availableEth);
    error SendAmountExceedsEthBalance(uint256 amountToSend);
    error StakeAmountExceedsMaxTVL();
    error OnlyOperator();
    error OnlyAdapter();
    error NoRebalancingRequired();
    error IndexOutOfBounds(uint256 index, uint256 length);
    error NoAdapterAvailable(uint256 _chainId);
    error TreasuryUpdatesPaused();
    error NoChainIdsConfigured();

    function handleL2Info(
        uint256 _chainId,
        uint256 _timestamp,
        uint256 _balance,
        uint256 _totalSupply
    ) external;

    function getTransactionData(
        uint256 _chainId
    ) external view returns (Transaction memory);

    function setDefaultAdapter(address payable _newDefaultAdapter) external;

    function setInceptionToken(address _inceptionTokenAddress) external;

    function setLockboxAddress(address _lockboxAddress) external;

    function updateTreasuryData() external;

    function inceptionToken() external view returns (address);

    function lockboxAddress() external view returns (address);

    function liqPool() external view returns (address payable);

    function ratioFeed() external view returns (address);

    function operator() external view returns (address);

    function defaultAdapter() external view returns (address payable);
}

File 12 of 12 : IRestakingPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

interface IRestakingPool {
    /* structs */

    struct Unstake {
        address recipient;
        uint256 amount;
    }

    /* errors */

    error PoolZeroAmount();
    error PoolZeroAddress();
    error PoolRestakerExists();
    error PoolRestakerNotExists();
    error PoolInsufficientBalance();
    error PoolWrongInputLength();
    error AmbiguousFee(uint256 claimed, uint256 fee);
    error InsufficientCapacity(uint256 capacity);
    error TargetCapacityNotSet();
    error TimelineNotOver();
    error InconsistentData();

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

    error PoolDistributeGasLimitNotInRange(uint64 max);

    error PoolStakeAmLessThanMin();
    error PoolStakeAmGreaterThanAvailable();
    error PoolUnstakeAmLessThanMin();

    error ParameterExceedsLimits(uint256 param);

    /* events */

    event Received(address indexed sender, uint256 amount);

    event Staked(address indexed staker, uint256 amount, uint256 shares);

    event Unstaked(
        address indexed from,
        address indexed to,
        uint256 amount,
        uint256 shares
    );

    event Deposited(string indexed provider, bytes[] pubkeys);

    event DistributeGasLimitChanged(uint32 prevValue, uint32 newValue);

    event MinStakeChanged(uint256 prevValue, uint256 newValue);

    event MinUnstakeChanged(uint256 prevValue, uint256 newValue);

    event MaxTVLChanged(uint256 prevValue, uint256 newValue);

    event PendingUnstake(
        address indexed ownerAddress,
        address indexed receiverAddress,
        uint256 amount,
        uint256 shares
    );

    /**
     *
     * @dev Deprecated.
     */
    event UnstakesDistributed(Unstake[] unstakes);

    event ClaimExpected(address indexed claimer, uint256 value);

    event UnstakeClaimed(
        address indexed claimer,
        address indexed caller,
        uint256 value
    );

    event FlashUnstaked(
        address indexed sender,
        address indexed receiver,
        address indexed owner,
        uint256 amount,
        uint256 shares,
        uint256 fee
    );

    event FeeClaimed(
        address indexed restaker,
        address indexed treasury,
        uint256 fee,
        uint256 totalClaimed
    );

    event RestakerAdded(string indexed provider, address restaker);

    event ReferralStake(bytes32 indexed code);

    event StakeBonus(uint256 amount);

    event StakeBonusParamsChanged(
        uint256 newMaxBonusRate,
        uint256 newOptimalBonusRate,
        uint256 newDepositUtilizationKink
    );

    event UnstakeFeeParamsChanged(
        uint256 newMaxFlashFeeRate,
        uint256 newOptimalWithdrawalRate,
        uint256 newWithdrawUtilizationKink
    );

    event ProtocolFeeChanged(uint256 prevValue, uint256 newValue);

    event TargetCapacityChanged(uint256 prevValue, uint256 newValue);

    event RewardsAdded(uint256 amount, uint256 startTimeline);

    event RewardsTimelineChanged(
        uint256 rewardsTimeline,
        uint256 newTimelineInSeconds
    );

    /* functions */

    function getMinStake() external view returns (uint256);

    function getMinUnstake() external view returns (uint256);

    function startWithdrawalCheckpoint(
        string memory provider,
        bool revertIfNoBalance
    ) external;

    function stake() external payable;

    function availableToStake() external view returns (uint256);
}

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

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"BridgeAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"ChainIdAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"ChainIdNotFound","type":"error"},{"inputs":[],"name":"CrosschainBridgeNotSet","type":"error"},{"inputs":[],"name":"InceptionTokenAddressNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"IndexOutOfBounds","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"LiquidityPoolNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"MissingOneOrMoreL2Transactions","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"MsgNotFromBridge","type":"error"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"NoAdapterAvailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"NoBridgeForThisChainId","type":"error"},{"inputs":[],"name":"NoChainIdsConfigured","type":"error"},{"inputs":[],"name":"NoRebalancingRequired","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"OnlyAdapter","type":"error"},{"inputs":[],"name":"OnlyOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountToSend","type":"uint256"}],"name":"SendAmountExceedsEthBalance","type":"error"},{"inputs":[],"name":"SettingZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"staked","type":"uint256"},{"internalType":"uint256","name":"availableEth","type":"uint256"}],"name":"StakeAmountExceedsEthBalance","type":"error"},{"inputs":[],"name":"StakeAmountExceedsMaxTVL","type":"error"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TimeBeforePrevRecord","type":"error"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TimeCannotBeInFuture","type":"error"},{"inputs":[],"name":"TransferToLockboxFailed","type":"error"},{"inputs":[],"name":"TreasuryUpdatesPaused","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"address","name":"newAdapter","type":"address"}],"name":"AdapterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"ChainIdAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"ChainIdDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevDefaultAdapter","type":"address"},{"indexed":true,"internalType":"address","name":"newDefaultAdapter","type":"address"}],"name":"DefaultBridgeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"liquidPool","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"}],"name":"ETHDepositedToLiquidPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevInceptionToken","type":"address"},{"indexed":false,"internalType":"address","name":"newInceptionToken","type":"address"}],"name":"InceptionTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"InceptionTokenDepositedToLockbox","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"networkId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"inceptionTokenBalance","type":"uint256"}],"name":"L2InfoReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevLiqPool","type":"address"},{"indexed":false,"internalType":"address","name":"newLiqPool","type":"address"}],"name":"LiqPoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevLockbox","type":"address"},{"indexed":false,"internalType":"address","name":"newLockbox","type":"address"}],"name":"LockboxChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevOperator","type":"address"},{"indexed":false,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevSyncedSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextSyncedSupply","type":"uint256"}],"name":"SyncedSupplyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferToLockbox","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"TreasuryUpdateBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"TreasuryUpdateMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"prevUpdateable","type":"bool"},{"indexed":false,"internalType":"bool","name":"nextUpdateable","type":"bool"}],"name":"UpdateableChanged","type":"event"},{"inputs":[],"name":"MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"address payable","name":"_newAdapter","type":"address"}],"name":"addAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newChainId","type":"uint256"}],"name":"addChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdapter","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"deleteChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"getAdapter","outputs":[{"internalType":"address payable","name":"adapter","type":"address"},{"internalType":"bool","name":"isDefault","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"getTransactionData","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ethBalance","type":"uint256"},{"internalType":"uint256","name":"inceptionTokenBalance","type":"uint256"}],"internalType":"struct INativeRebalancer.Transaction","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"uint256","name":"_balance","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"}],"name":"handleL2Info","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inceptionToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_inceptionToken","type":"address"},{"internalType":"address","name":"_lockbox","type":"address"},{"internalType":"address payable","name":"_liqPool","type":"address"},{"internalType":"address payable","name":"_defaultAdapter","type":"address"},{"internalType":"address","name":"_ratioFeed","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liqPool","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockboxAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"quoteSendEthToL2","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratioFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"uint256","name":"_callValue","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"sendEthToL2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newDefaultAdapter","type":"address"}],"name":"setDefaultAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_inceptionToken","type":"address"}],"name":"setInceptionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_liqPool","type":"address"}],"name":"setLiqPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lockboxAddress","type":"address"}],"name":"setLockboxAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_syncedSupply","type":"uint256"}],"name":"setSyncedSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_updateable","type":"bool"}],"name":"setUpdateable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"syncedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"txs","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ethBalance","type":"uint256"},{"internalType":"uint256","name":"inceptionTokenBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateTreasuryData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052348015600f57600080fd5b5061213d8061001f6000396000f3fe6080604052600436106101fc5760003560e01c8063715018a61161010d578063a694fc3a116100a0578063cc2a9a5b1161006f578063cc2a9a5b146105f2578063ddeadbb614610612578063e30c397814610651578063f2fde38b14610666578063f5715d561461068657600080fd5b8063a694fc3a14610572578063b3ab15fb14610592578063bfab2bb6146105b2578063c235fb14146105d257600080fd5b806382257e3f116100dc57806382257e3f146104f35780638da5cb5b146105135780638e29ebb514610528578063983586d91461054857600080fd5b8063715018a614610489578063734e6cad1461049e578063740b91f4146104be57806379ba5097146104de57600080fd5b80633b24b5471161019057806357039e911161015f57806357039e9114610400578063570ca73514610413578063582f1da21461043357806358951c68146104535780637129bbac1461047357600080fd5b80633b24b5471461035e578063405a2c1c146103a057806350d7be5f146103c057806351eafd87146103e057600080fd5b80631b449f06116101cc5780631b449f06146102de57806321d93090146102fe57806328ed3db61461031e5780633924c33c1461033e57600080fd5b80625c54fc14610240578063029c9ae914610257578063059f8b16146102945780630f3b647e146102be57600080fd5b3661023b57604080513381523460208201527fbfe611b001dfcd411432f7bf0d79b82b4b2ee81511edac123a3403c357fb972a910160405180910390a1005b600080fd5b34801561024c57600080fd5b506102556106dd565b005b34801561026357600080fd5b50600154610277906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102a057600080fd5b506102b0670de0b6b3a764000081565b60405190815260200161028b565b3480156102ca57600080fd5b506102556102d9366004611d03565b610a64565b3480156102ea57600080fd5b506102556102f9366004611d33565b610b05565b34801561030a57600080fd5b506102b0610319366004611d57565b610b9d565b34801561032a57600080fd5b50610255610339366004611d57565b610bbe565b34801561034a57600080fd5b50610255610359366004611d33565b610cdc565b34801561036a57600080fd5b5061037e610379366004611d57565b610d74565b604080518251815260208084015190820152918101519082015260600161028b565b3480156103ac57600080fd5b506102556103bb366004611d57565b610dd1565b3480156103cc57600080fd5b506102b06103db366004611d70565b610e1a565b3480156103ec57600080fd5b506102556103fb366004611dee565b610f42565b61025561040e366004611e36565b61108b565b34801561041f57600080fd5b50600454610277906001600160a01b031681565b34801561043f57600080fd5b5061025561044e366004611d57565b6111ad565b34801561045f57600080fd5b5061025561046e366004611f10565b6111c1565b34801561047f57600080fd5b506102b060095481565b34801561049557600080fd5b5061025561121f565b3480156104aa57600080fd5b50600754610277906001600160a01b031681565b3480156104ca57600080fd5b50600254610277906001600160a01b031681565b3480156104ea57600080fd5b50610255611233565b3480156104ff57600080fd5b5061025561050e366004611d33565b611278565b34801561051f57600080fd5b50610277611303565b34801561053457600080fd5b50600354610277906001600160a01b031681565b34801561055457600080fd5b50600a546105629060ff1681565b604051901515815260200161028b565b34801561057e57600080fd5b5061025561058d366004611d57565b611338565b34801561059e57600080fd5b506102556105ad366004611d33565b611489565b3480156105be57600080fd5b506102556105cd366004611d33565b611521565b3480156105de57600080fd5b50600054610277906001600160a01b031681565b3480156105fe57600080fd5b5061025561060d366004611f2d565b6115b9565b34801561061e57600080fd5b5061063261062d366004611d57565b61181a565b604080516001600160a01b03909316835290151560208301520161028b565b34801561065d57600080fd5b50610277611848565b34801561067257600080fd5b50610255610681366004611d33565b611871565b34801561069257600080fd5b506106c26106a1366004611d57565b60056020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161028b565b600a5460ff1661070057604051630cfb2abb60e41b815260040160405180910390fd5b600080600880548060200260200160405190810160405280929190818152602001828054801561074f57602002820191906000526020600020905b81548152602001906001019080831161073b575b5050505050905060006008805490501161077c57604051634c25b0bb60e01b815260040160405180910390fd5b60005b81518110156107fd57600082828151811061079c5761079c611faf565b6020026020010151905060006107b182610d74565b805190915082906107e1576040516335a6861360e11b81526004016107d891815260200190565b60405180910390fd5b5060408101516107f19086611fdb565b9450505060010161077f565b50816009541015610888576000600954836108189190611ff4565b9050610823816118f6565b6009547f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08906108528382611fdb565b6040805192835260208301919091520160405180910390a1806009600082825461087c9190611fdb565b9091555061091f915050565b816009541115610906576000826009546108a29190611ff4565b90506108ad816119ba565b6009547f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08906108dc8382611ff4565b6040805192835260208301919091520160405180910390a1806009600082825461087c9190611ff4565b604051637bb44c2160e11b815260040160405180910390fd5b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610968573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098c9190612007565b90508015610a5f5760005460015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af11580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190612020565b610a2a57604051638205342760e01b815260040160405180910390fd5b6040518181527f4ae5bd787f4cd94b85a88836b5cefe362f37828a82ecd6172ae39aa907f3dec9906020015b60405180910390a15b505050565b610a6c611a7e565b6001600160a01b038116610a935760405163ef945a6560e01b815260040160405180910390fd5b600082815260066020526040902080546001600160a01b0319166001600160a01b038316179055610ac382611ab0565b6040516001600160a01b038216815282907f36faf335eb63af51ba93e9dd185ae816d74a9bac978bc399b49b11137ecd48189060200160405180910390a25050565b610b0d611a7e565b6001600160a01b038116610b345760405163ef945a6560e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527ffc944a5f86de9fcfac9dd7587ad1fbfb44e832bfeddec35cad2884cab5d7da65910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b60088181548110610bad57600080fd5b600091825260209091200154905081565b610bc6611a7e565b600080805b600854811015610c0d578360088281548110610be957610be9611faf565b906000526020600020015403610c055780925060019150610c0d565b600101610bcb565b508281610c30576040516354a5785b60e11b81526004016107d891815260200190565b5060088054610c4190600190611ff4565b81548110610c5157610c51611faf565b906000526020600020015460088381548110610c6f57610c6f611faf565b6000918252602090912001556008805480610c8c57610c8c61203d565b600190038181906000526020600020016000905590557f6065156fce04c2111fb2766a72318ef9845d87e0e4eebcf9c3400d1b0d22f4228383604051610a56929190918252602082015260400190565b610ce4611a7e565b6001600160a01b038116610d0b5760405163ef945a6560e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fe8282554581f4f6dcc4a6fbb857f7e89cad72736bcb699bf4205e3665b8e7066910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b610d9860405180606001604052806000815260200160008152602001600081525090565b50600090815260056020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915290565b610dd9611a7e565b60095460408051918252602082018390527f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08910160405180910390a1600955565b600080610e2685611b59565b90506001600160a01b038116610e4f57604051636389838560e11b815260040160405180910390fd5b604051638d02167d60e01b81526001600160a01b03821690638d02167d90610e7d908790879060040161207c565b602060405180830381865afa158015610e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebe9190612007565b604051632296888760e11b81526001600160a01b0383169063452d110e90610eee90899089908990600401612098565b602060405180830381865afa158015610f0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2f9190612007565b610f399190611ff4565b95945050505050565b83610f4c81611b59565b6001600160a01b0316336001600160a01b031614610f7d576040516308ce245d60e31b815260040160405180910390fd5b8342811115610fa2576040516336ce2d0f60e11b81526004016107d891815260200190565b506000858152600560209081526040918290208251606081018452815480825260018301549382019390935260029091015492810192909252156110085780518590811161100657604051636e6f496160e01b81526004016107d891815260200190565b505b6040805160608082018352878252602080830188815283850188815260008c8152600584528690208551815591516001830155516002909101558351898152908101889052928301869052909188917f32d49425af41fa76a45e8ef674babb83acc4d8312d2dffe76903c97b7089249a910160405180910390a250505050505050565b6004546001600160a01b03163314806110bc57506110a7611303565b6001600160a01b0316336001600160a01b0316145b6110d9576040516327e1f1e560e01b815260040160405180910390fd5b60006110e484611b59565b90506001600160a01b03811661110d57604051636389838560e11b815260040160405180910390fd5b476111183485611fdb565b1115839061113c57604051636e5b995960e11b81526004016107d891815260200190565b506001600160a01b0381166335d439496111563486611fdb565b86856040518463ffffffff1660e01b81526004016111759291906120b2565b6000604051808303818588803b15801561118e57600080fd5b505af11580156111a2573d6000803e3d6000fd5b505050505050505050565b6111b5611a7e565b6111be81611ab0565b50565b6111c9611a7e565b600a546040805160ff9092161515825282151560208301527fd5c31b9c0e8a01c501ba52c814e2ad86843d0b06abcc9d5f19ea1b2a3f482c29910160405180910390a1600a805460ff1916911515919091179055565b611227611a7e565b6112316000611bb5565b565b338061123d611848565b6001600160a01b03161461126f5760405163118cdaa760e01b81526001600160a01b03821660048201526024016107d8565b6111be81611bb5565b611280611a7e565b6001600160a01b0381166112a75760405163ef945a6560e01b815260040160405180910390fd5b6007546040516001600160a01b038084169216907f45d051af501a72e3e9cb0c59c70e94521b42cf1ba723cd0956bf5b8321616c4590600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6004546001600160a01b03163314806113695750611354611303565b6001600160a01b0316336001600160a01b0316145b611386576040516327e1f1e560e01b815260040160405180910390fd5b6002546001600160a01b03166113af5760405163d667ca4560e01b815260040160405180910390fd5b8047478211156113db576040516306836a2960e21b8152600481019290925260248201526044016107d8565b50506002546040516000916001600160a01b03169083908381818185875af1925050503d806000811461142a576040519150601f19603f3d011682016040523d82523d6000602084013e61142f565b606091505b505090508061145157604051638205342760e01b815260040160405180910390fd5b6040518281527f17be455e052eee2a6239378a3ba4f2f8bae4c0d1526bad8ad0d773cb1492bbd0906020015b60405180910390a15050565b611491611a7e565b6001600160a01b0381166114b85760405163ef945a6560e01b815260040160405180910390fd5b600454604080516001600160a01b03928316815291831660208301527fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c910160405180910390a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b611529611a7e565b6001600160a01b0381166115505760405163ef945a6560e01b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f224a554a3f3aadb47d65ed2efd7c15f31f83deeee4b3717ed7ade9dec75c61f6910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156115ff5750825b905060008267ffffffffffffffff16600114801561161c5750303b155b90508115801561162a575080155b156116485760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561167257845460ff60401b1916600160401b1785555b61167b33611bf1565b6001600160a01b038b166116a25760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b038a166116c95760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0389166116f05760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0388166117175760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b03871661173e5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0386166117655760405163ef945a6560e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b038e8116919091179092556001805482168d84161790556002805482168c84161790556007805482168b84161790556003805482168a841617905560048054909116918816919091179055831561180d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b60008061182683611b59565b6007549092506001600160a01b0390811690831603611843575060015b915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00611328565b611879611a7e565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556118bd611303565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6000546001600160a01b031661191f57604051635ce3a26360e01b815260040160405180910390fd5b6000546001546040516340c10f1960e01b81526001600160a01b0391821660048201526024810184905291169081906340c10f1990604401600060405180830381600087803b15801561197157600080fd5b505af1158015611985573d6000803e3d6000fd5b505050507f61f887a2f5c9e7b476f4c3dab1560bc4f01d991be63db8ab9dd0d826044ae1158260405161147d91815260200190565b6000546001600160a01b03166119e357604051635ce3a26360e01b815260040160405180910390fd5b600054600154604051632770a7eb60e21b81526001600160a01b039182166004820152602481018490529116908190639dc29fac90604401600060405180830381600087803b158015611a3557600080fd5b505af1158015611a49573d6000803e3d6000fd5b505050507f4addf2dd216e30ceae7fd7eea5312852e3471df45182db976a324001db87c0b08260405161147d91815260200190565b33611a87611303565b6001600160a01b0316146112315760405163118cdaa760e01b81523360048201526024016107d8565b60005b600854811015611aed578160088281548110611ad157611ad1611faf565b906000526020600020015403611ae5575050565b600101611ab3565b50600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018190556040518181527f81b76ca0f2f5caf9af258fb0d9955478a105e304a99322dd21ee8f35dcb494a69060200160405180910390a150565b6000818152600660205260409020546001600160a01b031680611b8457506007546001600160a01b03165b816001600160a01b038216611baf57604051636efcc08960e01b81526004016107d891815260200190565b50919050565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155611bed82611c02565b5050565b611bf9611c73565b6111be81611cbc565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661123157604051631afcd79f60e31b815260040160405180910390fd5b611cc4611c73565b6001600160a01b03811661126f57604051631e4fbdf760e01b8152600060048201526024016107d8565b6001600160a01b03811681146111be57600080fd5b60008060408385031215611d1657600080fd5b823591506020830135611d2881611cee565b809150509250929050565b600060208284031215611d4557600080fd5b8135611d5081611cee565b9392505050565b600060208284031215611d6957600080fd5b5035919050565b600080600060408486031215611d8557600080fd5b83359250602084013567ffffffffffffffff811115611da357600080fd5b8401601f81018613611db457600080fd5b803567ffffffffffffffff811115611dcb57600080fd5b866020828401011115611ddd57600080fd5b939660209190910195509293505050565b60008060008060808587031215611e0457600080fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215611e4b57600080fd5b8335925060208401359150604084013567ffffffffffffffff811115611e7057600080fd5b8401601f81018613611e8157600080fd5b803567ffffffffffffffff811115611e9b57611e9b611e20565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611eca57611eca611e20565b604052818152828201602001881015611ee257600080fd5b816020840160208301376000602083830101528093505050509250925092565b80151581146111be57600080fd5b600060208284031215611f2257600080fd5b8135611d5081611f02565b60008060008060008060c08789031215611f4657600080fd5b8635611f5181611cee565b95506020870135611f6181611cee565b94506040870135611f7181611cee565b93506060870135611f8181611cee565b92506080870135611f9181611cee565b915060a0870135611fa181611cee565b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611fee57611fee611fc5565b92915050565b81810381811115611fee57611fee611fc5565b60006020828403121561201957600080fd5b5051919050565b60006020828403121561203257600080fd5b8151611d5081611f02565b634e487b7160e01b600052603160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000612090602083018486612053565b949350505050565b838152604060208201526000610f39604083018486612053565b828152604060208201526000825180604084015260005b818110156120e657602081860181015160608684010152016120c9565b506000606082850101526060601f19601f830116840101915050939250505056fea26469706673582212201e23aa3570f1fd06eff45579b818bbd60f9096ea87dc25d1808dc34f0ba5b4c564736f6c634300081b0033

Deployed Bytecode

0x6080604052600436106101fc5760003560e01c8063715018a61161010d578063a694fc3a116100a0578063cc2a9a5b1161006f578063cc2a9a5b146105f2578063ddeadbb614610612578063e30c397814610651578063f2fde38b14610666578063f5715d561461068657600080fd5b8063a694fc3a14610572578063b3ab15fb14610592578063bfab2bb6146105b2578063c235fb14146105d257600080fd5b806382257e3f116100dc57806382257e3f146104f35780638da5cb5b146105135780638e29ebb514610528578063983586d91461054857600080fd5b8063715018a614610489578063734e6cad1461049e578063740b91f4146104be57806379ba5097146104de57600080fd5b80633b24b5471161019057806357039e911161015f57806357039e9114610400578063570ca73514610413578063582f1da21461043357806358951c68146104535780637129bbac1461047357600080fd5b80633b24b5471461035e578063405a2c1c146103a057806350d7be5f146103c057806351eafd87146103e057600080fd5b80631b449f06116101cc5780631b449f06146102de57806321d93090146102fe57806328ed3db61461031e5780633924c33c1461033e57600080fd5b80625c54fc14610240578063029c9ae914610257578063059f8b16146102945780630f3b647e146102be57600080fd5b3661023b57604080513381523460208201527fbfe611b001dfcd411432f7bf0d79b82b4b2ee81511edac123a3403c357fb972a910160405180910390a1005b600080fd5b34801561024c57600080fd5b506102556106dd565b005b34801561026357600080fd5b50600154610277906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102a057600080fd5b506102b0670de0b6b3a764000081565b60405190815260200161028b565b3480156102ca57600080fd5b506102556102d9366004611d03565b610a64565b3480156102ea57600080fd5b506102556102f9366004611d33565b610b05565b34801561030a57600080fd5b506102b0610319366004611d57565b610b9d565b34801561032a57600080fd5b50610255610339366004611d57565b610bbe565b34801561034a57600080fd5b50610255610359366004611d33565b610cdc565b34801561036a57600080fd5b5061037e610379366004611d57565b610d74565b604080518251815260208084015190820152918101519082015260600161028b565b3480156103ac57600080fd5b506102556103bb366004611d57565b610dd1565b3480156103cc57600080fd5b506102b06103db366004611d70565b610e1a565b3480156103ec57600080fd5b506102556103fb366004611dee565b610f42565b61025561040e366004611e36565b61108b565b34801561041f57600080fd5b50600454610277906001600160a01b031681565b34801561043f57600080fd5b5061025561044e366004611d57565b6111ad565b34801561045f57600080fd5b5061025561046e366004611f10565b6111c1565b34801561047f57600080fd5b506102b060095481565b34801561049557600080fd5b5061025561121f565b3480156104aa57600080fd5b50600754610277906001600160a01b031681565b3480156104ca57600080fd5b50600254610277906001600160a01b031681565b3480156104ea57600080fd5b50610255611233565b3480156104ff57600080fd5b5061025561050e366004611d33565b611278565b34801561051f57600080fd5b50610277611303565b34801561053457600080fd5b50600354610277906001600160a01b031681565b34801561055457600080fd5b50600a546105629060ff1681565b604051901515815260200161028b565b34801561057e57600080fd5b5061025561058d366004611d57565b611338565b34801561059e57600080fd5b506102556105ad366004611d33565b611489565b3480156105be57600080fd5b506102556105cd366004611d33565b611521565b3480156105de57600080fd5b50600054610277906001600160a01b031681565b3480156105fe57600080fd5b5061025561060d366004611f2d565b6115b9565b34801561061e57600080fd5b5061063261062d366004611d57565b61181a565b604080516001600160a01b03909316835290151560208301520161028b565b34801561065d57600080fd5b50610277611848565b34801561067257600080fd5b50610255610681366004611d33565b611871565b34801561069257600080fd5b506106c26106a1366004611d57565b60056020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161028b565b600a5460ff1661070057604051630cfb2abb60e41b815260040160405180910390fd5b600080600880548060200260200160405190810160405280929190818152602001828054801561074f57602002820191906000526020600020905b81548152602001906001019080831161073b575b5050505050905060006008805490501161077c57604051634c25b0bb60e01b815260040160405180910390fd5b60005b81518110156107fd57600082828151811061079c5761079c611faf565b6020026020010151905060006107b182610d74565b805190915082906107e1576040516335a6861360e11b81526004016107d891815260200190565b60405180910390fd5b5060408101516107f19086611fdb565b9450505060010161077f565b50816009541015610888576000600954836108189190611ff4565b9050610823816118f6565b6009547f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08906108528382611fdb565b6040805192835260208301919091520160405180910390a1806009600082825461087c9190611fdb565b9091555061091f915050565b816009541115610906576000826009546108a29190611ff4565b90506108ad816119ba565b6009547f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08906108dc8382611ff4565b6040805192835260208301919091520160405180910390a1806009600082825461087c9190611ff4565b604051637bb44c2160e11b815260040160405180910390fd5b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610968573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098c9190612007565b90508015610a5f5760005460015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af11580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190612020565b610a2a57604051638205342760e01b815260040160405180910390fd5b6040518181527f4ae5bd787f4cd94b85a88836b5cefe362f37828a82ecd6172ae39aa907f3dec9906020015b60405180910390a15b505050565b610a6c611a7e565b6001600160a01b038116610a935760405163ef945a6560e01b815260040160405180910390fd5b600082815260066020526040902080546001600160a01b0319166001600160a01b038316179055610ac382611ab0565b6040516001600160a01b038216815282907f36faf335eb63af51ba93e9dd185ae816d74a9bac978bc399b49b11137ecd48189060200160405180910390a25050565b610b0d611a7e565b6001600160a01b038116610b345760405163ef945a6560e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527ffc944a5f86de9fcfac9dd7587ad1fbfb44e832bfeddec35cad2884cab5d7da65910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b60088181548110610bad57600080fd5b600091825260209091200154905081565b610bc6611a7e565b600080805b600854811015610c0d578360088281548110610be957610be9611faf565b906000526020600020015403610c055780925060019150610c0d565b600101610bcb565b508281610c30576040516354a5785b60e11b81526004016107d891815260200190565b5060088054610c4190600190611ff4565b81548110610c5157610c51611faf565b906000526020600020015460088381548110610c6f57610c6f611faf565b6000918252602090912001556008805480610c8c57610c8c61203d565b600190038181906000526020600020016000905590557f6065156fce04c2111fb2766a72318ef9845d87e0e4eebcf9c3400d1b0d22f4228383604051610a56929190918252602082015260400190565b610ce4611a7e565b6001600160a01b038116610d0b5760405163ef945a6560e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fe8282554581f4f6dcc4a6fbb857f7e89cad72736bcb699bf4205e3665b8e7066910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b610d9860405180606001604052806000815260200160008152602001600081525090565b50600090815260056020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915290565b610dd9611a7e565b60095460408051918252602082018390527f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08910160405180910390a1600955565b600080610e2685611b59565b90506001600160a01b038116610e4f57604051636389838560e11b815260040160405180910390fd5b604051638d02167d60e01b81526001600160a01b03821690638d02167d90610e7d908790879060040161207c565b602060405180830381865afa158015610e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebe9190612007565b604051632296888760e11b81526001600160a01b0383169063452d110e90610eee90899089908990600401612098565b602060405180830381865afa158015610f0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2f9190612007565b610f399190611ff4565b95945050505050565b83610f4c81611b59565b6001600160a01b0316336001600160a01b031614610f7d576040516308ce245d60e31b815260040160405180910390fd5b8342811115610fa2576040516336ce2d0f60e11b81526004016107d891815260200190565b506000858152600560209081526040918290208251606081018452815480825260018301549382019390935260029091015492810192909252156110085780518590811161100657604051636e6f496160e01b81526004016107d891815260200190565b505b6040805160608082018352878252602080830188815283850188815260008c8152600584528690208551815591516001830155516002909101558351898152908101889052928301869052909188917f32d49425af41fa76a45e8ef674babb83acc4d8312d2dffe76903c97b7089249a910160405180910390a250505050505050565b6004546001600160a01b03163314806110bc57506110a7611303565b6001600160a01b0316336001600160a01b0316145b6110d9576040516327e1f1e560e01b815260040160405180910390fd5b60006110e484611b59565b90506001600160a01b03811661110d57604051636389838560e11b815260040160405180910390fd5b476111183485611fdb565b1115839061113c57604051636e5b995960e11b81526004016107d891815260200190565b506001600160a01b0381166335d439496111563486611fdb565b86856040518463ffffffff1660e01b81526004016111759291906120b2565b6000604051808303818588803b15801561118e57600080fd5b505af11580156111a2573d6000803e3d6000fd5b505050505050505050565b6111b5611a7e565b6111be81611ab0565b50565b6111c9611a7e565b600a546040805160ff9092161515825282151560208301527fd5c31b9c0e8a01c501ba52c814e2ad86843d0b06abcc9d5f19ea1b2a3f482c29910160405180910390a1600a805460ff1916911515919091179055565b611227611a7e565b6112316000611bb5565b565b338061123d611848565b6001600160a01b03161461126f5760405163118cdaa760e01b81526001600160a01b03821660048201526024016107d8565b6111be81611bb5565b611280611a7e565b6001600160a01b0381166112a75760405163ef945a6560e01b815260040160405180910390fd5b6007546040516001600160a01b038084169216907f45d051af501a72e3e9cb0c59c70e94521b42cf1ba723cd0956bf5b8321616c4590600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6004546001600160a01b03163314806113695750611354611303565b6001600160a01b0316336001600160a01b0316145b611386576040516327e1f1e560e01b815260040160405180910390fd5b6002546001600160a01b03166113af5760405163d667ca4560e01b815260040160405180910390fd5b8047478211156113db576040516306836a2960e21b8152600481019290925260248201526044016107d8565b50506002546040516000916001600160a01b03169083908381818185875af1925050503d806000811461142a576040519150601f19603f3d011682016040523d82523d6000602084013e61142f565b606091505b505090508061145157604051638205342760e01b815260040160405180910390fd5b6040518281527f17be455e052eee2a6239378a3ba4f2f8bae4c0d1526bad8ad0d773cb1492bbd0906020015b60405180910390a15050565b611491611a7e565b6001600160a01b0381166114b85760405163ef945a6560e01b815260040160405180910390fd5b600454604080516001600160a01b03928316815291831660208301527fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c910160405180910390a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b611529611a7e565b6001600160a01b0381166115505760405163ef945a6560e01b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f224a554a3f3aadb47d65ed2efd7c15f31f83deeee4b3717ed7ade9dec75c61f6910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156115ff5750825b905060008267ffffffffffffffff16600114801561161c5750303b155b90508115801561162a575080155b156116485760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561167257845460ff60401b1916600160401b1785555b61167b33611bf1565b6001600160a01b038b166116a25760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b038a166116c95760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0389166116f05760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0388166117175760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b03871661173e5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0386166117655760405163ef945a6560e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b038e8116919091179092556001805482168d84161790556002805482168c84161790556007805482168b84161790556003805482168a841617905560048054909116918816919091179055831561180d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b60008061182683611b59565b6007549092506001600160a01b0390811690831603611843575060015b915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00611328565b611879611a7e565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556118bd611303565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6000546001600160a01b031661191f57604051635ce3a26360e01b815260040160405180910390fd5b6000546001546040516340c10f1960e01b81526001600160a01b0391821660048201526024810184905291169081906340c10f1990604401600060405180830381600087803b15801561197157600080fd5b505af1158015611985573d6000803e3d6000fd5b505050507f61f887a2f5c9e7b476f4c3dab1560bc4f01d991be63db8ab9dd0d826044ae1158260405161147d91815260200190565b6000546001600160a01b03166119e357604051635ce3a26360e01b815260040160405180910390fd5b600054600154604051632770a7eb60e21b81526001600160a01b039182166004820152602481018490529116908190639dc29fac90604401600060405180830381600087803b158015611a3557600080fd5b505af1158015611a49573d6000803e3d6000fd5b505050507f4addf2dd216e30ceae7fd7eea5312852e3471df45182db976a324001db87c0b08260405161147d91815260200190565b33611a87611303565b6001600160a01b0316146112315760405163118cdaa760e01b81523360048201526024016107d8565b60005b600854811015611aed578160088281548110611ad157611ad1611faf565b906000526020600020015403611ae5575050565b600101611ab3565b50600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018190556040518181527f81b76ca0f2f5caf9af258fb0d9955478a105e304a99322dd21ee8f35dcb494a69060200160405180910390a150565b6000818152600660205260409020546001600160a01b031680611b8457506007546001600160a01b03165b816001600160a01b038216611baf57604051636efcc08960e01b81526004016107d891815260200190565b50919050565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155611bed82611c02565b5050565b611bf9611c73565b6111be81611cbc565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661123157604051631afcd79f60e31b815260040160405180910390fd5b611cc4611c73565b6001600160a01b03811661126f57604051631e4fbdf760e01b8152600060048201526024016107d8565b6001600160a01b03811681146111be57600080fd5b60008060408385031215611d1657600080fd5b823591506020830135611d2881611cee565b809150509250929050565b600060208284031215611d4557600080fd5b8135611d5081611cee565b9392505050565b600060208284031215611d6957600080fd5b5035919050565b600080600060408486031215611d8557600080fd5b83359250602084013567ffffffffffffffff811115611da357600080fd5b8401601f81018613611db457600080fd5b803567ffffffffffffffff811115611dcb57600080fd5b866020828401011115611ddd57600080fd5b939660209190910195509293505050565b60008060008060808587031215611e0457600080fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215611e4b57600080fd5b8335925060208401359150604084013567ffffffffffffffff811115611e7057600080fd5b8401601f81018613611e8157600080fd5b803567ffffffffffffffff811115611e9b57611e9b611e20565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611eca57611eca611e20565b604052818152828201602001881015611ee257600080fd5b816020840160208301376000602083830101528093505050509250925092565b80151581146111be57600080fd5b600060208284031215611f2257600080fd5b8135611d5081611f02565b60008060008060008060c08789031215611f4657600080fd5b8635611f5181611cee565b95506020870135611f6181611cee565b94506040870135611f7181611cee565b93506060870135611f8181611cee565b92506080870135611f9181611cee565b915060a0870135611fa181611cee565b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611fee57611fee611fc5565b92915050565b81810381811115611fee57611fee611fc5565b60006020828403121561201957600080fd5b5051919050565b60006020828403121561203257600080fd5b8151611d5081611f02565b634e487b7160e01b600052603160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000612090602083018486612053565b949350505050565b838152604060208201526000610f39604083018486612053565b828152604060208201526000825180604084015260005b818110156120e657602081860181015160608684010152016120c9565b506000606082850101526060601f19601f830116840101915050939250505056fea26469706673582212201e23aa3570f1fd06eff45579b818bbd60f9096ea87dc25d1808dc34f0ba5b4c564736f6c634300081b0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.