ETH Price: $3,073.82 (+3.46%)
Gas: 8 Gwei

Contract

0xA4ab5E1bD2609DAf29b4970481c89faF1EB7583D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040200798472024-06-13 2:13:2326 days ago1718244803IN
 Create: EtherFiNode
0 ETH0.0703863514.60274239

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EtherFiNode

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 2000 runs

Other Settings:
paris EvmVersion
File 1 of 23 : EtherFiNode.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "./interfaces/IEtherFiNode.sol";
import "./interfaces/IEtherFiNodesManager.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./eigenlayer-interfaces/IEigenPodManager.sol";
import "./eigenlayer-interfaces/IDelayedWithdrawalRouter.sol";
import "./eigenlayer-interfaces/IDelegationManager.sol";
import "forge-std/console.sol";

contract EtherFiNode is IEtherFiNode {
    address public etherFiNodesManager;

    uint256 public DEPRECATED_localRevenueIndex;
    uint256 public DEPRECATED_vestedAuctionRewards;
    string public DEPRECATED_ipfsHashForEncryptedValidatorKey;
    uint32 public DEPRECATED_exitRequestTimestamp;
    uint32 public DEPRECATED_exitTimestamp;
    uint32 public DEPRECATED_stakingStartTimestamp;
    VALIDATOR_PHASE public DEPRECATED_phase;

    uint32 public DEPRECATED_restakingObservedExitBlock;
    address public eigenPod;

    /// @dev Is this withdrawal safe is configured for restaking within the etherfi protocol.
    ///      Independent of whether the associated eigenpod has toggled its hasRestaked flag.
    bool public isRestakingEnabled;

    uint16 public version;
    uint16 private _numAssociatedValidators; // num validators in {LIVE, BEING_SLASHED, EXITED} phase
    uint16 public numExitRequestsByTnft;
    uint16 public numExitedValidators; // EXITED & but not FULLY_WITHDRAWN

    mapping(uint256 => uint256) public associatedValidatorIndices;
    uint256[] public associatedValidatorIds; // validators in {STAKE_DEPOSITED, WAITING_FOR_APPROVAL, LIVE, BEING_SLASHED, EXITED} phase

    // Track the amount of pending/completed withdrawals;
    uint64 public pendingWithdrawalFromRestakingInGwei; // incremented when the delayed withdrawal (from EigenPod to EtherFiNode) is queued, decremented when it is completed
    uint64 public completedWithdrawalFromRestakingInGwei; // incremented when the delayed withdarwal is completed, decremented when the fund is withdrawan (from EtherFiNode to the externals via fullWithdraw call)

    // eigenLayer phase 1 bookeeping
    // we need to mark a block from which we know all beaconchain eth has been moved to the eigenPod
    // so that we can properly calculate exit payouts and ensure queued withdrawals have been resolved
    // (eigenLayer withdrawals are tied to blocknumber instead of timestamp)
    mapping(uint256 => uint32) restakingObservedExitBlocks;

    error CallFailed(bytes data);

    event EigenPodCreated(address indexed nodeAddress, address indexed podAddress);

    //--------------------------------------------------------------------------------------
    //----------------------------------  CONSTRUCTOR   ------------------------------------
    //--------------------------------------------------------------------------------------

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        etherFiNodesManager = address(0x000000000000000000000000000000000000dEaD); // prevent initialization of the proxy implementation
    }

    /// @notice Based on the sources where they come from, the staking rewards are split into
    ///  - those from the execution layer: transaction fees and MEV
    ///  - those from the consensus layer: staking rewards for attesting the state of the chain, 
    ///    proposing a new block, or being selected in a validator sync committee
    ///  To receive the rewards from the execution layer, it should have 'receive()' function.
    receive() external payable {}

    /// @dev called once immediately after creating a new instance of a EtheriNode beacon proxy
    function initialize(address _etherFiNodesManager) external {
        require(DEPRECATED_phase == VALIDATOR_PHASE.NOT_INITIALIZED, "ALREADY_INITIALIZED");
        require(etherFiNodesManager == address(0), "ALREADY_INITIALIZED");
        require(_etherFiNodesManager != address(0), "NO_ZERO_ADDRESS");
        etherFiNodesManager = _etherFiNodesManager;
        version = 1;
    }

    // Update the safe contract from verison 0 to version 1
    // if `_validatorId` != 0, the v0 safe contract currently is tied to the validator with its id = `_validatorId`
    // this function updates it to v1 so that it can be used by multiple validators 
    // else `_validatorId` == 0, this safe is not tied to any validator yet
    function migrateVersion(uint256 _validatorId, IEtherFiNodesManager.ValidatorInfo memory _info) external onlyEtherFiNodeManagerContract {
        if (version != 0) return;
        
        DEPRECATED_exitRequestTimestamp = 0;
        DEPRECATED_exitTimestamp = 0;
        DEPRECATED_stakingStartTimestamp = 0;
        DEPRECATED_phase = VALIDATOR_PHASE.NOT_INITIALIZED;
        delete DEPRECATED_ipfsHashForEncryptedValidatorKey;

        version = 1;

        if (_validatorId != 0) {
            require(_numAssociatedValidators == 0, "ALREADY_INITIALIZED");
            registerValidator(_validatorId, false);

            updateNumberOfAssociatedValidators(1, 0);

            // Meaning that the validator got `sendExitRequest` before the safe version 1 release
            // EFM._updateExitRequestTimestamp (which updates 'numExitRequestsByTnft') was not called. So, process that here
            if (_info.exitRequestTimestamp > 0) {
                updateNumExitRequests(1, 0);
            }

            // Meaning that the validator got `processNodeExit` before the safe version 1 release
            // EFM._setValidatorPhase (which updates 'numExitedValidators') was not called. So, process that here
            if (_info.exitTimestamp > 0) {
                updateNumExitedValidators(1, 0);
            }
        }
    }

    // At version 0, an EtherFiNode contract is associated with only one validator
    // After version 1, it can be associated with multiple validators having the same (B-nft, T-nft, node operator) 
    // returns the number of the validators in {LIVE, BEING_SLASHED, EXITED} phase associated with this safe
    function numAssociatedValidators() public view returns (uint256) {
        if (version == 0) {
            // For the safe at version 0, `phase` variable is still valid and can be used to check if the validator is still active 
            if (DEPRECATED_phase == VALIDATOR_PHASE.LIVE || DEPRECATED_phase == VALIDATOR_PHASE.BEING_SLASHED || DEPRECATED_phase == VALIDATOR_PHASE.EXITED) {
                return 1;
            } else {
                return 0;
            }
        } else {
            return _numAssociatedValidators;
        }
    }

    function registerValidator(uint256 _validatorId, bool _enableRestaking) public onlyEtherFiNodeManagerContract ensureLatestVersion {
        require(numAssociatedValidators() == 0 || isRestakingEnabled == _enableRestaking, "restaking status mismatch");

        {
            uint256 index = associatedValidatorIds.length;
            associatedValidatorIds.push(_validatorId);
            associatedValidatorIndices[_validatorId] = index;
        }

        if (_enableRestaking) {
            isRestakingEnabled = true;
            createEigenPod(); // NOOP if already exists
        }
    }

    /// @dev deRegister the validator from the safe
    ///      if there is no more validator associated with this safe, it is recycled to be used again in the withdrawal safe pool
    function unRegisterValidator(
        uint256 _validatorId,
        IEtherFiNodesManager.ValidatorInfo memory _info
    ) external onlyEtherFiNodeManagerContract ensureLatestVersion returns (bool) {        
        require(_info.phase == VALIDATOR_PHASE.FULLY_WITHDRAWN || _info.phase == VALIDATOR_PHASE.NOT_INITIALIZED, "invalid phase");

        // If the phase changed from EXITED to FULLY_WITHDRAWN, decrement the counter
        if (_info.phase == VALIDATOR_PHASE.FULLY_WITHDRAWN) {
            numExitedValidators -= 1;
        }

        // If there was an exit request, decrement the number of exit requests
        if (_info.exitRequestTimestamp != 0) {
            numExitRequestsByTnft -= 1;
        }

        {
            uint256 index = associatedValidatorIndices[_validatorId];
            uint256 endIndex = associatedValidatorIds.length - 1;
            uint256 end = associatedValidatorIds[endIndex];

            associatedValidatorIds[index] = associatedValidatorIds[endIndex];
            associatedValidatorIndices[end] = index;
            
            associatedValidatorIds.pop();
            delete associatedValidatorIndices[_validatorId];
        }
        
        if (associatedValidatorIds.length == 0) {
            require(numAssociatedValidators() == 0, "INVALID_STATE");

            restakingObservedExitBlocks[_validatorId] = 0;
            isRestakingEnabled = false;
            return true;
        }
        return false;
    }

    //--------------------------------------------------------------------------------------
    //----------------------------  STATE-CHANGING FUNCTIONS  ------------------------------
    //--------------------------------------------------------------------------------------

    function updateNumberOfAssociatedValidators(uint16 _up, uint16 _down) public onlyEtherFiNodeManagerContract ensureLatestVersion {
        if (_up > 0) _numAssociatedValidators += _up;
        if (_down > 0) _numAssociatedValidators -= _down;
    }

    function updateNumExitRequests(uint16 _up, uint16 _down) public onlyEtherFiNodeManagerContract ensureLatestVersion {
        if (_up > 0) numExitRequestsByTnft += _up;
        if (_down > 0) numExitRequestsByTnft -= _down;
    }

    function updateNumExitedValidators(uint16 _up, uint16 _down) public onlyEtherFiNodeManagerContract ensureLatestVersion {
        if (_up > 0) numExitedValidators += _up;
        if (_down > 0) numExitedValidators -= _down;
    }

    /// @notice process the exit
    // TODO: make it permission-less call
    function processNodeExit(uint256 _validatorId) external onlyEtherFiNodeManagerContract ensureLatestVersion returns (bytes32[] memory fullWithdrawalRoots) {
        if (isRestakingEnabled) {
            // eigenLayer bookeeping
            // we need to mark a block from which we know all beaconchain eth has been moved to the eigenPod
            // so that we can properly calculate exit payouts and ensure queued withdrawals have been resolved
            // (eigenLayer withdrawals are tied to blocknumber instead of timestamp)
            restakingObservedExitBlocks[_validatorId] = uint32(block.number);

            fullWithdrawalRoots = _queueEigenpodFullWithdrawal();
            require(fullWithdrawalRoots.length == 1, "NO_FULLWITHDRAWAL_QUEUED");
        }
    }

    function processFullWithdraw(uint256 _validatorId) external onlyEtherFiNodeManagerContract ensureLatestVersion {
        updateNumberOfAssociatedValidators(0, 1);

        if (isRestakingEnabled) {
            // TODO: revisit for the case of slashing
            require(completedWithdrawalFromRestakingInGwei >= 32 ether / 1 gwei, "INSUFFICIENT_BALANCE");
            completedWithdrawalFromRestakingInGwei -= uint64(32 ether / 1 gwei);
        }
    }

    function completeQueuedWithdrawal(IDelegationManager.Withdrawal memory withdrawals, uint256 middlewareTimesIndexes) external {
        IDelegationManager.Withdrawal[] memory _withdrawals = new IDelegationManager.Withdrawal[](1);
        _withdrawals[0] = withdrawals;
        uint256[] memory _middlewareTimesIndexes = new uint256[](1);
        _middlewareTimesIndexes[0] = middlewareTimesIndexes;
        return _completeQueuedWithdrawals(_withdrawals, _middlewareTimesIndexes);
    }

    function completeQueuedWithdrawals(IDelegationManager.Withdrawal[] memory withdrawals, uint256[] memory middlewareTimesIndexes) external {
        return _completeQueuedWithdrawals(withdrawals, middlewareTimesIndexes);
    }

    function _completeQueuedWithdrawals(IDelegationManager.Withdrawal[] memory withdrawals, uint256[] memory middlewareTimesIndexes) internal {
        uint256 totalAmount = 0;

        bool[] memory receiveAsTokens = new bool[](withdrawals.length);
        IERC20[][] memory tokens = new IERC20[][](withdrawals.length);
        for (uint256 i = 0; i < withdrawals.length; i++) {
            require(withdrawals[i].withdrawer == address(this) && withdrawals[i].staker == address(this), "INVALID");

            receiveAsTokens[i] = true;
            tokens[i] = new IERC20[](withdrawals[i].strategies.length);
            for (uint256 j = 0; j < withdrawals[i].shares.length; j++) {
                totalAmount += withdrawals[i].shares[j];
            }
        }

        pendingWithdrawalFromRestakingInGwei -= uint64(totalAmount / 1 gwei);
        completedWithdrawalFromRestakingInGwei += uint64(totalAmount / 1 gwei);

        IDelegationManager mgr = IEtherFiNodesManager(etherFiNodesManager).delegationManager();
        mgr.completeQueuedWithdrawals(withdrawals, tokens, middlewareTimesIndexes, receiveAsTokens);
    }

    /// @dev transfer funds from the withdrawal safe to the 4 associated parties (bNFT, tNFT, treasury, nodeOperator)
    function withdrawFunds(
        address _treasury, uint256 _treasuryAmount,
        address _operator, uint256 _operatorAmount,
        address _tnftHolder, uint256 _tnftAmount,
        address _bnftHolder, uint256 _bnftAmount
    ) external onlyEtherFiNodeManagerContract ensureLatestVersion {
        // the recipients of the funds must be able to receive the fund
        // if it is a smart contract, they should implement either receive() or fallback() properly
        // It's designed to prevent malicious actors from pausing the withdrawals
        bool sent;
        if (_operatorAmount > 0) {
            (sent, ) = payable(_operator).call{value: _operatorAmount, gas: 10000}("");
            _treasuryAmount += (!sent) ? _operatorAmount : 0;
        }
        if (_bnftAmount > 0) {
            (sent, ) = payable(_bnftHolder).call{value: _bnftAmount, gas: 12000}("");
            _treasuryAmount += (!sent) ? _bnftAmount : 0;
        }
        if (_tnftAmount > 0) {
            (sent, ) = payable(_tnftHolder).call{value: _tnftAmount, gas: 12000}("");
            _treasuryAmount += (!sent) ? _tnftAmount : 0;
        }
        if (_treasuryAmount > 0) {
            (sent, ) = _treasury.call{value: _treasuryAmount, gas: 2300}("");
            require(sent, "ETH_SEND_FAILED");
        }
    }

    //--------------------------------------------------------------------------------------
    //--------------------------------------  GETTER  --------------------------------------
    //--------------------------------------------------------------------------------------

    /// @notice Fetch the staking rewards accrued in the safe that can be paid out to (toNodeOperator, toTnft, toBnft, toTreasury)
    /// @param _splits the splits for the staking rewards
    ///
    /// @return toNodeOperator  the payout to the Node Operator
    /// @return toTnft          the payout to the T-NFT holder
    /// @return toBnft          the payout to the B-NFT holder
    /// @return toTreasury      the payout to the Treasury
    function getRewardsPayouts(
        uint32 _exitRequestTimestamp,
        IEtherFiNodesManager.RewardsSplit memory _splits
    ) public view returns (uint256, uint256, uint256, uint256) {
        uint256 _balance = withdrawableBalanceInExecutionLayer();
        return _calculateSplits(_balance, _splits);
    }

    /// @notice Compute the non exit penalty for the b-nft holder
    /// @param _tNftExitRequestTimestamp the timestamp when the T-NFT holder asked the B-NFT holder to exit the node
    /// @param _bNftExitRequestTimestamp the timestamp when the B-NFT holder submitted the exit request to the beacon network
    function getNonExitPenalty(
        uint32 _tNftExitRequestTimestamp, 
        uint32 _bNftExitRequestTimestamp
    ) public view returns (uint256) {
        if (_tNftExitRequestTimestamp == 0) return 0;

        uint128 _penaltyPrinciple = IEtherFiNodesManager(etherFiNodesManager).nonExitPenaltyPrincipal();
        uint64 _dailyPenalty = IEtherFiNodesManager(etherFiNodesManager).nonExitPenaltyDailyRate();
        uint256 daysElapsed = _getDaysPassedSince(_tNftExitRequestTimestamp, _bNftExitRequestTimestamp);
        if (daysElapsed > 365) {
            return _penaltyPrinciple;
        }

        uint256 remaining = _penaltyPrinciple;
        while (daysElapsed > 0) {
            uint256 exponent = Math.min(7, daysElapsed);
            remaining = (remaining * (10000 - uint256(_dailyPenalty)) ** exponent) / (10000 ** exponent);
            daysElapsed -= Math.min(7, daysElapsed);
        }

        return _penaltyPrinciple - remaining;
    }

    /// @notice total balance (in the execution layer) of this withdrawal safe split into its component parts.
    ///   1. the withdrawal safe balance
    ///   2. the EigenPod balance
    ///   3. the withdrawals pending in DelayedWithdrawalRouter
    function splitBalanceInExecutionLayer() public view returns (uint256 _withdrawalSafe, uint256 _eigenPod, uint256 _delayedWithdrawalRouter) {
        _withdrawalSafe = address(this).balance;

        if (isRestakingEnabled) {
            _eigenPod = eigenPod.balance;

            IDelayedWithdrawalRouter delayedWithdrawalRouter = IDelayedWithdrawalRouter(IEtherFiNodesManager(etherFiNodesManager).delayedWithdrawalRouter());
            IDelayedWithdrawalRouter.DelayedWithdrawal[] memory delayedWithdrawals = delayedWithdrawalRouter.getUserDelayedWithdrawals(address(this));
            for (uint256 x = 0; x < delayedWithdrawals.length; x++) {
                _delayedWithdrawalRouter += delayedWithdrawals[x].amount;
            }
        }
        return (_withdrawalSafe, _eigenPod, _delayedWithdrawalRouter);
    }


    /// @notice total balance (wei) of this safe currently in the execution layer.
    function totalBalanceInExecutionLayer() public view returns (uint256) {
        (uint256 _safe, uint256 _pod, uint256 _router) = splitBalanceInExecutionLayer();
        return _safe + _pod + _router;
    }

    /// @notice balance (wei) of this safe that could be immediately withdrawn.
    ///         This only differs from the balance in the safe in the case of restaked validators
    ///         because some funds might not be withdrawable yet due to eigenlayer's queued withdrawal system
    function withdrawableBalanceInExecutionLayer() public view returns (uint256) {
        uint256 safeBalance = address(this).balance;
        uint256 claimableBalance = 0;
        if (isRestakingEnabled) {
            IDelayedWithdrawalRouter delayedWithdrawalRouter = IDelayedWithdrawalRouter(IEtherFiNodesManager(etherFiNodesManager).delayedWithdrawalRouter());
            IDelayedWithdrawalRouter.DelayedWithdrawal[] memory claimableWithdrawals = delayedWithdrawalRouter.getClaimableUserDelayedWithdrawals(address(this));
            for (uint256 x = 0; x < claimableWithdrawals.length; x++) {
                claimableBalance += claimableWithdrawals[x].amount;
            }
        }
        return safeBalance + claimableBalance;
    }

    function moveFundsToManager(uint256 _amount) external onlyEtherFiNodeManagerContract {
        (bool sent, ) = etherFiNodesManager.call{value: _amount, gas: 6000}("");
        require(sent, "ETH_SEND_FAILED");
    }

    function getFullWithdrawalPayouts(
        IEtherFiNodesManager.ValidatorInfo memory _info,
        IEtherFiNodesManager.RewardsSplit memory _SRsplits
    ) public view onlyEtherFiNodeManagerContract returns (uint256 toNodeOperator, uint256 toTnft, uint256 toBnft, uint256 toTreasury) {
        if (version == 0 || numAssociatedValidators() == 1) {
            return calculateTVL(0, _info, _SRsplits, true);
        } else if (version == 1) {
            // If (version ==1 && numAssociatedValidators() > 1)
            //  the full withdrwal for a validator only considers its principal amount (= 16 ether ~ 32 ether)
            //  the staking rewards remain in the safe contract
            // Therefore, if a validator is slashed, the accrued staking rewards are used to cover the slashing amount
            // In the upcoming version, the proof system will be ported so that the penalty amount properly considered for withdrawals

            uint256[] memory payouts = new uint256[](4); // (toNodeOperator, toTnft, toBnft, toTreasury)
            uint256 principal = (withdrawableBalanceInExecutionLayer() >= 32 ether) ? 32 ether : withdrawableBalanceInExecutionLayer();
            (payouts[2], payouts[1]) = _calculatePrincipals(principal);
            (payouts[0], payouts[1], payouts[2], payouts[3]) = _applyNonExitPenalty(_info, payouts[0], payouts[1], payouts[2], payouts[3]);

            return (payouts[0], payouts[1], payouts[2], payouts[3]);
        } else {
            require(false, "WRONG_VERSION");
        }
    }

    /// @notice Given the current (phase, beacon balance) of a validator, compute the TVLs for {node operator, t-nft holder, b-nft holder, treasury}
    function getTvlSplits(
        VALIDATOR_PHASE _phase, 
        uint256 _beaconBalance,
        bool _onlyWithdrawable
    ) internal view returns (uint256 stakingRewards, uint256 principal) {
        uint256 numValidators = numAssociatedValidators();
        if (numValidators == 0) return (0, 0);

        // Consider the total balance of the safe in the execution layer
        uint256 balance = _onlyWithdrawable? withdrawableBalanceInExecutionLayer() : totalBalanceInExecutionLayer();

        // Calculate the total principal for the exited validators. 
        // It must be in the range of [16 ether * numExitedValidators, 32 ether * numExitedValidators]
        // since the maximum slashing amount is 16 ether per validator (without considering the slashing from restaking)
        // 
        // Here, the accrued rewards in the safe are used to cover the loss from the slashing
        // For example, say the safe had 1 ether accrued staking rewards, but the validator got slashed till 16 ether
        // After exiting the validator, the safe balance becomes 17 ether (16 ether from the slashed validator, 1 ether was the accrued rewards),
        // the accrued rewards are used to cover the slashing amount, thus, being considered as principal.
        // While this is not the best way to handle it, we acknowledge it as a temporary solution until the more advanced & efficient method is implemented
        require (balance >= 16 ether * numExitedValidators, "INSUFFICIENT_BALANCE");
        uint256 totalPrincipalForExitedValidators = 16 ether * numExitedValidators + Math.min(balance - 16 ether * numExitedValidators, 16 ether * numExitedValidators);

        // The rewards in the safe are split equally among the associated validators
        // The rewards in the beacon are considered as the staking rewards of the current validator being considered
        uint256 stakingRewardsInEL = (balance - totalPrincipalForExitedValidators) / numValidators;
        uint256 stakingRewardsInBeacon = (_beaconBalance > 32 ether ? _beaconBalance - 32 ether : 0);
        stakingRewards = stakingRewardsInEL + stakingRewardsInBeacon;

        // The principal amount is computed
        if (_phase == VALIDATOR_PHASE.EXITED) {
            principal = totalPrincipalForExitedValidators / numExitedValidators;
            require(_beaconBalance == 0, "Exited validator must have zero balanace in the beacon");
        } else if (_phase == VALIDATOR_PHASE.LIVE || _phase == VALIDATOR_PHASE.BEING_SLASHED) {
            principal = _beaconBalance - stakingRewardsInBeacon;
        } else {
            require(false, "INVALID_PHASE");
        }
        require(principal <= 32 ether && principal >= 16 ether, "INCORRECT_AMOUNT");
    }

    /// @notice Given
    ///         - the current balance of the validator in Consensus Layer (or Beacon)
    ///         - the current balance of the ether fi node contract,
    ///         Compute the TVLs for {node operator, t-nft holder, b-nft holder, treasury}
    /// @param _beaconBalance the balance of the validator in Consensus Layer
    /// @param _SRsplits the splits for the Staking Rewards
    ///
    /// @return toNodeOperator  the payout to the Node Operator
    /// @return toTnft          the payout to the T-NFT holder
    /// @return toBnft          the payout to the B-NFT holder
    /// @return toTreasury      the payout to the Treasury
    function calculateTVL(
        uint256 _beaconBalance,
        IEtherFiNodesManager.ValidatorInfo memory _info,
        IEtherFiNodesManager.RewardsSplit memory _SRsplits,
        bool _onlyWithdrawable
    ) public view onlyEtherFiNodeManagerContract returns (uint256, uint256, uint256, uint256) {
        (uint256 stakingRewards, uint256 principal) = getTvlSplits(_info.phase, _beaconBalance, _onlyWithdrawable);
        if (stakingRewards + principal == 0) return (0, 0, 0, 0);

        // Compute the payouts for the staking rewards
        uint256[] memory payouts = new uint256[](4); // (toNodeOperator, toTnft, toBnft, toTreasury)
        (payouts[0], payouts[1], payouts[2], payouts[3]) = _calculateSplits(stakingRewards, _SRsplits);

        // Compute the payouts for the principals to {B, T}-NFTs
        (uint256 toBnftPrincipal, uint256 toTnftPrincipal) = _calculatePrincipals(principal);
        payouts[1] += toTnftPrincipal;
        payouts[2] += toBnftPrincipal;

        // Apply the non-exit penalty to the B-NFT
        (payouts[0], payouts[1], payouts[2], payouts[3]) = _applyNonExitPenalty(_info, payouts[0], payouts[1], payouts[2], payouts[3]);

        require(payouts[0] + payouts[1] + payouts[2] + payouts[3] == stakingRewards + principal, "INCORRECT_AMOUNT");
        return (payouts[0], payouts[1], payouts[2], payouts[3]);
    }


    function callEigenPod(bytes memory data) external onlyEtherFiNodeManagerContract returns (bytes memory) {
        _verifyEigenPodCall(data);
        return Address.functionCall(eigenPod, data);
    }

    // As an optimization, it skips the call to 'etherFiNodesManager' back again to retrieve the target address
    function forwardCall(address to, bytes memory data) external onlyEtherFiNodeManagerContract returns (bytes memory) {
        _verifyForwardCall(to, data);
        return Address.functionCall(to, data);
    }
    
    //--------------------------------------------------------------------------------------
    //-------------------------------  INTERNAL FUNCTIONS  ---------------------------------
    //--------------------------------------------------------------------------------------

    function _verifyEigenPodCall(bytes memory data) internal view {
        bytes4 selector;
        assembly {
            selector := mload(add(data, 0x20))
        }

        // withdrawNonBeaconChainETHBalanceWei
        if (selector == IEigenPod.withdrawNonBeaconChainETHBalanceWei.selector) {
            require(data.length >= 36, "INVALID_DATA_LENGTH");
            address recipient;
            assembly {
                recipient := mload(add(data, 0x24))
            }
            // No withdrawal to any other address than the safe
            require (recipient == address(this), "INCORRECT_RECIPIENT");
        }

        // recoverTokens(IERC20[], uint256[], address)
        if (selector == IEigenPod.recoverTokens.selector) {
            revert("NOT_ALLOWED");
        }
    }

    function _verifyForwardCall(address to, bytes memory data) internal view {
        bytes4 selector;
        assembly {
            selector := mload(add(data, 0x20))
        }
        bool allowed = (selector != IDelegationManager.completeQueuedWithdrawal.selector && selector != IDelegationManager.completeQueuedWithdrawals.selector);
        require (allowed, "NOT_ALLOWED");
    }

    function _applyNonExitPenalty(
        IEtherFiNodesManager.ValidatorInfo memory _info, 
        uint256 _toNodeOperator, 
        uint256 _toTnft, 
        uint256 _toBnft, 
        uint256 _toTreasury
    ) internal view returns (uint256, uint256, uint256, uint256) {
        // NonExitPenalty grows till 1 ether
        uint256 bnftNonExitPenalty = getNonExitPenalty(_info.exitRequestTimestamp, _info.exitTimestamp);
        uint256 appliedPenalty = Math.min(_toBnft, bnftNonExitPenalty);
        uint256 incentiveToNoToExitValidator = Math.min(appliedPenalty, 0.2 ether);

        // Cap the incentive to the operator under 0.2 ether.
        // the rest (= penalty - incentive to NO) goes to the treasury
        _toNodeOperator += incentiveToNoToExitValidator;
        _toTreasury += appliedPenalty - incentiveToNoToExitValidator;
        _toBnft -= appliedPenalty;

        return (_toNodeOperator, _toTnft, _toBnft, _toTreasury);
    }

    /// @notice Calculates values for payouts based on certain parameters
    /// @param _totalAmount The total amount to split
    /// @param _splits The splits for the staking rewards
    ///
    /// @return toNodeOperator  the payout to the Node Operator
    /// @return toTnft          the payout to the T-NFT holder
    /// @return toBnft          the payout to the B-NFT holder
    /// @return toTreasury      the payout to the Treasury
    function _calculateSplits(
        uint256 _totalAmount,
        IEtherFiNodesManager.RewardsSplit memory _splits
    ) internal pure returns (uint256 toNodeOperator, uint256 toTnft, uint256 toBnft, uint256 toTreasury) {
        uint256 scale = _splits.treasury + _splits.nodeOperator + _splits.tnft + _splits.bnft;
        toNodeOperator = (_totalAmount * _splits.nodeOperator) / scale;
        toTnft = (_totalAmount * _splits.tnft) / scale;
        toBnft = (_totalAmount * _splits.bnft) / scale;
        toTreasury = _totalAmount - (toBnft + toTnft + toNodeOperator);
        return (toNodeOperator, toTnft, toBnft, toTreasury);
    }

    /// @notice Calculate the principal for the T-NFT and B-NFT holders based on the balance
    /// @param _balance The balance of the node
    /// @return toBnftPrincipal the principal for the B-NFT holder
    /// @return toTnftPrincipal the principal for the T-NFT holder
    function _calculatePrincipals(
        uint256 _balance
    ) internal pure returns (uint256 , uint256) {
        // Check if the ETH principal withdrawn (16 ETH ~ 32 ETH) from beacon is within this contract
        // If not:
        //  - case 1: ETH is still in the EigenPod contract. Need to get that out
        //  - case 2: ETH is withdrawn from the EigenPod contract, but ETH got slashed and the amount is under 16 ETH
        // Note that the case 2 won't happen until EigenLayer's AVS goes live on mainnet and the slashing mechanism is added
        // We will need upgrades again once EigenLayer's AVS goes live
        require(_balance >= 16 ether && _balance <= 32 ether, "INCORRECT_PRINCIPAL_AMOUNT");
        
        uint256 toBnftPrincipal = (_balance >= 31 ether) ? _balance - 30 ether : 1 ether;
        uint256 toTnftPrincipal = _balance - toBnftPrincipal;
        return (toBnftPrincipal, toTnftPrincipal);
    }

    function _getDaysPassedSince(
        uint32 _startTimestamp,
        uint32 _endTimestamp
    ) public pure returns (uint256) {
        uint256 timeElapsed = _endTimestamp - Math.min(_startTimestamp, _endTimestamp);
        return uint256(timeElapsed / (24 * 3_600));
    }

    /// @dev implementation address for beacon proxy.
    ///      https://docs.openzeppelin.com/contracts/3.x/api/proxy#beacon
    function implementation() external view returns (address) {
        bytes32 slot = bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1);
        address implementationVariable;
        assembly {
            implementationVariable := sload(slot)
        }

        IBeacon beacon = IBeacon(implementationVariable);
        return beacon.implementation();
    }


    //--------------------------------------------------------------------------------------
    //-----------------------------------  RESTAKING  --------------------------------------
    //--------------------------------------------------------------------------------------

    /// @notice create a new eigenPod associated with this withdrawal safe
    /// @dev to take advantage of restaking via eigenlayer the validator associated with this
    ///      withdrawal safe must set their withdrawalCredentials to point to this eigenPod
    ///      and not to the withdrawal safe itself
    function createEigenPod() public {
        if (eigenPod != address(0x0)) return; // already have pod
        IEigenPodManager eigenPodManager = IEigenPodManager(IEtherFiNodesManager(etherFiNodesManager).eigenPodManager());
        eigenPodManager.createPod();
        eigenPod = address(eigenPodManager.getPod(address(this)));
        emit EigenPodCreated(address(this), eigenPod);
    }

    function queuePhase1PartialWithdrawal() public {
        if (!isRestakingEnabled || IEigenPod(eigenPod).hasRestaked()) return;

        // EigenPod has never been truly re-staked.
        IEigenPod(eigenPod).withdrawBeforeRestaking();
    }

    // returns the withdrawal roots for the queued full-withdrawals
    // the {NonBeaconChainEthWithdrawal, partial withdraw}'s queued withdrawals can be retrieved (indexed) on DelayedWithdrawalRouter
    function queueEigenpodFullWithdrawal() public onlyEtherFiNodeManagerContract returns (bytes32[] memory fullWithdrawalRoots) {
        return _queueEigenpodFullWithdrawal();
    }

    function _queueEigenpodFullWithdrawal() private returns (bytes32[] memory fullWithdrawalRoots) {
        if (!isRestakingEnabled) return fullWithdrawalRoots;

        if (!IEigenPod(eigenPod).hasRestaked()) {
            // EigenPod has never re-staked. Then, just withdraw the funds to the withdrawal safe
            IEigenPod(eigenPod).withdrawBeforeRestaking();
        } else {
            // There are three flows of withdrawals from EL: {NonBeaconChainEthWithdrawal, partial withdraw, full withdrawal}
            // All flows are subject to the DelayedWithdrawal put by the EL's DelayedWithdrawalRouter
            // - In the NonBeaconChainEthWithdrawal, the verification is not required and the withdrawal is queued upon the call to `withdrawNonBeaconChainETHBalanceWei`
            // - In the partial withdrawal, the verified withdrawal is immeidately queued 
            // https://github.com/Layr-Labs/eigenlayer-contracts/tree/90a0f6aee79b4a38e1b63b32f9627f21b1162fbb/src/contracts/pods/EigenPod.sol#L717
            // - In the full withdrawal, the verified withdrawal amount is kept in the EigenPod until we call `DelegationManager.queueWithdrawals`
            // https://github.com/Layr-Labs/eigenlayer-contracts/tree/90a0f6aee79b4a38e1b63b32f9627f21b1162fbb/src/contracts/pods/EigenPod.sol#L685
            // 
            // Therefore, here we only need to queue {NonBeaconChainEthWithdrawal, full withdrawal}
            _queueNonBeaconChainEthWithdrawal();
            fullWithdrawalRoots = _queueRestakedFullWithdrawal();
        }

    }

    function _queueNonBeaconChainEthWithdrawal() internal {
        uint256 amountToWithdraw = IEigenPod(eigenPod).nonBeaconChainETHBalanceWei();
        if (amountToWithdraw > 0) IEigenPod(eigenPod).withdrawNonBeaconChainETHBalanceWei(address(this), amountToWithdraw);
    }

    // Once the `EigenPod.activeValidatorCount()` is available. We can make it permission-less
    function _queueRestakedFullWithdrawal() internal returns (bytes32[] memory fullWithdrawalRoots) {
        if (!IEigenPod(eigenPod).hasRestaked()) return fullWithdrawalRoots;

        // calculate the pending amount. The withdrawal proof verification will update the EigenPod's `withdrawableRestakedExecutionLayerGwei` value
        uint256 unclaimedFullWithdrawalAmountInGwei = IEigenPod(eigenPod).withdrawableRestakedExecutionLayerGwei() - pendingWithdrawalFromRestakingInGwei;
        if (unclaimedFullWithdrawalAmountInGwei == 0) return fullWithdrawalRoots;

        // TODO: revisit for the case of slashing
        // we will need to re-visit this logic once the EigenLayer's slashing mechanism is implemented
        // + we need to consider the slashing amount in the full withdrawal from the beacon layer as well
        require(unclaimedFullWithdrawalAmountInGwei >= 32 ether / 1 gwei, "SLASHED");

        // Update the pending withdrawal amount
        // Note that the call to `DelegationManager.queueWithdrawals(...)` won't update the EigenPod's `withdrawableRestakedExecutionLayerGwei`
        // It is updated only when the withdrawal is completed by the `DelegationManager.completeQueuedWithdrawals(...)`
        // That is why we use two variables for accounting
        pendingWithdrawalFromRestakingInGwei += uint64(32 ether / 1 gwei);

        IDelegationManager mgr = IEtherFiNodesManager(etherFiNodesManager).delegationManager();

        // Queue the withdrawal for whatever amount is available
        IDelegationManager.QueuedWithdrawalParams[] memory params = new IDelegationManager.QueuedWithdrawalParams[](1);
        IStrategy[] memory strategies = new IStrategy[](1);
        uint256[] memory shares = new uint256[](1);

        strategies[0] = mgr.beaconChainETHStrategy();
        shares[0] = 32 ether;
        params[0] = IDelegationManager.QueuedWithdrawalParams({
            strategies: strategies,
            shares: shares,
            withdrawer: address(this)
        });

        fullWithdrawalRoots = mgr.queueWithdrawals(params);
    }


    /// @notice claim queued withdrawals (eigenlayer phase1 + phase2 partial withdrawals) from the EigenPod to this withdrawal safe.
    /// @param maxNumWithdrawals maximum number of queued withdrawals to claim in this tx.
    /// @dev usually you will want to call with "maxNumWithdrawals == unclaimedWithdrawals.length
    ///      but if this queue grows too large to process in your target tx you can pass less
    function claimDelayedWithdrawalRouterWithdrawals(uint256 maxNumWithdrawals, bool _checkIfHasOutstandingEigenLayerWithdrawals, uint256 _validatorId) public returns (bool) {
        if (!isRestakingEnabled) return false;

        // only claim if we have active unclaimed withdrawals
        IDelayedWithdrawalRouter delayedWithdrawalRouter = IDelayedWithdrawalRouter(IEtherFiNodesManager(etherFiNodesManager).delayedWithdrawalRouter());
        if (delayedWithdrawalRouter.getUserDelayedWithdrawals(address(this)).length > 0) {
            delayedWithdrawalRouter.claimDelayedWithdrawals(address(this), maxNumWithdrawals);
        }


        if (_checkIfHasOutstandingEigenLayerWithdrawals) {

            if (!isRestakingEnabled) return false;
            IDelayedWithdrawalRouter delayedWithdrawalRouter = IDelayedWithdrawalRouter(IEtherFiNodesManager(etherFiNodesManager).delayedWithdrawalRouter());
            IDelayedWithdrawalRouter.DelayedWithdrawal[] memory unclaimedWithdrawals = delayedWithdrawalRouter.getUserDelayedWithdrawals(address(this));
            for (uint256 i = 0; i < unclaimedWithdrawals.length; i++) {

                if (unclaimedWithdrawals[i].blockCreated < restakingObservedExitBlocks[_validatorId]) {
                    // unclaimed withdrawal from before oracle observed exit
                    return true;
                }
            }
        }

        return false;
    }

    function validatePhaseTransition(VALIDATOR_PHASE _currentPhase, VALIDATOR_PHASE _newPhase) public pure returns (bool) {
        bool pass;

        // Transition rules
        if (_currentPhase == VALIDATOR_PHASE.NOT_INITIALIZED) {
            pass = (_newPhase == VALIDATOR_PHASE.STAKE_DEPOSITED);
        } else if (_currentPhase == VALIDATOR_PHASE.STAKE_DEPOSITED) {
            pass = (_newPhase == VALIDATOR_PHASE.LIVE || _newPhase == VALIDATOR_PHASE.NOT_INITIALIZED || _newPhase == VALIDATOR_PHASE.WAITING_FOR_APPROVAL);
        } else if (_currentPhase == VALIDATOR_PHASE.WAITING_FOR_APPROVAL) {
            pass = (_newPhase == VALIDATOR_PHASE.LIVE || _newPhase == VALIDATOR_PHASE.NOT_INITIALIZED);
        } else if (_currentPhase == VALIDATOR_PHASE.LIVE) {
            pass = (_newPhase == VALIDATOR_PHASE.EXITED || _newPhase == VALIDATOR_PHASE.BEING_SLASHED);
        } else if (_currentPhase == VALIDATOR_PHASE.BEING_SLASHED) {
            pass = (_newPhase == VALIDATOR_PHASE.EXITED);
        } else if (_currentPhase == VALIDATOR_PHASE.EXITED) {
            pass = (_newPhase == VALIDATOR_PHASE.FULLY_WITHDRAWN);
        } else {
            pass = false;
        }

        require(pass, "INVALID_PHASE_TRANSITION");
        return pass;
    }

    function _onlyEtherFiNodeManagerContract() internal view {
        require(msg.sender == etherFiNodesManager, "INCORRECT_CALLER");
    } 

    //--------------------------------------------------------------------------------------
    //-----------------------------------  MODIFIERS  --------------------------------------
    //--------------------------------------------------------------------------------------

    modifier onlyEtherFiNodeManagerContract() {
        _onlyEtherFiNodeManagerContract();
        _;
    }

    modifier ensureLatestVersion() {
        require(version == 1, "NEED_TO_MIGRATE");
        _;
    }
}

File 2 of 23 : IEtherFiNode.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./IEtherFiNodesManager.sol";

import "../eigenlayer-interfaces/IDelegationManager.sol";


interface IEtherFiNode {
    // State Transition Diagram for StateMachine contract:
    //
    //      NOT_INITIALIZED <-
    //              |        |
    //              ↓        |
    //      STAKE_DEPOSITED --
    //           /    \      |
    //          ↓      ↓     |
    //         LIVE <- WAITING_FOR_APPROVAL
    //         |  \ 
    //         |   ↓  
    //         |  BEING_SLASHED
    //         |   /
    //         ↓  ↓
    //         EXITED
    //         |
    //         ↓
    //     FULLY_WITHDRAWN
    // 
    // Transitions are only allowed as directed above.
    // For instance, a transition from STAKE_DEPOSITED to either LIVE or CANCELLED is allowed,
    // but a transition from LIVE to NOT_INITIALIZED is not.
    //
    // All phase transitions should be made through the setPhase function,
    // which validates transitions based on these rules.
    //
    enum VALIDATOR_PHASE {
        NOT_INITIALIZED,
        STAKE_DEPOSITED,
        LIVE,
        EXITED,
        FULLY_WITHDRAWN,
        DEPRECATED_CANCELLED,
        BEING_SLASHED,
        DEPRECATED_EVICTED,
        WAITING_FOR_APPROVAL,
        DEPRECATED_READY_FOR_DEPOSIT
    }

    // VIEW functions
    function numAssociatedValidators() external view returns (uint256);
    function numExitRequestsByTnft() external view returns (uint16);
    function numExitedValidators() external view returns (uint16);
    function version() external view returns (uint16);
    function eigenPod() external view returns (address);
    function calculateTVL(uint256 _beaconBalance, IEtherFiNodesManager.ValidatorInfo memory _info, IEtherFiNodesManager.RewardsSplit memory _SRsplits, bool _onlyWithdrawable) external view returns (uint256, uint256, uint256, uint256);
    function getNonExitPenalty(uint32 _tNftExitRequestTimestamp, uint32 _bNftExitRequestTimestamp) external view returns (uint256);
    function getRewardsPayouts(uint32 _exitRequestTimestamp, IEtherFiNodesManager.RewardsSplit memory _splits) external view returns (uint256, uint256, uint256, uint256);
    function getFullWithdrawalPayouts(IEtherFiNodesManager.ValidatorInfo memory _info, IEtherFiNodesManager.RewardsSplit memory _SRsplits) external view returns (uint256, uint256, uint256, uint256);
    function associatedValidatorIds(uint256 _index) external view returns (uint256);
    function associatedValidatorIndices(uint256 _validatorId) external view returns (uint256);
    function validatePhaseTransition(VALIDATOR_PHASE _currentPhase, VALIDATOR_PHASE _newPhase) external pure returns (bool);

    function DEPRECATED_exitRequestTimestamp() external view returns (uint32);
    function DEPRECATED_exitTimestamp() external view returns (uint32);
    function DEPRECATED_phase() external view returns (VALIDATOR_PHASE);

    // Non-VIEW functions
    function initialize(address _etherFiNodesManager) external;
    function claimDelayedWithdrawalRouterWithdrawals(uint256 maxNumWithdrawals, bool _checkIfHasOutstandingEigenLayerWithdrawals, uint256 _validatorId) external returns (bool);
    function createEigenPod() external;
    function isRestakingEnabled() external view returns (bool);
    function processNodeExit(uint256 _validatorId) external returns (bytes32[] memory withdrawalRoots);
    function processFullWithdraw(uint256 _validatorId) external;
    function queueEigenpodFullWithdrawal() external returns (bytes32[] memory withdrawalRoots);
    function queuePhase1PartialWithdrawal() external;
    function completeQueuedWithdrawals(IDelegationManager.Withdrawal[] memory withdrawals, uint256[] calldata middlewareTimesIndexes) external;
    function completeQueuedWithdrawal(IDelegationManager.Withdrawal memory withdrawals, uint256 middlewareTimesIndexes) external;
    function updateNumberOfAssociatedValidators(uint16 _up, uint16 _down) external;
    function updateNumExitedValidators(uint16 _up, uint16 _down) external;
    function registerValidator(uint256 _validatorId, bool _enableRestaking) external;
    function unRegisterValidator(uint256 _validatorId, IEtherFiNodesManager.ValidatorInfo memory _info) external returns (bool);
    function splitBalanceInExecutionLayer() external view returns (uint256 _withdrawalSafe, uint256 _eigenPod, uint256 _delayedWithdrawalRouter);
    function totalBalanceInExecutionLayer() external view returns (uint256);
    function withdrawableBalanceInExecutionLayer() external view returns (uint256);
    function updateNumExitRequests(uint16 _up, uint16 _down) external;
    function migrateVersion(uint256 _validatorId, IEtherFiNodesManager.ValidatorInfo memory _info) external;

    function callEigenPod(bytes memory data) external returns (bytes memory);
    function forwardCall(address to, bytes memory data) external returns (bytes memory);

    function withdrawFunds(
        address _treasury,
        uint256 _treasuryAmount,
        address _operator,
        uint256 _operatorAmount,
        address _tnftHolder,
        uint256 _tnftAmount,
        address _bnftHolder,
        uint256 _bnftAmount
    ) external;

    function moveFundsToManager(uint256 _amount) external;
}

File 3 of 23 : IEtherFiNodesManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;


import "./IEtherFiNode.sol";

import "../eigenlayer-interfaces/IEigenPodManager.sol";
import "../eigenlayer-interfaces/IDelegationManager.sol";
import "../eigenlayer-interfaces/IDelayedWithdrawalRouter.sol";


interface IEtherFiNodesManager {

    struct ValidatorInfo {
        uint32 validatorIndex;
        uint32 exitRequestTimestamp;
        uint32 exitTimestamp;
        IEtherFiNode.VALIDATOR_PHASE phase;
    }

    struct RewardsSplit {
        uint64 treasury;
        uint64 nodeOperator;
        uint64 tnft;
        uint64 bnft;
    }

    // VIEW functions
    function delayedWithdrawalRouter() external view returns (IDelayedWithdrawalRouter);
    function eigenPodManager() external view returns (IEigenPodManager);
    function delegationManager() external view returns (IDelegationManager);
    function treasuryContract() external view returns (address);

    function etherfiNodeAddress(uint256 _validatorId) external view returns (address);
    function calculateTVL(uint256 _validatorId, uint256 _beaconBalance) external view returns (uint256, uint256, uint256, uint256);
    function getFullWithdrawalPayouts(uint256 _validatorId) external view returns (uint256, uint256, uint256, uint256);
    function getNonExitPenalty(uint256 _validatorId) external view returns (uint256);
    function getRewardsPayouts(uint256 _validatorId) external view returns (uint256, uint256, uint256, uint256);
    function getWithdrawalCredentials(uint256 _validatorId) external view returns (bytes memory);
    function getValidatorInfo(uint256 _validatorId) external view returns (ValidatorInfo memory);
    function numAssociatedValidators(uint256 _validatorId) external view returns (uint256);
    function phase(uint256 _validatorId) external view returns (IEtherFiNode.VALIDATOR_PHASE phase);

    function generateWithdrawalCredentials(address _address) external view returns (bytes memory);
    function nonExitPenaltyDailyRate() external view returns (uint64);
    function nonExitPenaltyPrincipal() external view returns (uint64);
    function numberOfValidators() external view returns (uint64);
    function maxEigenlayerWithdrawals() external view returns (uint8);

    function admins(address _address) external view returns (bool);

    // Non-VIEW functions    
    function updateEtherFiNode(uint256 _validatorId) external;

    function batchQueueRestakedWithdrawal(uint256[] calldata _validatorIds) external;
    function batchSendExitRequest(uint256[] calldata _validatorIds) external;
    function batchFullWithdraw(uint256[] calldata _validatorIds) external;
    function batchPartialWithdraw(uint256[] calldata _validatorIds) external;
    function fullWithdraw(uint256 _validatorId) external;
    function getUnusedWithdrawalSafesLength() external view returns (uint256);
    function incrementNumberOfValidators(uint64 _count) external;
    function markBeingSlashed(uint256[] calldata _validatorIds) external;
    function partialWithdraw(uint256 _validatorId) external;
    function processNodeExit(uint256[] calldata _validatorIds, uint32[] calldata _exitTimestamp) external;
    function allocateEtherFiNode(bool _enableRestaking) external returns (address);
    function registerValidator(uint256 _validatorId, bool _enableRestaking, address _withdrawalSafeAddress) external;
    function setValidatorPhase(uint256 _validatorId, IEtherFiNode.VALIDATOR_PHASE _phase) external;
    function setNonExitPenalty(uint64 _nonExitPenaltyDailyRate, uint64 _nonExitPenaltyPrincipal) external;
    function setStakingRewardsSplit(uint64 _treasury, uint64 _nodeOperator, uint64 _tnft, uint64 _bnf) external;
    function unregisterValidator(uint256 _validatorId) external;
    
    function updateAdmin(address _address, bool _isAdmin) external;
    function pauseContract() external;
    function unPauseContract() external;
}

File 4 of 23 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 5 of 23 : IBeacon.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 6 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 7 of 23 : IEigenPodManager.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";
import "./IETHPOSDeposit.sol";
import "./IStrategyManager.sol";
import "./IEigenPod.sol";
import "./IBeaconChainOracle.sol";
import "./IPausable.sol";
import "./ISlasher.sol";
import "./IStrategy.sol";

/**
 * @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 */

interface IEigenPodManager is IPausable {
    /// @notice Emitted to notify the update of the beaconChainOracle address
    event BeaconOracleUpdated(address indexed newOracleAddress);

    /// @notice Emitted to notify the deployment of an EigenPod
    event PodDeployed(address indexed eigenPod, address indexed podOwner);

    /// @notice Emitted to notify a deposit of beacon chain ETH recorded in the strategy manager
    event BeaconChainETHDeposited(address indexed podOwner, uint256 amount);

    /// @notice Emitted when the balance of an EigenPod is updated
    event PodSharesUpdated(address indexed podOwner, int256 sharesDelta);

    /// @notice Emitted when a withdrawal of beacon chain ETH is completed
    event BeaconChainETHWithdrawalCompleted(
        address indexed podOwner,
        uint256 shares,
        uint96 nonce,
        address delegatedAddress,
        address withdrawer,
        bytes32 withdrawalRoot
    );

    event DenebForkTimestampUpdated(uint64 newValue);

    /**
     * @notice Creates an EigenPod for the sender.
     * @dev Function will revert if the `msg.sender` already has an EigenPod.
     * @dev Returns EigenPod address 
     */
    function createPod() external returns (address);

    /**
     * @notice Stakes for a new beacon chain validator on the sender's EigenPod.
     * Also creates an EigenPod for the sender if they don't have one already.
     * @param pubkey The 48 bytes public key of the beacon chain validator.
     * @param signature The validator's signature of the deposit data.
     * @param depositDataRoot The root/hash of the deposit data for the validator's deposit.
     */
    function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable;

    /**
     * @notice Changes the `podOwner`'s shares by `sharesDelta` and performs a call to the DelegationManager
     * to ensure that delegated shares are also tracked correctly
     * @param podOwner is the pod owner whose balance is being updated.
     * @param sharesDelta is the change in podOwner's beaconChainETHStrategy shares
     * @dev Callable only by the podOwner's EigenPod contract.
     * @dev Reverts if `sharesDelta` is not a whole Gwei amount
     */
    function recordBeaconChainETHBalanceUpdate(address podOwner, int256 sharesDelta) external;

    /**
     * @notice Updates the oracle contract that provides the beacon chain state root
     * @param newBeaconChainOracle is the new oracle contract being pointed to
     * @dev Callable only by the owner of this contract (i.e. governance)
     */
    function updateBeaconChainOracle(IBeaconChainOracle newBeaconChainOracle) external;

    /// @notice Returns the address of the `podOwner`'s EigenPod if it has been deployed.
    function ownerToPod(address podOwner) external view returns (IEigenPod);

    /// @notice Returns the address of the `podOwner`'s EigenPod (whether it is deployed yet or not).
    function getPod(address podOwner) external view returns (IEigenPod);

    /// @notice The ETH2 Deposit Contract
    function ethPOS() external view returns (IETHPOSDeposit);

    /// @notice Beacon proxy to which the EigenPods point
    function eigenPodBeacon() external view returns (IBeacon);

    /// @notice Oracle contract that provides updates to the beacon chain's state
    function beaconChainOracle() external view returns (IBeaconChainOracle);

    /// @notice Returns the beacon block root at `timestamp`. Reverts if the Beacon block root at `timestamp` has not yet been finalized.
    function getBlockRootAtTimestamp(uint64 timestamp) external view returns (bytes32);

    /// @notice EigenLayer's StrategyManager contract
    function strategyManager() external view returns (IStrategyManager);

    /// @notice EigenLayer's Slasher contract
    function slasher() external view returns (ISlasher);

    /// @notice Returns 'true' if the `podOwner` has created an EigenPod, and 'false' otherwise.
    function hasPod(address podOwner) external view returns (bool);

    /// @notice Returns the number of EigenPods that have been created
    function numPods() external view returns (uint256);

    /**
     * @notice Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy.
     * @dev The share amount can become negative. This is necessary to accommodate the fact that a pod owner's virtual beacon chain ETH shares can
     * decrease between the pod owner queuing and completing a withdrawal.
     * When the pod owner's shares would otherwise increase, this "deficit" is decreased first _instead_.
     * Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this
     * as the withdrawal "paying off the deficit".
     */
    function podOwnerShares(address podOwner) external view returns (int256);

    /// @notice returns canonical, virtual beaconChainETH strategy
    function beaconChainETHStrategy() external view returns (IStrategy);

    /**
     * @notice Used by the DelegationManager to remove a pod owner's shares while they're in the withdrawal queue.
     * Simply decreases the `podOwner`'s shares by `shares`, down to a minimum of zero.
     * @dev This function reverts if it would result in `podOwnerShares[podOwner]` being less than zero, i.e. it is forbidden for this function to
     * result in the `podOwner` incurring a "share deficit". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive
     * shares from the operator to whom the staker is delegated.
     * @dev Reverts if `shares` is not a whole Gwei amount
     */
    function removeShares(address podOwner, uint256 shares) external;

    /**
     * @notice Increases the `podOwner`'s shares by `shares`, paying off deficit if possible.
     * Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue
     * @dev Returns the number of shares added to `podOwnerShares[podOwner]` above zero, which will be less than the `shares` input
     * in the event that the podOwner has an existing shares deficit (i.e. `podOwnerShares[podOwner]` starts below zero)
     * @dev Reverts if `shares` is not a whole Gwei amount
     */
    function addShares(address podOwner, uint256 shares) external returns (uint256);

    /**
     * @notice Used by the DelegationManager to complete a withdrawal, sending tokens to some destination address
     * @dev Prioritizes decreasing the podOwner's share deficit, if they have one
     * @dev Reverts if `shares` is not a whole Gwei amount
     */
    function withdrawSharesAsTokens(address podOwner, address destination, uint256 shares) external;

    /**
     * @notice the deneb hard fork timestamp used to determine which proof path to use for proving a withdrawal
     */
    function denebForkTimestamp() external view returns (uint64);

     /**
     * setting the deneb hard fork timestamp by the eigenPodManager owner
     * @dev this function is designed to be called twice.  Once, it is set to type(uint64).max 
     * prior to the actual deneb fork timestamp being set, and then the second time it is set 
     * to the actual deneb fork timestamp.
     */
    function setDenebForkTimestamp(uint64 newDenebForkTimestamp) external;

    function owner() external returns (address);

}

File 8 of 23 : IDelayedWithdrawalRouter.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

interface IDelayedWithdrawalRouter {
    // struct used to pack data into a single storage slot
    struct DelayedWithdrawal {
        uint224 amount;
        uint32 blockCreated;
    }

    // struct used to store a single users delayedWithdrawal data
    struct UserDelayedWithdrawals {
        uint256 delayedWithdrawalsCompleted;
        DelayedWithdrawal[] delayedWithdrawals;
    }

     /// @notice event for delayedWithdrawal creation
    event DelayedWithdrawalCreated(address podOwner, address recipient, uint256 amount, uint256 index);

    /// @notice event for the claiming of delayedWithdrawals
    event DelayedWithdrawalsClaimed(address recipient, uint256 amountClaimed, uint256 delayedWithdrawalsCompleted);

    /// @notice Emitted when the `withdrawalDelayBlocks` variable is modified from `previousValue` to `newValue`.
    event WithdrawalDelayBlocksSet(uint256 previousValue, uint256 newValue);

    /**
     * @notice Creates an delayed withdrawal for `msg.value` to the `recipient`.
     * @dev Only callable by the `podOwner`'s EigenPod contract.
     */
    function createDelayedWithdrawal(address podOwner, address recipient) external payable;

    /**
     * @notice Called in order to withdraw delayed withdrawals made to the `recipient` that have passed the `withdrawalDelayBlocks` period.
     * @param recipient The address to claim delayedWithdrawals for.
     * @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming.
     */
    function claimDelayedWithdrawals(address recipient, uint256 maxNumberOfWithdrawalsToClaim) external;

    /**
     * @notice Called in order to withdraw delayed withdrawals made to the caller that have passed the `withdrawalDelayBlocks` period.
     * @param maxNumberOfWithdrawalsToClaim Used to limit the maximum number of withdrawals to loop through claiming.
     */
    function claimDelayedWithdrawals(uint256 maxNumberOfWithdrawalsToClaim) external;

    /// @notice Owner-only function for modifying the value of the `withdrawalDelayBlocks` variable.
    function setWithdrawalDelayBlocks(uint256 newValue) external;

    /// @notice Getter function for the mapping `_userWithdrawals`
    function userWithdrawals(address user) external view returns (UserDelayedWithdrawals memory);

    /// @notice Getter function to get all delayedWithdrawals of the `user`
    function getUserDelayedWithdrawals(address user) external view returns (DelayedWithdrawal[] memory);

    /// @notice Getter function to get all delayedWithdrawals that are currently claimable by the `user`
    function getClaimableUserDelayedWithdrawals(address user) external view returns (DelayedWithdrawal[] memory);

    /// @notice Getter function for fetching the delayedWithdrawal at the `index`th entry from the `_userWithdrawals[user].delayedWithdrawals` array
    function userDelayedWithdrawalByIndex(address user, uint256 index) external view returns (DelayedWithdrawal memory);

    /// @notice Getter function for fetching the length of the delayedWithdrawals array of a specific user
    function userWithdrawalsLength(address user) external view returns (uint256);

    /// @notice Convenience function for checking whether or not the delayedWithdrawal at the `index`th entry from the `_userWithdrawals[user].delayedWithdrawals` array is currently claimable
    function canClaimDelayedWithdrawal(address user, uint256 index) external view returns (bool);

    /**
     * @notice Delay enforced by this contract for completing any delayedWithdrawal. Measured in blocks, and adjustable by this contract's owner,
     * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced).
     */
    function withdrawalDelayBlocks() external view returns (uint256);
}

File 9 of 23 : IDelegationManager.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import "./IStrategy.sol";
import "./ISignatureUtils.sol";
import "./IStrategyManager.sol";

/**
 * @title DelegationManager
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 * @notice  This is the contract for delegation in EigenLayer. The main functionalities of this contract are
 * - enabling anyone to register as an operator in EigenLayer
 * - allowing operators to specify parameters related to stakers who delegate to them
 * - enabling any staker to delegate its stake to the operator of its choice (a given staker can only delegate to a single operator at a time)
 * - enabling a staker to undelegate its assets from the operator it is delegated to (performed as part of the withdrawal process, initiated through the StrategyManager)
 */
interface IDelegationManager is ISignatureUtils {
    // @notice Struct used for storing information about a single operator who has registered with EigenLayer
    struct OperatorDetails {
        // @notice address to receive the rewards that the operator earns via serving applications built on EigenLayer.
        address earningsReceiver;
        /**
         * @notice Address to verify signatures when a staker wishes to delegate to the operator, as well as controlling "forced undelegations".
         * @dev Signature verification follows these rules:
         * 1) If this address is left as address(0), then any staker will be free to delegate to the operator, i.e. no signature verification will be performed.
         * 2) If this address is an EOA (i.e. it has no code), then we follow standard ECDSA signature verification for delegations to the operator.
         * 3) If this address is a contract (i.e. it has code) then we forward a call to the contract and verify that it returns the correct EIP-1271 "magic value".
         */
        address delegationApprover;
        /**
         * @notice A minimum delay -- measured in blocks -- enforced between:
         * 1) the operator signalling their intent to register for a service, via calling `Slasher.optIntoSlashing`
         * and
         * 2) the operator completing registration for the service, via the service ultimately calling `Slasher.recordFirstStakeUpdate`
         * @dev note that for a specific operator, this value *cannot decrease*, i.e. if the operator wishes to modify their OperatorDetails,
         * then they are only allowed to either increase this value or keep it the same.
         */
        uint32 stakerOptOutWindowBlocks;
    }

    /**
     * @notice Abstract struct used in calculating an EIP712 signature for a staker to approve that they (the staker themselves) delegate to a specific operator.
     * @dev Used in computing the `STAKER_DELEGATION_TYPEHASH` and as a reference in the computation of the stakerDigestHash in the `delegateToBySignature` function.
     */
    struct StakerDelegation {
        // the staker who is delegating
        address staker;
        // the operator being delegated to
        address operator;
        // the staker's nonce
        uint256 nonce;
        // the expiration timestamp (UTC) of the signature
        uint256 expiry;
    }

    /**
     * @notice Abstract struct used in calculating an EIP712 signature for an operator's delegationApprover to approve that a specific staker delegate to the operator.
     * @dev Used in computing the `DELEGATION_APPROVAL_TYPEHASH` and as a reference in the computation of the approverDigestHash in the `_delegate` function.
     */
    struct DelegationApproval {
        // the staker who is delegating
        address staker;
        // the operator being delegated to
        address operator;
        // the operator's provided salt
        bytes32 salt;
        // the expiration timestamp (UTC) of the signature
        uint256 expiry;
    }

    /**
     * Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored.
     * In functions that operate on existing queued withdrawals -- e.g. completeQueuedWithdrawal`, the data is resubmitted and the hash of the submitted
     * data is computed by `calculateWithdrawalRoot` and checked against the stored hash in order to confirm the integrity of the submitted data.
     */
    struct Withdrawal {
        // The address that originated the Withdrawal
        address staker;
        // The address that the staker was delegated to at the time that the Withdrawal was created
        address delegatedTo;
        // The address that can complete the Withdrawal + will receive funds when completing the withdrawal
        address withdrawer;
        // Nonce used to guarantee that otherwise identical withdrawals have unique hashes
        uint256 nonce;
        // Block number when the Withdrawal was created
        uint32 startBlock;
        // Array of strategies that the Withdrawal contains
        IStrategy[] strategies;
        // Array containing the amount of shares in each Strategy in the `strategies` array
        uint256[] shares;
    }

    struct QueuedWithdrawalParams {
        // Array of strategies that the QueuedWithdrawal contains
        IStrategy[] strategies;
        // Array containing the amount of shares in each Strategy in the `strategies` array
        uint256[] shares;
        // The address of the withdrawer
        address withdrawer;
    }

    // @notice Emitted when a new operator registers in EigenLayer and provides their OperatorDetails.
    event OperatorRegistered(address indexed operator, OperatorDetails operatorDetails);

    /// @notice Emitted when an operator updates their OperatorDetails to @param newOperatorDetails
    event OperatorDetailsModified(address indexed operator, OperatorDetails newOperatorDetails);

    /**
     * @notice Emitted when @param operator indicates that they are updating their MetadataURI string
     * @dev Note that these strings are *never stored in storage* and are instead purely emitted in events for off-chain indexing
     */
    event OperatorMetadataURIUpdated(address indexed operator, string metadataURI);

    /// @notice Emitted whenever an operator's shares are increased for a given strategy. Note that shares is the delta in the operator's shares.
    event OperatorSharesIncreased(address indexed operator, address staker, IStrategy strategy, uint256 shares);

    /// @notice Emitted whenever an operator's shares are decreased for a given strategy. Note that shares is the delta in the operator's shares.
    event OperatorSharesDecreased(address indexed operator, address staker, IStrategy strategy, uint256 shares);

    /// @notice Emitted when @param staker delegates to @param operator.
    event StakerDelegated(address indexed staker, address indexed operator);

    /// @notice Emitted when @param staker undelegates from @param operator.
    event StakerUndelegated(address indexed staker, address indexed operator);

    /// @notice Emitted when @param staker is undelegated via a call not originating from the staker themself
    event StakerForceUndelegated(address indexed staker, address indexed operator);

    /**
     * @notice Emitted when a new withdrawal is queued.
     * @param withdrawalRoot Is the hash of the `withdrawal`.
     * @param withdrawal Is the withdrawal itself.
     */
    event WithdrawalQueued(bytes32 withdrawalRoot, Withdrawal withdrawal);

    /// @notice Emitted when a queued withdrawal is completed
    event WithdrawalCompleted(bytes32 withdrawalRoot);

    /// @notice Emitted when a queued withdrawal is *migrated* from the StrategyManager to the DelegationManager
    event WithdrawalMigrated(bytes32 oldWithdrawalRoot, bytes32 newWithdrawalRoot);
    
    /// @notice Emitted when the `minWithdrawalDelayBlocks` variable is modified from `previousValue` to `newValue`.
    event MinWithdrawalDelayBlocksSet(uint256 previousValue, uint256 newValue);

    /// @notice Emitted when the `strategyWithdrawalDelayBlocks` variable is modified from `previousValue` to `newValue`.
    event StrategyWithdrawalDelayBlocksSet(IStrategy strategy, uint256 previousValue, uint256 newValue);

    /**
     * @notice Registers the caller as an operator in EigenLayer.
     * @param registeringOperatorDetails is the `OperatorDetails` for the operator.
     * @param metadataURI is a URI for the operator's metadata, i.e. a link providing more details on the operator.
     *
     * @dev Once an operator is registered, they cannot 'deregister' as an operator, and they will forever be considered "delegated to themself".
     * @dev This function will revert if the caller attempts to set their `earningsReceiver` to address(0).
     * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event
     */
    function registerAsOperator(
        OperatorDetails calldata registeringOperatorDetails,
        string calldata metadataURI
    ) external;

    /**
     * @notice Updates an operator's stored `OperatorDetails`.
     * @param newOperatorDetails is the updated `OperatorDetails` for the operator, to replace their current OperatorDetails`.
     *
     * @dev The caller must have previously registered as an operator in EigenLayer.
     * @dev This function will revert if the caller attempts to set their `earningsReceiver` to address(0).
     */
    function modifyOperatorDetails(OperatorDetails calldata newOperatorDetails) external;

    /**
     * @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated.
     * @param metadataURI The URI for metadata associated with an operator
     * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event
     */
    function updateOperatorMetadataURI(string calldata metadataURI) external;

    /**
     * @notice Caller delegates their stake to an operator.
     * @param operator The account (`msg.sender`) is delegating its assets to for use in serving applications built on EigenLayer.
     * @param approverSignatureAndExpiry Verifies the operator approves of this delegation
     * @param approverSalt A unique single use value tied to an individual signature.
     * @dev The approverSignatureAndExpiry is used in the event that:
     *          1) the operator's `delegationApprover` address is set to a non-zero value.
     *                  AND
     *          2) neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator
     *             or their delegationApprover is the `msg.sender`, then approval is assumed.
     * @dev In the event that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input
     * in this case to save on complexity + gas costs
     */
    function delegateTo(
        address operator,
        SignatureWithExpiry memory approverSignatureAndExpiry,
        bytes32 approverSalt
    ) external;

    /**
     * @notice Caller delegates a staker's stake to an operator with valid signatures from both parties.
     * @param staker The account delegating stake to an `operator` account
     * @param operator The account (`staker`) is delegating its assets to for use in serving applications built on EigenLayer.
     * @param stakerSignatureAndExpiry Signed data from the staker authorizing delegating stake to an operator
     * @param approverSignatureAndExpiry is a parameter that will be used for verifying that the operator approves of this delegation action in the event that:
     * @param approverSalt Is a salt used to help guarantee signature uniqueness. Each salt can only be used once by a given approver.
     *
     * @dev If `staker` is an EOA, then `stakerSignature` is verified to be a valid ECDSA stakerSignature from `staker`, indicating their intention for this action.
     * @dev If `staker` is a contract, then `stakerSignature` will be checked according to EIP-1271.
     * @dev the operator's `delegationApprover` address is set to a non-zero value.
     * @dev neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator or their delegationApprover
     * is the `msg.sender`, then approval is assumed.
     * @dev This function will revert if the current `block.timestamp` is equal to or exceeds the expiry
     * @dev In the case that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input
     * in this case to save on complexity + gas costs
     */
    function delegateToBySignature(
        address staker,
        address operator,
        SignatureWithExpiry memory stakerSignatureAndExpiry,
        SignatureWithExpiry memory approverSignatureAndExpiry,
        bytes32 approverSalt
    ) external;

    /**
     * @notice Undelegates the staker from the operator who they are delegated to. Puts the staker into the "undelegation limbo" mode of the EigenPodManager
     * and queues a withdrawal of all of the staker's shares in the StrategyManager (to the staker), if necessary.
     * @param staker The account to be undelegated.
     * @return withdrawalRoot The root of the newly queued withdrawal, if a withdrawal was queued. Otherwise just bytes32(0).
     *
     * @dev Reverts if the `staker` is also an operator, since operators are not allowed to undelegate from themselves.
     * @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified "delegationApprover"
     * @dev Reverts if the `staker` is already undelegated.
     */
    function undelegate(address staker) external returns (bytes32[] memory withdrawalRoot);

    /**
     * Allows a staker to withdraw some shares. Withdrawn shares/strategies are immediately removed
     * from the staker. If the staker is delegated, withdrawn shares/strategies are also removed from
     * their operator.
     *
     * All withdrawn shares/strategies are placed in a queue and can be fully withdrawn after a delay.
     */
    function queueWithdrawals(
        QueuedWithdrawalParams[] calldata queuedWithdrawalParams
    ) external returns (bytes32[] memory);

    /**
     * @notice Used to complete the specified `withdrawal`. The caller must match `withdrawal.withdrawer`
     * @param withdrawal The Withdrawal to complete.
     * @param tokens Array in which the i-th entry specifies the `token` input to the 'withdraw' function of the i-th Strategy in the `withdrawal.strategies` array.
     * This input can be provided with zero length if `receiveAsTokens` is set to 'false' (since in that case, this input will be unused)
     * @param middlewareTimesIndex is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array
     * @param receiveAsTokens If true, the shares specified in the withdrawal will be withdrawn from the specified strategies themselves
     * and sent to the caller, through calls to `withdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies
     * will simply be transferred to the caller directly.
     * @dev middlewareTimesIndex should be calculated off chain before calling this function by finding the first index that satisfies `slasher.canWithdraw`
     * @dev beaconChainETHStrategy shares are non-transferrable, so if `receiveAsTokens = false` and `withdrawal.withdrawer != withdrawal.staker`, note that
     * any beaconChainETHStrategy shares in the `withdrawal` will be _returned to the staker_, rather than transferred to the withdrawer, unlike shares in
     * any other strategies, which will be transferred to the withdrawer.
     */
    function completeQueuedWithdrawal(
        Withdrawal calldata withdrawal,
        IERC20[] calldata tokens,
        uint256 middlewareTimesIndex,
        bool receiveAsTokens
    ) external;

    /**
     * @notice Array-ified version of `completeQueuedWithdrawal`.
     * Used to complete the specified `withdrawals`. The function caller must match `withdrawals[...].withdrawer`
     * @param withdrawals The Withdrawals to complete.
     * @param tokens Array of tokens for each Withdrawal. See `completeQueuedWithdrawal` for the usage of a single array.
     * @param middlewareTimesIndexes One index to reference per Withdrawal. See `completeQueuedWithdrawal` for the usage of a single index.
     * @param receiveAsTokens Whether or not to complete each withdrawal as tokens. See `completeQueuedWithdrawal` for the usage of a single boolean.
     * @dev See `completeQueuedWithdrawal` for relevant dev tags
     */
    function completeQueuedWithdrawals(
        Withdrawal[] calldata withdrawals,
        IERC20[][] calldata tokens,
        uint256[] calldata middlewareTimesIndexes,
        bool[] calldata receiveAsTokens
    ) external;

    /**
     * @notice Increases a staker's delegated share balance in a strategy.
     * @param staker The address to increase the delegated shares for their operator.
     * @param strategy The strategy in which to increase the delegated shares.
     * @param shares The number of shares to increase.
     *
     * @dev *If the staker is actively delegated*, then increases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing.
     * @dev Callable only by the StrategyManager or EigenPodManager.
     */
    function increaseDelegatedShares(
        address staker,
        IStrategy strategy,
        uint256 shares
    ) external;

    /**
     * @notice Decreases a staker's delegated share balance in a strategy.
     * @param staker The address to increase the delegated shares for their operator.
     * @param strategy The strategy in which to decrease the delegated shares.
     * @param shares The number of shares to decrease.
     *
     * @dev *If the staker is actively delegated*, then decreases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing.
     * @dev Callable only by the StrategyManager or EigenPodManager.
     */
    function decreaseDelegatedShares(
        address staker,
        IStrategy strategy,
        uint256 shares
    ) external;

    /**
     * @notice returns the address of the operator that `staker` is delegated to.
     * @notice Mapping: staker => operator whom the staker is currently delegated to.
     * @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator.
     */
    function delegatedTo(address staker) external view returns (address);

    /**
     * @notice Returns the OperatorDetails struct associated with an `operator`.
     */
    function operatorDetails(address operator) external view returns (OperatorDetails memory);

    /*
     * @notice Returns the earnings receiver address for an operator
     */
    function earningsReceiver(address operator) external view returns (address);

    /**
     * @notice Returns the delegationApprover account for an operator
     */
    function delegationApprover(address operator) external view returns (address);

    /**
     * @notice Returns the stakerOptOutWindowBlocks for an operator
     */
    function stakerOptOutWindowBlocks(address operator) external view returns (uint256);

    /**
     * @notice Given array of strategies, returns array of shares for the operator
     */
    function getOperatorShares(
        address operator,
        IStrategy[] memory strategies
    ) external view returns (uint256[] memory);

    /**
     * @notice Given a list of strategies, return the minimum number of blocks that must pass to withdraw
     * from all the inputted strategies. Return value is >= minWithdrawalDelayBlocks as this is the global min withdrawal delay.
     * @param strategies The strategies to check withdrawal delays for
     */
    function getWithdrawalDelay(IStrategy[] calldata strategies) external view returns (uint256);

    /**
     * @notice returns the total number of shares in `strategy` that are delegated to `operator`.
     * @notice Mapping: operator => strategy => total number of shares in the strategy delegated to the operator.
     * @dev By design, the following invariant should hold for each Strategy:
     * (operator's shares in delegation manager) = sum (shares above zero of all stakers delegated to operator)
     * = sum (delegateable shares of all stakers delegated to the operator)
     */
    function operatorShares(address operator, IStrategy strategy) external view returns (uint256);

    /**
     * @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise.
     */
    function isDelegated(address staker) external view returns (bool);

    /**
     * @notice Returns true is an operator has previously registered for delegation.
     */
    function isOperator(address operator) external view returns (bool);

    /// @notice Mapping: staker => number of signed delegation nonces (used in `delegateToBySignature`) from the staker that the contract has already checked
    function stakerNonce(address staker) external view returns (uint256);

    /**
     * @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover.
     * @dev Salts are used in the `delegateTo` and `delegateToBySignature` functions. Note that these functions only process the delegationApprover's
     * signature + the provided salt if the operator being delegated to has specified a nonzero address as their `delegationApprover`.
     */
    function delegationApproverSaltIsSpent(address _delegationApprover, bytes32 salt) external view returns (bool);

    /**
     * @notice Minimum delay enforced by this contract for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner,
     * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced).
     * Note that strategies each have a separate withdrawal delay, which can be greater than this value. So the minimum number of blocks that must pass
     * to withdraw a strategy is MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy])
     */
    function minWithdrawalDelayBlocks() external view returns (uint256);

    /**
     * @notice Minimum delay enforced by this contract per Strategy for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner,
     * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced).
     */
    function strategyWithdrawalDelayBlocks(IStrategy strategy) external view returns (uint256);

    /**
     * @notice Calculates the digestHash for a `staker` to sign to delegate to an `operator`
     * @param staker The signing staker
     * @param operator The operator who is being delegated to
     * @param expiry The desired expiry time of the staker's signature
     */
    function calculateCurrentStakerDelegationDigestHash(
        address staker,
        address operator,
        uint256 expiry
    ) external view returns (bytes32);

    /**
     * @notice Calculates the digest hash to be signed and used in the `delegateToBySignature` function
     * @param staker The signing staker
     * @param _stakerNonce The nonce of the staker. In practice we use the staker's current nonce, stored at `stakerNonce[staker]`
     * @param operator The operator who is being delegated to
     * @param expiry The desired expiry time of the staker's signature
     */
    function calculateStakerDelegationDigestHash(
        address staker,
        uint256 _stakerNonce,
        address operator,
        uint256 expiry
    ) external view returns (bytes32);

    /**
     * @notice Calculates the digest hash to be signed by the operator's delegationApprove and used in the `delegateTo` and `delegateToBySignature` functions.
     * @param staker The account delegating their stake
     * @param operator The account receiving delegated stake
     * @param _delegationApprover the operator's `delegationApprover` who will be signing the delegationHash (in general)
     * @param approverSalt A unique and single use value associated with the approver signature.
     * @param expiry Time after which the approver's signature becomes invalid
     */
    function calculateDelegationApprovalDigestHash(
        address staker,
        address operator,
        address _delegationApprover,
        bytes32 approverSalt,
        uint256 expiry
    ) external view returns (bytes32);

    /// @notice The EIP-712 typehash for the contract's domain
    function DOMAIN_TYPEHASH() external view returns (bytes32);

    /// @notice The EIP-712 typehash for the StakerDelegation struct used by the contract
    function STAKER_DELEGATION_TYPEHASH() external view returns (bytes32);

    /// @notice The EIP-712 typehash for the DelegationApproval struct used by the contract
    function DELEGATION_APPROVAL_TYPEHASH() external view returns (bytes32);

    /**
     * @notice Getter function for the current EIP-712 domain separator for this contract.
     *
     * @dev The domain separator will change in the event of a fork that changes the ChainID.
     * @dev By introducing a domain separator the DApp developers are guaranteed that there can be no signature collision.
     * for more detailed information please read EIP-712.
     */
    function domainSeparator() external view returns (bytes32);
    
    /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated.
    /// @dev This only increments (doesn't decrement), and is used to help ensure that otherwise identical withdrawals have unique hashes.
    function cumulativeWithdrawalsQueued(address staker) external view returns (uint256);

    /// @notice Returns the keccak256 hash of `withdrawal`.
    function calculateWithdrawalRoot(Withdrawal memory withdrawal) external pure returns (bytes32);

    function migrateQueuedWithdrawals(IStrategyManager.DeprecatedStruct_QueuedWithdrawal[] memory withdrawalsToQueue) external;

    function pendingWithdrawals(bytes32 withdrawalRoot) external view returns (bool);

    function beaconChainETHStrategy() external view returns (IStrategy);
}

File 10 of 23 : console.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

library console {
    address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);

    function _sendLogPayload(bytes memory payload) private view {
        uint256 payloadLength = payload.length;
        address consoleAddress = CONSOLE_ADDRESS;
        /// @solidity memory-safe-assembly
        assembly {
            let payloadStart := add(payload, 32)
            let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
        }
    }

    function log() internal view {
        _sendLogPayload(abi.encodeWithSignature("log()"));
    }

    function logInt(int p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(int)", p0));
    }

    function logUint(uint p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
    }

    function logString(string memory p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
    }

    function logBool(bool p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
    }

    function logAddress(address p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address)", p0));
    }

    function logBytes(bytes memory p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
    }

    function logBytes1(bytes1 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
    }

    function logBytes2(bytes2 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
    }

    function logBytes3(bytes3 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
    }

    function logBytes4(bytes4 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
    }

    function logBytes5(bytes5 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
    }

    function logBytes6(bytes6 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
    }

    function logBytes7(bytes7 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
    }

    function logBytes8(bytes8 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
    }

    function logBytes9(bytes9 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
    }

    function logBytes10(bytes10 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
    }

    function logBytes11(bytes11 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
    }

    function logBytes12(bytes12 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
    }

    function logBytes13(bytes13 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
    }

    function logBytes14(bytes14 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
    }

    function logBytes15(bytes15 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
    }

    function logBytes16(bytes16 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
    }

    function logBytes17(bytes17 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
    }

    function logBytes18(bytes18 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
    }

    function logBytes19(bytes19 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
    }

    function logBytes20(bytes20 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
    }

    function logBytes21(bytes21 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
    }

    function logBytes22(bytes22 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
    }

    function logBytes23(bytes23 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
    }

    function logBytes24(bytes24 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
    }

    function logBytes25(bytes25 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
    }

    function logBytes26(bytes26 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
    }

    function logBytes27(bytes27 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
    }

    function logBytes28(bytes28 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
    }

    function logBytes29(bytes29 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
    }

    function logBytes30(bytes30 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
    }

    function logBytes31(bytes31 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
    }

    function logBytes32(bytes32 p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
    }

    function log(uint p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
    }

    function log(string memory p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
    }

    function log(bool p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
    }

    function log(address p0) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address)", p0));
    }

    function log(uint p0, uint p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
    }

    function log(uint p0, string memory p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
    }

    function log(uint p0, bool p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
    }

    function log(uint p0, address p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
    }

    function log(string memory p0, uint p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
    }

    function log(string memory p0, string memory p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
    }

    function log(string memory p0, bool p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
    }

    function log(string memory p0, address p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
    }

    function log(bool p0, uint p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
    }

    function log(bool p0, string memory p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
    }

    function log(bool p0, bool p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
    }

    function log(bool p0, address p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
    }

    function log(address p0, uint p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
    }

    function log(address p0, string memory p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
    }

    function log(address p0, bool p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
    }

    function log(address p0, address p1) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
    }

    function log(uint p0, uint p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
    }

    function log(uint p0, uint p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
    }

    function log(uint p0, uint p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
    }

    function log(uint p0, uint p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
    }

    function log(uint p0, string memory p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
    }

    function log(uint p0, string memory p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
    }

    function log(uint p0, string memory p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
    }

    function log(uint p0, string memory p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
    }

    function log(uint p0, bool p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
    }

    function log(uint p0, bool p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
    }

    function log(uint p0, bool p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
    }

    function log(uint p0, bool p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
    }

    function log(uint p0, address p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
    }

    function log(uint p0, address p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
    }

    function log(uint p0, address p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
    }

    function log(uint p0, address p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
    }

    function log(string memory p0, uint p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
    }

    function log(string memory p0, uint p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
    }

    function log(string memory p0, uint p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
    }

    function log(string memory p0, uint p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
    }

    function log(string memory p0, address p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
    }

    function log(string memory p0, address p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
    }

    function log(string memory p0, address p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
    }

    function log(string memory p0, address p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
    }

    function log(bool p0, uint p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
    }

    function log(bool p0, uint p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
    }

    function log(bool p0, uint p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
    }

    function log(bool p0, uint p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
    }

    function log(bool p0, bool p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
    }

    function log(bool p0, bool p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
    }

    function log(bool p0, bool p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
    }

    function log(bool p0, bool p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
    }

    function log(bool p0, address p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
    }

    function log(bool p0, address p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
    }

    function log(bool p0, address p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
    }

    function log(bool p0, address p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
    }

    function log(address p0, uint p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
    }

    function log(address p0, uint p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
    }

    function log(address p0, uint p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
    }

    function log(address p0, uint p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
    }

    function log(address p0, string memory p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
    }

    function log(address p0, string memory p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
    }

    function log(address p0, string memory p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
    }

    function log(address p0, string memory p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
    }

    function log(address p0, bool p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
    }

    function log(address p0, bool p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
    }

    function log(address p0, bool p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
    }

    function log(address p0, bool p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
    }

    function log(address p0, address p1, uint p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
    }

    function log(address p0, address p1, string memory p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
    }

    function log(address p0, address p1, bool p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
    }

    function log(address p0, address p1, address p2) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
    }

    function log(uint p0, uint p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, uint p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, string memory p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, bool p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
    }

    function log(uint p0, address p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, uint p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, string memory p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, bool p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, address p3) internal view {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
    }

}

File 11 of 23 : IETHPOSDeposit.sol
// ┏━━━┓━┏┓━┏┓━━┏━━━┓━━┏━━━┓━━━━┏━━━┓━━━━━━━━━━━━━━━━━━━┏┓━━━━━┏━━━┓━━━━━━━━━┏┓━━━━━━━━━━━━━━┏┓━
// ┃┏━━┛┏┛┗┓┃┃━━┃┏━┓┃━━┃┏━┓┃━━━━┗┓┏┓┃━━━━━━━━━━━━━━━━━━┏┛┗┓━━━━┃┏━┓┃━━━━━━━━┏┛┗┓━━━━━━━━━━━━┏┛┗┓
// ┃┗━━┓┗┓┏┛┃┗━┓┗┛┏┛┃━━┃┃━┃┃━━━━━┃┃┃┃┏━━┓┏━━┓┏━━┓┏━━┓┏┓┗┓┏┛━━━━┃┃━┗┛┏━━┓┏━┓━┗┓┏┛┏━┓┏━━┓━┏━━┓┗┓┏┛
// ┃┏━━┛━┃┃━┃┏┓┃┏━┛┏┛━━┃┃━┃┃━━━━━┃┃┃┃┃┏┓┃┃┏┓┃┃┏┓┃┃━━┫┣┫━┃┃━━━━━┃┃━┏┓┃┏┓┃┃┏┓┓━┃┃━┃┏┛┗━┓┃━┃┏━┛━┃┃━
// ┃┗━━┓━┃┗┓┃┃┃┃┃┃┗━┓┏┓┃┗━┛┃━━━━┏┛┗┛┃┃┃━┫┃┗┛┃┃┗┛┃┣━━┃┃┃━┃┗┓━━━━┃┗━┛┃┃┗┛┃┃┃┃┃━┃┗┓┃┃━┃┗┛┗┓┃┗━┓━┃┗┓
// ┗━━━┛━┗━┛┗┛┗┛┗━━━┛┗┛┗━━━┛━━━━┗━━━┛┗━━┛┃┏━┛┗━━┛┗━━┛┗┛━┗━┛━━━━┗━━━┛┗━━┛┗┛┗┛━┗━┛┗┛━┗━━━┛┗━━┛━┗━┛
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┃┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┗┛━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

// SPDX-License-Identifier: CC0-1.0

pragma solidity >=0.5.0;

// This interface is designed to be compatible with the Vyper version.
/// @notice This is the Ethereum 2.0 deposit contract interface.
/// For more information see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs
interface IETHPOSDeposit {
    /// @notice A processed deposit event.
    event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index);

    /// @notice Submit a Phase 0 DepositData object.
    /// @param pubkey A BLS12-381 public key.
    /// @param withdrawal_credentials Commitment to a public key for withdrawals.
    /// @param signature A BLS12-381 signature.
    /// @param deposit_data_root The SHA-256 hash of the SSZ-encoded DepositData object.
    /// Used as a protection against malformed input.
    function deposit(
        bytes calldata pubkey,
        bytes calldata withdrawal_credentials,
        bytes calldata signature,
        bytes32 deposit_data_root
    ) external payable;

    /// @notice Query the current deposit root hash.
    /// @return The deposit root hash.
    function get_deposit_root() external view returns (bytes32);

    /// @notice Query the current deposit count.
    /// @return The deposit count encoded as a little endian 64-bit number.
    function get_deposit_count() external view returns (bytes memory);
}

File 12 of 23 : IStrategyManager.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import "./IStrategy.sol";
import "./ISlasher.sol";
import "./IDelegationManager.sol";
import "./IEigenPodManager.sol";

/**
 * @title Interface for the primary entrypoint for funds into EigenLayer.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 * @notice See the `StrategyManager` contract itself for implementation details.
 */
interface IStrategyManager {
    /**
     * @notice Emitted when a new deposit occurs on behalf of `staker`.
     * @param staker Is the staker who is depositing funds into EigenLayer.
     * @param strategy Is the strategy that `staker` has deposited into.
     * @param token Is the token that `staker` deposited.
     * @param shares Is the number of new shares `staker` has been granted in `strategy`.
     */
    event Deposit(address staker, IERC20 token, IStrategy strategy, uint256 shares);

    /// @notice Emitted when `thirdPartyTransfersForbidden` is updated for a strategy and value by the owner
    event UpdatedThirdPartyTransfersForbidden(IStrategy strategy, bool value);

    /// @notice Emitted when the `strategyWhitelister` is changed
    event StrategyWhitelisterChanged(address previousAddress, address newAddress);

    /// @notice Emitted when a strategy is added to the approved list of strategies for deposit
    event StrategyAddedToDepositWhitelist(IStrategy strategy);

    /// @notice Emitted when a strategy is removed from the approved list of strategies for deposit
    event StrategyRemovedFromDepositWhitelist(IStrategy strategy);

    /**
     * @notice Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `msg.sender`
     * @param strategy is the specified strategy where deposit is to be made,
     * @param token is the denomination in which the deposit is to be made,
     * @param amount is the amount of token to be deposited in the strategy by the staker
     * @return shares The amount of new shares in the `strategy` created as part of the action.
     * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf.
     * @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen).
     *
     * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended.  This can lead to attack vectors
     *          where the token balance and corresponding strategy shares are not in sync upon reentrancy.
     */
    function depositIntoStrategy(IStrategy strategy, IERC20 token, uint256 amount) external returns (uint256 shares);

    /**
     * @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`,
     * who must sign off on the action.
     * Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed
     * purely to help one address deposit 'for' another.
     * @param strategy is the specified strategy where deposit is to be made,
     * @param token is the denomination in which the deposit is to be made,
     * @param amount is the amount of token to be deposited in the strategy by the staker
     * @param staker the staker that the deposited assets will be credited to
     * @param expiry the timestamp at which the signature expires
     * @param signature is a valid signature from the `staker`. either an ECDSA signature if the `staker` is an EOA, or data to forward
     * following EIP-1271 if the `staker` is a contract
     * @return shares The amount of new shares in the `strategy` created as part of the action.
     * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf.
     * @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those
     * targeting stakers who may be attempting to undelegate.
     * @dev Cannot be called if thirdPartyTransfersForbidden is set to true for this strategy
     *
     *  WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended.  This can lead to attack vectors
     *          where the token balance and corresponding strategy shares are not in sync upon reentrancy
     */
    function depositIntoStrategyWithSignature(
        IStrategy strategy,
        IERC20 token,
        uint256 amount,
        address staker,
        uint256 expiry,
        bytes memory signature
    ) external returns (uint256 shares);

    /// @notice Used by the DelegationManager to remove a Staker's shares from a particular strategy when entering the withdrawal queue
    function removeShares(address staker, IStrategy strategy, uint256 shares) external;

    /// @notice Used by the DelegationManager to award a Staker some shares that have passed through the withdrawal queue
    function addShares(address staker, IERC20 token, IStrategy strategy, uint256 shares) external;
    
    /// @notice Used by the DelegationManager to convert withdrawn shares to tokens and send them to a recipient
    function withdrawSharesAsTokens(address recipient, IStrategy strategy, uint256 shares, IERC20 token) external;

    /// @notice Returns the current shares of `user` in `strategy`
    function stakerStrategyShares(address user, IStrategy strategy) external view returns (uint256 shares);

    /**
     * @notice Get all details on the staker's deposits and corresponding shares
     * @return (staker's strategies, shares in these strategies)
     */
    function getDeposits(address staker) external view returns (IStrategy[] memory, uint256[] memory);

    /// @notice Simple getter function that returns `stakerStrategyList[staker].length`.
    function stakerStrategyListLength(address staker) external view returns (uint256);

    /**
     * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into
     * @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already)
     * @param thirdPartyTransfersForbiddenValues bool values to set `thirdPartyTransfersForbidden` to for each strategy
     */
    function addStrategiesToDepositWhitelist(
        IStrategy[] calldata strategiesToWhitelist,
        bool[] calldata thirdPartyTransfersForbiddenValues
    ) external;

    /**
     * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into
     * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it)
     */
    function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external;

    /// @notice Returns the single, central Delegation contract of EigenLayer
    function delegation() external view returns (IDelegationManager);

    /// @notice Returns the single, central Slasher contract of EigenLayer
    function slasher() external view returns (ISlasher);

    /// @notice Returns the EigenPodManager contract of EigenLayer
    function eigenPodManager() external view returns (IEigenPodManager);

    /// @notice Returns the address of the `strategyWhitelister`
    function strategyWhitelister() external view returns (address);

    /**
     * @notice Returns bool for whether or not `strategy` enables credit transfers. i.e enabling
     * depositIntoStrategyWithSignature calls or queueing withdrawals to a different address than the staker.
     */
    function thirdPartyTransfersForbidden(IStrategy strategy) external view returns (bool);

// LIMITED BACKWARDS-COMPATIBILITY FOR DEPRECATED FUNCTIONALITY
    // packed struct for queued withdrawals; helps deal with stack-too-deep errors
    struct DeprecatedStruct_WithdrawerAndNonce {
        address withdrawer;
        uint96 nonce;
    }

    /**
     * Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored.
     * In functions that operate on existing queued withdrawals -- e.g. `startQueuedWithdrawalWaitingPeriod` or `completeQueuedWithdrawal`,
     * the data is resubmitted and the hash of the submitted data is computed by `calculateWithdrawalRoot` and checked against the
     * stored hash in order to confirm the integrity of the submitted data.
     */
    struct DeprecatedStruct_QueuedWithdrawal {
        IStrategy[] strategies;
        uint256[] shares;
        address staker;
        DeprecatedStruct_WithdrawerAndNonce withdrawerAndNonce;
        uint32 withdrawalStartBlock;
        address delegatedAddress;
    }

    function migrateQueuedWithdrawal(DeprecatedStruct_QueuedWithdrawal memory queuedWithdrawal) external returns (bool, bytes32);

    function calculateWithdrawalRoot(DeprecatedStruct_QueuedWithdrawal memory queuedWithdrawal) external pure returns (bytes32);

    function withdrawalRootPending(bytes32 _withdrawalRoot) external view returns (bool);
}

File 13 of 23 : IEigenPod.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import "src/eigenlayer-libraries/BeaconChainProofs.sol";
import "./IEigenPodManager.sol";
import "./IBeaconChainOracle.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * @title The implementation contract used for restaking beacon chain ETH on EigenLayer
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 * @notice The main functionalities are:
 * - creating new ETH validators with their withdrawal credentials pointed to this contract
 * - proving from beacon chain state roots that withdrawal credentials are pointed to this contract
 * - proving from beacon chain state roots the balances of ETH validators with their withdrawal credentials
 *   pointed to this contract
 * - updating aggregate balances in the EigenPodManager
 * - withdrawing eth when withdrawals are initiated
 * @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose
 *   to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts
 */
interface IEigenPod {
    enum VALIDATOR_STATUS {
        INACTIVE, // doesnt exist
        ACTIVE, // staked on ethpos and withdrawal credentials are pointed to the EigenPod
        WITHDRAWN // withdrawn from the Beacon Chain
    }

    struct ValidatorInfo {
        // index of the validator in the beacon chain
        uint64 validatorIndex;
        // amount of beacon chain ETH restaked on EigenLayer in gwei
        uint64 restakedBalanceGwei;
        //timestamp of the validator's most recent balance update
        uint64 mostRecentBalanceUpdateTimestamp;
        // status of the validator
        VALIDATOR_STATUS status;
    }

    /**
     * @notice struct used to store amounts related to proven withdrawals in memory. Used to help
     * manage stack depth and optimize the number of external calls, when batching withdrawal operations.
     */
    struct VerifiedWithdrawal {
        // amount to send to a podOwner from a proven withdrawal
        uint256 amountToSendGwei;
        // difference in shares to be recorded in the eigenPodManager, as a result of the withdrawal
        int256 sharesDeltaGwei;
    }


    enum PARTIAL_WITHDRAWAL_CLAIM_STATUS {
        REDEEMED,
        PENDING,
        FAILED
    }

    /// @notice Emitted when an ETH validator stakes via this eigenPod
    event EigenPodStaked(bytes pubkey);

    /// @notice Emitted when an ETH validator's withdrawal credentials are successfully verified to be pointed to this eigenPod
    event ValidatorRestaked(uint40 validatorIndex);

    /// @notice Emitted when an ETH validator's  balance is proven to be updated.  Here newValidatorBalanceGwei
    //  is the validator's balance that is credited on EigenLayer.
    event ValidatorBalanceUpdated(uint40 validatorIndex, uint64 balanceTimestamp, uint64 newValidatorBalanceGwei);

    /// @notice Emitted when an ETH validator is prove to have withdrawn from the beacon chain
    event FullWithdrawalRedeemed(
        uint40 validatorIndex,
        uint64 withdrawalTimestamp,
        address indexed recipient,
        uint64 withdrawalAmountGwei
    );

    /// @notice Emitted when a partial withdrawal claim is successfully redeemed
    event PartialWithdrawalRedeemed(
        uint40 validatorIndex,
        uint64 withdrawalTimestamp,
        address indexed recipient,
        uint64 partialWithdrawalAmountGwei
    );

    /// @notice Emitted when restaked beacon chain ETH is withdrawn from the eigenPod.
    event RestakedBeaconChainETHWithdrawn(address indexed recipient, uint256 amount);

    /// @notice Emitted when podOwner enables restaking
    event RestakingActivated(address indexed podOwner);

    /// @notice Emitted when ETH is received via the `receive` fallback
    event NonBeaconChainETHReceived(uint256 amountReceived);

    /// @notice Emitted when ETH that was previously received via the `receive` fallback is withdrawn
    event NonBeaconChainETHWithdrawn(address indexed recipient, uint256 amountWithdrawn);


    /// @notice The max amount of eth, in gwei, that can be restaked per validator
    function MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR() external view returns (uint64);

    /// @notice the amount of execution layer ETH in this contract that is staked in EigenLayer (i.e. withdrawn from beaconchain but not EigenLayer),
    function withdrawableRestakedExecutionLayerGwei() external view returns (uint64);

    /// @notice any ETH deposited into the EigenPod contract via the `receive` fallback function
    function nonBeaconChainETHBalanceWei() external view returns (uint256);

    /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager
    function initialize(address owner) external;

    /// @notice Called by EigenPodManager when the owner wants to create another ETH validator.
    function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable;

    /**
     * @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address
     * @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain.
     * @dev The podOwner must have already proved sufficient withdrawals, so that this pod's `withdrawableRestakedExecutionLayerGwei` exceeds the
     * `amountWei` input (when converted to GWEI).
     * @dev Reverts if `amountWei` is not a whole Gwei amount
     */
    function withdrawRestakedBeaconChainETH(address recipient, uint256 amount) external;

    /// @notice The single EigenPodManager for EigenLayer
    function eigenPodManager() external view returns (IEigenPodManager);

    /// @notice The owner of this EigenPod
    function podOwner() external view returns (address);

    /// @notice an indicator of whether or not the podOwner has ever "fully restaked" by successfully calling `verifyCorrectWithdrawalCredentials`.
    function hasRestaked() external view returns (bool);

    /**
     * @notice The latest timestamp at which the pod owner withdrew the balance of the pod, via calling `withdrawBeforeRestaking`.
     * @dev This variable is only updated when the `withdrawBeforeRestaking` function is called, which can only occur before `hasRestaked` is set to true for this pod.
     * Proofs for this pod are only valid against Beacon Chain state roots corresponding to timestamps after the stored `mostRecentWithdrawalTimestamp`.
     */
    function mostRecentWithdrawalTimestamp() external view returns (uint64);

    /// @notice Returns the validatorInfo struct for the provided pubkeyHash
    function validatorPubkeyHashToInfo(bytes32 validatorPubkeyHash) external view returns (ValidatorInfo memory);

    /// @notice Returns the validatorInfo struct for the provided pubkey
    function validatorPubkeyToInfo(bytes calldata validatorPubkey) external view returns (ValidatorInfo memory);

    ///@notice mapping that tracks proven withdrawals
    function provenWithdrawal(bytes32 validatorPubkeyHash, uint64 slot) external view returns (bool);

    /// @notice This returns the status of a given validator
    function validatorStatus(bytes32 pubkeyHash) external view returns (VALIDATOR_STATUS);

    /// @notice This returns the status of a given validator pubkey
    function validatorStatus(bytes calldata validatorPubkey) external view returns (VALIDATOR_STATUS);

    /**
     * @notice This function verifies that the withdrawal credentials of validator(s) owned by the podOwner are pointed to
     * this contract. It also verifies the effective balance  of the validator.  It verifies the provided proof of the ETH validator against the beacon chain state
     * root, marks the validator as 'active' in EigenLayer, and credits the restaked ETH in Eigenlayer.
     * @param oracleTimestamp is the Beacon Chain timestamp whose state root the `proof` will be proven against.
     * @param validatorIndices is the list of indices of the validators being proven, refer to consensus specs
     * @param withdrawalCredentialProofs is an array of proofs, where each proof proves each ETH validator's balance and withdrawal credentials
     * against a beacon chain state root
     * @param validatorFields are the fields of the "Validator Container", refer to consensus specs
     * for details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator
     */
    function verifyWithdrawalCredentials(
        uint64 oracleTimestamp,
        BeaconChainProofs.StateRootProof calldata stateRootProof,
        uint40[] calldata validatorIndices,
        bytes[] calldata withdrawalCredentialProofs,
        bytes32[][] calldata validatorFields
    )
        external;

    /**
     * @notice This function records an update (either increase or decrease) in the pod's balance in the StrategyManager.  
               It also verifies a merkle proof of the validator's current beacon chain balance.  
     * @param oracleTimestamp The oracleTimestamp whose state root the `proof` will be proven against.
     *        Must be within `VERIFY_BALANCE_UPDATE_WINDOW_SECONDS` of the current block.
     * @param validatorIndices is the list of indices of the validators being proven, refer to consensus specs 
     * @param validatorFieldsProofs proofs against the `beaconStateRoot` for each validator in `validatorFields`
     * @param validatorFields are the fields of the "Validator Container", refer to consensus specs
     * @dev For more details on the Beacon Chain spec, see: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator
     */
    function verifyBalanceUpdates(
        uint64 oracleTimestamp,
        uint40[] calldata validatorIndices,
        BeaconChainProofs.StateRootProof calldata stateRootProof,
        bytes[] calldata validatorFieldsProofs,
        bytes32[][] calldata validatorFields
    ) external;

    /**
     * @notice This function records full and partial withdrawals on behalf of one of the Ethereum validators for this EigenPod
     * @param oracleTimestamp is the timestamp of the oracle slot that the withdrawal is being proven against
     * @param withdrawalProofs is the information needed to check the veracity of the block numbers and withdrawals being proven
     * @param validatorFieldsProofs is the proof of the validator's fields' in the validator tree
     * @param withdrawalFields are the fields of the withdrawals being proven
     * @param validatorFields are the fields of the validators being proven
     */
    function verifyAndProcessWithdrawals(
        uint64 oracleTimestamp,
        BeaconChainProofs.StateRootProof calldata stateRootProof,
        BeaconChainProofs.WithdrawalProof[] calldata withdrawalProofs,
        bytes[] calldata validatorFieldsProofs,
        bytes32[][] calldata validatorFields,
        bytes32[][] calldata withdrawalFields
    ) external;

    /**
     * @notice Called by the pod owner to activate restaking by withdrawing
     * all existing ETH from the pod and preventing further withdrawals via
     * "withdrawBeforeRestaking()"
     */
    function activateRestaking() external;

    /// @notice Called by the pod owner to withdraw the balance of the pod when `hasRestaked` is set to false
    function withdrawBeforeRestaking() external;

    /// @notice Called by the pod owner to withdraw the nonBeaconChainETHBalanceWei
    function withdrawNonBeaconChainETHBalanceWei(address recipient, uint256 amountToWithdraw) external;

    /// @notice called by owner of a pod to remove any ERC20s deposited in the pod
    function recoverTokens(IERC20[] memory tokenList, uint256[] memory amountsToWithdraw, address recipient) external;
}

File 14 of 23 : IBeaconChainOracle.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

/**
 * @title Interface for the BeaconStateOracle contract.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 */
interface IBeaconChainOracle {
    /// @notice The block number to state root mapping.
    function timestampToBlockRoot(uint256 timestamp) external view returns (bytes32);
}

File 15 of 23 : IPausable.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import "src/eigenlayer-interfaces/IPauserRegistry.sol";

/**
 * @title Adds pausability to a contract, with pausing & unpausing controlled by the `pauser` and `unpauser` of a PauserRegistry contract.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 * @notice Contracts that inherit from this contract may define their own `pause` and `unpause` (and/or related) functions.
 * These functions should be permissioned as "onlyPauser" which defers to a `PauserRegistry` for determining access control.
 * @dev Pausability is implemented using a uint256, which allows up to 256 different single bit-flags; each bit can potentially pause different functionality.
 * Inspiration for this was taken from the NearBridge design here https://etherscan.io/address/0x3FEFc5A4B1c02f21cBc8D3613643ba0635b9a873#code.
 * For the `pause` and `unpause` functions we've implemented, if you pause, you can only flip (any number of) switches to on/1 (aka "paused"), and if you unpause,
 * you can only flip (any number of) switches to off/0 (aka "paused").
 * If you want a pauseXYZ function that just flips a single bit / "pausing flag", it will:
 * 1) 'bit-wise and' (aka `&`) a flag with the current paused state (as a uint256)
 * 2) update the paused state to this new value
 * @dev We note as well that we have chosen to identify flags by their *bit index* as opposed to their numerical value, so, e.g. defining `DEPOSITS_PAUSED = 3`
 * indicates specifically that if the *third bit* of `_paused` is flipped -- i.e. it is a '1' -- then deposits should be paused
 */

interface IPausable {
    /// @notice Emitted when the `pauserRegistry` is set to `newPauserRegistry`.
    event PauserRegistrySet(IPauserRegistry pauserRegistry, IPauserRegistry newPauserRegistry);

    /// @notice Emitted when the pause is triggered by `account`, and changed to `newPausedStatus`.
    event Paused(address indexed account, uint256 newPausedStatus);

    /// @notice Emitted when the pause is lifted by `account`, and changed to `newPausedStatus`.
    event Unpaused(address indexed account, uint256 newPausedStatus);
    
    /// @notice Address of the `PauserRegistry` contract that this contract defers to for determining access control (for pausing).
    function pauserRegistry() external view returns (IPauserRegistry);

    /**
     * @notice This function is used to pause an EigenLayer contract's functionality.
     * It is permissioned to the `pauser` address, which is expected to be a low threshold multisig.
     * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once.
     * @dev This function can only pause functionality, and thus cannot 'unflip' any bit in `_paused` from 1 to 0.
     */
    function pause(uint256 newPausedStatus) external;

    /**
     * @notice Alias for `pause(type(uint256).max)`.
     */
    function pauseAll() external;

    /**
     * @notice This function is used to unpause an EigenLayer contract's functionality.
     * It is permissioned to the `unpauser` address, which is expected to be a high threshold multisig or governance contract.
     * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once.
     * @dev This function can only unpause functionality, and thus cannot 'flip' any bit in `_paused` from 0 to 1.
     */
    function unpause(uint256 newPausedStatus) external;

    /// @notice Returns the current paused status as a uint256.
    function paused() external view returns (uint256);

    /// @notice Returns 'true' if the `indexed`th bit of `_paused` is 1, and 'false' otherwise
    function paused(uint8 index) external view returns (bool);

    /// @notice Allows the unpauser to set a new pauser registry
    function setPauserRegistry(IPauserRegistry newPauserRegistry) external;
}

File 16 of 23 : ISlasher.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import "./IStrategyManager.sol";
import "./IDelegationManager.sol";

/**
 * @title Interface for the primary 'slashing' contract for EigenLayer.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 * @notice See the `Slasher` contract itself for implementation details.
 */
interface ISlasher {
    // struct used to store information about the current state of an operator's obligations to middlewares they are serving
    struct MiddlewareTimes {
        // The update block for the middleware whose most recent update was earliest, i.e. the 'stalest' update out of all middlewares the operator is serving
        uint32 stalestUpdateBlock;
        // The latest 'serveUntilBlock' from all of the middleware that the operator is serving
        uint32 latestServeUntilBlock;
    }

    // struct used to store details relevant to a single middleware that an operator has opted-in to serving
    struct MiddlewareDetails {
        // the block at which the contract begins being able to finalize the operator's registration with the service via calling `recordFirstStakeUpdate`
        uint32 registrationMayBeginAtBlock;
        // the block before which the contract is allowed to slash the user
        uint32 contractCanSlashOperatorUntilBlock;
        // the block at which the middleware's view of the operator's stake was most recently updated
        uint32 latestUpdateBlock;
    }

    /// @notice Emitted when a middleware times is added to `operator`'s array.
    event MiddlewareTimesAdded(
        address operator,
        uint256 index,
        uint32 stalestUpdateBlock,
        uint32 latestServeUntilBlock
    );

    /// @notice Emitted when `operator` begins to allow `contractAddress` to slash them.
    event OptedIntoSlashing(address indexed operator, address indexed contractAddress);

    /// @notice Emitted when `contractAddress` signals that it will no longer be able to slash `operator` after the `contractCanSlashOperatorUntilBlock`.
    event SlashingAbilityRevoked(
        address indexed operator,
        address indexed contractAddress,
        uint32 contractCanSlashOperatorUntilBlock
    );

    /**
     * @notice Emitted when `slashingContract` 'freezes' the `slashedOperator`.
     * @dev The `slashingContract` must have permission to slash the `slashedOperator`, i.e. `canSlash(slasherOperator, slashingContract)` must return 'true'.
     */
    event OperatorFrozen(address indexed slashedOperator, address indexed slashingContract);

    /// @notice Emitted when `previouslySlashedAddress` is 'unfrozen', allowing them to again move deposited funds within EigenLayer.
    event FrozenStatusReset(address indexed previouslySlashedAddress);

    /**
     * @notice Gives the `contractAddress` permission to slash the funds of the caller.
     * @dev Typically, this function must be called prior to registering for a middleware.
     */
    function optIntoSlashing(address contractAddress) external;

    /**
     * @notice Used for 'slashing' a certain operator.
     * @param toBeFrozen The operator to be frozen.
     * @dev Technically the operator is 'frozen' (hence the name of this function), and then subject to slashing pending a decision by a human-in-the-loop.
     * @dev The operator must have previously given the caller (which should be a contract) the ability to slash them, through a call to `optIntoSlashing`.
     */
    function freezeOperator(address toBeFrozen) external;

    /**
     * @notice Removes the 'frozen' status from each of the `frozenAddresses`
     * @dev Callable only by the contract owner (i.e. governance).
     */
    function resetFrozenStatus(address[] calldata frozenAddresses) external;

    /**
     * @notice this function is a called by middlewares during an operator's registration to make sure the operator's stake at registration
     *         is slashable until serveUntil
     * @param operator the operator whose stake update is being recorded
     * @param serveUntilBlock the block until which the operator's stake at the current block is slashable
     * @dev adds the middleware's slashing contract to the operator's linked list
     */
    function recordFirstStakeUpdate(address operator, uint32 serveUntilBlock) external;

    /**
     * @notice this function is a called by middlewares during a stake update for an operator (perhaps to free pending withdrawals)
     *         to make sure the operator's stake at updateBlock is slashable until serveUntil
     * @param operator the operator whose stake update is being recorded
     * @param updateBlock the block for which the stake update is being recorded
     * @param serveUntilBlock the block until which the operator's stake at updateBlock is slashable
     * @param insertAfter the element of the operators linked list that the currently updating middleware should be inserted after
     * @dev insertAfter should be calculated offchain before making the transaction that calls this. this is subject to race conditions,
     *      but it is anticipated to be rare and not detrimental.
     */
    function recordStakeUpdate(
        address operator,
        uint32 updateBlock,
        uint32 serveUntilBlock,
        uint256 insertAfter
    ) external;

    /**
     * @notice this function is a called by middlewares during an operator's deregistration to make sure the operator's stake at deregistration
     *         is slashable until serveUntil
     * @param operator the operator whose stake update is being recorded
     * @param serveUntilBlock the block until which the operator's stake at the current block is slashable
     * @dev removes the middleware's slashing contract to the operator's linked list and revokes the middleware's (i.e. caller's) ability to
     * slash `operator` once `serveUntil` is reached
     */
    function recordLastStakeUpdateAndRevokeSlashingAbility(address operator, uint32 serveUntilBlock) external;

    /// @notice The StrategyManager contract of EigenLayer
    function strategyManager() external view returns (IStrategyManager);

    /// @notice The DelegationManager contract of EigenLayer
    function delegation() external view returns (IDelegationManager);

    /**
     * @notice Used to determine whether `staker` is actively 'frozen'. If a staker is frozen, then they are potentially subject to
     * slashing of their funds, and cannot cannot deposit or withdraw from the strategyManager until the slashing process is completed
     * and the staker's status is reset (to 'unfrozen').
     * @param staker The staker of interest.
     * @return Returns 'true' if `staker` themselves has their status set to frozen, OR if the staker is delegated
     * to an operator who has their status set to frozen. Otherwise returns 'false'.
     */
    function isFrozen(address staker) external view returns (bool);

    /// @notice Returns true if `slashingContract` is currently allowed to slash `toBeSlashed`.
    function canSlash(address toBeSlashed, address slashingContract) external view returns (bool);

    /// @notice Returns the block until which `serviceContract` is allowed to slash the `operator`.
    function contractCanSlashOperatorUntilBlock(
        address operator,
        address serviceContract
    ) external view returns (uint32);

    /// @notice Returns the block at which the `serviceContract` last updated its view of the `operator`'s stake
    function latestUpdateBlock(address operator, address serviceContract) external view returns (uint32);

    /// @notice A search routine for finding the correct input value of `insertAfter` to `recordStakeUpdate` / `_updateMiddlewareList`.
    function getCorrectValueForInsertAfter(address operator, uint32 updateBlock) external view returns (uint256);

    /**
     * @notice Returns 'true' if `operator` can currently complete a withdrawal started at the `withdrawalStartBlock`, with `middlewareTimesIndex` used
     * to specify the index of a `MiddlewareTimes` struct in the operator's list (i.e. an index in `operatorToMiddlewareTimes[operator]`). The specified
     * struct is consulted as proof of the `operator`'s ability (or lack thereof) to complete the withdrawal.
     * This function will return 'false' if the operator cannot currently complete a withdrawal started at the `withdrawalStartBlock`, *or* in the event
     * that an incorrect `middlewareTimesIndex` is supplied, even if one or more correct inputs exist.
     * @param operator Either the operator who queued the withdrawal themselves, or if the withdrawing party is a staker who delegated to an operator,
     * this address is the operator *who the staker was delegated to* at the time of the `withdrawalStartBlock`.
     * @param withdrawalStartBlock The block number at which the withdrawal was initiated.
     * @param middlewareTimesIndex Indicates an index in `operatorToMiddlewareTimes[operator]` to consult as proof of the `operator`'s ability to withdraw
     * @dev The correct `middlewareTimesIndex` input should be computable off-chain.
     */
    function canWithdraw(
        address operator,
        uint32 withdrawalStartBlock,
        uint256 middlewareTimesIndex
    ) external returns (bool);

    /**
     * operator =>
     *  [
     *      (
     *          the least recent update block of all of the middlewares it's serving/served,
     *          latest time that the stake bonded at that update needed to serve until
     *      )
     *  ]
     */
    function operatorToMiddlewareTimes(
        address operator,
        uint256 arrayIndex
    ) external view returns (MiddlewareTimes memory);

    /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator].length`
    function middlewareTimesLength(address operator) external view returns (uint256);

    /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].stalestUpdateBlock`.
    function getMiddlewareTimesIndexStalestUpdateBlock(address operator, uint32 index) external view returns (uint32);

    /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].latestServeUntil`.
    function getMiddlewareTimesIndexServeUntilBlock(address operator, uint32 index) external view returns (uint32);

    /// @notice Getter function for fetching `_operatorToWhitelistedContractsByUpdate[operator].size`.
    function operatorWhitelistedContractsLinkedListSize(address operator) external view returns (uint256);

    /// @notice Getter function for fetching a single node in the operator's linked list (`_operatorToWhitelistedContractsByUpdate[operator]`).
    function operatorWhitelistedContractsLinkedListEntry(
        address operator,
        address node
    ) external view returns (bool, uint256, uint256);
}

File 17 of 23 : IStrategy.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

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

/**
 * @title Minimal interface for an `Strategy` contract.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 * @notice Custom `Strategy` implementations may expand extensively on this interface.
 */
interface IStrategy {
    /**
     * @notice Used to deposit tokens into this Strategy
     * @param token is the ERC20 token being deposited
     * @param amount is the amount of token being deposited
     * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's
     * `depositIntoStrategy` function, and individual share balances are recorded in the strategyManager as well.
     * @return newShares is the number of new shares issued at the current exchange ratio.
     */
    function deposit(IERC20 token, uint256 amount) external returns (uint256);

    /**
     * @notice Used to withdraw tokens from this Strategy, to the `recipient`'s address
     * @param recipient is the address to receive the withdrawn funds
     * @param token is the ERC20 token being transferred out
     * @param amountShares is the amount of shares being withdrawn
     * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's
     * other functions, and individual share balances are recorded in the strategyManager as well.
     */
    function withdraw(address recipient, IERC20 token, uint256 amountShares) external;

    /**
     * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy.
     * @notice In contrast to `sharesToUnderlyingView`, this function **may** make state modifications
     * @param amountShares is the amount of shares to calculate its conversion into the underlying token
     * @return The amount of underlying tokens corresponding to the input `amountShares`
     * @dev Implementation for these functions in particular may vary significantly for different strategies
     */
    function sharesToUnderlying(uint256 amountShares) external returns (uint256);

    /**
     * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.
     * @notice In contrast to `underlyingToSharesView`, this function **may** make state modifications
     * @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares
     * @return The amount of underlying tokens corresponding to the input `amountShares`
     * @dev Implementation for these functions in particular may vary significantly for different strategies
     */
    function underlyingToShares(uint256 amountUnderlying) external returns (uint256);

    /**
     * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in
     * this strategy. In contrast to `userUnderlyingView`, this function **may** make state modifications
     */
    function userUnderlying(address user) external returns (uint256);

    /**
     * @notice convenience function for fetching the current total shares of `user` in this strategy, by
     * querying the `strategyManager` contract
     */
    function shares(address user) external view returns (uint256);

    /**
     * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy.
     * @notice In contrast to `sharesToUnderlying`, this function guarantees no state modifications
     * @param amountShares is the amount of shares to calculate its conversion into the underlying token
     * @return The amount of shares corresponding to the input `amountUnderlying`
     * @dev Implementation for these functions in particular may vary significantly for different strategies
     */
    function sharesToUnderlyingView(uint256 amountShares) external view returns (uint256);

    /**
     * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.
     * @notice In contrast to `underlyingToShares`, this function guarantees no state modifications
     * @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares
     * @return The amount of shares corresponding to the input `amountUnderlying`
     * @dev Implementation for these functions in particular may vary significantly for different strategies
     */
    function underlyingToSharesView(uint256 amountUnderlying) external view returns (uint256);

    /**
     * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in
     * this strategy. In contrast to `userUnderlying`, this function guarantees no state modifications
     */
    function userUnderlyingView(address user) external view returns (uint256);

    /// @notice The underlying token for shares in this Strategy
    function underlyingToken() external view returns (IERC20);

    /// @notice The total number of extant shares in this Strategy
    function totalShares() external view returns (uint256);

    /// @notice Returns either a brief string explaining the strategy's goal & purpose, or a link to metadata that explains in more detail.
    function explanation() external view returns (string memory);
}

File 18 of 23 : ISignatureUtils.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

/**
 * @title The interface for common signature utilities.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 */
interface ISignatureUtils {
    // @notice Struct that bundles together a signature and an expiration time for the signature. Used primarily for stack management.
    struct SignatureWithExpiry {
        // the signature itself, formatted as a single bytes object
        bytes signature;
        // the expiration timestamp (UTC) of the signature
        uint256 expiry;
    }

    // @notice Struct that bundles together a signature, a salt for uniqueness, and an expiration time for the signature. Used primarily for stack management.
    struct SignatureWithSaltAndExpiry {
        // the signature itself, formatted as a single bytes object
        bytes signature;
        // the salt used to generate the signature
        bytes32 salt;
        // the expiration timestamp (UTC) of the signature
        uint256 expiry;
    }
}

File 19 of 23 : BeaconChainProofs.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./Merkle.sol";
import "./Endian.sol";

//Utility library for parsing and PHASE0 beacon chain block headers
//SSZ Spec: https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md#merkleization
//BeaconBlockHeader Spec: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconblockheader
//BeaconState Spec: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconstate
library BeaconChainProofs {
    // constants are the number of fields and the heights of the different merkle trees used in merkleizing beacon chain containers
    uint256 internal constant NUM_BEACON_BLOCK_HEADER_FIELDS = 5;
    uint256 internal constant BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT = 3;

    uint256 internal constant NUM_BEACON_BLOCK_BODY_FIELDS = 11;
    uint256 internal constant BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT = 4;

    uint256 internal constant NUM_BEACON_STATE_FIELDS = 21;
    uint256 internal constant BEACON_STATE_FIELD_TREE_HEIGHT = 5;

    uint256 internal constant NUM_ETH1_DATA_FIELDS = 3;
    uint256 internal constant ETH1_DATA_FIELD_TREE_HEIGHT = 2;

    uint256 internal constant NUM_VALIDATOR_FIELDS = 8;
    uint256 internal constant VALIDATOR_FIELD_TREE_HEIGHT = 3;

    uint256 internal constant NUM_EXECUTION_PAYLOAD_HEADER_FIELDS = 15;
    uint256 internal constant EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT = 4;

    uint256 internal constant NUM_EXECUTION_PAYLOAD_FIELDS = 15;
    uint256 internal constant EXECUTION_PAYLOAD_FIELD_TREE_HEIGHT = 4;

    // HISTORICAL_ROOTS_LIMIT	 = 2**24, so tree height is 24
    uint256 internal constant HISTORICAL_ROOTS_TREE_HEIGHT = 24;

    // HISTORICAL_BATCH is root of state_roots and block_root, so number of leaves =  2^1
    uint256 internal constant HISTORICAL_BATCH_TREE_HEIGHT = 1;

    // SLOTS_PER_HISTORICAL_ROOT = 2**13, so tree height is 13
    uint256 internal constant STATE_ROOTS_TREE_HEIGHT = 13;
    uint256 internal constant BLOCK_ROOTS_TREE_HEIGHT = 13;

    //HISTORICAL_ROOTS_LIMIT = 2**24, so tree height is 24
    uint256 internal constant HISTORICAL_SUMMARIES_TREE_HEIGHT = 24;

    //Index of block_summary_root in historical_summary container
    uint256 internal constant BLOCK_SUMMARY_ROOT_INDEX = 0;

    uint256 internal constant NUM_WITHDRAWAL_FIELDS = 4;
    // tree height for hash tree of an individual withdrawal container
    uint256 internal constant WITHDRAWAL_FIELD_TREE_HEIGHT = 2;

    uint256 internal constant VALIDATOR_TREE_HEIGHT = 40;

    // MAX_WITHDRAWALS_PER_PAYLOAD = 2**4, making tree height = 4
    uint256 internal constant WITHDRAWALS_TREE_HEIGHT = 4;

    //in beacon block body https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#beaconblockbody
    uint256 internal constant EXECUTION_PAYLOAD_INDEX = 9;

    // in beacon block header https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconblockheader
    uint256 internal constant SLOT_INDEX = 0;
    uint256 internal constant PROPOSER_INDEX_INDEX = 1;
    uint256 internal constant STATE_ROOT_INDEX = 3;
    uint256 internal constant BODY_ROOT_INDEX = 4;
    // in beacon state https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#beaconstate
    uint256 internal constant HISTORICAL_BATCH_STATE_ROOT_INDEX = 1;
    uint256 internal constant BEACON_STATE_SLOT_INDEX = 2;
    uint256 internal constant LATEST_BLOCK_HEADER_ROOT_INDEX = 4;
    uint256 internal constant BLOCK_ROOTS_INDEX = 5;
    uint256 internal constant STATE_ROOTS_INDEX = 6;
    uint256 internal constant HISTORICAL_ROOTS_INDEX = 7;
    uint256 internal constant ETH_1_ROOT_INDEX = 8;
    uint256 internal constant VALIDATOR_TREE_ROOT_INDEX = 11;
    uint256 internal constant EXECUTION_PAYLOAD_HEADER_INDEX = 24;
    uint256 internal constant HISTORICAL_SUMMARIES_INDEX = 27;

    // in validator https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator
    uint256 internal constant VALIDATOR_PUBKEY_INDEX = 0;
    uint256 internal constant VALIDATOR_WITHDRAWAL_CREDENTIALS_INDEX = 1;
    uint256 internal constant VALIDATOR_BALANCE_INDEX = 2;
    uint256 internal constant VALIDATOR_SLASHED_INDEX = 3;
    uint256 internal constant VALIDATOR_WITHDRAWABLE_EPOCH_INDEX = 7;

    // in execution payload header
    uint256 internal constant TIMESTAMP_INDEX = 9;
    uint256 internal constant WITHDRAWALS_ROOT_INDEX = 14;

    //in execution payload
    uint256 internal constant WITHDRAWALS_INDEX = 14;

    // in withdrawal
    uint256 internal constant WITHDRAWAL_VALIDATOR_INDEX_INDEX = 1;
    uint256 internal constant WITHDRAWAL_VALIDATOR_AMOUNT_INDEX = 3;

    //In historicalBatch
    uint256 internal constant HISTORICALBATCH_STATEROOTS_INDEX = 1;

    //Misc Constants

    /// @notice The number of slots each epoch in the beacon chain
    uint64 internal constant SLOTS_PER_EPOCH = 32;

    /// @notice The number of seconds in a slot in the beacon chain
    uint64 internal constant SECONDS_PER_SLOT = 12;

    /// @notice Number of seconds per epoch: 384 == 32 slots/epoch * 12 seconds/slot 
    uint64 internal constant SECONDS_PER_EPOCH = SLOTS_PER_EPOCH * SECONDS_PER_SLOT;

    bytes8 internal constant UINT64_MASK = 0xffffffffffffffff;

    /// @notice This struct contains the merkle proofs and leaves needed to verify a partial/full withdrawal
    struct WithdrawalProof {
        bytes withdrawalProof;
        bytes slotProof;
        bytes executionPayloadProof;
        bytes timestampProof;
        bytes historicalSummaryBlockRootProof;
        uint64 blockRootIndex;
        uint64 historicalSummaryIndex;
        uint64 withdrawalIndex;
        bytes32 blockRoot;
        bytes32 slotRoot;
        bytes32 timestampRoot;
        bytes32 executionPayloadRoot;
    }

    /// @notice This struct contains the root and proof for verifying the state root against the oracle block root
    struct StateRootProof {
        bytes32 beaconStateRoot;
        bytes proof;
    }

    /**
     * @notice This function verifies merkle proofs of the fields of a certain validator against a beacon chain state root
     * @param validatorIndex the index of the proven validator
     * @param beaconStateRoot is the beacon chain state root to be proven against.
     * @param validatorFieldsProof is the data used in proving the validator's fields
     * @param validatorFields the claimed fields of the validator
     */
    function verifyValidatorFields(
        bytes32 beaconStateRoot,
        bytes32[] calldata validatorFields,
        bytes calldata validatorFieldsProof,
        uint40 validatorIndex
    ) internal view {
        require(
            validatorFields.length == 2 ** VALIDATOR_FIELD_TREE_HEIGHT,
            "BeaconChainProofs.verifyValidatorFields: Validator fields has incorrect length"
        );

        /**
         * Note: the length of the validator merkle proof is BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1.
         * There is an additional layer added by hashing the root with the length of the validator list
         */
        require(
            validatorFieldsProof.length == 32 * ((VALIDATOR_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT),
            "BeaconChainProofs.verifyValidatorFields: Proof has incorrect length"
        );
        uint256 index = (VALIDATOR_TREE_ROOT_INDEX << (VALIDATOR_TREE_HEIGHT + 1)) | uint256(validatorIndex);
        // merkleize the validatorFields to get the leaf to prove
        bytes32 validatorRoot = EigenlayerMerkle.merkleizeSha256(validatorFields);

        // verify the proof of the validatorRoot against the beaconStateRoot
        require(
            EigenlayerMerkle.verifyInclusionSha256({
                proof: validatorFieldsProof,
                root: beaconStateRoot,
                leaf: validatorRoot,
                index: index
            }),
            "BeaconChainProofs.verifyValidatorFields: Invalid merkle proof"
        );
    }

    /**
     * @notice This function verifies the latestBlockHeader against the state root. the latestBlockHeader is
     * a tracked in the beacon state.
     * @param beaconStateRoot is the beacon chain state root to be proven against.
     * @param stateRootProof is the provided merkle proof
     * @param latestBlockRoot is hashtree root of the latest block header in the beacon state
     */
    function verifyStateRootAgainstLatestBlockRoot(
        bytes32 latestBlockRoot,
        bytes32 beaconStateRoot,
        bytes calldata stateRootProof
    ) internal view {
        require(
            stateRootProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT),
            "BeaconChainProofs.verifyStateRootAgainstLatestBlockRoot: Proof has incorrect length"
        );
        //Next we verify the slot against the blockRoot
        require(
            EigenlayerMerkle.verifyInclusionSha256({
                proof: stateRootProof,
                root: latestBlockRoot,
                leaf: beaconStateRoot,
                index: STATE_ROOT_INDEX
            }),
            "BeaconChainProofs.verifyStateRootAgainstLatestBlockRoot: Invalid latest block header root merkle proof"
        );
    }

    /**
     * @notice This function verifies the slot and the withdrawal fields for a given withdrawal
     * @param withdrawalProof is the provided set of merkle proofs
     * @param withdrawalFields is the serialized withdrawal container to be proven
     */
    function verifyWithdrawal(
        bytes32 beaconStateRoot,
        bytes32[] calldata withdrawalFields,
        WithdrawalProof calldata withdrawalProof
    ) internal view {
        require(
            withdrawalFields.length == 2 ** WITHDRAWAL_FIELD_TREE_HEIGHT,
            "BeaconChainProofs.verifyWithdrawal: withdrawalFields has incorrect length"
        );

        require(
            withdrawalProof.blockRootIndex < 2 ** BLOCK_ROOTS_TREE_HEIGHT,
            "BeaconChainProofs.verifyWithdrawal: blockRootIndex is too large"
        );
        require(
            withdrawalProof.withdrawalIndex < 2 ** WITHDRAWALS_TREE_HEIGHT,
            "BeaconChainProofs.verifyWithdrawal: withdrawalIndex is too large"
        );

        require(
            withdrawalProof.historicalSummaryIndex < 2 ** HISTORICAL_SUMMARIES_TREE_HEIGHT,
            "BeaconChainProofs.verifyWithdrawal: historicalSummaryIndex is too large"
        );

        require(
            withdrawalProof.withdrawalProof.length ==
                32 * (EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT + WITHDRAWALS_TREE_HEIGHT + 1),
            "BeaconChainProofs.verifyWithdrawal: withdrawalProof has incorrect length"
        );
        require(
            withdrawalProof.executionPayloadProof.length ==
                32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT + BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT),
            "BeaconChainProofs.verifyWithdrawal: executionPayloadProof has incorrect length"
        );
        require(
            withdrawalProof.slotProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT),
            "BeaconChainProofs.verifyWithdrawal: slotProof has incorrect length"
        );
        require(
            withdrawalProof.timestampProof.length == 32 * (EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT),
            "BeaconChainProofs.verifyWithdrawal: timestampProof has incorrect length"
        );

        require(
            withdrawalProof.historicalSummaryBlockRootProof.length ==
                32 *
                    (BEACON_STATE_FIELD_TREE_HEIGHT +
                        (HISTORICAL_SUMMARIES_TREE_HEIGHT + 1) +
                        1 +
                        (BLOCK_ROOTS_TREE_HEIGHT)),
            "BeaconChainProofs.verifyWithdrawal: historicalSummaryBlockRootProof has incorrect length"
        );
        /**
         * Note: Here, the "1" in "1 + (BLOCK_ROOTS_TREE_HEIGHT)" signifies that extra step of choosing the "block_root_summary" within the individual
         * "historical_summary". Everywhere else it signifies merkelize_with_mixin, where the length of an array is hashed with the root of the array,
         * but not here.
         */
        uint256 historicalBlockHeaderIndex = (HISTORICAL_SUMMARIES_INDEX <<
            ((HISTORICAL_SUMMARIES_TREE_HEIGHT + 1) + 1 + (BLOCK_ROOTS_TREE_HEIGHT))) |
            (uint256(withdrawalProof.historicalSummaryIndex) << (1 + (BLOCK_ROOTS_TREE_HEIGHT))) |
            (BLOCK_SUMMARY_ROOT_INDEX << (BLOCK_ROOTS_TREE_HEIGHT)) |
            uint256(withdrawalProof.blockRootIndex);

        require(
            EigenlayerMerkle.verifyInclusionSha256({
                proof: withdrawalProof.historicalSummaryBlockRootProof,
                root: beaconStateRoot,
                leaf: withdrawalProof.blockRoot,
                index: historicalBlockHeaderIndex
            }),
            "BeaconChainProofs.verifyWithdrawal: Invalid historicalsummary merkle proof"
        );

        //Next we verify the slot against the blockRoot
        require(
            EigenlayerMerkle.verifyInclusionSha256({
                proof: withdrawalProof.slotProof,
                root: withdrawalProof.blockRoot,
                leaf: withdrawalProof.slotRoot,
                index: SLOT_INDEX
            }),
            "BeaconChainProofs.verifyWithdrawal: Invalid slot merkle proof"
        );

        {
            // Next we verify the executionPayloadRoot against the blockRoot
            uint256 executionPayloadIndex = (BODY_ROOT_INDEX << (BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT)) |
                EXECUTION_PAYLOAD_INDEX;
            require(
                EigenlayerMerkle.verifyInclusionSha256({
                    proof: withdrawalProof.executionPayloadProof,
                    root: withdrawalProof.blockRoot,
                    leaf: withdrawalProof.executionPayloadRoot,
                    index: executionPayloadIndex
                }),
                "BeaconChainProofs.verifyWithdrawal: Invalid executionPayload merkle proof"
            );
        }

        // Next we verify the timestampRoot against the executionPayload root
        require(
            EigenlayerMerkle.verifyInclusionSha256({
                proof: withdrawalProof.timestampProof,
                root: withdrawalProof.executionPayloadRoot,
                leaf: withdrawalProof.timestampRoot,
                index: TIMESTAMP_INDEX
            }),
            "BeaconChainProofs.verifyWithdrawal: Invalid blockNumber merkle proof"
        );

        {
            /**
             * Next we verify the withdrawal fields against the blockRoot:
             * First we compute the withdrawal_index relative to the blockRoot by concatenating the indexes of all the
             * intermediate root indexes from the bottom of the sub trees (the withdrawal container) to the top, the blockRoot.
             * Then we calculate merkleize the withdrawalFields container to calculate the the withdrawalRoot.
             * Finally we verify the withdrawalRoot against the executionPayloadRoot.
             *
             *
             * Note: EigenlayerMerkleization of the withdrawals root tree uses EigenlayerMerkleizeWithMixin, i.e., the length of the array is hashed with the root of
             * the array.  Thus we shift the WITHDRAWALS_INDEX over by WITHDRAWALS_TREE_HEIGHT + 1 and not just WITHDRAWALS_TREE_HEIGHT.
             */
            uint256 withdrawalIndex = (WITHDRAWALS_INDEX << (WITHDRAWALS_TREE_HEIGHT + 1)) |
                uint256(withdrawalProof.withdrawalIndex);
            bytes32 withdrawalRoot = EigenlayerMerkle.merkleizeSha256(withdrawalFields);
            require(
                EigenlayerMerkle.verifyInclusionSha256({
                    proof: withdrawalProof.withdrawalProof,
                    root: withdrawalProof.executionPayloadRoot,
                    leaf: withdrawalRoot,
                    index: withdrawalIndex
                }),
                "BeaconChainProofs.verifyWithdrawal: Invalid withdrawal merkle proof"
            );
        }
    }

    /**
     * @notice This function replicates the ssz hashing of a validator's pubkey, outlined below:
     *  hh := ssz.NewHasher()
     *  hh.PutBytes(validatorPubkey[:])
     *  validatorPubkeyHash := hh.Hash()
     *  hh.Reset()
     */
    function hashValidatorBLSPubkey(bytes memory validatorPubkey) internal pure returns (bytes32 pubkeyHash) {
        require(validatorPubkey.length == 48, "Input should be 48 bytes in length");
        return sha256(abi.encodePacked(validatorPubkey, bytes16(0)));
    }

    /**
     * @dev Retrieve the withdrawal timestamp
     */
    function getWithdrawalTimestamp(WithdrawalProof memory withdrawalProof) internal pure returns (uint64) {
        return
            Endian.fromLittleEndianUint64(withdrawalProof.timestampRoot);
    }

    /**
     * @dev Converts the withdrawal's slot to an epoch
     */
    function getWithdrawalEpoch(WithdrawalProof memory withdrawalProof) internal pure returns (uint64) {
        return
            Endian.fromLittleEndianUint64(withdrawalProof.slotRoot) / SLOTS_PER_EPOCH;
    }

    /**
     * Indices for validator fields (refer to consensus specs):
     * 0: pubkey
     * 1: withdrawal credentials
     * 2: effective balance
     * 3: slashed?
     * 4: activation elligibility epoch
     * 5: activation epoch
     * 6: exit epoch
     * 7: withdrawable epoch
     */

    /**
     * @dev Retrieves a validator's pubkey hash
     */
    function getPubkeyHash(bytes32[] memory validatorFields) internal pure returns (bytes32) {
        return 
            validatorFields[VALIDATOR_PUBKEY_INDEX];
    }

    function getWithdrawalCredentials(bytes32[] memory validatorFields) internal pure returns (bytes32) {
        return
            validatorFields[VALIDATOR_WITHDRAWAL_CREDENTIALS_INDEX];
    }

    /**
     * @dev Retrieves a validator's effective balance (in gwei)
     */
    function getEffectiveBalanceGwei(bytes32[] memory validatorFields) internal pure returns (uint64) {
        return 
            Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_BALANCE_INDEX]);
    }

    /**
     * @dev Retrieves a validator's withdrawable epoch
     */
    function getWithdrawableEpoch(bytes32[] memory validatorFields) internal pure returns (uint64) {
        return 
            Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_WITHDRAWABLE_EPOCH_INDEX]);
    }

    /**
     * Indices for withdrawal fields (refer to consensus specs):
     * 0: withdrawal index
     * 1: validator index
     * 2: execution address
     * 3: withdrawal amount
     */

    /**
     * @dev Retrieves a withdrawal's validator index
     */
    function getValidatorIndex(bytes32[] memory withdrawalFields) internal pure returns (uint40) {
        return 
            uint40(Endian.fromLittleEndianUint64(withdrawalFields[WITHDRAWAL_VALIDATOR_INDEX_INDEX]));
    }

    /**
     * @dev Retrieves a withdrawal's withdrawal amount (in gwei)
     */
    function getWithdrawalAmountGwei(bytes32[] memory withdrawalFields) internal pure returns (uint64) {
        return
            Endian.fromLittleEndianUint64(withdrawalFields[WITHDRAWAL_VALIDATOR_AMOUNT_INDEX]);
    }
}

File 20 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 21 of 23 : IPauserRegistry.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

/**
 * @title Interface for the `PauserRegistry` contract.
 * @author Layr Labs, Inc.
 * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
 */
interface IPauserRegistry {
    event PauserStatusChanged(address pauser, bool canPause);

    event UnpauserChanged(address previousUnpauser, address newUnpauser);
    
    /// @notice Mapping of addresses to whether they hold the pauser role.
    function isPauser(address pauser) external view returns (bool);

    /// @notice Unique address that holds the unpauser role. Capable of changing *both* the pauser and unpauser addresses.
    function unpauser() external view returns (address);
}

File 22 of 23 : Merkle.sol
// SPDX-License-Identifier: BUSL-1.1
// Adapted from OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library EigenlayerMerkle {
    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. The tree is built assuming `leaf` is
     * the 0 indexed `index`'th leaf from the bottom left of the tree.
     *
     * Note this is for a Merkle tree using the keccak/sha3 hash function
     */
    function verifyInclusionKeccak(
        bytes memory proof,
        bytes32 root,
        bytes32 leaf,
        uint256 index
    ) internal pure returns (bool) {
        return processInclusionProofKeccak(proof, leaf, index) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. The tree is built assuming `leaf` is
     * the 0 indexed `index`'th leaf from the bottom left of the tree.
     *
     * _Available since v4.4._
     *
     * Note this is for a Merkle tree using the keccak/sha3 hash function
     */
    function processInclusionProofKeccak(
        bytes memory proof,
        bytes32 leaf,
        uint256 index
    ) internal pure returns (bytes32) {
        require(
            proof.length != 0 && proof.length % 32 == 0,
            "Merkle.processInclusionProofKeccak: proof length should be a non-zero multiple of 32"
        );
        bytes32 computedHash = leaf;
        for (uint256 i = 32; i <= proof.length; i += 32) {
            if (index % 2 == 0) {
                // if ith bit of index is 0, then computedHash is a left sibling
                assembly {
                    mstore(0x00, computedHash)
                    mstore(0x20, mload(add(proof, i)))
                    computedHash := keccak256(0x00, 0x40)
                    index := div(index, 2)
                }
            } else {
                // if ith bit of index is 1, then computedHash is a right sibling
                assembly {
                    mstore(0x00, mload(add(proof, i)))
                    mstore(0x20, computedHash)
                    computedHash := keccak256(0x00, 0x40)
                    index := div(index, 2)
                }
            }
        }
        return computedHash;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. The tree is built assuming `leaf` is
     * the 0 indexed `index`'th leaf from the bottom left of the tree.
     *
     * Note this is for a Merkle tree using the sha256 hash function
     */
    function verifyInclusionSha256(
        bytes memory proof,
        bytes32 root,
        bytes32 leaf,
        uint256 index
    ) internal view returns (bool) {
        return processInclusionProofSha256(proof, leaf, index) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. The tree is built assuming `leaf` is
     * the 0 indexed `index`'th leaf from the bottom left of the tree.
     *
     * _Available since v4.4._
     *
     * Note this is for a Merkle tree using the sha256 hash function
     */
    function processInclusionProofSha256(
        bytes memory proof,
        bytes32 leaf,
        uint256 index
    ) internal view returns (bytes32) {
        require(
            proof.length != 0 && proof.length % 32 == 0,
            "Merkle.processInclusionProofSha256: proof length should be a non-zero multiple of 32"
        );
        bytes32[1] memory computedHash = [leaf];
        for (uint256 i = 32; i <= proof.length; i += 32) {
            if (index % 2 == 0) {
                // if ith bit of index is 0, then computedHash is a left sibling
                assembly {
                    mstore(0x00, mload(computedHash))
                    mstore(0x20, mload(add(proof, i)))
                    if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) {
                        revert(0, 0)
                    }
                    index := div(index, 2)
                }
            } else {
                // if ith bit of index is 1, then computedHash is a right sibling
                assembly {
                    mstore(0x00, mload(add(proof, i)))
                    mstore(0x20, mload(computedHash))
                    if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) {
                        revert(0, 0)
                    }
                    index := div(index, 2)
                }
            }
        }
        return computedHash[0];
    }

    /**
     @notice this function returns the merkle root of a tree created from a set of leaves using sha256 as its hash function
     @param leaves the leaves of the merkle tree
     @return The computed Merkle root of the tree.
     @dev A pre-condition to this function is that leaves.length is a power of two.  If not, the function will merkleize the inputs incorrectly.
     */
    function merkleizeSha256(bytes32[] memory leaves) internal pure returns (bytes32) {
        //there are half as many nodes in the layer above the leaves
        uint256 numNodesInLayer = leaves.length / 2;
        //create a layer to store the internal nodes
        bytes32[] memory layer = new bytes32[](numNodesInLayer);
        //fill the layer with the pairwise hashes of the leaves
        for (uint256 i = 0; i < numNodesInLayer; i++) {
            layer[i] = sha256(abi.encodePacked(leaves[2 * i], leaves[2 * i + 1]));
        }
        //the next layer above has half as many nodes
        numNodesInLayer /= 2;
        //while we haven't computed the root
        while (numNodesInLayer != 0) {
            //overwrite the first numNodesInLayer nodes in layer with the pairwise hashes of their children
            for (uint256 i = 0; i < numNodesInLayer; i++) {
                layer[i] = sha256(abi.encodePacked(layer[2 * i], layer[2 * i + 1]));
            }
            //the next layer above has half as many nodes
            numNodesInLayer /= 2;
        }
        //the first node in the layer is the root
        return layer[0];
    }
}

File 23 of 23 : Endian.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

library Endian {
    /**
     * @notice Converts a little endian-formatted uint64 to a big endian-formatted uint64
     * @param lenum little endian-formatted uint64 input, provided as 'bytes32' type
     * @return n The big endian-formatted uint64
     * @dev Note that the input is formatted as a 'bytes32' type (i.e. 256 bits), but it is immediately truncated to a uint64 (i.e. 64 bits)
     * through a right-shift/shr operation.
     */
    function fromLittleEndianUint64(bytes32 lenum) internal pure returns (uint64 n) {
        // the number needs to be stored in little-endian encoding (ie in bytes 0-8)
        n = uint64(uint256(lenum >> 192));
        return
            (n >> 56) |
            ((0x00FF000000000000 & n) >> 40) |
            ((0x0000FF0000000000 & n) >> 24) |
            ((0x000000FF00000000 & n) >> 8) |
            ((0x00000000FF000000 & n) << 8) |
            ((0x0000000000FF0000 & n) << 24) |
            ((0x000000000000FF00 & n) << 40) |
            ((0x00000000000000FF & n) << 56);
    }
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "@uniswap/=lib/",
    "@eigenlayer/=lib/eigenlayer-contracts/src/",
    "@layerzerolabs/lz-evm-oapp-v2/contracts/=lib/Etherfi-SyncPools/node_modules/@layerzerolabs/lz-evm-oapp-v2/contracts/",
    "@layerzerolabs/lz-evm-protocol-v2/contracts/=lib/Etherfi-SyncPools/node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/",
    "@layerzerolabs/lz-evm-messagelib-v2/contracts/=lib/Etherfi-SyncPools/node_modules/@layerzerolabs/lz-evm-messagelib-v2/contracts/",
    "@layerzerolabs/lz-evm-oapp-v2/contracts-upgradeable/=lib/Etherfi-SyncPools/node_modules/layerzero-v2/oapp/contracts/",
    "Etherfi-SyncPools/=lib/Etherfi-SyncPools/",
    "ds-test/=lib/Etherfi-SyncPools/node_modules/ds-test/src/",
    "layerzero-v2/=lib/Etherfi-SyncPools/node_modules/layerzero-v2/",
    "murky/=lib/murky/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solidity-bytes-utils/=lib/Etherfi-SyncPools/node_modules/solidity-bytes-utils/",
    "v3-core/=lib/v3-core/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 2000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"CallFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nodeAddress","type":"address"},{"indexed":true,"internalType":"address","name":"podAddress","type":"address"}],"name":"EigenPodCreated","type":"event"},{"inputs":[],"name":"DEPRECATED_exitRequestTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_exitTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_ipfsHashForEncryptedValidatorKey","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_localRevenueIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_phase","outputs":[{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_restakingObservedExitBlock","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_stakingStartTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_vestedAuctionRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_startTimestamp","type":"uint32"},{"internalType":"uint32","name":"_endTimestamp","type":"uint32"}],"name":"_getDaysPassedSince","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"associatedValidatorIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"associatedValidatorIndices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_beaconBalance","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorIndex","type":"uint32"},{"internalType":"uint32","name":"exitRequestTimestamp","type":"uint32"},{"internalType":"uint32","name":"exitTimestamp","type":"uint32"},{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"phase","type":"uint8"}],"internalType":"struct IEtherFiNodesManager.ValidatorInfo","name":"_info","type":"tuple"},{"components":[{"internalType":"uint64","name":"treasury","type":"uint64"},{"internalType":"uint64","name":"nodeOperator","type":"uint64"},{"internalType":"uint64","name":"tnft","type":"uint64"},{"internalType":"uint64","name":"bnft","type":"uint64"}],"internalType":"struct IEtherFiNodesManager.RewardsSplit","name":"_SRsplits","type":"tuple"},{"internalType":"bool","name":"_onlyWithdrawable","type":"bool"}],"name":"calculateTVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"callEigenPod","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxNumWithdrawals","type":"uint256"},{"internalType":"bool","name":"_checkIfHasOutstandingEigenLayerWithdrawals","type":"bool"},{"internalType":"uint256","name":"_validatorId","type":"uint256"}],"name":"claimDelayedWithdrawalRouterWithdrawals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"delegatedTo","type":"address"},{"internalType":"address","name":"withdrawer","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint32","name":"startBlock","type":"uint32"},{"internalType":"contract IStrategy[]","name":"strategies","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct IDelegationManager.Withdrawal","name":"withdrawals","type":"tuple"},{"internalType":"uint256","name":"middlewareTimesIndexes","type":"uint256"}],"name":"completeQueuedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"delegatedTo","type":"address"},{"internalType":"address","name":"withdrawer","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint32","name":"startBlock","type":"uint32"},{"internalType":"contract IStrategy[]","name":"strategies","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct IDelegationManager.Withdrawal[]","name":"withdrawals","type":"tuple[]"},{"internalType":"uint256[]","name":"middlewareTimesIndexes","type":"uint256[]"}],"name":"completeQueuedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"completedWithdrawalFromRestakingInGwei","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createEigenPod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eigenPod","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etherFiNodesManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"forwardCall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"validatorIndex","type":"uint32"},{"internalType":"uint32","name":"exitRequestTimestamp","type":"uint32"},{"internalType":"uint32","name":"exitTimestamp","type":"uint32"},{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"phase","type":"uint8"}],"internalType":"struct IEtherFiNodesManager.ValidatorInfo","name":"_info","type":"tuple"},{"components":[{"internalType":"uint64","name":"treasury","type":"uint64"},{"internalType":"uint64","name":"nodeOperator","type":"uint64"},{"internalType":"uint64","name":"tnft","type":"uint64"},{"internalType":"uint64","name":"bnft","type":"uint64"}],"internalType":"struct IEtherFiNodesManager.RewardsSplit","name":"_SRsplits","type":"tuple"}],"name":"getFullWithdrawalPayouts","outputs":[{"internalType":"uint256","name":"toNodeOperator","type":"uint256"},{"internalType":"uint256","name":"toTnft","type":"uint256"},{"internalType":"uint256","name":"toBnft","type":"uint256"},{"internalType":"uint256","name":"toTreasury","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tNftExitRequestTimestamp","type":"uint32"},{"internalType":"uint32","name":"_bNftExitRequestTimestamp","type":"uint32"}],"name":"getNonExitPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_exitRequestTimestamp","type":"uint32"},{"components":[{"internalType":"uint64","name":"treasury","type":"uint64"},{"internalType":"uint64","name":"nodeOperator","type":"uint64"},{"internalType":"uint64","name":"tnft","type":"uint64"},{"internalType":"uint64","name":"bnft","type":"uint64"}],"internalType":"struct IEtherFiNodesManager.RewardsSplit","name":"_splits","type":"tuple"}],"name":"getRewardsPayouts","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_etherFiNodesManager","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isRestakingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validatorId","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorIndex","type":"uint32"},{"internalType":"uint32","name":"exitRequestTimestamp","type":"uint32"},{"internalType":"uint32","name":"exitTimestamp","type":"uint32"},{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"phase","type":"uint8"}],"internalType":"struct IEtherFiNodesManager.ValidatorInfo","name":"_info","type":"tuple"}],"name":"migrateVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"moveFundsToManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numAssociatedValidators","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numExitRequestsByTnft","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numExitedValidators","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingWithdrawalFromRestakingInGwei","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validatorId","type":"uint256"}],"name":"processFullWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validatorId","type":"uint256"}],"name":"processNodeExit","outputs":[{"internalType":"bytes32[]","name":"fullWithdrawalRoots","type":"bytes32[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"queueEigenpodFullWithdrawal","outputs":[{"internalType":"bytes32[]","name":"fullWithdrawalRoots","type":"bytes32[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"queuePhase1PartialWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validatorId","type":"uint256"},{"internalType":"bool","name":"_enableRestaking","type":"bool"}],"name":"registerValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"splitBalanceInExecutionLayer","outputs":[{"internalType":"uint256","name":"_withdrawalSafe","type":"uint256"},{"internalType":"uint256","name":"_eigenPod","type":"uint256"},{"internalType":"uint256","name":"_delayedWithdrawalRouter","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalanceInExecutionLayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validatorId","type":"uint256"},{"components":[{"internalType":"uint32","name":"validatorIndex","type":"uint32"},{"internalType":"uint32","name":"exitRequestTimestamp","type":"uint32"},{"internalType":"uint32","name":"exitTimestamp","type":"uint32"},{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"phase","type":"uint8"}],"internalType":"struct IEtherFiNodesManager.ValidatorInfo","name":"_info","type":"tuple"}],"name":"unRegisterValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_up","type":"uint16"},{"internalType":"uint16","name":"_down","type":"uint16"}],"name":"updateNumExitRequests","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_up","type":"uint16"},{"internalType":"uint16","name":"_down","type":"uint16"}],"name":"updateNumExitedValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_up","type":"uint16"},{"internalType":"uint16","name":"_down","type":"uint16"}],"name":"updateNumberOfAssociatedValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"_currentPhase","type":"uint8"},{"internalType":"enum IEtherFiNode.VALIDATOR_PHASE","name":"_newPhase","type":"uint8"}],"name":"validatePhaseTransition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_treasuryAmount","type":"uint256"},{"internalType":"address","name":"_operator","type":"address"},{"internalType":"uint256","name":"_operatorAmount","type":"uint256"},{"internalType":"address","name":"_tnftHolder","type":"address"},{"internalType":"uint256","name":"_tnftAmount","type":"uint256"},{"internalType":"address","name":"_bnftHolder","type":"address"},{"internalType":"uint256","name":"_bnftAmount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawableBalanceInExecutionLayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50600080546001600160a01b03191661dead17905561560e80620000356000396000f3fe6080604052600436106103175760003560e01c806383644f741161019a578063a9f2803a116100e1578063cd2c5b5a1161008a578063e1bba04e11610064578063e1bba04e14610962578063e2b28dab1461099a578063f55b3040146109c757600080fd5b8063cd2c5b5a1461090d578063d2c6ae191461092d578063d7e9b9a41461094d57600080fd5b8063c7e4aa66116100bb578063c7e4aa66146108a1578063c95efcaf146108b6578063ca2f8899146108d657600080fd5b8063a9f2803a1461082a578063b00fe2fd14610847578063c4d66de81461088157600080fd5b806393eb3a0311610143578063a653239d1161011d578063a653239d146107ca578063a6c89f36146107ea578063a8a90f371461080a57600080fd5b806393eb3a03146107605780639cdd7f9514610781578063a3aae136146107aa57600080fd5b806388100e4d1161017457806388100e4d146107005780638f06a2ff1461072057806392ac08201461074057600080fd5b806383644f74146106ab57806383f3b78d146106cb57806383f884d3146106e057600080fd5b80632c616c961161025e5780634183e66f116102075780635c60da1b116101e15780635c60da1b146106415780636d2fe263146106565780636e717d771461069657600080fd5b80634183e66f146105cf578063459a3ecf146105ef57806354fd4d501461061f57600080fd5b80633c0fb350116102385780633c0fb350146105515780633c624584146105715780633d03eaf21461059f57600080fd5b80632c616c96146104fa5780632cab108b1461051c5780632cef7b3e1461053c57600080fd5b80631bc4758e116102c057806322bee4941161029a57806322bee4941461047d5780632568a621146104aa5780632a7305b2146104e457600080fd5b80631bc4758e146103fb57806320d010761461041b5780632143769f1461045057600080fd5b80630c89120c116102f15780630c89120c1461039b5780631124a855146103bb57806314574244146103db57600080fd5b8063089acd98146103235780630b10b201146103605780630c2f32761461037757600080fd5b3661031e57005b600080fd5b34801561032f57600080fd5b50600054610343906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561036c57600080fd5b506103756109e7565b005b34801561038357600080fd5b5061038d60025481565b604051908152602001610357565b3480156103a757600080fd5b506103756103b6366004614554565b610bbf565b3480156103c757600080fd5b506103756103d636600461482f565b610d0b565b3480156103e757600080fd5b5061038d6103f6366004614874565b610e0b565b34801561040757600080fd5b506103756104163660046148b4565b610e4d565b34801561042757600080fd5b5060055461043d90600160d81b900461ffff1681565b60405161ffff9091168152602001610357565b34801561045c57600080fd5b5061038d61046b3660046148e7565b60066020526000908152604090205481565b34801561048957600080fd5b5061049d610498366004614970565b610f2f565b6040516103579190614a10565b3480156104b657600080fd5b506004546104cf90640100000000900463ffffffff1681565b60405163ffffffff9091168152602001610357565b3480156104f057600080fd5b5061038d60015481565b34801561050657600080fd5b5061050f610f54565b6040516103579190614a23565b34801561052857600080fd5b50610375610537366004614a67565b610f6b565b34801561054857600080fd5b5061038d6111e9565b34801561055d57600080fd5b5061050f61056c3660046148e7565b6112c3565b34801561057d57600080fd5b506004546104cf906d0100000000000000000000000000900463ffffffff1681565b3480156105ab57600080fd5b506105bf6105ba366004614afb565b6113af565b6040519015158152602001610357565b3480156105db57600080fd5b506105bf6105ea366004614b25565b61154c565b3480156105fb57600080fd5b50610604611854565b60408051938452602084019290925290820152606001610357565b34801561062b57600080fd5b5060055461043d90600160a81b900461ffff1681565b34801561064d57600080fd5b506103436119da565b34801561066257600080fd5b50610676610671366004614c36565b611a82565b604080519485526020850193909352918301526060820152608001610357565b3480156106a257600080fd5b5061038d611d3c565b3480156106b757600080fd5b5061049d6106c6366004614c63565b611d66565b3480156106d757600080fd5b5061049d611d8f565b3480156106ec57600080fd5b506103756106fb3660046148b4565b611e1d565b34801561070c57600080fd5b506105bf61071b366004614c98565b611ee1565b34801561072c57600080fd5b5061067661073b366004614cbc565b6121ed565b34801561074c57600080fd5b5061067661075b366004614d0f565b61258e565b34801561076c57600080fd5b506005546105bf90600160a01b900460ff1681565b34801561078d57600080fd5b506004546104cf9068010000000000000000900463ffffffff1681565b3480156107b657600080fd5b50600554610343906001600160a01b031681565b3480156107d657600080fd5b506103756107e53660046148e7565b6125bb565b3480156107f657600080fd5b506103756108053660046148b4565b6126f1565b34801561081657600080fd5b5061038d6108253660046148e7565b6127b5565b34801561083657600080fd5b506004546104cf9063ffffffff1681565b34801561085357600080fd5b506008546108689067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610357565b34801561088d57600080fd5b5061037561089c366004614d3c565b6127d6565b3480156108ad57600080fd5b50610375612964565b3480156108c257600080fd5b506103756108d13660046148e7565b612a5a565b3480156108e257600080fd5b50600454610900906c01000000000000000000000000900460ff1681565b6040516103579190614d6f565b34801561091957600080fd5b5061038d610928366004614874565b612b0a565b34801561093957600080fd5b50610375610948366004614c98565b612d03565b34801561095957600080fd5b5061038d612e46565b34801561096e57600080fd5b5060055461043d90790100000000000000000000000000000000000000000000000000900461ffff1681565b3480156109a657600080fd5b506008546108689068010000000000000000900467ffffffffffffffff1681565b3480156109d357600080fd5b506103756109e2366004614d97565b612fd6565b6005546001600160a01b0316156109fa57565b60008060009054906101000a90046001600160a01b03166001600160a01b0316634665bcda6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a729190614e61565b9050806001600160a01b03166384d810626040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190614e61565b506040517fa38406a30000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0382169063a38406a390602401602060405180830381865afa158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190614e61565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216918217905560405130907fcdc82cfed67d9b46d3a15dd3b48745fb894a354d554cb5da5fb8c440f85c108e90600090a350565b610bc7612fe0565b600554600160a81b900461ffff16600114610c1b5760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b60448201526064015b60405180910390fd5b610c236111e9565b1580610c3f575060055460ff600160a01b909104161515811515145b610c8b5760405162461bcd60e51b815260206004820152601960248201527f72657374616b696e6720737461747573206d69736d61746368000000000000006044820152606401610c12565b60078054600181019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68881018390556000838152600660205260409020558015610d0757600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055610d076109e7565b5050565b604080516001808252818301909252600091816020015b610d836040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff16815260200160608152602001606081525090565b815260200190600190039081610d225790505090508281600081518110610dac57610dac614e7e565b60209081029190910101526040805160018082528183019092526000918160200160208202803683370190505090508281600081518110610def57610def614e7e565b602002602001018181525050610e05828261303c565b50505050565b600080610e248463ffffffff168463ffffffff1661346b565b610e349063ffffffff8516614eaa565b9050610e436201518082614ebd565b9150505b92915050565b610e55612fe0565b600554600160a81b900461ffff16600114610ea45760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61ffff821615610ee857816005601b8282829054906101000a900461ffff16610ecd9190614edf565b92506101000a81548161ffff021916908361ffff1602179055505b61ffff811615610d0757806005601b8282829054906101000a900461ffff16610f119190614f01565b92506101000a81548161ffff021916908361ffff1602179055505050565b6060610f39612fe0565b610f438383613481565b610f4d838361356b565b9392505050565b6060610f5e612fe0565b610f666135af565b905090565b610f73612fe0565b600554600160a81b900461ffff16600114610fc25760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b6000851561103e576040516001600160a01b038816906127109088906000818181858888f193505050503d8060008114611018576040519150601f19603f3d011682016040523d82523d6000602084013e61101d565b606091505b5090915050801561102f576000611031565b855b61103b9089614f1c565b97505b81156110b8576040516001600160a01b03841690612ee09084906000818181858888f193505050503d8060008114611092576040519150601f19603f3d011682016040523d82523d6000602084013e611097565b606091505b509091505080156110a95760006110ab565b815b6110b59089614f1c565b97505b8315611132576040516001600160a01b03861690612ee09086906000818181858888f193505050503d806000811461110c576040519150601f19603f3d011682016040523d82523d6000602084013e611111565b606091505b50909150508015611123576000611125565b835b61112f9089614f1c565b97505b87156111de576040516001600160a01b038a16906108fc908a906000818181858888f193505050503d8060008114611186576040519150601f19603f3d011682016040523d82523d6000602084013e61118b565b606091505b505080915050806111de5760405162461bcd60e51b815260206004820152600f60248201527f4554485f53454e445f4641494c454400000000000000000000000000000000006044820152606401610c12565b505050505050505050565b600554600090600160a81b900461ffff16810361129d5760026004546c01000000000000000000000000900460ff16600981111561122957611229614d59565b148061125b575060066004546c01000000000000000000000000900460ff16600981111561125957611259614d59565b145b8061128c575060036004546c01000000000000000000000000900460ff16600981111561128a5761128a614d59565b145b156112975750600190565b50600090565b5060055477010000000000000000000000000000000000000000000000900461ffff1690565b60606112cd612fe0565b600554600160a81b900461ffff1660011461131c5760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b600554600160a01b900460ff16156113aa576000828152600960205260409020805463ffffffff19164363ffffffff161790556113576135af565b905080516001146113aa5760405162461bcd60e51b815260206004820152601860248201527f4e4f5f46554c4c5749544844524157414c5f51554555454400000000000000006044820152606401610c12565b919050565b600080808460098111156113c5576113c5614d59565b036113e75760015b8360098111156113df576113df614d59565b1490506114ff565b60018460098111156113fb576113fb614d59565b0361144557600283600981111561141457611414614d59565b14806114315750600083600981111561142f5761142f614d59565b145b8061143e575060086113cd565b90506114ff565b600884600981111561145957611459614d59565b0361148057600283600981111561147257611472614d59565b148061143e575060006113cd565b600284600981111561149457611494614d59565b036114bb5760038360098111156114ad576114ad614d59565b148061143e575060066113cd565b60068460098111156114cf576114cf614d59565b036114db5760036113cd565b60038460098111156114ef576114ef614d59565b036114fb5760046113cd565b5060005b80610f4d5760405162461bcd60e51b815260206004820152601860248201527f494e56414c49445f50484153455f5452414e534954494f4e00000000000000006044820152606401610c12565b600554600090600160a01b900460ff1661156857506000610f4d565b60008060009054906101000a90046001600160a01b03166001600160a01b0316631a5057be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e09190614e61565b6040516307c3bc0160e31b81523060048201529091506000906001600160a01b03831690633e1de00890602401600060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116529190810190614f2f565b5111156116d3576040517fe5db06c0000000000000000000000000000000000000000000000000000000008152306004820152602481018690526001600160a01b0382169063e5db06c090604401600060405180830381600087803b1580156116ba57600080fd5b505af11580156116ce573d6000803e3d6000fd5b505050505b831561184957600554600160a01b900460ff166116f4576000915050610f4d565b60008060009054906101000a90046001600160a01b03166001600160a01b0316631a5057be6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c9190614e61565b6040516307c3bc0160e31b81523060048201529091506000906001600160a01b03831690633e1de00890602401600060405180830381865afa1580156117b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117de9190810190614f2f565b905060005b815181101561184557600086815260096020526040902054825163ffffffff9091169083908390811061181857611818614e7e565b60200260200101516020015163ffffffff16101561183d576001945050505050610f4d565b6001016117e3565b5050505b506000949350505050565b60055447906000908190600160a01b900460ff16156119d55760055460008054604080517f1a5057be00000000000000000000000000000000000000000000000000000000815290516001600160a01b03948516319650929390911691631a5057be916004808201926020929091908290030181865afa1580156118dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119009190614e61565b6040516307c3bc0160e31b81523060048201529091506000906001600160a01b03831690633e1de00890602401600060405180830381865afa15801561194a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119729190810190614f2f565b905060005b81518110156119d15781818151811061199257611992614e7e565b6020026020010151600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16846119c79190614f1c565b9350600101611977565b5050505b909192565b600080611a0860017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d51614eaa565b60001b90506000815490506000819050806001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7a9190614e61565b935050505090565b600080600080611a90612fe0565b600554600160a81b900461ffff161580611ab15750611aad6111e9565b6001145b15611ad157611ac46000878760016121ed565b9350935093509350611d33565b600554600160a81b900461ffff16600103611ceb5760408051600480825260a082019092526000916020820160808036833701905050905060006801bc16d674ec800000611b1d612e46565b1015611b3057611b2b612e46565b611b3b565b6801bc16d674ec8000005b9050611b46816136bc565b83600281518110611b5957611b59614e7e565b6020026020010184600181518110611b7357611b73614e7e565b6020026020010182815250828152505050611bf98883600081518110611b9b57611b9b614e7e565b602002602001015184600181518110611bb657611bb6614e7e565b602002602001015185600281518110611bd157611bd1614e7e565b602002602001015186600381518110611bec57611bec614e7e565b602002602001015161377a565b85600081518110611c0c57611c0c614e7e565b6020026020010186600181518110611c2657611c26614e7e565b6020026020010187600281518110611c4057611c40614e7e565b6020026020010188600381518110611c5a57611c5a614e7e565b6020908102919091010193909352929091529190525281518290600090611c8357611c83614e7e565b602002602001015182600181518110611c9e57611c9e614e7e565b602002602001015183600281518110611cb957611cb9614e7e565b602002602001015184600381518110611cd457611cd4614e7e565b602002602001015195509550955095505050611d33565b60405162461bcd60e51b815260206004820152600d60248201527f57524f4e475f56455253494f4e000000000000000000000000000000000000006044820152606401610c12565b92959194509250565b600080600080611d4a611854565b9194509250905080611d5c8385614f1c565b611a7a9190614f1c565b6060611d70612fe0565b611d79826137f8565b600554610e47906001600160a01b03168361356b565b60038054611d9c9061500f565b80601f0160208091040260200160405190810160405280929190818152602001828054611dc89061500f565b8015611e155780601f10611dea57610100808354040283529160200191611e15565b820191906000526020600020905b815481529060010190602001808311611df857829003601f168201915b505050505081565b611e25612fe0565b600554600160a81b900461ffff16600114611e745760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61ffff821615611eb85781600560178282829054906101000a900461ffff16611e9d9190614edf565b92506101000a81548161ffff021916908361ffff1602179055505b61ffff811615610d075780600560178282829054906101000a900461ffff16610f119190614f01565b6000611eeb612fe0565b600554600160a81b900461ffff16600114611f3a5760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b600482606001516009811115611f5257611f52614d59565b1480611f735750600082606001516009811115611f7157611f71614d59565b145b611fbf5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964207068617365000000000000000000000000000000000000006044820152606401610c12565b600482606001516009811115611fd757611fd7614d59565b036120175760016005601b8282829054906101000a900461ffff16611ffc9190614f01565b92506101000a81548161ffff021916908361ffff1602179055505b602082015163ffffffff1615612062576001600560198282829054906101000a900461ffff166120479190614f01565b92506101000a81548161ffff021916908361ffff1602179055505b60008381526006602052604081205460075490919061208390600190614eaa565b905060006007828154811061209a5761209a614e7e565b90600052602060002001549050600782815481106120ba576120ba614e7e565b9060005260206000200154600784815481106120d8576120d8614e7e565b6000918252602080832090910192909255828152600690915260409020839055600780548061210957612109615049565b6001900381819060005260206000200160009055905560066000878152602001908152602001600020600090555050506007805490506000036121e45761214e6111e9565b1561219b5760405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f5354415445000000000000000000000000000000000000006044820152606401610c12565b506000828152600960205260409020805463ffffffff19169055600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556001610e47565b50600092915050565b6000806000806121fb612fe0565b60008061220d89606001518b89613988565b909250905061221c8183614f1c565b6000036122385760008060008095509550955095505050612583565b60408051600480825260a0820190925260009160208201608080368337019050509050612265838a613ced565b8460008151811061227857612278614e7e565b602002602001018560018151811061229257612292614e7e565b60200260200101866002815181106122ac576122ac614e7e565b60200260200101876003815181106122c6576122c6614e7e565b602090810291909101019390935292909152919052526000806122e8846136bc565b91509150808360018151811061230057612300614e7e565b602002602001018181516123149190614f1c565b905250825182908490600290811061232e5761232e614e7e565b602002602001018181516123429190614f1c565b915081815250506123b18c8460008151811061236057612360614e7e565b60200260200101518560018151811061237b5761237b614e7e565b60200260200101518660028151811061239657612396614e7e565b602002602001015187600381518110611bec57611bec614e7e565b866000815181106123c4576123c4614e7e565b60200260200101876001815181106123de576123de614e7e565b60200260200101886002815181106123f8576123f8614e7e565b602002602001018960038151811061241257612412614e7e565b602090810291909101019390935292909152919052526124328486614f1c565b8360038151811061244557612445614e7e565b60200260200101518460028151811061246057612460614e7e565b60200260200101518560018151811061247b5761247b614e7e565b60200260200101518660008151811061249657612496614e7e565b60200260200101516124a89190614f1c565b6124b29190614f1c565b6124bc9190614f1c565b146125095760405162461bcd60e51b815260206004820152601060248201527f494e434f52524543545f414d4f554e54000000000000000000000000000000006044820152606401610c12565b8260008151811061251c5761251c614e7e565b60200260200101518360018151811061253757612537614e7e565b60200260200101518460028151811061255257612552614e7e565b60200260200101518560038151811061256d5761256d614e7e565b6020026020010151985098509850985050505050505b945094509450949050565b600080600080600061259e612e46565b90506125aa8187613ced565b929a91995097509095509350505050565b6125c3612fe0565b600554600160a81b900461ffff166001146126125760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61261e60006001611e1d565b600554600160a01b900460ff16156126ee576008546407735940006801000000000000000090910467ffffffffffffffff16101561269e5760405162461bcd60e51b815260206004820152601460248201527f494e53554646494349454e545f42414c414e43450000000000000000000000006044820152606401610c12565b6407735940006008808282829054906101000a900467ffffffffffffffff166126c7919061505f565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b50565b6126f9612fe0565b600554600160a81b900461ffff166001146127485760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61ffff82161561278c5781600560198282829054906101000a900461ffff166127719190614edf565b92506101000a81548161ffff021916908361ffff1602179055505b61ffff811615610d075780600560198282829054906101000a900461ffff16610f119190614f01565b600781815481106127c557600080fd5b600091825260209091200154905081565b60006004546c01000000000000000000000000900460ff1660098111156127ff576127ff614d59565b1461284c5760405162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610c12565b6000546001600160a01b0316156128a55760405162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610c12565b6001600160a01b0381166128fb5760405162461bcd60e51b815260206004820152600f60248201527f4e4f5f5a45524f5f4144445245535300000000000000000000000000000000006044820152606401610c12565b600080546001600160a01b039092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216919091179055600580547fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b600554600160a01b900460ff1615806129ef5750600560009054906101000a90046001600160a01b03166001600160a01b0316633106ab536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ef9190615080565b156129f657565b600560009054906101000a90046001600160a01b03166001600160a01b031663baa7145a6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612a4657600080fd5b505af1158015610e05573d6000803e3d6000fd5b612a62612fe0565b600080546040516001600160a01b039091169061177090849084818181858888f193505050503d8060008114612ab4576040519150601f19603f3d011682016040523d82523d6000602084013e612ab9565b606091505b5050905080610d075760405162461bcd60e51b815260206004820152600f60248201527f4554485f53454e445f4641494c454400000000000000000000000000000000006044820152606401610c12565b60008263ffffffff16600003612b2257506000610e47565b60008060009054906101000a90046001600160a01b03166001600160a01b031663bbe78ecd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9a919061509d565b67ffffffffffffffff16905060008060009054906101000a90046001600160a01b03166001600160a01b0316637082994b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1e919061509d565b90506000612c2c8686610e0b565b905061016d811115612c535750506fffffffffffffffffffffffffffffffff169050610e47565b6fffffffffffffffffffffffffffffffff83165b8115612cdc576000612c7a60078461346b565b9050612c888161271061519e565b81612c9f67ffffffffffffffff8716612710614eaa565b612ca9919061519e565b612cb390846151aa565b612cbd9190614ebd565b9150612cca60078461346b565b612cd49084614eaa565b925050612c67565b612cf8816fffffffffffffffffffffffffffffffff8616614eaa565b979650505050505050565b612d0b612fe0565b600554600160a81b900461ffff16600003610d0757600480547fffffffffffffffffffffffffffffffffffffff00000000000000000000000000169055612d54600360006144f8565b600580547fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff16600160a81b1790558115610d075760055477010000000000000000000000000000000000000000000000900461ffff1615612df75760405162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610c12565b612e02826000610bbf565b612e0e60016000611e1d565b602081015163ffffffff1615612e2a57612e2a600160006126f1565b604081015163ffffffff1615610d0757610d0760016000610e4d565b60055460009047908290600160a01b900460ff1615612fc55760008060009054906101000a90046001600160a01b03166001600160a01b0316631a5057be6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed79190614e61565b6040517f1f39d87f0000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b03831690631f39d87f90602401600060405180830381865afa158015612f3a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f629190810190614f2f565b905060005b8151811015612fc157818181518110612f8257612f82614e7e565b6020026020010151600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1684612fb79190614f1c565b9350600101612f67565b5050505b612fcf8183614f1c565b9250505090565b610d07828261303c565b6000546001600160a01b0316331461303a5760405162461bcd60e51b815260206004820152601060248201527f494e434f52524543545f43414c4c4552000000000000000000000000000000006044820152606401610c12565b565b600080835167ffffffffffffffff81111561305957613059614584565b604051908082528060200260200182016040528015613082578160200160208202803683370190505b5090506000845167ffffffffffffffff8111156130a1576130a1614584565b6040519080825280602002602001820160405280156130d457816020015b60608152602001906001900390816130bf5790505b50905060005b85518110156132bd57306001600160a01b03168682815181106130ff576130ff614e7e565b6020026020010151604001516001600160a01b031614801561314f5750306001600160a01b031686828151811061313857613138614e7e565b6020026020010151600001516001600160a01b0316145b61319b5760405162461bcd60e51b815260206004820152600760248201527f494e56414c4944000000000000000000000000000000000000000000000000006044820152606401610c12565b60018382815181106131af576131af614e7e565b6020026020010190151590811515815250508581815181106131d3576131d3614e7e565b602002602001015160a001515167ffffffffffffffff8111156131f8576131f8614584565b604051908082528060200260200182016040528015613221578160200160208202803683370190505b5082828151811061323457613234614e7e565b602002602001018190525060005b86828151811061325457613254614e7e565b602002602001015160c00151518110156132b45786828151811061327a5761327a614e7e565b602002602001015160c00151818151811061329757613297614e7e565b6020026020010151856132aa9190614f1c565b9450600101613242565b506001016130da565b506132cc633b9aca0084614ebd565b600880546000906132e890849067ffffffffffffffff1661505f565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550633b9aca008361331e9190614ebd565b60088054819061334590849068010000000000000000900467ffffffffffffffff166151c1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060008060009054906101000a90046001600160a01b03166001600160a01b031663ea4d3c9b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133e39190614e61565b6040517f334043960000000000000000000000000000000000000000000000000000000081529091506001600160a01b0382169063334043969061343190899086908a908990600401615313565b600060405180830381600087803b15801561344b57600080fd5b505af115801561345f573d6000803e3d6000fd5b50505050505050505050565b600081831061347a5781610f4d565b5090919050565b602081015160007fffffffff0000000000000000000000000000000000000000000000000000000082167f60d7faed000000000000000000000000000000000000000000000000000000001480159061351c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f334043960000000000000000000000000000000000000000000000000000000014155b905080610e055760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f414c4c4f5745440000000000000000000000000000000000000000006044820152606401610c12565b6060610f4d838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250613dd3565b600554606090600160a01b900460ff166135c65790565b600560009054906101000a90046001600160a01b03166001600160a01b0316633106ab536040518163ffffffff1660e01b8152600401602060405180830381865afa158015613619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061363d9190615080565b6136ac57600560009054906101000a90046001600160a01b03166001600160a01b031663baa7145a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561369157600080fd5b505af11580156136a5573d6000803e3d6000fd5b5050505090565b6136b4613ec7565b610f66613fd6565b60008067de0b6b3a7640000083101580156136e057506801bc16d674ec8000008311155b61372c5760405162461bcd60e51b815260206004820152601a60248201527f494e434f52524543545f5052494e434950414c5f414d4f554e540000000000006044820152606401610c12565b60006801ae361fc1451c000084101561374d57670de0b6b3a7640000613760565b6137606801a055690d9db8000085614eaa565b9050600061376e8286614eaa565b91959194509092505050565b60008060008060006137948a602001518b60400151612b0a565b905060006137a2888361346b565b905060006137b8826702c68af0bb14000061346b565b90506137c4818c614f1c565b9a506137d08183614eaa565b6137da9089614f1c565b97506137e6828a614eaa565b9a9c999b509698975050505050505050565b60208101517f1d37cbbb000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016138f7576024825110156138985760405162461bcd60e51b815260206004820152601360248201527f494e56414c49445f444154415f4c454e475448000000000000000000000000006044820152606401610c12565b60248201516001600160a01b03811630146138f55760405162461bcd60e51b815260206004820152601360248201527f494e434f52524543545f524543495049454e54000000000000000000000000006044820152606401610c12565b505b7f225ccb94000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601610d075760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f414c4c4f5745440000000000000000000000000000000000000000006044820152606401610c12565b60008060006139956111e9565b9050806000036139ac576000809250925050613ce5565b6000846139c0576139bb611d3c565b6139c8565b6139c8612e46565b6005549091506139eb90600160d81b900461ffff1667de0b6b3a76400000615437565b67ffffffffffffffff16811015613a445760405162461bcd60e51b815260206004820152601460248201527f494e53554646494349454e545f42414c414e43450000000000000000000000006044820152606401610c12565b600554600090613aae90613a6b90600160d81b900461ffff1667de0b6b3a76400000615437565b613a7f9067ffffffffffffffff1684614eaa565b600554613a9f90600160d81b900461ffff1667de0b6b3a76400000615437565b67ffffffffffffffff1661346b565b600554613ace90600160d81b900461ffff1667de0b6b3a76400000615437565b67ffffffffffffffff16613ae29190614f1c565b9050600083613af18385614eaa565b613afb9190614ebd565b905060006801bc16d674ec8000008911613b16576000613b29565b613b296801bc16d674ec8000008a614eaa565b9050613b358183614f1c565b965060038a6009811115613b4b57613b4b614d59565b03613be357600554613b6890600160d81b900461ffff1684614ebd565b95508815613bde5760405162461bcd60e51b815260206004820152603660248201527f4578697465642076616c696461746f72206d7573742068617665207a65726f2060448201527f62616c616e61636520696e2074686520626561636f6e000000000000000000006064820152608401610c12565b613c72565b60028a6009811115613bf757613bf7614d59565b1480613c14575060068a6009811115613c1257613c12614d59565b145b15613c2a57613c23818a614eaa565b9550613c72565b60405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f5048415345000000000000000000000000000000000000006044820152606401610c12565b6801bc16d674ec8000008611158015613c93575067de0b6b3a764000008610155b613cdf5760405162461bcd60e51b815260206004820152601060248201527f494e434f52524543545f414d4f554e54000000000000000000000000000000006044820152606401610c12565b50505050505b935093915050565b60008060008060008560600151866040015187602001518860000151613d1391906151c1565b613d1d91906151c1565b613d2791906151c1565b67ffffffffffffffff16905080866020015167ffffffffffffffff1688613d4e91906151aa565b613d589190614ebd565b945080866040015167ffffffffffffffff1688613d7591906151aa565b613d7f9190614ebd565b935080866060015167ffffffffffffffff1688613d9c91906151aa565b613da69190614ebd565b925084613db38585614f1c565b613dbd9190614f1c565b613dc79088614eaa565b91505092959194509250565b606082471015613e4b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c12565b600080866001600160a01b03168587604051613e679190615463565b60006040518083038185875af1925050503d8060008114613ea4576040519150601f19603f3d011682016040523d82523d6000602084013e613ea9565b606091505b5091509150613eba8783838761445a565b925050505b949350505050565b600554604080517ffe80b08700000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163fe80b0879160048083019260209291908290030181865afa158015613f2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f4e919061547f565b905080156126ee576005546040517fe2c83445000000000000000000000000000000000000000000000000000000008152306004820152602481018390526001600160a01b039091169063e2c8344590604401600060405180830381600087803b158015613fbb57600080fd5b505af1158015613fcf573d6000803e3d6000fd5b5050505050565b600554604080517f3106ab5300000000000000000000000000000000000000000000000000000000815290516060926001600160a01b031691633106ab539160048083019260209291908290030181865afa158015614039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405d9190615080565b6140645790565b600854600554604080517f3474aa16000000000000000000000000000000000000000000000000000000008152905160009367ffffffffffffffff16926001600160a01b031691633474aa169160048083019260209291908290030181865afa1580156140d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140f9919061509d565b614103919061505f565b67ffffffffffffffff1690508060000361411b575090565b6407735940008110156141705760405162461bcd60e51b815260206004820152600760248201527f534c4153484544000000000000000000000000000000000000000000000000006044820152606401610c12565b60088054640773594000919060009061419490849067ffffffffffffffff166151c1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060008060009054906101000a90046001600160a01b03166001600160a01b031663ea4d3c9b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561420e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142329190614e61565b60408051600180825281830190925291925060009190816020015b6040805160608082018352808252602082015260009181019190915281526020019060019003908161424d57505060408051600180825281830190925291925060009190602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050836001600160a01b0316639104c3196040518163ffffffff1660e01b8152600401602060405180830381865afa158015614302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143269190614e61565b8260008151811061433957614339614e7e565b60200260200101906001600160a01b031690816001600160a01b0316815250506801bc16d674ec8000008160008151811061437657614376614e7e565b6020026020010181815250506040518060600160405280838152602001828152602001306001600160a01b0316815250836000815181106143b9576143b9614e7e565b60209081029190910101526040517f0dd8dd020000000000000000000000000000000000000000000000000000000081526001600160a01b03851690630dd8dd0290614409908690600401615498565b6000604051808303816000875af1158015614428573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526144509190810190615552565b9550505050505090565b606083156144c95782516000036144c2576001600160a01b0385163b6144c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c12565b5081613ebf565b613ebf83838151156144de5781518083602001fd5b8060405162461bcd60e51b8152600401610c129190614a10565b5080546145049061500f565b6000825580601f10614514575050565b601f0160209004906000526020600020908101906126ee91905b80821115614542576000815560010161452e565b5090565b80151581146126ee57600080fd5b6000806040838503121561456757600080fd5b82359150602083013561457981614546565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff811182821017156145bd576145bd614584565b60405290565b6040516080810167ffffffffffffffff811182821017156145bd576145bd614584565b6040805190810167ffffffffffffffff811182821017156145bd576145bd614584565b604051601f8201601f1916810167ffffffffffffffff8111828210171561463257614632614584565b604052919050565b6001600160a01b03811681146126ee57600080fd5b80356113aa8161463a565b63ffffffff811681146126ee57600080fd5b80356113aa8161465a565b600067ffffffffffffffff82111561469157614691614584565b5060051b60200190565b600082601f8301126146ac57600080fd5b813560206146c16146bc83614677565b614609565b8083825260208201915060208460051b8701019350868411156146e357600080fd5b602086015b848110156147085780356146fb8161463a565b83529183019183016146e8565b509695505050505050565b600082601f83011261472457600080fd5b813560206147346146bc83614677565b8083825260208201915060208460051b87010193508684111561475657600080fd5b602086015b84811015614708578035835291830191830161475b565b600060e0828403121561478457600080fd5b61478c61459a565b90506147978261464f565b81526147a56020830161464f565b60208201526147b66040830161464f565b6040820152606082013560608201526147d16080830161466c565b608082015260a082013567ffffffffffffffff808211156147f157600080fd5b6147fd8583860161469b565b60a084015260c084013591508082111561481657600080fd5b5061482384828501614713565b60c08301525092915050565b6000806040838503121561484257600080fd5b823567ffffffffffffffff81111561485957600080fd5b61486585828601614772565b95602094909401359450505050565b6000806040838503121561488757600080fd5b82356148928161465a565b915060208301356145798161465a565b803561ffff811681146113aa57600080fd5b600080604083850312156148c757600080fd5b6148d0836148a2565b91506148de602084016148a2565b90509250929050565b6000602082840312156148f957600080fd5b5035919050565b600082601f83011261491157600080fd5b813567ffffffffffffffff81111561492b5761492b614584565b61493e6020601f19601f84011601614609565b81815284602083860101111561495357600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561498357600080fd5b823561498e8161463a565b9150602083013567ffffffffffffffff8111156149aa57600080fd5b6149b685828601614900565b9150509250929050565b60005b838110156149db5781810151838201526020016149c3565b50506000910152565b600081518084526149fc8160208601602086016149c0565b601f01601f19169290920160200192915050565b602081526000610f4d60208301846149e4565b6020808252825182820181905260009190848201906040850190845b81811015614a5b57835183529284019291840191600101614a3f565b50909695505050505050565b600080600080600080600080610100898b031215614a8457600080fd5b8835614a8f8161463a565b9750602089013596506040890135614aa68161463a565b9550606089013594506080890135614abd8161463a565b935060a0890135925060c0890135614ad48161463a565b8092505060e089013590509295985092959890939650565b8035600a81106113aa57600080fd5b60008060408385031215614b0e57600080fd5b614b1783614aec565b91506148de60208401614aec565b600080600060608486031215614b3a57600080fd5b833592506020840135614b4c81614546565b929592945050506040919091013590565b600060808284031215614b6f57600080fd5b614b776145c3565b90508135614b848161465a565b81526020820135614b948161465a565b60208201526040820135614ba78161465a565b6040820152614bb860608301614aec565b606082015292915050565b67ffffffffffffffff811681146126ee57600080fd5b600060808284031215614beb57600080fd5b614bf36145c3565b90508135614c0081614bc3565b81526020820135614c1081614bc3565b60208201526040820135614c2381614bc3565b60408201526060820135614bb881614bc3565b6000806101008385031215614c4a57600080fd5b614c548484614b5d565b91506148de8460808501614bd9565b600060208284031215614c7557600080fd5b813567ffffffffffffffff811115614c8c57600080fd5b610e4384828501614900565b60008060a08385031215614cab57600080fd5b823591506148de8460208501614b5d565b6000806000806101408587031215614cd357600080fd5b84359350614ce48660208701614b5d565b9250614cf38660a08701614bd9565b9150610120850135614d0481614546565b939692955090935050565b60008060a08385031215614d2257600080fd5b8235614d2d8161465a565b91506148de8460208501614bd9565b600060208284031215614d4e57600080fd5b8135610f4d8161463a565b634e487b7160e01b600052602160045260246000fd5b60208101600a8310614d9157634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215614daa57600080fd5b823567ffffffffffffffff80821115614dc257600080fd5b818501915085601f830112614dd657600080fd5b81356020614de66146bc83614677565b82815260059290921b84018101918181019089841115614e0557600080fd5b8286015b84811015614e3d57803586811115614e215760008081fd5b614e2f8c86838b0101614772565b845250918301918301614e09565b5096505086013592505080821115614e5457600080fd5b506149b685828601614713565b600060208284031215614e7357600080fd5b8151610f4d8161463a565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610e4757610e47614e94565b600082614eda57634e487b7160e01b600052601260045260246000fd5b500490565b61ffff818116838216019080821115614efa57614efa614e94565b5092915050565b61ffff828116828216039080821115614efa57614efa614e94565b80820180821115610e4757610e47614e94565b60006020808385031215614f4257600080fd5b825167ffffffffffffffff811115614f5957600080fd5b8301601f81018513614f6a57600080fd5b8051614f786146bc82614677565b81815260069190911b82018301908381019087831115614f9757600080fd5b928401925b82841015612cf85760408489031215614fb55760008081fd5b614fbd6145e6565b84517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114614fea5760008081fd5b815284860151614ff98161465a565b8187015282526040939093019290840190614f9c565b600181811c9082168061502357607f821691505b60208210810361504357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603160045260246000fd5b67ffffffffffffffff828116828216039080821115614efa57614efa614e94565b60006020828403121561509257600080fd5b8151610f4d81614546565b6000602082840312156150af57600080fd5b8151610f4d81614bc3565b600181815b808511156150f55781600019048211156150db576150db614e94565b808516156150e857918102915b93841c93908002906150bf565b509250929050565b60008261510c57506001610e47565b8161511957506000610e47565b816001811461512f576002811461513957615155565b6001915050610e47565b60ff84111561514a5761514a614e94565b50506001821b610e47565b5060208310610133831016604e8410600b8410161715615178575081810a610e47565b61518283836150ba565b806000190482111561519657615196614e94565b029392505050565b6000610f4d83836150fd565b8082028115828204841417610e4757610e47614e94565b67ffffffffffffffff818116838216019080821115614efa57614efa614e94565b60008151808452602080850194506020840160005b8381101561521c5781516001600160a01b0316875295820195908201906001016151f7565b509495945050505050565b60008151808452602080850194506020840160005b8381101561521c5781518752958201959082019060010161523c565b600082825180855260208086019550808260051b8401018186016000805b858110156152d257868403601f19018a52825180518086529086019086860190845b818110156152bd5783516001600160a01b031683529288019291880191600101615298565b50509a86019a94505091840191600101615276565b509198975050505050505050565b60008151808452602080850194506020840160005b8381101561521c5781511515875295820195908201906001016152f5565b600060808083016080845280885180835260a0925060a08601915060a08160051b8701016020808c0160005b848110156153f8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608a8503018652815180516001600160a01b0390811686528482015181168587015260408083015190911690860152606080820151908601528881015163ffffffff16898601528781015160e0898701819052906153c7828801826151e2565b91505060c080830151925086820381880152506153e48183615227565b97850197955050509082019060010161533f565b50508782039088015261540b818b615258565b94505050505082810360408401526154238186615227565b90508281036060840152612cf881856152e0565b67ffffffffffffffff81811683821602808216919082811461545b5761545b614e94565b505092915050565b600082516154758184602087016149c0565b9190910192915050565b60006020828403121561549157600080fd5b5051919050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015615544577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652615505828701826151e2565b915050888201518582038a87015261551d8282615227565b928901516001600160a01b03169589019590955250948701949250908601906001016154c1565b509098975050505050505050565b6000602080838503121561556557600080fd5b825167ffffffffffffffff81111561557c57600080fd5b8301601f8101851361558d57600080fd5b805161559b6146bc82614677565b81815260059190911b820183019083810190878311156155ba57600080fd5b928401925b82841015612cf8578351825292840192908401906155bf56fea2646970667358221220da1e3586f4e3f09fa1c3495274c8c9f79084f7513a8bac5975b8b39c5ef78a3e64736f6c63430008180033

Deployed Bytecode

0x6080604052600436106103175760003560e01c806383644f741161019a578063a9f2803a116100e1578063cd2c5b5a1161008a578063e1bba04e11610064578063e1bba04e14610962578063e2b28dab1461099a578063f55b3040146109c757600080fd5b8063cd2c5b5a1461090d578063d2c6ae191461092d578063d7e9b9a41461094d57600080fd5b8063c7e4aa66116100bb578063c7e4aa66146108a1578063c95efcaf146108b6578063ca2f8899146108d657600080fd5b8063a9f2803a1461082a578063b00fe2fd14610847578063c4d66de81461088157600080fd5b806393eb3a0311610143578063a653239d1161011d578063a653239d146107ca578063a6c89f36146107ea578063a8a90f371461080a57600080fd5b806393eb3a03146107605780639cdd7f9514610781578063a3aae136146107aa57600080fd5b806388100e4d1161017457806388100e4d146107005780638f06a2ff1461072057806392ac08201461074057600080fd5b806383644f74146106ab57806383f3b78d146106cb57806383f884d3146106e057600080fd5b80632c616c961161025e5780634183e66f116102075780635c60da1b116101e15780635c60da1b146106415780636d2fe263146106565780636e717d771461069657600080fd5b80634183e66f146105cf578063459a3ecf146105ef57806354fd4d501461061f57600080fd5b80633c0fb350116102385780633c0fb350146105515780633c624584146105715780633d03eaf21461059f57600080fd5b80632c616c96146104fa5780632cab108b1461051c5780632cef7b3e1461053c57600080fd5b80631bc4758e116102c057806322bee4941161029a57806322bee4941461047d5780632568a621146104aa5780632a7305b2146104e457600080fd5b80631bc4758e146103fb57806320d010761461041b5780632143769f1461045057600080fd5b80630c89120c116102f15780630c89120c1461039b5780631124a855146103bb57806314574244146103db57600080fd5b8063089acd98146103235780630b10b201146103605780630c2f32761461037757600080fd5b3661031e57005b600080fd5b34801561032f57600080fd5b50600054610343906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561036c57600080fd5b506103756109e7565b005b34801561038357600080fd5b5061038d60025481565b604051908152602001610357565b3480156103a757600080fd5b506103756103b6366004614554565b610bbf565b3480156103c757600080fd5b506103756103d636600461482f565b610d0b565b3480156103e757600080fd5b5061038d6103f6366004614874565b610e0b565b34801561040757600080fd5b506103756104163660046148b4565b610e4d565b34801561042757600080fd5b5060055461043d90600160d81b900461ffff1681565b60405161ffff9091168152602001610357565b34801561045c57600080fd5b5061038d61046b3660046148e7565b60066020526000908152604090205481565b34801561048957600080fd5b5061049d610498366004614970565b610f2f565b6040516103579190614a10565b3480156104b657600080fd5b506004546104cf90640100000000900463ffffffff1681565b60405163ffffffff9091168152602001610357565b3480156104f057600080fd5b5061038d60015481565b34801561050657600080fd5b5061050f610f54565b6040516103579190614a23565b34801561052857600080fd5b50610375610537366004614a67565b610f6b565b34801561054857600080fd5b5061038d6111e9565b34801561055d57600080fd5b5061050f61056c3660046148e7565b6112c3565b34801561057d57600080fd5b506004546104cf906d0100000000000000000000000000900463ffffffff1681565b3480156105ab57600080fd5b506105bf6105ba366004614afb565b6113af565b6040519015158152602001610357565b3480156105db57600080fd5b506105bf6105ea366004614b25565b61154c565b3480156105fb57600080fd5b50610604611854565b60408051938452602084019290925290820152606001610357565b34801561062b57600080fd5b5060055461043d90600160a81b900461ffff1681565b34801561064d57600080fd5b506103436119da565b34801561066257600080fd5b50610676610671366004614c36565b611a82565b604080519485526020850193909352918301526060820152608001610357565b3480156106a257600080fd5b5061038d611d3c565b3480156106b757600080fd5b5061049d6106c6366004614c63565b611d66565b3480156106d757600080fd5b5061049d611d8f565b3480156106ec57600080fd5b506103756106fb3660046148b4565b611e1d565b34801561070c57600080fd5b506105bf61071b366004614c98565b611ee1565b34801561072c57600080fd5b5061067661073b366004614cbc565b6121ed565b34801561074c57600080fd5b5061067661075b366004614d0f565b61258e565b34801561076c57600080fd5b506005546105bf90600160a01b900460ff1681565b34801561078d57600080fd5b506004546104cf9068010000000000000000900463ffffffff1681565b3480156107b657600080fd5b50600554610343906001600160a01b031681565b3480156107d657600080fd5b506103756107e53660046148e7565b6125bb565b3480156107f657600080fd5b506103756108053660046148b4565b6126f1565b34801561081657600080fd5b5061038d6108253660046148e7565b6127b5565b34801561083657600080fd5b506004546104cf9063ffffffff1681565b34801561085357600080fd5b506008546108689067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610357565b34801561088d57600080fd5b5061037561089c366004614d3c565b6127d6565b3480156108ad57600080fd5b50610375612964565b3480156108c257600080fd5b506103756108d13660046148e7565b612a5a565b3480156108e257600080fd5b50600454610900906c01000000000000000000000000900460ff1681565b6040516103579190614d6f565b34801561091957600080fd5b5061038d610928366004614874565b612b0a565b34801561093957600080fd5b50610375610948366004614c98565b612d03565b34801561095957600080fd5b5061038d612e46565b34801561096e57600080fd5b5060055461043d90790100000000000000000000000000000000000000000000000000900461ffff1681565b3480156109a657600080fd5b506008546108689068010000000000000000900467ffffffffffffffff1681565b3480156109d357600080fd5b506103756109e2366004614d97565b612fd6565b6005546001600160a01b0316156109fa57565b60008060009054906101000a90046001600160a01b03166001600160a01b0316634665bcda6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a729190614e61565b9050806001600160a01b03166384d810626040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190614e61565b506040517fa38406a30000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0382169063a38406a390602401602060405180830381865afa158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190614e61565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216918217905560405130907fcdc82cfed67d9b46d3a15dd3b48745fb894a354d554cb5da5fb8c440f85c108e90600090a350565b610bc7612fe0565b600554600160a81b900461ffff16600114610c1b5760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b60448201526064015b60405180910390fd5b610c236111e9565b1580610c3f575060055460ff600160a01b909104161515811515145b610c8b5760405162461bcd60e51b815260206004820152601960248201527f72657374616b696e6720737461747573206d69736d61746368000000000000006044820152606401610c12565b60078054600181019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68881018390556000838152600660205260409020558015610d0757600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055610d076109e7565b5050565b604080516001808252818301909252600091816020015b610d836040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff16815260200160608152602001606081525090565b815260200190600190039081610d225790505090508281600081518110610dac57610dac614e7e565b60209081029190910101526040805160018082528183019092526000918160200160208202803683370190505090508281600081518110610def57610def614e7e565b602002602001018181525050610e05828261303c565b50505050565b600080610e248463ffffffff168463ffffffff1661346b565b610e349063ffffffff8516614eaa565b9050610e436201518082614ebd565b9150505b92915050565b610e55612fe0565b600554600160a81b900461ffff16600114610ea45760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61ffff821615610ee857816005601b8282829054906101000a900461ffff16610ecd9190614edf565b92506101000a81548161ffff021916908361ffff1602179055505b61ffff811615610d0757806005601b8282829054906101000a900461ffff16610f119190614f01565b92506101000a81548161ffff021916908361ffff1602179055505050565b6060610f39612fe0565b610f438383613481565b610f4d838361356b565b9392505050565b6060610f5e612fe0565b610f666135af565b905090565b610f73612fe0565b600554600160a81b900461ffff16600114610fc25760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b6000851561103e576040516001600160a01b038816906127109088906000818181858888f193505050503d8060008114611018576040519150601f19603f3d011682016040523d82523d6000602084013e61101d565b606091505b5090915050801561102f576000611031565b855b61103b9089614f1c565b97505b81156110b8576040516001600160a01b03841690612ee09084906000818181858888f193505050503d8060008114611092576040519150601f19603f3d011682016040523d82523d6000602084013e611097565b606091505b509091505080156110a95760006110ab565b815b6110b59089614f1c565b97505b8315611132576040516001600160a01b03861690612ee09086906000818181858888f193505050503d806000811461110c576040519150601f19603f3d011682016040523d82523d6000602084013e611111565b606091505b50909150508015611123576000611125565b835b61112f9089614f1c565b97505b87156111de576040516001600160a01b038a16906108fc908a906000818181858888f193505050503d8060008114611186576040519150601f19603f3d011682016040523d82523d6000602084013e61118b565b606091505b505080915050806111de5760405162461bcd60e51b815260206004820152600f60248201527f4554485f53454e445f4641494c454400000000000000000000000000000000006044820152606401610c12565b505050505050505050565b600554600090600160a81b900461ffff16810361129d5760026004546c01000000000000000000000000900460ff16600981111561122957611229614d59565b148061125b575060066004546c01000000000000000000000000900460ff16600981111561125957611259614d59565b145b8061128c575060036004546c01000000000000000000000000900460ff16600981111561128a5761128a614d59565b145b156112975750600190565b50600090565b5060055477010000000000000000000000000000000000000000000000900461ffff1690565b60606112cd612fe0565b600554600160a81b900461ffff1660011461131c5760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b600554600160a01b900460ff16156113aa576000828152600960205260409020805463ffffffff19164363ffffffff161790556113576135af565b905080516001146113aa5760405162461bcd60e51b815260206004820152601860248201527f4e4f5f46554c4c5749544844524157414c5f51554555454400000000000000006044820152606401610c12565b919050565b600080808460098111156113c5576113c5614d59565b036113e75760015b8360098111156113df576113df614d59565b1490506114ff565b60018460098111156113fb576113fb614d59565b0361144557600283600981111561141457611414614d59565b14806114315750600083600981111561142f5761142f614d59565b145b8061143e575060086113cd565b90506114ff565b600884600981111561145957611459614d59565b0361148057600283600981111561147257611472614d59565b148061143e575060006113cd565b600284600981111561149457611494614d59565b036114bb5760038360098111156114ad576114ad614d59565b148061143e575060066113cd565b60068460098111156114cf576114cf614d59565b036114db5760036113cd565b60038460098111156114ef576114ef614d59565b036114fb5760046113cd565b5060005b80610f4d5760405162461bcd60e51b815260206004820152601860248201527f494e56414c49445f50484153455f5452414e534954494f4e00000000000000006044820152606401610c12565b600554600090600160a01b900460ff1661156857506000610f4d565b60008060009054906101000a90046001600160a01b03166001600160a01b0316631a5057be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e09190614e61565b6040516307c3bc0160e31b81523060048201529091506000906001600160a01b03831690633e1de00890602401600060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116529190810190614f2f565b5111156116d3576040517fe5db06c0000000000000000000000000000000000000000000000000000000008152306004820152602481018690526001600160a01b0382169063e5db06c090604401600060405180830381600087803b1580156116ba57600080fd5b505af11580156116ce573d6000803e3d6000fd5b505050505b831561184957600554600160a01b900460ff166116f4576000915050610f4d565b60008060009054906101000a90046001600160a01b03166001600160a01b0316631a5057be6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c9190614e61565b6040516307c3bc0160e31b81523060048201529091506000906001600160a01b03831690633e1de00890602401600060405180830381865afa1580156117b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117de9190810190614f2f565b905060005b815181101561184557600086815260096020526040902054825163ffffffff9091169083908390811061181857611818614e7e565b60200260200101516020015163ffffffff16101561183d576001945050505050610f4d565b6001016117e3565b5050505b506000949350505050565b60055447906000908190600160a01b900460ff16156119d55760055460008054604080517f1a5057be00000000000000000000000000000000000000000000000000000000815290516001600160a01b03948516319650929390911691631a5057be916004808201926020929091908290030181865afa1580156118dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119009190614e61565b6040516307c3bc0160e31b81523060048201529091506000906001600160a01b03831690633e1de00890602401600060405180830381865afa15801561194a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119729190810190614f2f565b905060005b81518110156119d15781818151811061199257611992614e7e565b6020026020010151600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16846119c79190614f1c565b9350600101611977565b5050505b909192565b600080611a0860017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d51614eaa565b60001b90506000815490506000819050806001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7a9190614e61565b935050505090565b600080600080611a90612fe0565b600554600160a81b900461ffff161580611ab15750611aad6111e9565b6001145b15611ad157611ac46000878760016121ed565b9350935093509350611d33565b600554600160a81b900461ffff16600103611ceb5760408051600480825260a082019092526000916020820160808036833701905050905060006801bc16d674ec800000611b1d612e46565b1015611b3057611b2b612e46565b611b3b565b6801bc16d674ec8000005b9050611b46816136bc565b83600281518110611b5957611b59614e7e565b6020026020010184600181518110611b7357611b73614e7e565b6020026020010182815250828152505050611bf98883600081518110611b9b57611b9b614e7e565b602002602001015184600181518110611bb657611bb6614e7e565b602002602001015185600281518110611bd157611bd1614e7e565b602002602001015186600381518110611bec57611bec614e7e565b602002602001015161377a565b85600081518110611c0c57611c0c614e7e565b6020026020010186600181518110611c2657611c26614e7e565b6020026020010187600281518110611c4057611c40614e7e565b6020026020010188600381518110611c5a57611c5a614e7e565b6020908102919091010193909352929091529190525281518290600090611c8357611c83614e7e565b602002602001015182600181518110611c9e57611c9e614e7e565b602002602001015183600281518110611cb957611cb9614e7e565b602002602001015184600381518110611cd457611cd4614e7e565b602002602001015195509550955095505050611d33565b60405162461bcd60e51b815260206004820152600d60248201527f57524f4e475f56455253494f4e000000000000000000000000000000000000006044820152606401610c12565b92959194509250565b600080600080611d4a611854565b9194509250905080611d5c8385614f1c565b611a7a9190614f1c565b6060611d70612fe0565b611d79826137f8565b600554610e47906001600160a01b03168361356b565b60038054611d9c9061500f565b80601f0160208091040260200160405190810160405280929190818152602001828054611dc89061500f565b8015611e155780601f10611dea57610100808354040283529160200191611e15565b820191906000526020600020905b815481529060010190602001808311611df857829003601f168201915b505050505081565b611e25612fe0565b600554600160a81b900461ffff16600114611e745760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61ffff821615611eb85781600560178282829054906101000a900461ffff16611e9d9190614edf565b92506101000a81548161ffff021916908361ffff1602179055505b61ffff811615610d075780600560178282829054906101000a900461ffff16610f119190614f01565b6000611eeb612fe0565b600554600160a81b900461ffff16600114611f3a5760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b600482606001516009811115611f5257611f52614d59565b1480611f735750600082606001516009811115611f7157611f71614d59565b145b611fbf5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964207068617365000000000000000000000000000000000000006044820152606401610c12565b600482606001516009811115611fd757611fd7614d59565b036120175760016005601b8282829054906101000a900461ffff16611ffc9190614f01565b92506101000a81548161ffff021916908361ffff1602179055505b602082015163ffffffff1615612062576001600560198282829054906101000a900461ffff166120479190614f01565b92506101000a81548161ffff021916908361ffff1602179055505b60008381526006602052604081205460075490919061208390600190614eaa565b905060006007828154811061209a5761209a614e7e565b90600052602060002001549050600782815481106120ba576120ba614e7e565b9060005260206000200154600784815481106120d8576120d8614e7e565b6000918252602080832090910192909255828152600690915260409020839055600780548061210957612109615049565b6001900381819060005260206000200160009055905560066000878152602001908152602001600020600090555050506007805490506000036121e45761214e6111e9565b1561219b5760405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f5354415445000000000000000000000000000000000000006044820152606401610c12565b506000828152600960205260409020805463ffffffff19169055600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556001610e47565b50600092915050565b6000806000806121fb612fe0565b60008061220d89606001518b89613988565b909250905061221c8183614f1c565b6000036122385760008060008095509550955095505050612583565b60408051600480825260a0820190925260009160208201608080368337019050509050612265838a613ced565b8460008151811061227857612278614e7e565b602002602001018560018151811061229257612292614e7e565b60200260200101866002815181106122ac576122ac614e7e565b60200260200101876003815181106122c6576122c6614e7e565b602090810291909101019390935292909152919052526000806122e8846136bc565b91509150808360018151811061230057612300614e7e565b602002602001018181516123149190614f1c565b905250825182908490600290811061232e5761232e614e7e565b602002602001018181516123429190614f1c565b915081815250506123b18c8460008151811061236057612360614e7e565b60200260200101518560018151811061237b5761237b614e7e565b60200260200101518660028151811061239657612396614e7e565b602002602001015187600381518110611bec57611bec614e7e565b866000815181106123c4576123c4614e7e565b60200260200101876001815181106123de576123de614e7e565b60200260200101886002815181106123f8576123f8614e7e565b602002602001018960038151811061241257612412614e7e565b602090810291909101019390935292909152919052526124328486614f1c565b8360038151811061244557612445614e7e565b60200260200101518460028151811061246057612460614e7e565b60200260200101518560018151811061247b5761247b614e7e565b60200260200101518660008151811061249657612496614e7e565b60200260200101516124a89190614f1c565b6124b29190614f1c565b6124bc9190614f1c565b146125095760405162461bcd60e51b815260206004820152601060248201527f494e434f52524543545f414d4f554e54000000000000000000000000000000006044820152606401610c12565b8260008151811061251c5761251c614e7e565b60200260200101518360018151811061253757612537614e7e565b60200260200101518460028151811061255257612552614e7e565b60200260200101518560038151811061256d5761256d614e7e565b6020026020010151985098509850985050505050505b945094509450949050565b600080600080600061259e612e46565b90506125aa8187613ced565b929a91995097509095509350505050565b6125c3612fe0565b600554600160a81b900461ffff166001146126125760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61261e60006001611e1d565b600554600160a01b900460ff16156126ee576008546407735940006801000000000000000090910467ffffffffffffffff16101561269e5760405162461bcd60e51b815260206004820152601460248201527f494e53554646494349454e545f42414c414e43450000000000000000000000006044820152606401610c12565b6407735940006008808282829054906101000a900467ffffffffffffffff166126c7919061505f565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b50565b6126f9612fe0565b600554600160a81b900461ffff166001146127485760405162461bcd60e51b815260206004820152600f60248201526e4e4545445f544f5f4d49475241544560881b6044820152606401610c12565b61ffff82161561278c5781600560198282829054906101000a900461ffff166127719190614edf565b92506101000a81548161ffff021916908361ffff1602179055505b61ffff811615610d075780600560198282829054906101000a900461ffff16610f119190614f01565b600781815481106127c557600080fd5b600091825260209091200154905081565b60006004546c01000000000000000000000000900460ff1660098111156127ff576127ff614d59565b1461284c5760405162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610c12565b6000546001600160a01b0316156128a55760405162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610c12565b6001600160a01b0381166128fb5760405162461bcd60e51b815260206004820152600f60248201527f4e4f5f5a45524f5f4144445245535300000000000000000000000000000000006044820152606401610c12565b600080546001600160a01b039092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216919091179055600580547fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b600554600160a01b900460ff1615806129ef5750600560009054906101000a90046001600160a01b03166001600160a01b0316633106ab536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ef9190615080565b156129f657565b600560009054906101000a90046001600160a01b03166001600160a01b031663baa7145a6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612a4657600080fd5b505af1158015610e05573d6000803e3d6000fd5b612a62612fe0565b600080546040516001600160a01b039091169061177090849084818181858888f193505050503d8060008114612ab4576040519150601f19603f3d011682016040523d82523d6000602084013e612ab9565b606091505b5050905080610d075760405162461bcd60e51b815260206004820152600f60248201527f4554485f53454e445f4641494c454400000000000000000000000000000000006044820152606401610c12565b60008263ffffffff16600003612b2257506000610e47565b60008060009054906101000a90046001600160a01b03166001600160a01b031663bbe78ecd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9a919061509d565b67ffffffffffffffff16905060008060009054906101000a90046001600160a01b03166001600160a01b0316637082994b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1e919061509d565b90506000612c2c8686610e0b565b905061016d811115612c535750506fffffffffffffffffffffffffffffffff169050610e47565b6fffffffffffffffffffffffffffffffff83165b8115612cdc576000612c7a60078461346b565b9050612c888161271061519e565b81612c9f67ffffffffffffffff8716612710614eaa565b612ca9919061519e565b612cb390846151aa565b612cbd9190614ebd565b9150612cca60078461346b565b612cd49084614eaa565b925050612c67565b612cf8816fffffffffffffffffffffffffffffffff8616614eaa565b979650505050505050565b612d0b612fe0565b600554600160a81b900461ffff16600003610d0757600480547fffffffffffffffffffffffffffffffffffffff00000000000000000000000000169055612d54600360006144f8565b600580547fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff16600160a81b1790558115610d075760055477010000000000000000000000000000000000000000000000900461ffff1615612df75760405162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610c12565b612e02826000610bbf565b612e0e60016000611e1d565b602081015163ffffffff1615612e2a57612e2a600160006126f1565b604081015163ffffffff1615610d0757610d0760016000610e4d565b60055460009047908290600160a01b900460ff1615612fc55760008060009054906101000a90046001600160a01b03166001600160a01b0316631a5057be6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed79190614e61565b6040517f1f39d87f0000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b03831690631f39d87f90602401600060405180830381865afa158015612f3a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f629190810190614f2f565b905060005b8151811015612fc157818181518110612f8257612f82614e7e565b6020026020010151600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1684612fb79190614f1c565b9350600101612f67565b5050505b612fcf8183614f1c565b9250505090565b610d07828261303c565b6000546001600160a01b0316331461303a5760405162461bcd60e51b815260206004820152601060248201527f494e434f52524543545f43414c4c4552000000000000000000000000000000006044820152606401610c12565b565b600080835167ffffffffffffffff81111561305957613059614584565b604051908082528060200260200182016040528015613082578160200160208202803683370190505b5090506000845167ffffffffffffffff8111156130a1576130a1614584565b6040519080825280602002602001820160405280156130d457816020015b60608152602001906001900390816130bf5790505b50905060005b85518110156132bd57306001600160a01b03168682815181106130ff576130ff614e7e565b6020026020010151604001516001600160a01b031614801561314f5750306001600160a01b031686828151811061313857613138614e7e565b6020026020010151600001516001600160a01b0316145b61319b5760405162461bcd60e51b815260206004820152600760248201527f494e56414c4944000000000000000000000000000000000000000000000000006044820152606401610c12565b60018382815181106131af576131af614e7e565b6020026020010190151590811515815250508581815181106131d3576131d3614e7e565b602002602001015160a001515167ffffffffffffffff8111156131f8576131f8614584565b604051908082528060200260200182016040528015613221578160200160208202803683370190505b5082828151811061323457613234614e7e565b602002602001018190525060005b86828151811061325457613254614e7e565b602002602001015160c00151518110156132b45786828151811061327a5761327a614e7e565b602002602001015160c00151818151811061329757613297614e7e565b6020026020010151856132aa9190614f1c565b9450600101613242565b506001016130da565b506132cc633b9aca0084614ebd565b600880546000906132e890849067ffffffffffffffff1661505f565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550633b9aca008361331e9190614ebd565b60088054819061334590849068010000000000000000900467ffffffffffffffff166151c1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060008060009054906101000a90046001600160a01b03166001600160a01b031663ea4d3c9b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133e39190614e61565b6040517f334043960000000000000000000000000000000000000000000000000000000081529091506001600160a01b0382169063334043969061343190899086908a908990600401615313565b600060405180830381600087803b15801561344b57600080fd5b505af115801561345f573d6000803e3d6000fd5b50505050505050505050565b600081831061347a5781610f4d565b5090919050565b602081015160007fffffffff0000000000000000000000000000000000000000000000000000000082167f60d7faed000000000000000000000000000000000000000000000000000000001480159061351c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f334043960000000000000000000000000000000000000000000000000000000014155b905080610e055760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f414c4c4f5745440000000000000000000000000000000000000000006044820152606401610c12565b6060610f4d838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250613dd3565b600554606090600160a01b900460ff166135c65790565b600560009054906101000a90046001600160a01b03166001600160a01b0316633106ab536040518163ffffffff1660e01b8152600401602060405180830381865afa158015613619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061363d9190615080565b6136ac57600560009054906101000a90046001600160a01b03166001600160a01b031663baa7145a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561369157600080fd5b505af11580156136a5573d6000803e3d6000fd5b5050505090565b6136b4613ec7565b610f66613fd6565b60008067de0b6b3a7640000083101580156136e057506801bc16d674ec8000008311155b61372c5760405162461bcd60e51b815260206004820152601a60248201527f494e434f52524543545f5052494e434950414c5f414d4f554e540000000000006044820152606401610c12565b60006801ae361fc1451c000084101561374d57670de0b6b3a7640000613760565b6137606801a055690d9db8000085614eaa565b9050600061376e8286614eaa565b91959194509092505050565b60008060008060006137948a602001518b60400151612b0a565b905060006137a2888361346b565b905060006137b8826702c68af0bb14000061346b565b90506137c4818c614f1c565b9a506137d08183614eaa565b6137da9089614f1c565b97506137e6828a614eaa565b9a9c999b509698975050505050505050565b60208101517f1d37cbbb000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016138f7576024825110156138985760405162461bcd60e51b815260206004820152601360248201527f494e56414c49445f444154415f4c454e475448000000000000000000000000006044820152606401610c12565b60248201516001600160a01b03811630146138f55760405162461bcd60e51b815260206004820152601360248201527f494e434f52524543545f524543495049454e54000000000000000000000000006044820152606401610c12565b505b7f225ccb94000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601610d075760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f414c4c4f5745440000000000000000000000000000000000000000006044820152606401610c12565b60008060006139956111e9565b9050806000036139ac576000809250925050613ce5565b6000846139c0576139bb611d3c565b6139c8565b6139c8612e46565b6005549091506139eb90600160d81b900461ffff1667de0b6b3a76400000615437565b67ffffffffffffffff16811015613a445760405162461bcd60e51b815260206004820152601460248201527f494e53554646494349454e545f42414c414e43450000000000000000000000006044820152606401610c12565b600554600090613aae90613a6b90600160d81b900461ffff1667de0b6b3a76400000615437565b613a7f9067ffffffffffffffff1684614eaa565b600554613a9f90600160d81b900461ffff1667de0b6b3a76400000615437565b67ffffffffffffffff1661346b565b600554613ace90600160d81b900461ffff1667de0b6b3a76400000615437565b67ffffffffffffffff16613ae29190614f1c565b9050600083613af18385614eaa565b613afb9190614ebd565b905060006801bc16d674ec8000008911613b16576000613b29565b613b296801bc16d674ec8000008a614eaa565b9050613b358183614f1c565b965060038a6009811115613b4b57613b4b614d59565b03613be357600554613b6890600160d81b900461ffff1684614ebd565b95508815613bde5760405162461bcd60e51b815260206004820152603660248201527f4578697465642076616c696461746f72206d7573742068617665207a65726f2060448201527f62616c616e61636520696e2074686520626561636f6e000000000000000000006064820152608401610c12565b613c72565b60028a6009811115613bf757613bf7614d59565b1480613c14575060068a6009811115613c1257613c12614d59565b145b15613c2a57613c23818a614eaa565b9550613c72565b60405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f5048415345000000000000000000000000000000000000006044820152606401610c12565b6801bc16d674ec8000008611158015613c93575067de0b6b3a764000008610155b613cdf5760405162461bcd60e51b815260206004820152601060248201527f494e434f52524543545f414d4f554e54000000000000000000000000000000006044820152606401610c12565b50505050505b935093915050565b60008060008060008560600151866040015187602001518860000151613d1391906151c1565b613d1d91906151c1565b613d2791906151c1565b67ffffffffffffffff16905080866020015167ffffffffffffffff1688613d4e91906151aa565b613d589190614ebd565b945080866040015167ffffffffffffffff1688613d7591906151aa565b613d7f9190614ebd565b935080866060015167ffffffffffffffff1688613d9c91906151aa565b613da69190614ebd565b925084613db38585614f1c565b613dbd9190614f1c565b613dc79088614eaa565b91505092959194509250565b606082471015613e4b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c12565b600080866001600160a01b03168587604051613e679190615463565b60006040518083038185875af1925050503d8060008114613ea4576040519150601f19603f3d011682016040523d82523d6000602084013e613ea9565b606091505b5091509150613eba8783838761445a565b925050505b949350505050565b600554604080517ffe80b08700000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163fe80b0879160048083019260209291908290030181865afa158015613f2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f4e919061547f565b905080156126ee576005546040517fe2c83445000000000000000000000000000000000000000000000000000000008152306004820152602481018390526001600160a01b039091169063e2c8344590604401600060405180830381600087803b158015613fbb57600080fd5b505af1158015613fcf573d6000803e3d6000fd5b5050505050565b600554604080517f3106ab5300000000000000000000000000000000000000000000000000000000815290516060926001600160a01b031691633106ab539160048083019260209291908290030181865afa158015614039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405d9190615080565b6140645790565b600854600554604080517f3474aa16000000000000000000000000000000000000000000000000000000008152905160009367ffffffffffffffff16926001600160a01b031691633474aa169160048083019260209291908290030181865afa1580156140d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140f9919061509d565b614103919061505f565b67ffffffffffffffff1690508060000361411b575090565b6407735940008110156141705760405162461bcd60e51b815260206004820152600760248201527f534c4153484544000000000000000000000000000000000000000000000000006044820152606401610c12565b60088054640773594000919060009061419490849067ffffffffffffffff166151c1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060008060009054906101000a90046001600160a01b03166001600160a01b031663ea4d3c9b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561420e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142329190614e61565b60408051600180825281830190925291925060009190816020015b6040805160608082018352808252602082015260009181019190915281526020019060019003908161424d57505060408051600180825281830190925291925060009190602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050836001600160a01b0316639104c3196040518163ffffffff1660e01b8152600401602060405180830381865afa158015614302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143269190614e61565b8260008151811061433957614339614e7e565b60200260200101906001600160a01b031690816001600160a01b0316815250506801bc16d674ec8000008160008151811061437657614376614e7e565b6020026020010181815250506040518060600160405280838152602001828152602001306001600160a01b0316815250836000815181106143b9576143b9614e7e565b60209081029190910101526040517f0dd8dd020000000000000000000000000000000000000000000000000000000081526001600160a01b03851690630dd8dd0290614409908690600401615498565b6000604051808303816000875af1158015614428573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526144509190810190615552565b9550505050505090565b606083156144c95782516000036144c2576001600160a01b0385163b6144c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c12565b5081613ebf565b613ebf83838151156144de5781518083602001fd5b8060405162461bcd60e51b8152600401610c129190614a10565b5080546145049061500f565b6000825580601f10614514575050565b601f0160209004906000526020600020908101906126ee91905b80821115614542576000815560010161452e565b5090565b80151581146126ee57600080fd5b6000806040838503121561456757600080fd5b82359150602083013561457981614546565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff811182821017156145bd576145bd614584565b60405290565b6040516080810167ffffffffffffffff811182821017156145bd576145bd614584565b6040805190810167ffffffffffffffff811182821017156145bd576145bd614584565b604051601f8201601f1916810167ffffffffffffffff8111828210171561463257614632614584565b604052919050565b6001600160a01b03811681146126ee57600080fd5b80356113aa8161463a565b63ffffffff811681146126ee57600080fd5b80356113aa8161465a565b600067ffffffffffffffff82111561469157614691614584565b5060051b60200190565b600082601f8301126146ac57600080fd5b813560206146c16146bc83614677565b614609565b8083825260208201915060208460051b8701019350868411156146e357600080fd5b602086015b848110156147085780356146fb8161463a565b83529183019183016146e8565b509695505050505050565b600082601f83011261472457600080fd5b813560206147346146bc83614677565b8083825260208201915060208460051b87010193508684111561475657600080fd5b602086015b84811015614708578035835291830191830161475b565b600060e0828403121561478457600080fd5b61478c61459a565b90506147978261464f565b81526147a56020830161464f565b60208201526147b66040830161464f565b6040820152606082013560608201526147d16080830161466c565b608082015260a082013567ffffffffffffffff808211156147f157600080fd5b6147fd8583860161469b565b60a084015260c084013591508082111561481657600080fd5b5061482384828501614713565b60c08301525092915050565b6000806040838503121561484257600080fd5b823567ffffffffffffffff81111561485957600080fd5b61486585828601614772565b95602094909401359450505050565b6000806040838503121561488757600080fd5b82356148928161465a565b915060208301356145798161465a565b803561ffff811681146113aa57600080fd5b600080604083850312156148c757600080fd5b6148d0836148a2565b91506148de602084016148a2565b90509250929050565b6000602082840312156148f957600080fd5b5035919050565b600082601f83011261491157600080fd5b813567ffffffffffffffff81111561492b5761492b614584565b61493e6020601f19601f84011601614609565b81815284602083860101111561495357600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561498357600080fd5b823561498e8161463a565b9150602083013567ffffffffffffffff8111156149aa57600080fd5b6149b685828601614900565b9150509250929050565b60005b838110156149db5781810151838201526020016149c3565b50506000910152565b600081518084526149fc8160208601602086016149c0565b601f01601f19169290920160200192915050565b602081526000610f4d60208301846149e4565b6020808252825182820181905260009190848201906040850190845b81811015614a5b57835183529284019291840191600101614a3f565b50909695505050505050565b600080600080600080600080610100898b031215614a8457600080fd5b8835614a8f8161463a565b9750602089013596506040890135614aa68161463a565b9550606089013594506080890135614abd8161463a565b935060a0890135925060c0890135614ad48161463a565b8092505060e089013590509295985092959890939650565b8035600a81106113aa57600080fd5b60008060408385031215614b0e57600080fd5b614b1783614aec565b91506148de60208401614aec565b600080600060608486031215614b3a57600080fd5b833592506020840135614b4c81614546565b929592945050506040919091013590565b600060808284031215614b6f57600080fd5b614b776145c3565b90508135614b848161465a565b81526020820135614b948161465a565b60208201526040820135614ba78161465a565b6040820152614bb860608301614aec565b606082015292915050565b67ffffffffffffffff811681146126ee57600080fd5b600060808284031215614beb57600080fd5b614bf36145c3565b90508135614c0081614bc3565b81526020820135614c1081614bc3565b60208201526040820135614c2381614bc3565b60408201526060820135614bb881614bc3565b6000806101008385031215614c4a57600080fd5b614c548484614b5d565b91506148de8460808501614bd9565b600060208284031215614c7557600080fd5b813567ffffffffffffffff811115614c8c57600080fd5b610e4384828501614900565b60008060a08385031215614cab57600080fd5b823591506148de8460208501614b5d565b6000806000806101408587031215614cd357600080fd5b84359350614ce48660208701614b5d565b9250614cf38660a08701614bd9565b9150610120850135614d0481614546565b939692955090935050565b60008060a08385031215614d2257600080fd5b8235614d2d8161465a565b91506148de8460208501614bd9565b600060208284031215614d4e57600080fd5b8135610f4d8161463a565b634e487b7160e01b600052602160045260246000fd5b60208101600a8310614d9157634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215614daa57600080fd5b823567ffffffffffffffff80821115614dc257600080fd5b818501915085601f830112614dd657600080fd5b81356020614de66146bc83614677565b82815260059290921b84018101918181019089841115614e0557600080fd5b8286015b84811015614e3d57803586811115614e215760008081fd5b614e2f8c86838b0101614772565b845250918301918301614e09565b5096505086013592505080821115614e5457600080fd5b506149b685828601614713565b600060208284031215614e7357600080fd5b8151610f4d8161463a565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610e4757610e47614e94565b600082614eda57634e487b7160e01b600052601260045260246000fd5b500490565b61ffff818116838216019080821115614efa57614efa614e94565b5092915050565b61ffff828116828216039080821115614efa57614efa614e94565b80820180821115610e4757610e47614e94565b60006020808385031215614f4257600080fd5b825167ffffffffffffffff811115614f5957600080fd5b8301601f81018513614f6a57600080fd5b8051614f786146bc82614677565b81815260069190911b82018301908381019087831115614f9757600080fd5b928401925b82841015612cf85760408489031215614fb55760008081fd5b614fbd6145e6565b84517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114614fea5760008081fd5b815284860151614ff98161465a565b8187015282526040939093019290840190614f9c565b600181811c9082168061502357607f821691505b60208210810361504357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603160045260246000fd5b67ffffffffffffffff828116828216039080821115614efa57614efa614e94565b60006020828403121561509257600080fd5b8151610f4d81614546565b6000602082840312156150af57600080fd5b8151610f4d81614bc3565b600181815b808511156150f55781600019048211156150db576150db614e94565b808516156150e857918102915b93841c93908002906150bf565b509250929050565b60008261510c57506001610e47565b8161511957506000610e47565b816001811461512f576002811461513957615155565b6001915050610e47565b60ff84111561514a5761514a614e94565b50506001821b610e47565b5060208310610133831016604e8410600b8410161715615178575081810a610e47565b61518283836150ba565b806000190482111561519657615196614e94565b029392505050565b6000610f4d83836150fd565b8082028115828204841417610e4757610e47614e94565b67ffffffffffffffff818116838216019080821115614efa57614efa614e94565b60008151808452602080850194506020840160005b8381101561521c5781516001600160a01b0316875295820195908201906001016151f7565b509495945050505050565b60008151808452602080850194506020840160005b8381101561521c5781518752958201959082019060010161523c565b600082825180855260208086019550808260051b8401018186016000805b858110156152d257868403601f19018a52825180518086529086019086860190845b818110156152bd5783516001600160a01b031683529288019291880191600101615298565b50509a86019a94505091840191600101615276565b509198975050505050505050565b60008151808452602080850194506020840160005b8381101561521c5781511515875295820195908201906001016152f5565b600060808083016080845280885180835260a0925060a08601915060a08160051b8701016020808c0160005b848110156153f8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608a8503018652815180516001600160a01b0390811686528482015181168587015260408083015190911690860152606080820151908601528881015163ffffffff16898601528781015160e0898701819052906153c7828801826151e2565b91505060c080830151925086820381880152506153e48183615227565b97850197955050509082019060010161533f565b50508782039088015261540b818b615258565b94505050505082810360408401526154238186615227565b90508281036060840152612cf881856152e0565b67ffffffffffffffff81811683821602808216919082811461545b5761545b614e94565b505092915050565b600082516154758184602087016149c0565b9190910192915050565b60006020828403121561549157600080fd5b5051919050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015615544577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652615505828701826151e2565b915050888201518582038a87015261551d8282615227565b928901516001600160a01b03169589019590955250948701949250908601906001016154c1565b509098975050505050505050565b6000602080838503121561556557600080fd5b825167ffffffffffffffff81111561557c57600080fd5b8301601f8101851361558d57600080fd5b805161559b6146bc82614677565b81815260059190911b820183019083810190878311156155ba57600080fd5b928401925b82841015612cf8578351825292840192908401906155bf56fea2646970667358221220da1e3586f4e3f09fa1c3495274c8c9f79084f7513a8bac5975b8b39c5ef78a3e64736f6c63430008180033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.