creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "lib/eigenlayer-middleware/src/OperatorStateRetriever.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity =0.8.12;\n\nimport {IRegistryCoordinator} from \"./interfaces/IRegistryCoordinator.sol\";\nimport {IBLSApkRegistry} from \"./interfaces/IBLSApkRegistry.sol\";\nimport {IStakeRegistry} from \"./interfaces/IStakeRegistry.sol\";\nimport {IIndexRegistry} from \"./interfaces/IIndexRegistry.sol\";\n\nimport {BitmapUtils} from \"./libraries/BitmapUtils.sol\";\n\n/**\n * @title OperatorStateRetriever with view functions that allow to retrieve the state of an AVSs registry system.\n * @author Layr Labs Inc.\n */\ncontract OperatorStateRetriever {\n    struct Operator {\n        address operator;\n        bytes32 operatorId;\n        uint96 stake;\n    }\n\n    struct CheckSignaturesIndices {\n        uint32[] nonSignerQuorumBitmapIndices;\n        uint32[] quorumApkIndices;\n        uint32[] totalStakeIndices;\n        uint32[][] nonSignerStakeIndices; // nonSignerStakeIndices[quorumNumberIndex][nonSignerIndex]\n    }\n\n    /**\n     * @notice This function is intended to to be called by AVS operators every time a new task is created (i.e.)\n     * the AVS coordinator makes a request to AVS operators. Since all of the crucial information is kept onchain,\n     * operators don't need to run indexers to fetch the data.\n     * @param registryCoordinator is the registry coordinator to fetch the AVS registry information from\n     * @param operatorId the id of the operator to fetch the quorums lists\n     * @param blockNumber is the block number to get the operator state for\n     * @return 1) the quorumBitmap of the operator at the given blockNumber\n     *         2) 2d array of Operator structs. For each quorum the provided operator\n     *            was a part of at `blockNumber`, an ordered list of operators.\n     */\n    function getOperatorState(IRegistryCoordinator registryCoordinator, bytes32 operatorId, uint32 blockNumber)\n        external\n        view\n        returns (uint256, Operator[][] memory)\n    {\n        bytes32[] memory operatorIds = new bytes32[](1);\n        operatorIds[0] = operatorId;\n        uint256 index = registryCoordinator.getQuorumBitmapIndicesAtBlockNumber(blockNumber, operatorIds)[0];\n\n        uint256 quorumBitmap = registryCoordinator.getQuorumBitmapAtBlockNumberByIndex(operatorId, blockNumber, index);\n\n        bytes memory quorumNumbers = BitmapUtils.bitmapToBytesArray(quorumBitmap);\n\n        return (quorumBitmap, getOperatorState(registryCoordinator, quorumNumbers, blockNumber));\n    }\n\n    /**\n     * @notice returns the ordered list of operators (id and stake) for each quorum. The AVS coordinator\n     * may call this function directly to get the operator state for a given block number\n     * @param registryCoordinator is the registry coordinator to fetch the AVS registry information from\n     * @param quorumNumbers are the ids of the quorums to get the operator state for\n     * @param blockNumber is the block number to get the operator state for\n     * @return 2d array of Operators. For each quorum, an ordered list of Operators\n     */\n    function getOperatorState(IRegistryCoordinator registryCoordinator, bytes memory quorumNumbers, uint32 blockNumber)\n        public\n        view\n        returns (Operator[][] memory)\n    {\n        IStakeRegistry stakeRegistry = registryCoordinator.stakeRegistry();\n        IIndexRegistry indexRegistry = registryCoordinator.indexRegistry();\n        IBLSApkRegistry blsApkRegistry = registryCoordinator.blsApkRegistry();\n\n        Operator[][] memory operators = new Operator[][](quorumNumbers.length);\n        for (uint256 i = 0; i < quorumNumbers.length; i++) {\n            uint8 quorumNumber = uint8(quorumNumbers[i]);\n            bytes32[] memory operatorIds = indexRegistry.getOperatorListAtBlockNumber(quorumNumber, blockNumber);\n            operators[i] = new Operator[](operatorIds.length);\n            for (uint256 j = 0; j < operatorIds.length; j++) {\n                operators[i][j] = Operator({\n                    operator: blsApkRegistry.getOperatorFromPubkeyHash(operatorIds[j]),\n                    operatorId: bytes32(operatorIds[j]),\n                    stake: stakeRegistry.getStakeAtBlockNumber(bytes32(operatorIds[j]), quorumNumber, blockNumber)\n                });\n            }\n        }\n\n        return operators;\n    }\n\n    /**\n     * @notice this is called by the AVS operator to get the relevant indices for the checkSignatures function\n     * if they are not running an indexer\n     * @param registryCoordinator is the registry coordinator to fetch the AVS registry information from\n     * @param referenceBlockNumber is the block number to get the indices for\n     * @param quorumNumbers are the ids of the quorums to get the operator state for\n     * @param nonSignerOperatorIds are the ids of the nonsigning operators\n     * @return 1) the indices of the quorumBitmaps for each of the operators in the @param nonSignerOperatorIds array at the given blocknumber\n     *         2) the indices of the total stakes entries for the given quorums at the given blocknumber\n     *         3) the indices of the stakes of each of the nonsigners in each of the quorums they were a\n     *            part of (for each nonsigner, an array of length the number of quorums they were a part of\n     *            that are also part of the provided quorumNumbers) at the given blocknumber\n     *         4) the indices of the quorum apks for each of the provided quorums at the given blocknumber\n     */\n    function getCheckSignaturesIndices(\n        IRegistryCoordinator registryCoordinator,\n        uint32 referenceBlockNumber,\n        bytes calldata quorumNumbers,\n        bytes32[] calldata nonSignerOperatorIds\n    ) external view returns (CheckSignaturesIndices memory) {\n        IStakeRegistry stakeRegistry = registryCoordinator.stakeRegistry();\n        CheckSignaturesIndices memory checkSignaturesIndices;\n\n        // get the indices of the quorumBitmap updates for each of the operators in the nonSignerOperatorIds array\n        checkSignaturesIndices.nonSignerQuorumBitmapIndices =\n            registryCoordinator.getQuorumBitmapIndicesAtBlockNumber(referenceBlockNumber, nonSignerOperatorIds);\n\n        // get the indices of the totalStake updates for each of the quorums in the quorumNumbers array\n        checkSignaturesIndices.totalStakeIndices =\n            stakeRegistry.getTotalStakeIndicesAtBlockNumber(referenceBlockNumber, quorumNumbers);\n\n        checkSignaturesIndices.nonSignerStakeIndices = new uint32[][](quorumNumbers.length);\n        for (uint8 quorumNumberIndex = 0; quorumNumberIndex < quorumNumbers.length; quorumNumberIndex++) {\n            uint256 numNonSignersForQuorum = 0;\n            // this array's length will be at most the number of nonSignerOperatorIds, this will be trimmed after it is filled\n            checkSignaturesIndices.nonSignerStakeIndices[quorumNumberIndex] = new uint32[](nonSignerOperatorIds.length);\n\n            for (uint256 i = 0; i < nonSignerOperatorIds.length; i++) {\n                // get the quorumBitmap for the operator at the given blocknumber and index\n                uint192 nonSignerQuorumBitmap = registryCoordinator.getQuorumBitmapAtBlockNumberByIndex(\n                    nonSignerOperatorIds[i],\n                    referenceBlockNumber,\n                    checkSignaturesIndices.nonSignerQuorumBitmapIndices[i]\n                );\n\n                require(\n                    nonSignerQuorumBitmap != 0,\n                    \"OperatorStateRetriever.getCheckSignaturesIndices: operator must be registered at blocknumber\"\n                );\n\n                // if the operator was a part of the quorum and the quorum is a part of the provided quorumNumbers\n                if ((nonSignerQuorumBitmap >> uint8(quorumNumbers[quorumNumberIndex])) & 1 == 1) {\n                    // get the index of the stake update for the operator at the given blocknumber and quorum number\n                    checkSignaturesIndices.nonSignerStakeIndices[quorumNumberIndex][numNonSignersForQuorum] =\n                    stakeRegistry.getStakeUpdateIndexAtBlockNumber(\n                        nonSignerOperatorIds[i], uint8(quorumNumbers[quorumNumberIndex]), referenceBlockNumber\n                    );\n                    numNonSignersForQuorum++;\n                }\n            }\n\n            // resize the array to the number of nonSigners for this quorum\n            uint32[] memory nonSignerStakeIndicesForQuorum = new uint32[](numNonSignersForQuorum);\n            for (uint256 i = 0; i < numNonSignersForQuorum; i++) {\n                nonSignerStakeIndicesForQuorum[i] = checkSignaturesIndices.nonSignerStakeIndices[quorumNumberIndex][i];\n            }\n            checkSignaturesIndices.nonSignerStakeIndices[quorumNumberIndex] = nonSignerStakeIndicesForQuorum;\n        }\n\n        IBLSApkRegistry blsApkRegistry = registryCoordinator.blsApkRegistry();\n        // get the indices of the quorum apks for each of the provided quorums at the given blocknumber\n        checkSignaturesIndices.quorumApkIndices =\n            blsApkRegistry.getApkIndicesAtBlockNumber(quorumNumbers, referenceBlockNumber);\n\n        return checkSignaturesIndices;\n    }\n\n    /**\n     * @notice this function returns the quorumBitmaps for each of the operators in the operatorIds array at the given blocknumber\n     * @param registryCoordinator is the AVS registry coordinator to fetch the operator information from\n     * @param operatorIds are the ids of the operators to get the quorumBitmaps for\n     * @param blockNumber is the block number to get the quorumBitmaps for\n     */\n    function getQuorumBitmapsAtBlockNumber(\n        IRegistryCoordinator registryCoordinator,\n        bytes32[] memory operatorIds,\n        uint32 blockNumber\n    ) external view returns (uint256[] memory) {\n        uint32[] memory quorumBitmapIndices =\n            registryCoordinator.getQuorumBitmapIndicesAtBlockNumber(blockNumber, operatorIds);\n        uint256[] memory quorumBitmaps = new uint256[](operatorIds.length);\n        for (uint256 i = 0; i < operatorIds.length; i++) {\n            quorumBitmaps[i] = registryCoordinator.getQuorumBitmapAtBlockNumberByIndex(\n                operatorIds[i], blockNumber, quorumBitmapIndices[i]\n            );\n        }\n        return quorumBitmaps;\n    }\n}\n"
      },
      "lib/eigenlayer-middleware/src/interfaces/IRegistryCoordinator.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity =0.8.12;\n\nimport {IBLSApkRegistry} from \"./IBLSApkRegistry.sol\";\nimport {IStakeRegistry} from \"./IStakeRegistry.sol\";\nimport {IIndexRegistry} from \"./IIndexRegistry.sol\";\nimport {BN254} from \"../libraries/BN254.sol\";\n\n/**\n * @title Interface for a contract that coordinates between various registries for an AVS.\n * @author Layr Labs, Inc.\n */\ninterface IRegistryCoordinator {\n    // EVENTS\n\n    /// Emits when an operator is registered\n    event OperatorRegistered(address indexed operator, bytes32 indexed operatorId);\n\n    /// Emits when an operator is deregistered\n    event OperatorDeregistered(address indexed operator, bytes32 indexed operatorId);\n\n    event OperatorSetParamsUpdated(uint8 indexed quorumNumber, OperatorSetParam operatorSetParams);\n\n    event ChurnApproverUpdated(address prevChurnApprover, address newChurnApprover);\n\n    event EjectorUpdated(address prevEjector, address newEjector);\n\n    /// @notice emitted when all the operators for a quorum are updated at once\n    event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber);\n\n    // DATA STRUCTURES\n    enum OperatorStatus {\n        // default is NEVER_REGISTERED\n        NEVER_REGISTERED,\n        REGISTERED,\n        DEREGISTERED\n    }\n\n    // STRUCTS\n\n    /**\n     * @notice Data structure for storing info on operators\n     */\n    struct OperatorInfo {\n        // the id of the operator, which is likely the keccak256 hash of the operator's public key if using BLSRegistry\n        bytes32 operatorId;\n        // indicates whether the operator is actively registered for serving the middleware or not\n        OperatorStatus status;\n    }\n\n    /**\n     * @notice Data structure for storing info on quorum bitmap updates where the `quorumBitmap` is the bitmap of the\n     * quorums the operator is registered for starting at (inclusive)`updateBlockNumber` and ending at (exclusive) `nextUpdateBlockNumber`\n     * @dev nextUpdateBlockNumber is initialized to 0 for the latest update\n     */\n    struct QuorumBitmapUpdate {\n        uint32 updateBlockNumber;\n        uint32 nextUpdateBlockNumber;\n        uint192 quorumBitmap;\n    }\n\n    /**\n     * @notice Data structure for storing operator set params for a given quorum. Specifically the\n     * `maxOperatorCount` is the maximum number of operators that can be registered for the quorum,\n     * `kickBIPsOfOperatorStake` is the basis points of a new operator needs to have of an operator they are trying to kick from the quorum,\n     * and `kickBIPsOfTotalStake` is the basis points of the total stake of the quorum that an operator needs to be below to be kicked.\n     */\n    struct OperatorSetParam {\n        uint32 maxOperatorCount;\n        uint16 kickBIPsOfOperatorStake;\n        uint16 kickBIPsOfTotalStake;\n    }\n\n    /**\n     * @notice Data structure for the parameters needed to kick an operator from a quorum with number `quorumNumber`, used during registration churn.\n     * `operator` is the address of the operator to kick\n     */\n    struct OperatorKickParam {\n        uint8 quorumNumber;\n        address operator;\n    }\n\n    /// @notice Returns the operator set params for the given `quorumNumber`\n    function getOperatorSetParams(uint8 quorumNumber) external view returns (OperatorSetParam memory);\n    /// @notice the Stake registry contract that will keep track of operators' stakes\n    function stakeRegistry() external view returns (IStakeRegistry);\n    /// @notice the BLS Aggregate Pubkey Registry contract that will keep track of operators' BLS aggregate pubkeys per quorum\n    function blsApkRegistry() external view returns (IBLSApkRegistry);\n    /// @notice the index Registry contract that will keep track of operators' indexes\n    function indexRegistry() external view returns (IIndexRegistry);\n\n    /**\n     * @notice Ejects the provided operator from the provided quorums from the AVS\n     * @param operator is the operator to eject\n     * @param quorumNumbers are the quorum numbers to eject the operator from\n     */\n    function ejectOperator(address operator, bytes calldata quorumNumbers) external;\n\n    /// @notice Returns the number of quorums the registry coordinator has created\n    function quorumCount() external view returns (uint8);\n\n    /// @notice Returns the operator struct for the given `operator`\n    function getOperator(address operator) external view returns (OperatorInfo memory);\n\n    /// @notice Returns the operatorId for the given `operator`\n    function getOperatorId(address operator) external view returns (bytes32);\n\n    /// @notice Returns the operator address for the given `operatorId`\n    function getOperatorFromId(bytes32 operatorId) external view returns (address operator);\n\n    /// @notice Returns the status for the given `operator`\n    function getOperatorStatus(address operator) external view returns (IRegistryCoordinator.OperatorStatus);\n\n    /// @notice Returns the indices of the quorumBitmaps for the provided `operatorIds` at the given `blockNumber`\n    function getQuorumBitmapIndicesAtBlockNumber(uint32 blockNumber, bytes32[] memory operatorIds)\n        external\n        view\n        returns (uint32[] memory);\n\n    /**\n     * @notice Returns the quorum bitmap for the given `operatorId` at the given `blockNumber` via the `index`\n     * @dev reverts if `index` is incorrect\n     */\n    function getQuorumBitmapAtBlockNumberByIndex(bytes32 operatorId, uint32 blockNumber, uint256 index)\n        external\n        view\n        returns (uint192);\n\n    /// @notice Returns the `index`th entry in the operator with `operatorId`'s bitmap history\n    function getQuorumBitmapUpdateByIndex(bytes32 operatorId, uint256 index)\n        external\n        view\n        returns (QuorumBitmapUpdate memory);\n\n    /// @notice Returns the current quorum bitmap for the given `operatorId`\n    function getCurrentQuorumBitmap(bytes32 operatorId) external view returns (uint192);\n\n    /// @notice Returns the length of the quorum bitmap history for the given `operatorId`\n    function getQuorumBitmapHistoryLength(bytes32 operatorId) external view returns (uint256);\n\n    /// @notice Returns the registry at the desired index\n    function registries(uint256) external view returns (address);\n\n    /// @notice Returns the number of registries\n    function numRegistries() external view returns (uint256);\n\n    /**\n     * @notice Returns the message hash that an operator must sign to register their BLS public key.\n     * @param operator is the address of the operator registering their BLS public key\n     */\n    function pubkeyRegistrationMessageHash(address operator) external view returns (BN254.G1Point memory);\n\n    /// @notice returns the blocknumber the quorum was last updated all at once for all operators\n    function quorumUpdateBlockNumber(uint8 quorumNumber) external view returns (uint256);\n\n    /// @notice The owner of the registry coordinator\n    function owner() external view returns (address);\n}\n"
      },
      "lib/eigenlayer-middleware/src/interfaces/IBLSApkRegistry.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity =0.8.12;\n\nimport {IRegistry} from \"./IRegistry.sol\";\n\nimport {BN254} from \"../libraries/BN254.sol\";\n\n/**\n * @title Minimal interface for a registry that keeps track of aggregate operator public keys across many quorums.\n * @author Layr Labs, Inc.\n */\ninterface IBLSApkRegistry is IRegistry {\n    // STRUCTS\n    /// @notice Data structure used to track the history of the Aggregate Public Key of all operators\n    struct ApkUpdate {\n        // first 24 bytes of keccak256(apk_x0, apk_x1, apk_y0, apk_y1)\n        bytes24 apkHash;\n        // block number at which the update occurred\n        uint32 updateBlockNumber;\n        // block number at which the next update occurred\n        uint32 nextUpdateBlockNumber;\n    }\n\n    /**\n     * @notice Struct used when registering a new public key\n     * @param pubkeyRegistrationSignature is the registration message signed by the private key of the operator\n     * @param pubkeyG1 is the corresponding G1 public key of the operator\n     * @param pubkeyG2 is the corresponding G2 public key of the operator\n     */\n    struct PubkeyRegistrationParams {\n        BN254.G1Point pubkeyRegistrationSignature;\n        BN254.G1Point pubkeyG1;\n        BN254.G2Point pubkeyG2;\n    }\n\n    // EVENTS\n    /// @notice Emitted when `operator` registers with the public keys `pubkeyG1` and `pubkeyG2`.\n    event NewPubkeyRegistration(address indexed operator, BN254.G1Point pubkeyG1, BN254.G2Point pubkeyG2);\n\n    // @notice Emitted when a new operator pubkey is registered for a set of quorums\n    event OperatorAddedToQuorums(address operator, bytes32 operatorId, bytes quorumNumbers);\n\n    // @notice Emitted when an operator pubkey is removed from a set of quorums\n    event OperatorRemovedFromQuorums(address operator, bytes32 operatorId, bytes quorumNumbers);\n\n    /**\n     * @notice Registers the `operator`'s pubkey for the specified `quorumNumbers`.\n     * @param operator The address of the operator to register.\n     * @param quorumNumbers The quorum numbers the operator is registering for, where each byte is an 8 bit integer quorumNumber.\n     * @dev access restricted to the RegistryCoordinator\n     * @dev Preconditions (these are assumed, not validated in this contract):\n     *         1) `quorumNumbers` has no duplicates\n     *         2) `quorumNumbers.length` != 0\n     *         3) `quorumNumbers` is ordered in ascending order\n     *         4) the operator is not already registered\n     */\n    function registerOperator(address operator, bytes calldata quorumNumbers) external;\n\n    /**\n     * @notice Deregisters the `operator`'s pubkey for the specified `quorumNumbers`.\n     * @param operator The address of the operator to deregister.\n     * @param quorumNumbers The quorum numbers the operator is deregistering from, where each byte is an 8 bit integer quorumNumber.\n     * @dev access restricted to the RegistryCoordinator\n     * @dev Preconditions (these are assumed, not validated in this contract):\n     *         1) `quorumNumbers` has no duplicates\n     *         2) `quorumNumbers.length` != 0\n     *         3) `quorumNumbers` is ordered in ascending order\n     *         4) the operator is not already deregistered\n     *         5) `quorumNumbers` is a subset of the quorumNumbers that the operator is registered for\n     */\n    function deregisterOperator(address operator, bytes calldata quorumNumbers) external;\n\n    /**\n     * @notice Initializes a new quorum by pushing its first apk update\n     * @param quorumNumber The number of the new quorum\n     */\n    function initializeQuorum(uint8 quorumNumber) external;\n\n    /**\n     * @notice mapping from operator address to pubkey hash.\n     * Returns *zero* if the `operator` has never registered, and otherwise returns the hash of the public key of the operator.\n     */\n    function operatorToPubkeyHash(address operator) external view returns (bytes32);\n\n    /**\n     * @notice mapping from pubkey hash to operator address.\n     * Returns *zero* if no operator has ever registered the public key corresponding to `pubkeyHash`,\n     * and otherwise returns the (unique) registered operator who owns the BLS public key that is the preimage of `pubkeyHash`.\n     */\n    function pubkeyHashToOperator(bytes32 pubkeyHash) external view returns (address);\n\n    /**\n     * @notice Called by the RegistryCoordinator register an operator as the owner of a BLS public key.\n     * @param operator is the operator for whom the key is being registered\n     * @param params contains the G1 & G2 public keys of the operator, and a signature proving their ownership\n     * @param pubkeyRegistrationMessageHash is a hash that the operator must sign to prove key ownership\n     */\n    function registerBLSPublicKey(\n        address operator,\n        PubkeyRegistrationParams calldata params,\n        BN254.G1Point calldata pubkeyRegistrationMessageHash\n    ) external returns (bytes32 operatorId);\n\n    /**\n     * @notice Returns the pubkey and pubkey hash of an operator\n     * @dev Reverts if the operator has not registered a valid pubkey\n     */\n    function getRegisteredPubkey(address operator) external view returns (BN254.G1Point memory, bytes32);\n\n    /// @notice Returns the current APK for the provided `quorumNumber `\n    function getApk(uint8 quorumNumber) external view returns (BN254.G1Point memory);\n\n    /// @notice Returns the index of the quorumApk index at `blockNumber` for the provided `quorumNumber`\n    function getApkIndicesAtBlockNumber(bytes calldata quorumNumbers, uint256 blockNumber)\n        external\n        view\n        returns (uint32[] memory);\n\n    /// @notice Returns the `ApkUpdate` struct at `index` in the list of APK updates for the `quorumNumber`\n    function getApkUpdateAtIndex(uint8 quorumNumber, uint256 index) external view returns (ApkUpdate memory);\n\n    /// @notice Returns the operator address for the given `pubkeyHash`\n    function getOperatorFromPubkeyHash(bytes32 pubkeyHash) external view returns (address);\n\n    /**\n     * @notice get 24 byte hash of the apk of `quorumNumber` at `blockNumber` using the provided `index`;\n     * called by checkSignatures in BLSSignatureChecker.sol.\n     * @param quorumNumber is the quorum whose ApkHash is being retrieved\n     * @param blockNumber is the number of the block for which the latest ApkHash will be retrieved\n     * @param index is the index of the apkUpdate being retrieved from the list of quorum apkUpdates in storage\n     */\n    function getApkHashAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index)\n        external\n        view\n        returns (bytes24);\n\n    /// @notice returns the ID used to identify the `operator` within this AVS.\n    /// @dev Returns zero in the event that the `operator` has never registered for the AVS\n    function getOperatorId(address operator) external view returns (bytes32);\n}\n"
      },
      "lib/eigenlayer-middleware/src/interfaces/IStakeRegistry.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity =0.8.12;\n\nimport {IDelegationManager} from \"eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol\";\nimport {IStrategy} from \"eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol\";\n\nimport {IRegistry} from \"./IRegistry.sol\";\n\n/**\n * @title Interface for a `Registry` that keeps track of stakes of operators for up to 256 quorums.\n * @author Layr Labs, Inc.\n */\ninterface IStakeRegistry is IRegistry {\n    // DATA STRUCTURES\n\n    /// @notice struct used to store the stakes of an individual operator or the sum of all operators' stakes, for storage\n    struct StakeUpdate {\n        // the block number at which the stake amounts were updated and stored\n        uint32 updateBlockNumber;\n        // the block number at which the *next update* occurred.\n        /// @notice This entry has the value **0** until another update takes place.\n        uint32 nextUpdateBlockNumber;\n        // stake weight for the quorum\n        uint96 stake;\n    }\n\n    /**\n     * @notice In weighing a particular strategy, the amount of underlying asset for that strategy is\n     * multiplied by its multiplier, then divided by WEIGHTING_DIVISOR\n     */\n    struct StrategyParams {\n        IStrategy strategy;\n        uint96 multiplier;\n    }\n\n    // EVENTS\n\n    /// @notice emitted whenever the stake of `operator` is updated\n    event OperatorStakeUpdate(bytes32 indexed operatorId, uint8 quorumNumber, uint96 stake);\n    /// @notice emitted when the minimum stake for a quorum is updated\n    event MinimumStakeForQuorumUpdated(uint8 indexed quorumNumber, uint96 minimumStake);\n    /// @notice emitted when a new quorum is created\n    event QuorumCreated(uint8 indexed quorumNumber);\n    /// @notice emitted when `strategy` has been added to the array at `strategyParams[quorumNumber]`\n    event StrategyAddedToQuorum(uint8 indexed quorumNumber, IStrategy strategy);\n    /// @notice emitted when `strategy` has removed from the array at `strategyParams[quorumNumber]`\n    event StrategyRemovedFromQuorum(uint8 indexed quorumNumber, IStrategy strategy);\n    /// @notice emitted when `strategy` has its `multiplier` updated in the array at `strategyParams[quorumNumber]`\n    event StrategyMultiplierUpdated(uint8 indexed quorumNumber, IStrategy strategy, uint256 multiplier);\n\n    /**\n     * @notice Registers the `operator` with `operatorId` for the specified `quorumNumbers`.\n     * @param operator The address of the operator to register.\n     * @param operatorId The id of the operator to register.\n     * @param quorumNumbers The quorum numbers the operator is registering for, where each byte is an 8 bit integer quorumNumber.\n     * @return The operator's current stake for each quorum, and the total stake for each quorum\n     * @dev access restricted to the RegistryCoordinator\n     * @dev Preconditions (these are assumed, not validated in this contract):\n     *         1) `quorumNumbers` has no duplicates\n     *         2) `quorumNumbers.length` != 0\n     *         3) `quorumNumbers` is ordered in ascending order\n     *         4) the operator is not already registered\n     */\n    function registerOperator(address operator, bytes32 operatorId, bytes memory quorumNumbers)\n        external\n        returns (uint96[] memory, uint96[] memory);\n\n    /**\n     * @notice Deregisters the operator with `operatorId` for the specified `quorumNumbers`.\n     * @param operatorId The id of the operator to deregister.\n     * @param quorumNumbers The quorum numbers the operator is deregistering from, where each byte is an 8 bit integer quorumNumber.\n     * @dev access restricted to the RegistryCoordinator\n     * @dev Preconditions (these are assumed, not validated in this contract):\n     *         1) `quorumNumbers` has no duplicates\n     *         2) `quorumNumbers.length` != 0\n     *         3) `quorumNumbers` is ordered in ascending order\n     *         4) the operator is not already deregistered\n     *         5) `quorumNumbers` is a subset of the quorumNumbers that the operator is registered for\n     */\n    function deregisterOperator(bytes32 operatorId, bytes memory quorumNumbers) external;\n\n    /**\n     * @notice Initialize a new quorum created by the registry coordinator by setting strategies, weights, and minimum stake\n     */\n    function initializeQuorum(uint8 quorumNumber, uint96 minimumStake, StrategyParams[] memory strategyParams)\n        external;\n\n    /// @notice Adds new strategies and the associated multipliers to the @param quorumNumber.\n    function addStrategies(uint8 quorumNumber, StrategyParams[] memory strategyParams) external;\n\n    /**\n     * @notice This function is used for removing strategies and their associated weights from the\n     * mapping strategyParams for a specific @param quorumNumber.\n     * @dev higher indices should be *first* in the list of @param indicesToRemove, since otherwise\n     * the removal of lower index entries will cause a shift in the indices of the other strategiesToRemove\n     */\n    function removeStrategies(uint8 quorumNumber, uint256[] calldata indicesToRemove) external;\n\n    /**\n     * @notice This function is used for modifying the weights of strategies that are already in the\n     * mapping strategyParams for a specific\n     * @param quorumNumber is the quorum number to change the strategy for\n     * @param strategyIndices are the indices of the strategies to change\n     * @param newMultipliers are the new multipliers for the strategies\n     */\n    function modifyStrategyParams(\n        uint8 quorumNumber,\n        uint256[] calldata strategyIndices,\n        uint96[] calldata newMultipliers\n    ) external;\n\n    /// @notice Constant used as a divisor in calculating weights.\n    function WEIGHTING_DIVISOR() external pure returns (uint256);\n\n    /// @notice Returns the EigenLayer delegation manager contract.\n    function delegation() external view returns (IDelegationManager);\n\n    /// @notice In order to register for a quorum i, an operator must have at least `minimumStakeForQuorum[i]`\n    function minimumStakeForQuorum(uint8 quorumNumber) external view returns (uint96);\n\n    /// @notice Returns the length of the dynamic array stored in `strategyParams[quorumNumber]`.\n    function strategyParamsLength(uint8 quorumNumber) external view returns (uint256);\n\n    /// @notice Returns the strategy and weight multiplier for the `index`'th strategy in the quorum `quorumNumber`\n    function strategyParamsByIndex(uint8 quorumNumber, uint256 index) external view returns (StrategyParams memory);\n\n    /**\n     * @notice This function computes the total weight of the @param operator in the quorum @param quorumNumber.\n     * @dev reverts in the case that `quorumNumber` is greater than or equal to `quorumCount`\n     */\n    function weightOfOperatorForQuorum(uint8 quorumNumber, address operator) external view returns (uint96);\n\n    /**\n     * @notice Returns the entire `operatorIdToStakeHistory[operatorId][quorumNumber]` array.\n     * @param operatorId The id of the operator of interest.\n     * @param quorumNumber The quorum number to get the stake for.\n     */\n    function getStakeHistory(bytes32 operatorId, uint8 quorumNumber) external view returns (StakeUpdate[] memory);\n\n    function getTotalStakeHistoryLength(uint8 quorumNumber) external view returns (uint256);\n\n    /**\n     * @notice Returns the `index`-th entry in the dynamic array of total stake, `totalStakeHistory` for quorum `quorumNumber`.\n     * @param quorumNumber The quorum number to get the stake for.\n     * @param index Array index for lookup, within the dynamic array `totalStakeHistory[quorumNumber]`.\n     */\n    function getTotalStakeUpdateAtIndex(uint8 quorumNumber, uint256 index) external view returns (StakeUpdate memory);\n\n    /// @notice Returns the indices of the operator stakes for the provided `quorumNumber` at the given `blockNumber`\n    function getStakeUpdateIndexAtBlockNumber(bytes32 operatorId, uint8 quorumNumber, uint32 blockNumber)\n        external\n        view\n        returns (uint32);\n\n    /// @notice Returns the indices of the total stakes for the provided `quorumNumbers` at the given `blockNumber`\n    function getTotalStakeIndicesAtBlockNumber(uint32 blockNumber, bytes calldata quorumNumbers)\n        external\n        view\n        returns (uint32[] memory);\n\n    /**\n     * @notice Returns the `index`-th entry in the `operatorIdToStakeHistory[operatorId][quorumNumber]` array.\n     * @param quorumNumber The quorum number to get the stake for.\n     * @param operatorId The id of the operator of interest.\n     * @param index Array index for lookup, within the dynamic array `operatorIdToStakeHistory[operatorId][quorumNumber]`.\n     * @dev Function will revert if `index` is out-of-bounds.\n     */\n    function getStakeUpdateAtIndex(uint8 quorumNumber, bytes32 operatorId, uint256 index)\n        external\n        view\n        returns (StakeUpdate memory);\n\n    /**\n     * @notice Returns the most recent stake weight for the `operatorId` for a certain quorum\n     * @dev Function returns an StakeUpdate struct with **every entry equal to 0** in the event that the operator has no stake history\n     */\n    function getLatestStakeUpdate(bytes32 operatorId, uint8 quorumNumber) external view returns (StakeUpdate memory);\n\n    /**\n     * @notice Returns the stake weight corresponding to `operatorId` for quorum `quorumNumber`, at the\n     * `index`-th entry in the `operatorIdToStakeHistory[operatorId][quorumNumber]` array if the entry\n     * corresponds to the operator's stake at `blockNumber`. Reverts otherwise.\n     * @param quorumNumber The quorum number to get the stake for.\n     * @param operatorId The id of the operator of interest.\n     * @param index Array index for lookup, within the dynamic array `operatorIdToStakeHistory[operatorId][quorumNumber]`.\n     * @param blockNumber Block number to make sure the stake is from.\n     * @dev Function will revert if `index` is out-of-bounds.\n     * @dev used the BLSSignatureChecker to get past stakes of signing operators\n     */\n    function getStakeAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, bytes32 operatorId, uint256 index)\n        external\n        view\n        returns (uint96);\n\n    /**\n     * @notice Returns the total stake weight for quorum `quorumNumber`, at the `index`-th entry in the\n     * `totalStakeHistory[quorumNumber]` array if the entry corresponds to the total stake at `blockNumber`.\n     * Reverts otherwise.\n     * @param quorumNumber The quorum number to get the stake for.\n     * @param index Array index for lookup, within the dynamic array `totalStakeHistory[quorumNumber]`.\n     * @param blockNumber Block number to make sure the stake is from.\n     * @dev Function will revert if `index` is out-of-bounds.\n     * @dev used the BLSSignatureChecker to get past stakes of signing operators\n     */\n    function getTotalStakeAtBlockNumberFromIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index)\n        external\n        view\n        returns (uint96);\n\n    /**\n     * @notice Returns the most recent stake weight for the `operatorId` for quorum `quorumNumber`\n     * @dev Function returns weight of **0** in the event that the operator has no stake history\n     */\n    function getCurrentStake(bytes32 operatorId, uint8 quorumNumber) external view returns (uint96);\n\n    /// @notice Returns the stake of the operator for the provided `quorumNumber` at the given `blockNumber`\n    function getStakeAtBlockNumber(bytes32 operatorId, uint8 quorumNumber, uint32 blockNumber)\n        external\n        view\n        returns (uint96);\n\n    /**\n     * @notice Returns the stake weight from the latest entry in `_totalStakeHistory` for quorum `quorumNumber`.\n     * @dev Will revert if `_totalStakeHistory[quorumNumber]` is empty.\n     */\n    function getCurrentTotalStake(uint8 quorumNumber) external view returns (uint96);\n\n    /**\n     * @notice Called by the registry coordinator to update an operator's stake for one\n     * or more quorums.\n     *\n     * If the operator no longer has the minimum stake required for a quorum, they are\n     * added to the\n     * @return A bitmap of quorums where the operator no longer meets the minimum stake\n     * and should be deregistered.\n     */\n    function updateOperatorStake(address operator, bytes32 operatorId, bytes calldata quorumNumbers)\n        external\n        returns (uint192);\n}\n"
      },
      "lib/eigenlayer-middleware/src/interfaces/IIndexRegistry.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity =0.8.12;\n\nimport {IRegistry} from \"./IRegistry.sol\";\n\n/**\n * @title Interface for a `Registry`-type contract that keeps track of an ordered list of operators for up to 256 quorums.\n * @author Layr Labs, Inc.\n */\ninterface IIndexRegistry is IRegistry {\n    // EVENTS\n\n    // emitted when an operator's index in the ordered operator list for the quorum with number `quorumNumber` is updated\n    event QuorumIndexUpdate(bytes32 indexed operatorId, uint8 quorumNumber, uint32 newOperatorIndex);\n\n    // DATA STRUCTURES\n\n    // struct used to give definitive ordering to operators at each blockNumber.\n    struct OperatorUpdate {\n        // blockNumber number from which `operatorIndex` was the operators index\n        // the operator's index is the first entry such that `blockNumber >= entry.fromBlockNumber`\n        uint32 fromBlockNumber;\n        // the operator at this index\n        bytes32 operatorId;\n    }\n\n    // struct used to denote the number of operators in a quorum at a given blockNumber\n    struct QuorumUpdate {\n        // The total number of operators at a `blockNumber` is the first entry such that `blockNumber >= entry.fromBlockNumber`\n        uint32 fromBlockNumber;\n        // The number of operators at `fromBlockNumber`\n        uint32 numOperators;\n    }\n\n    /**\n     * @notice Registers the operator with the specified `operatorId` for the quorums specified by `quorumNumbers`.\n     * @param operatorId is the id of the operator that is being registered\n     * @param quorumNumbers is the quorum numbers the operator is registered for\n     * @return numOperatorsPerQuorum is a list of the number of operators (including the registering operator) in each of the quorums the operator is registered for\n     * @dev access restricted to the RegistryCoordinator\n     * @dev Preconditions (these are assumed, not validated in this contract):\n     *         1) `quorumNumbers` has no duplicates\n     *         2) `quorumNumbers.length` != 0\n     *         3) `quorumNumbers` is ordered in ascending order\n     *         4) the operator is not already registered\n     */\n    function registerOperator(bytes32 operatorId, bytes calldata quorumNumbers) external returns (uint32[] memory);\n\n    /**\n     * @notice Deregisters the operator with the specified `operatorId` for the quorums specified by `quorumNumbers`.\n     * @param operatorId is the id of the operator that is being deregistered\n     * @param quorumNumbers is the quorum numbers the operator is deregistered for\n     * @dev access restricted to the RegistryCoordinator\n     * @dev Preconditions (these are assumed, not validated in this contract):\n     *         1) `quorumNumbers` has no duplicates\n     *         2) `quorumNumbers.length` != 0\n     *         3) `quorumNumbers` is ordered in ascending order\n     *         4) the operator is not already deregistered\n     *         5) `quorumNumbers` is a subset of the quorumNumbers that the operator is registered for\n     */\n    function deregisterOperator(bytes32 operatorId, bytes calldata quorumNumbers) external;\n\n    /**\n     * @notice Initialize a quorum by pushing its first quorum update\n     * @param quorumNumber The number of the new quorum\n     */\n    function initializeQuorum(uint8 quorumNumber) external;\n\n    /// @notice Returns the OperatorUpdate entry for the specified `operatorIndex` and `quorumNumber` at the specified `arrayIndex`\n    function getOperatorUpdateAtIndex(uint8 quorumNumber, uint32 operatorIndex, uint32 arrayIndex)\n        external\n        view\n        returns (OperatorUpdate memory);\n\n    /// @notice Returns the QuorumUpdate entry for the specified `quorumNumber` at the specified `quorumIndex`\n    function getQuorumUpdateAtIndex(uint8 quorumNumber, uint32 quorumIndex)\n        external\n        view\n        returns (QuorumUpdate memory);\n\n    /// @notice Returns the most recent OperatorUpdate entry for the specified quorumNumber and operatorIndex\n    function getLatestOperatorUpdate(uint8 quorumNumber, uint32 operatorIndex)\n        external\n        view\n        returns (OperatorUpdate memory);\n\n    /// @notice Returns the most recent QuorumUpdate entry for the specified quorumNumber\n    function getLatestQuorumUpdate(uint8 quorumNumber) external view returns (QuorumUpdate memory);\n\n    /// @notice Returns the current number of operators of this service for `quorumNumber`.\n    function totalOperatorsForQuorum(uint8 quorumNumber) external view returns (uint32);\n\n    /// @notice Returns an ordered list of operators of the services for the given `quorumNumber` at the given `blockNumber`\n    function getOperatorListAtBlockNumber(uint8 quorumNumber, uint32 blockNumber)\n        external\n        view\n        returns (bytes32[] memory);\n}\n"
      },
      "lib/eigenlayer-middleware/src/libraries/BitmapUtils.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity =0.8.12;\n\n/**\n * @title Library for Bitmap utilities such as converting between an array of bytes and a bitmap and finding the number of 1s in a bitmap.\n * @author Layr Labs, Inc.\n */\nlibrary BitmapUtils {\n    /**\n     * @notice Byte arrays are meant to contain unique bytes.\n     * If the array length exceeds 256, then it's impossible for all entries to be unique.\n     * This constant captures the max allowed array length (inclusive, i.e. 256 is allowed).\n     */\n    uint256 internal constant MAX_BYTE_ARRAY_LENGTH = 256;\n\n    /**\n     * @notice Converts an ordered array of bytes into a bitmap.\n     * @param orderedBytesArray The array of bytes to convert/compress into a bitmap. Must be in strictly ascending order.\n     * @return The resulting bitmap.\n     * @dev Each byte in the input is processed as indicating a single bit to flip in the bitmap.\n     * @dev This function will eventually revert in the event that the `orderedBytesArray` is not properly ordered (in ascending order).\n     * @dev This function will also revert if the `orderedBytesArray` input contains any duplicate entries (i.e. duplicate bytes).\n     */\n    function orderedBytesArrayToBitmap(bytes memory orderedBytesArray) internal pure returns (uint256) {\n        // sanity-check on input. a too-long input would fail later on due to having duplicate entry(s)\n        require(\n            orderedBytesArray.length <= MAX_BYTE_ARRAY_LENGTH,\n            \"BitmapUtils.orderedBytesArrayToBitmap: orderedBytesArray is too long\"\n        );\n\n        // return empty bitmap early if length of array is 0\n        if (orderedBytesArray.length == 0) {\n            return uint256(0);\n        }\n\n        // initialize the empty bitmap, to be built inside the loop\n        uint256 bitmap;\n        // initialize an empty uint256 to be used as a bitmask inside the loop\n        uint256 bitMask;\n\n        // perform the 0-th loop iteration with the ordering check *omitted* (since it is unnecessary / will always pass)\n        // construct a single-bit mask from the numerical value of the 0th byte of the array, and immediately add it to the bitmap\n        bitmap = uint256(1 << uint8(orderedBytesArray[0]));\n\n        // loop through each byte in the array to construct the bitmap\n        for (uint256 i = 1; i < orderedBytesArray.length; ++i) {\n            // construct a single-bit mask from the numerical value of the next byte of the array\n            bitMask = uint256(1 << uint8(orderedBytesArray[i]));\n            // check strictly ascending array ordering by comparing the mask to the bitmap so far (revert if mask isn't greater than bitmap)\n            require(bitMask > bitmap, \"BitmapUtils.orderedBytesArrayToBitmap: orderedBytesArray is not ordered\");\n            // add the entry to the bitmap\n            bitmap = (bitmap | bitMask);\n        }\n        return bitmap;\n    }\n\n    /**\n     * @notice Converts an ordered byte array to a bitmap, validating that all bits are less than `bitUpperBound`\n     * @param orderedBytesArray The array to convert to a bitmap; must be in strictly ascending order\n     * @param bitUpperBound The exclusive largest bit. Each bit must be strictly less than this value.\n     * @dev Reverts if bitmap contains a bit greater than or equal to `bitUpperBound`\n     */\n    function orderedBytesArrayToBitmap(bytes memory orderedBytesArray, uint8 bitUpperBound)\n        internal\n        pure\n        returns (uint256)\n    {\n        uint256 bitmap = orderedBytesArrayToBitmap(orderedBytesArray);\n\n        require((1 << bitUpperBound) > bitmap, \"BitmapUtils.orderedBytesArrayToBitmap: bitmap exceeds max value\");\n\n        return bitmap;\n    }\n\n    /**\n     * @notice Utility function for checking if a bytes array is strictly ordered, in ascending order.\n     * @param bytesArray the bytes array of interest\n     * @return Returns 'true' if the array is ordered in strictly ascending order, and 'false' otherwise.\n     * @dev This function returns 'true' for the edge case of the `bytesArray` having zero length.\n     * It also returns 'false' early for arrays with length in excess of MAX_BYTE_ARRAY_LENGTH (i.e. so long that they cannot be strictly ordered)\n     */\n    function isArrayStrictlyAscendingOrdered(bytes calldata bytesArray) internal pure returns (bool) {\n        // Return early if the array is too long, or has a length of 0\n        if (bytesArray.length > MAX_BYTE_ARRAY_LENGTH) {\n            return false;\n        }\n\n        if (bytesArray.length == 0) {\n            return true;\n        }\n\n        // Perform the 0-th loop iteration by pulling the 0th byte out of the array\n        bytes1 singleByte = bytesArray[0];\n\n        // For each byte, validate that each entry is *strictly greater than* the previous\n        // If it isn't, return false as the array is not ordered\n        for (uint256 i = 1; i < bytesArray.length; ++i) {\n            if (uint256(uint8(bytesArray[i])) <= uint256(uint8(singleByte))) {\n                return false;\n            }\n\n            // Pull the next byte out of the array\n            singleByte = bytesArray[i];\n        }\n\n        return true;\n    }\n\n    /**\n     * @notice Converts a bitmap into an array of bytes.\n     * @param bitmap The bitmap to decompress/convert to an array of bytes.\n     * @return bytesArray The resulting bitmap array of bytes.\n     * @dev Each byte in the input is processed as indicating a single bit to flip in the bitmap\n     */\n    function bitmapToBytesArray(uint256 bitmap) internal pure returns (bytes memory /*bytesArray*/ ) {\n        // initialize an empty uint256 to be used as a bitmask inside the loop\n        uint256 bitMask;\n        // allocate only the needed amount of memory\n        bytes memory bytesArray = new bytes(countNumOnes(bitmap));\n        // track the array index to assign to\n        uint256 arrayIndex = 0;\n        /**\n         * loop through each index in the bitmap to construct the array,\n         * but short-circuit the loop if we reach the number of ones and thus are done\n         * assigning to memory\n         */\n        for (uint256 i = 0; (arrayIndex < bytesArray.length) && (i < 256); ++i) {\n            // construct a single-bit mask for the i-th bit\n            bitMask = uint256(1 << i);\n            // check if the i-th bit is flipped in the bitmap\n            if (bitmap & bitMask != 0) {\n                // if the i-th bit is flipped, then add a byte encoding the value 'i' to the `bytesArray`\n                bytesArray[arrayIndex] = bytes1(uint8(i));\n                // increment the bytesArray slot since we've assigned one more byte of memory\n                unchecked {\n                    ++arrayIndex;\n                }\n            }\n        }\n        return bytesArray;\n    }\n\n    /// @return count number of ones in binary representation of `n`\n    function countNumOnes(uint256 n) internal pure returns (uint16) {\n        uint16 count = 0;\n        while (n > 0) {\n            n &= (n - 1); // Clear the least significant bit (turn off the rightmost set bit).\n            count++; // Increment the count for each cleared bit (each one encountered).\n        }\n        return count; // Return the total count of ones in the binary representation of n.\n    }\n\n    /// @notice Returns `true` if `bit` is in `bitmap`. Returns `false` otherwise.\n    function isSet(uint256 bitmap, uint8 bit) internal pure returns (bool) {\n        return 1 == ((bitmap >> bit) & 1);\n    }\n\n    /**\n     * @notice Returns a copy of `bitmap` with `bit` set.\n     * @dev IMPORTANT: we're dealing with stack values here, so this doesn't modify\n     * the original bitmap. Using this correctly requires an assignment statement:\n     * `bitmap = bitmap.setBit(bit);`\n     */\n    function setBit(uint256 bitmap, uint8 bit) internal pure returns (uint256) {\n        return bitmap | (1 << bit);\n    }\n\n    /**\n     * @notice Returns true if `bitmap` has no set bits\n     */\n    function isEmpty(uint256 bitmap) internal pure returns (bool) {\n        return bitmap == 0;\n    }\n\n    /**\n     * @notice Returns true if `a` and `b` have no common set bits\n     */\n    function noBitsInCommon(uint256 a, uint256 b) internal pure returns (bool) {\n        return a & b == 0;\n    }\n\n    /**\n     * @notice Returns true if `a` is a subset of `b`: ALL of the bits in `a` are also in `b`\n     */\n    function isSubsetOf(uint256 a, uint256 b) internal pure returns (bool) {\n        return a & b == a;\n    }\n\n    /**\n     * @notice Returns a new bitmap that contains all bits set in either `a` or `b`\n     * @dev Result is the union of `a` and `b`\n     */\n    function plus(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a | b;\n    }\n\n    /**\n     * @notice Returns a new bitmap that clears all set bits of `b` from `a`\n     * @dev Negates `b` and returns the intersection of the result with `a`\n     */\n    function minus(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a & ~b;\n    }\n}\n"
      },
      "lib/eigenlayer-middleware/src/libraries/BN254.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// several functions are taken or adapted from https://github.com/HarryR/solcrypto/blob/master/contracts/altbn128.sol (MIT license):\n// Copyright 2017 Christian Reitwiessner\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// The remainder of the code in this library is written by LayrLabs Inc. and is also under an MIT license\n\npragma solidity =0.8.12;\n\n/**\n * @title Library for operations on the BN254 elliptic curve.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice Contains BN254 parameters, common operations (addition, scalar mul, pairing), and BLS signature functionality.\n */\nlibrary BN254 {\n    // modulus for the underlying field F_p of the elliptic curve\n    uint256 internal constant FP_MODULUS = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n    // modulus for the underlying field F_r of the elliptic curve\n    uint256 internal constant FR_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n\n    struct G1Point {\n        uint256 X;\n        uint256 Y;\n    }\n\n    // Encoding of field elements is: X[1] * i + X[0]\n    struct G2Point {\n        uint256[2] X;\n        uint256[2] Y;\n    }\n\n    function generatorG1() internal pure returns (G1Point memory) {\n        return G1Point(1, 2);\n    }\n\n    // generator of group G2\n    /// @dev Generator point in F_q2 is of the form: (x0 + ix1, y0 + iy1).\n    uint256 internal constant G2x1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;\n    uint256 internal constant G2x0 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;\n    uint256 internal constant G2y1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;\n    uint256 internal constant G2y0 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;\n\n    /// @notice returns the G2 generator\n    /// @dev mind the ordering of the 1s and 0s!\n    ///      this is because of the (unknown to us) convention used in the bn254 pairing precompile contract\n    ///      \"Elements a * i + b of F_p^2 are encoded as two elements of F_p, (a, b).\"\n    ///      https://github.com/ethereum/EIPs/blob/master/EIPS/eip-197.md#encoding\n    function generatorG2() internal pure returns (G2Point memory) {\n        return G2Point([G2x1, G2x0], [G2y1, G2y0]);\n    }\n\n    // negation of the generator of group G2\n    /// @dev Generator point in F_q2 is of the form: (x0 + ix1, y0 + iy1).\n    uint256 internal constant nG2x1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;\n    uint256 internal constant nG2x0 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;\n    uint256 internal constant nG2y1 = 17805874995975841540914202342111839520379459829704422454583296818431106115052;\n    uint256 internal constant nG2y0 = 13392588948715843804641432497768002650278120570034223513918757245338268106653;\n\n    function negGeneratorG2() internal pure returns (G2Point memory) {\n        return G2Point([nG2x1, nG2x0], [nG2y1, nG2y0]);\n    }\n\n    bytes32 internal constant powersOfTauMerkleRoot = 0x22c998e49752bbb1918ba87d6d59dd0e83620a311ba91dd4b2cc84990b31b56f;\n\n    /**\n     * @param p Some point in G1.\n     * @return The negation of `p`, i.e. p.plus(p.negate()) should be zero.\n     */\n    function negate(G1Point memory p) internal pure returns (G1Point memory) {\n        // The prime q in the base field F_q for G1\n        if (p.X == 0 && p.Y == 0) {\n            return G1Point(0, 0);\n        } else {\n            return G1Point(p.X, FP_MODULUS - (p.Y % FP_MODULUS));\n        }\n    }\n\n    /**\n     * @return r the sum of two points of G1\n     */\n    function plus(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\n        uint256[4] memory input;\n        input[0] = p1.X;\n        input[1] = p1.Y;\n        input[2] = p2.X;\n        input[3] = p2.Y;\n        bool success;\n\n        // solium-disable-next-line security/no-inline-assembly\n        assembly {\n            success := staticcall(sub(gas(), 2000), 6, input, 0x80, r, 0x40)\n            // Use \"invalid\" to make gas estimation work\n            switch success\n            case 0 { invalid() }\n        }\n\n        require(success, \"ec-add-failed\");\n    }\n\n    /**\n     * @notice an optimized ecMul implementation that takes O(log_2(s)) ecAdds\n     * @param p the point to multiply\n     * @param s the scalar to multiply by\n     * @dev this function is only safe to use if the scalar is 9 bits or less\n     */\n    function scalar_mul_tiny(BN254.G1Point memory p, uint16 s) internal view returns (BN254.G1Point memory) {\n        require(s < 2 ** 9, \"scalar-too-large\");\n\n        // if s is 1 return p\n        if (s == 1) {\n            return p;\n        }\n\n        // the accumulated product to return\n        BN254.G1Point memory acc = BN254.G1Point(0, 0);\n        // the 2^n*p to add to the accumulated product in each iteration\n        BN254.G1Point memory p2n = p;\n        // value of most significant bit\n        uint16 m = 1;\n        // index of most significant bit\n        uint8 i = 0;\n\n        //loop until we reach the most significant bit\n        while (s >= m) {\n            unchecked {\n                // if the  current bit is 1, add the 2^n*p to the accumulated product\n                if ((s >> i) & 1 == 1) {\n                    acc = plus(acc, p2n);\n                }\n                // double the 2^n*p for the next iteration\n                p2n = plus(p2n, p2n);\n\n                // increment the index and double the value of the most significant bit\n                m <<= 1;\n                ++i;\n            }\n        }\n\n        // return the accumulated product\n        return acc;\n    }\n\n    /**\n     * @return r the product of a point on G1 and a scalar, i.e.\n     *         p == p.scalar_mul(1) and p.plus(p) == p.scalar_mul(2) for all\n     *         points p.\n     */\n    function scalar_mul(G1Point memory p, uint256 s) internal view returns (G1Point memory r) {\n        uint256[3] memory input;\n        input[0] = p.X;\n        input[1] = p.Y;\n        input[2] = s;\n        bool success;\n        // solium-disable-next-line security/no-inline-assembly\n        assembly {\n            success := staticcall(sub(gas(), 2000), 7, input, 0x60, r, 0x40)\n            // Use \"invalid\" to make gas estimation work\n            switch success\n            case 0 { invalid() }\n        }\n        require(success, \"ec-mul-failed\");\n    }\n\n    /**\n     *  @return The result of computing the pairing check\n     *         e(p1[0], p2[0]) *  .... * e(p1[n], p2[n]) == 1\n     *         For example,\n     *         pairing([P1(), P1().negate()], [P2(), P2()]) should return true.\n     */\n    function pairing(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2)\n        internal\n        view\n        returns (bool)\n    {\n        G1Point[2] memory p1 = [a1, b1];\n        G2Point[2] memory p2 = [a2, b2];\n\n        uint256[12] memory input;\n\n        for (uint256 i = 0; i < 2; i++) {\n            uint256 j = i * 6;\n            input[j + 0] = p1[i].X;\n            input[j + 1] = p1[i].Y;\n            input[j + 2] = p2[i].X[0];\n            input[j + 3] = p2[i].X[1];\n            input[j + 4] = p2[i].Y[0];\n            input[j + 5] = p2[i].Y[1];\n        }\n\n        uint256[1] memory out;\n        bool success;\n\n        // solium-disable-next-line security/no-inline-assembly\n        assembly {\n            success := staticcall(sub(gas(), 2000), 8, input, mul(12, 0x20), out, 0x20)\n            // Use \"invalid\" to make gas estimation work\n            switch success\n            case 0 { invalid() }\n        }\n\n        require(success, \"pairing-opcode-failed\");\n\n        return out[0] != 0;\n    }\n\n    /**\n     * @notice This function is functionally the same as pairing(), however it specifies a gas limit\n     *         the user can set, as a precompile may use the entire gas budget if it reverts.\n     */\n    function safePairing(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2, uint256 pairingGas)\n        internal\n        view\n        returns (bool, bool)\n    {\n        G1Point[2] memory p1 = [a1, b1];\n        G2Point[2] memory p2 = [a2, b2];\n\n        uint256[12] memory input;\n\n        for (uint256 i = 0; i < 2; i++) {\n            uint256 j = i * 6;\n            input[j + 0] = p1[i].X;\n            input[j + 1] = p1[i].Y;\n            input[j + 2] = p2[i].X[0];\n            input[j + 3] = p2[i].X[1];\n            input[j + 4] = p2[i].Y[0];\n            input[j + 5] = p2[i].Y[1];\n        }\n\n        uint256[1] memory out;\n        bool success;\n\n        // solium-disable-next-line security/no-inline-assembly\n        assembly {\n            success := staticcall(pairingGas, 8, input, mul(12, 0x20), out, 0x20)\n        }\n\n        //Out is the output of the pairing precompile, either 0 or 1 based on whether the two pairings are equal.\n        //Success is true if the precompile actually goes through (aka all inputs are valid)\n\n        return (success, out[0] != 0);\n    }\n\n    /// @return hashedG1 the keccak256 hash of the G1 Point\n    /// @dev used for BLS signatures\n    function hashG1Point(BN254.G1Point memory pk) internal pure returns (bytes32 hashedG1) {\n        assembly {\n            mstore(0, mload(pk))\n            mstore(0x20, mload(add(0x20, pk)))\n            hashedG1 := keccak256(0, 0x40)\n        }\n    }\n\n    /// @return the keccak256 hash of the G2 Point\n    /// @dev used for BLS signatures\n    function hashG2Point(BN254.G2Point memory pk) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(pk.X[0], pk.X[1], pk.Y[0], pk.Y[1]));\n    }\n\n    /**\n     * @notice adapted from https://github.com/HarryR/solcrypto/blob/master/contracts/altbn128.sol\n     */\n    function hashToG1(bytes32 _x) internal view returns (G1Point memory) {\n        uint256 beta = 0;\n        uint256 y = 0;\n\n        uint256 x = uint256(_x) % FP_MODULUS;\n\n        while (true) {\n            (beta, y) = findYFromX(x);\n\n            // y^2 == beta\n            if (beta == mulmod(y, y, FP_MODULUS)) {\n                return G1Point(x, y);\n            }\n\n            x = addmod(x, 1, FP_MODULUS);\n        }\n        return G1Point(0, 0);\n    }\n\n    /**\n     * Given X, find Y\n     *\n     *   where y = sqrt(x^3 + b)\n     *\n     * Returns: (x^3 + b), y\n     */\n    function findYFromX(uint256 x) internal view returns (uint256, uint256) {\n        // beta = (x^3 + b) % p\n        uint256 beta = addmod(mulmod(mulmod(x, x, FP_MODULUS), x, FP_MODULUS), 3, FP_MODULUS);\n\n        // y^2 = x^3 + b\n        // this acts like: y = sqrt(beta) = beta^((p+1) / 4)\n        uint256 y = expMod(beta, 0xc19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52, FP_MODULUS);\n\n        return (beta, y);\n    }\n\n    function expMod(uint256 _base, uint256 _exponent, uint256 _modulus) internal view returns (uint256 retval) {\n        bool success;\n        uint256[1] memory output;\n        uint256[6] memory input;\n        input[0] = 0x20; // baseLen = new(big.Int).SetBytes(getData(input, 0, 32))\n        input[1] = 0x20; // expLen  = new(big.Int).SetBytes(getData(input, 32, 32))\n        input[2] = 0x20; // modLen  = new(big.Int).SetBytes(getData(input, 64, 32))\n        input[3] = _base;\n        input[4] = _exponent;\n        input[5] = _modulus;\n        assembly {\n            success := staticcall(sub(gas(), 2000), 5, input, 0xc0, output, 0x20)\n            // Use \"invalid\" to make gas estimation work\n            switch success\n            case 0 { invalid() }\n        }\n        require(success, \"BN254.expMod: call failure\");\n        return output[0];\n    }\n}\n"
      },
      "lib/eigenlayer-middleware/src/interfaces/IRegistry.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\n/**\n * @title Minimal interface for a `Registry`-type contract.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice Functions related to the registration process itself have been intentionally excluded\n * because their function signatures may vary significantly.\n */\ninterface IRegistry {\n    function registryCoordinator() external view returns (address);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"./IStrategy.sol\";\nimport \"./ISignatureUtils.sol\";\nimport \"./IStrategyManager.sol\";\n\n/**\n * @title DelegationManager\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice  This is the contract for delegation in EigenLayer. The main functionalities of this contract are\n * - enabling anyone to register as an operator in EigenLayer\n * - allowing operators to specify parameters related to stakers who delegate to them\n * - 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)\n * - 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)\n */\ninterface IDelegationManager is ISignatureUtils {\n    // @notice Struct used for storing information about a single operator who has registered with EigenLayer\n    struct OperatorDetails {\n        // @notice address to receive the rewards that the operator earns via serving applications built on EigenLayer.\n        address earningsReceiver;\n        /**\n         * @notice Address to verify signatures when a staker wishes to delegate to the operator, as well as controlling \"forced undelegations\".\n         * @dev Signature verification follows these rules:\n         * 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.\n         * 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.\n         * 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\".\n         */\n        address delegationApprover;\n        /**\n         * @notice A minimum delay -- measured in blocks -- enforced between:\n         * 1) the operator signalling their intent to register for a service, via calling `Slasher.optIntoSlashing`\n         * and\n         * 2) the operator completing registration for the service, via the service ultimately calling `Slasher.recordFirstStakeUpdate`\n         * @dev note that for a specific operator, this value *cannot decrease*, i.e. if the operator wishes to modify their OperatorDetails,\n         * then they are only allowed to either increase this value or keep it the same.\n         */\n        uint32 stakerOptOutWindowBlocks;\n    }\n\n    /**\n     * @notice Abstract struct used in calculating an EIP712 signature for a staker to approve that they (the staker themselves) delegate to a specific operator.\n     * @dev Used in computing the `STAKER_DELEGATION_TYPEHASH` and as a reference in the computation of the stakerDigestHash in the `delegateToBySignature` function.\n     */\n    struct StakerDelegation {\n        // the staker who is delegating\n        address staker;\n        // the operator being delegated to\n        address operator;\n        // the staker's nonce\n        uint256 nonce;\n        // the expiration timestamp (UTC) of the signature\n        uint256 expiry;\n    }\n\n    /**\n     * @notice Abstract struct used in calculating an EIP712 signature for an operator's delegationApprover to approve that a specific staker delegate to the operator.\n     * @dev Used in computing the `DELEGATION_APPROVAL_TYPEHASH` and as a reference in the computation of the approverDigestHash in the `_delegate` function.\n     */\n    struct DelegationApproval {\n        // the staker who is delegating\n        address staker;\n        // the operator being delegated to\n        address operator;\n        // the operator's provided salt\n        bytes32 salt;\n        // the expiration timestamp (UTC) of the signature\n        uint256 expiry;\n    }\n\n    /**\n     * Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored.\n     * In functions that operate on existing queued withdrawals -- e.g. completeQueuedWithdrawal`, the data is resubmitted and the hash of the submitted\n     * data is computed by `calculateWithdrawalRoot` and checked against the stored hash in order to confirm the integrity of the submitted data.\n     */\n    struct Withdrawal {\n        // The address that originated the Withdrawal\n        address staker;\n        // The address that the staker was delegated to at the time that the Withdrawal was created\n        address delegatedTo;\n        // The address that can complete the Withdrawal + will receive funds when completing the withdrawal\n        address withdrawer;\n        // Nonce used to guarantee that otherwise identical withdrawals have unique hashes\n        uint256 nonce;\n        // Block number when the Withdrawal was created\n        uint32 startBlock;\n        // Array of strategies that the Withdrawal contains\n        IStrategy[] strategies;\n        // Array containing the amount of shares in each Strategy in the `strategies` array\n        uint256[] shares;\n    }\n\n    struct QueuedWithdrawalParams {\n        // Array of strategies that the QueuedWithdrawal contains\n        IStrategy[] strategies;\n        // Array containing the amount of shares in each Strategy in the `strategies` array\n        uint256[] shares;\n        // The address of the withdrawer\n        address withdrawer;\n    }\n\n    // @notice Emitted when a new operator registers in EigenLayer and provides their OperatorDetails.\n    event OperatorRegistered(address indexed operator, OperatorDetails operatorDetails);\n\n    /// @notice Emitted when an operator updates their OperatorDetails to @param newOperatorDetails\n    event OperatorDetailsModified(address indexed operator, OperatorDetails newOperatorDetails);\n\n    /**\n     * @notice Emitted when @param operator indicates that they are updating their MetadataURI string\n     * @dev Note that these strings are *never stored in storage* and are instead purely emitted in events for off-chain indexing\n     */\n    event OperatorMetadataURIUpdated(address indexed operator, string metadataURI);\n\n    /// @notice Emitted whenever an operator's shares are increased for a given strategy. Note that shares is the delta in the operator's shares.\n    event OperatorSharesIncreased(address indexed operator, address staker, IStrategy strategy, uint256 shares);\n\n    /// @notice Emitted whenever an operator's shares are decreased for a given strategy. Note that shares is the delta in the operator's shares.\n    event OperatorSharesDecreased(address indexed operator, address staker, IStrategy strategy, uint256 shares);\n\n    /// @notice Emitted when @param staker delegates to @param operator.\n    event StakerDelegated(address indexed staker, address indexed operator);\n\n    /// @notice Emitted when @param staker undelegates from @param operator.\n    event StakerUndelegated(address indexed staker, address indexed operator);\n\n    /// @notice Emitted when @param staker is undelegated via a call not originating from the staker themself\n    event StakerForceUndelegated(address indexed staker, address indexed operator);\n\n    /**\n     * @notice Emitted when a new withdrawal is queued.\n     * @param withdrawalRoot Is the hash of the `withdrawal`.\n     * @param withdrawal Is the withdrawal itself.\n     */\n    event WithdrawalQueued(bytes32 withdrawalRoot, Withdrawal withdrawal);\n\n    /// @notice Emitted when a queued withdrawal is completed\n    event WithdrawalCompleted(bytes32 withdrawalRoot);\n\n    /// @notice Emitted when a queued withdrawal is *migrated* from the StrategyManager to the DelegationManager\n    event WithdrawalMigrated(bytes32 oldWithdrawalRoot, bytes32 newWithdrawalRoot);\n\n    /// @notice Emitted when the `minWithdrawalDelayBlocks` variable is modified from `previousValue` to `newValue`.\n    event MinWithdrawalDelayBlocksSet(uint256 previousValue, uint256 newValue);\n\n    /// @notice Emitted when the `strategyWithdrawalDelayBlocks` variable is modified from `previousValue` to `newValue`.\n    event StrategyWithdrawalDelayBlocksSet(IStrategy strategy, uint256 previousValue, uint256 newValue);\n\n    /**\n     * @notice Registers the caller as an operator in EigenLayer.\n     * @param registeringOperatorDetails is the `OperatorDetails` for the operator.\n     * @param metadataURI is a URI for the operator's metadata, i.e. a link providing more details on the operator.\n     *\n     * @dev Once an operator is registered, they cannot 'deregister' as an operator, and they will forever be considered \"delegated to themself\".\n     * @dev This function will revert if the caller attempts to set their `earningsReceiver` to address(0).\n     * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event\n     */\n    function registerAsOperator(OperatorDetails calldata registeringOperatorDetails, string calldata metadataURI)\n        external;\n\n    /**\n     * @notice Updates an operator's stored `OperatorDetails`.\n     * @param newOperatorDetails is the updated `OperatorDetails` for the operator, to replace their current OperatorDetails`.\n     *\n     * @dev The caller must have previously registered as an operator in EigenLayer.\n     * @dev This function will revert if the caller attempts to set their `earningsReceiver` to address(0).\n     */\n    function modifyOperatorDetails(OperatorDetails calldata newOperatorDetails) external;\n\n    /**\n     * @notice Called by an operator to emit an `OperatorMetadataURIUpdated` event indicating the information has updated.\n     * @param metadataURI The URI for metadata associated with an operator\n     * @dev Note that the `metadataURI` is *never stored * and is only emitted in the `OperatorMetadataURIUpdated` event\n     */\n    function updateOperatorMetadataURI(string calldata metadataURI) external;\n\n    /**\n     * @notice Caller delegates their stake to an operator.\n     * @param operator The account (`msg.sender`) is delegating its assets to for use in serving applications built on EigenLayer.\n     * @param approverSignatureAndExpiry Verifies the operator approves of this delegation\n     * @param approverSalt A unique single use value tied to an individual signature.\n     * @dev The approverSignatureAndExpiry is used in the event that:\n     *          1) the operator's `delegationApprover` address is set to a non-zero value.\n     *                  AND\n     *          2) neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator\n     *             or their delegationApprover is the `msg.sender`, then approval is assumed.\n     * @dev In the event that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input\n     * in this case to save on complexity + gas costs\n     */\n    function delegateTo(address operator, SignatureWithExpiry memory approverSignatureAndExpiry, bytes32 approverSalt)\n        external;\n\n    /**\n     * @notice Caller delegates a staker's stake to an operator with valid signatures from both parties.\n     * @param staker The account delegating stake to an `operator` account\n     * @param operator The account (`staker`) is delegating its assets to for use in serving applications built on EigenLayer.\n     * @param stakerSignatureAndExpiry Signed data from the staker authorizing delegating stake to an operator\n     * @param approverSignatureAndExpiry is a parameter that will be used for verifying that the operator approves of this delegation action in the event that:\n     * @param approverSalt Is a salt used to help guarantee signature uniqueness. Each salt can only be used once by a given approver.\n     *\n     * @dev If `staker` is an EOA, then `stakerSignature` is verified to be a valid ECDSA stakerSignature from `staker`, indicating their intention for this action.\n     * @dev If `staker` is a contract, then `stakerSignature` will be checked according to EIP-1271.\n     * @dev the operator's `delegationApprover` address is set to a non-zero value.\n     * @dev neither the operator nor their `delegationApprover` is the `msg.sender`, since in the event that the operator or their delegationApprover\n     * is the `msg.sender`, then approval is assumed.\n     * @dev This function will revert if the current `block.timestamp` is equal to or exceeds the expiry\n     * @dev In the case that `approverSignatureAndExpiry` is not checked, its content is ignored entirely; it's recommended to use an empty input\n     * in this case to save on complexity + gas costs\n     */\n    function delegateToBySignature(\n        address staker,\n        address operator,\n        SignatureWithExpiry memory stakerSignatureAndExpiry,\n        SignatureWithExpiry memory approverSignatureAndExpiry,\n        bytes32 approverSalt\n    ) external;\n\n    /**\n     * @notice Undelegates the staker from the operator who they are delegated to. Puts the staker into the \"undelegation limbo\" mode of the EigenPodManager\n     * and queues a withdrawal of all of the staker's shares in the StrategyManager (to the staker), if necessary.\n     * @param staker The account to be undelegated.\n     * @return withdrawalRoot The root of the newly queued withdrawal, if a withdrawal was queued. Otherwise just bytes32(0).\n     *\n     * @dev Reverts if the `staker` is also an operator, since operators are not allowed to undelegate from themselves.\n     * @dev Reverts if the caller is not the staker, nor the operator who the staker is delegated to, nor the operator's specified \"delegationApprover\"\n     * @dev Reverts if the `staker` is already undelegated.\n     */\n    function undelegate(address staker) external returns (bytes32[] memory withdrawalRoot);\n\n    /**\n     * Allows a staker to withdraw some shares. Withdrawn shares/strategies are immediately removed\n     * from the staker. If the staker is delegated, withdrawn shares/strategies are also removed from\n     * their operator.\n     *\n     * All withdrawn shares/strategies are placed in a queue and can be fully withdrawn after a delay.\n     */\n    function queueWithdrawals(QueuedWithdrawalParams[] calldata queuedWithdrawalParams)\n        external\n        returns (bytes32[] memory);\n\n    /**\n     * @notice Used to complete the specified `withdrawal`. The caller must match `withdrawal.withdrawer`\n     * @param withdrawal The Withdrawal to complete.\n     * @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.\n     * This input can be provided with zero length if `receiveAsTokens` is set to 'false' (since in that case, this input will be unused)\n     * @param middlewareTimesIndex is the index in the operator that the staker who triggered the withdrawal was delegated to's middleware times array\n     * @param receiveAsTokens If true, the shares specified in the withdrawal will be withdrawn from the specified strategies themselves\n     * and sent to the caller, through calls to `withdrawal.strategies[i].withdraw`. If false, then the shares in the specified strategies\n     * will simply be transferred to the caller directly.\n     * @dev middlewareTimesIndex should be calculated off chain before calling this function by finding the first index that satisfies `slasher.canWithdraw`\n     * @dev beaconChainETHStrategy shares are non-transferrable, so if `receiveAsTokens = false` and `withdrawal.withdrawer != withdrawal.staker`, note that\n     * any beaconChainETHStrategy shares in the `withdrawal` will be _returned to the staker_, rather than transferred to the withdrawer, unlike shares in\n     * any other strategies, which will be transferred to the withdrawer.\n     */\n    function completeQueuedWithdrawal(\n        Withdrawal calldata withdrawal,\n        IERC20[] calldata tokens,\n        uint256 middlewareTimesIndex,\n        bool receiveAsTokens\n    ) external;\n\n    /**\n     * @notice Array-ified version of `completeQueuedWithdrawal`.\n     * Used to complete the specified `withdrawals`. The function caller must match `withdrawals[...].withdrawer`\n     * @param withdrawals The Withdrawals to complete.\n     * @param tokens Array of tokens for each Withdrawal. See `completeQueuedWithdrawal` for the usage of a single array.\n     * @param middlewareTimesIndexes One index to reference per Withdrawal. See `completeQueuedWithdrawal` for the usage of a single index.\n     * @param receiveAsTokens Whether or not to complete each withdrawal as tokens. See `completeQueuedWithdrawal` for the usage of a single boolean.\n     * @dev See `completeQueuedWithdrawal` for relevant dev tags\n     */\n    function completeQueuedWithdrawals(\n        Withdrawal[] calldata withdrawals,\n        IERC20[][] calldata tokens,\n        uint256[] calldata middlewareTimesIndexes,\n        bool[] calldata receiveAsTokens\n    ) external;\n\n    /**\n     * @notice Increases a staker's delegated share balance in a strategy.\n     * @param staker The address to increase the delegated shares for their operator.\n     * @param strategy The strategy in which to increase the delegated shares.\n     * @param shares The number of shares to increase.\n     *\n     * @dev *If the staker is actively delegated*, then increases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing.\n     * @dev Callable only by the StrategyManager or EigenPodManager.\n     */\n    function increaseDelegatedShares(address staker, IStrategy strategy, uint256 shares) external;\n\n    /**\n     * @notice Decreases a staker's delegated share balance in a strategy.\n     * @param staker The address to increase the delegated shares for their operator.\n     * @param strategy The strategy in which to decrease the delegated shares.\n     * @param shares The number of shares to decrease.\n     *\n     * @dev *If the staker is actively delegated*, then decreases the `staker`'s delegated shares in `strategy` by `shares`. Otherwise does nothing.\n     * @dev Callable only by the StrategyManager or EigenPodManager.\n     */\n    function decreaseDelegatedShares(address staker, IStrategy strategy, uint256 shares) external;\n\n    /**\n     * @notice returns the address of the operator that `staker` is delegated to.\n     * @notice Mapping: staker => operator whom the staker is currently delegated to.\n     * @dev Note that returning address(0) indicates that the staker is not actively delegated to any operator.\n     */\n    function delegatedTo(address staker) external view returns (address);\n\n    /**\n     * @notice Returns the OperatorDetails struct associated with an `operator`.\n     */\n    function operatorDetails(address operator) external view returns (OperatorDetails memory);\n\n    /*\n     * @notice Returns the earnings receiver address for an operator\n     */\n    function earningsReceiver(address operator) external view returns (address);\n\n    /**\n     * @notice Returns the delegationApprover account for an operator\n     */\n    function delegationApprover(address operator) external view returns (address);\n\n    /**\n     * @notice Returns the stakerOptOutWindowBlocks for an operator\n     */\n    function stakerOptOutWindowBlocks(address operator) external view returns (uint256);\n\n    /**\n     * @notice Given array of strategies, returns array of shares for the operator\n     */\n    function getOperatorShares(address operator, IStrategy[] memory strategies)\n        external\n        view\n        returns (uint256[] memory);\n\n    /**\n     * @notice Given a list of strategies, return the minimum number of blocks that must pass to withdraw\n     * from all the inputted strategies. Return value is >= minWithdrawalDelayBlocks as this is the global min withdrawal delay.\n     * @param strategies The strategies to check withdrawal delays for\n     */\n    function getWithdrawalDelay(IStrategy[] calldata strategies) external view returns (uint256);\n\n    /**\n     * @notice returns the total number of shares in `strategy` that are delegated to `operator`.\n     * @notice Mapping: operator => strategy => total number of shares in the strategy delegated to the operator.\n     * @dev By design, the following invariant should hold for each Strategy:\n     * (operator's shares in delegation manager) = sum (shares above zero of all stakers delegated to operator)\n     * = sum (delegateable shares of all stakers delegated to the operator)\n     */\n    function operatorShares(address operator, IStrategy strategy) external view returns (uint256);\n\n    /**\n     * @notice Returns 'true' if `staker` *is* actively delegated, and 'false' otherwise.\n     */\n    function isDelegated(address staker) external view returns (bool);\n\n    /**\n     * @notice Returns true is an operator has previously registered for delegation.\n     */\n    function isOperator(address operator) external view returns (bool);\n\n    /// @notice Mapping: staker => number of signed delegation nonces (used in `delegateToBySignature`) from the staker that the contract has already checked\n    function stakerNonce(address staker) external view returns (uint256);\n\n    /**\n     * @notice Mapping: delegationApprover => 32-byte salt => whether or not the salt has already been used by the delegationApprover.\n     * @dev Salts are used in the `delegateTo` and `delegateToBySignature` functions. Note that these functions only process the delegationApprover's\n     * signature + the provided salt if the operator being delegated to has specified a nonzero address as their `delegationApprover`.\n     */\n    function delegationApproverSaltIsSpent(address _delegationApprover, bytes32 salt) external view returns (bool);\n\n    /**\n     * @notice Minimum delay enforced by this contract for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner,\n     * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced).\n     * 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\n     * to withdraw a strategy is MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy])\n     */\n    function minWithdrawalDelayBlocks() external view returns (uint256);\n\n    /**\n     * @notice Minimum delay enforced by this contract per Strategy for completing queued withdrawals. Measured in blocks, and adjustable by this contract's owner,\n     * up to a maximum of `MAX_WITHDRAWAL_DELAY_BLOCKS`. Minimum value is 0 (i.e. no delay enforced).\n     */\n    function strategyWithdrawalDelayBlocks(IStrategy strategy) external view returns (uint256);\n\n    /**\n     * @notice Calculates the digestHash for a `staker` to sign to delegate to an `operator`\n     * @param staker The signing staker\n     * @param operator The operator who is being delegated to\n     * @param expiry The desired expiry time of the staker's signature\n     */\n    function calculateCurrentStakerDelegationDigestHash(address staker, address operator, uint256 expiry)\n        external\n        view\n        returns (bytes32);\n\n    /**\n     * @notice Calculates the digest hash to be signed and used in the `delegateToBySignature` function\n     * @param staker The signing staker\n     * @param _stakerNonce The nonce of the staker. In practice we use the staker's current nonce, stored at `stakerNonce[staker]`\n     * @param operator The operator who is being delegated to\n     * @param expiry The desired expiry time of the staker's signature\n     */\n    function calculateStakerDelegationDigestHash(address staker, uint256 _stakerNonce, address operator, uint256 expiry)\n        external\n        view\n        returns (bytes32);\n\n    /**\n     * @notice Calculates the digest hash to be signed by the operator's delegationApprove and used in the `delegateTo` and `delegateToBySignature` functions.\n     * @param staker The account delegating their stake\n     * @param operator The account receiving delegated stake\n     * @param _delegationApprover the operator's `delegationApprover` who will be signing the delegationHash (in general)\n     * @param approverSalt A unique and single use value associated with the approver signature.\n     * @param expiry Time after which the approver's signature becomes invalid\n     */\n    function calculateDelegationApprovalDigestHash(\n        address staker,\n        address operator,\n        address _delegationApprover,\n        bytes32 approverSalt,\n        uint256 expiry\n    ) external view returns (bytes32);\n\n    /// @notice The EIP-712 typehash for the contract's domain\n    function DOMAIN_TYPEHASH() external view returns (bytes32);\n\n    /// @notice The EIP-712 typehash for the StakerDelegation struct used by the contract\n    function STAKER_DELEGATION_TYPEHASH() external view returns (bytes32);\n\n    /// @notice The EIP-712 typehash for the DelegationApproval struct used by the contract\n    function DELEGATION_APPROVAL_TYPEHASH() external view returns (bytes32);\n\n    /**\n     * @notice Getter function for the current EIP-712 domain separator for this contract.\n     *\n     * @dev The domain separator will change in the event of a fork that changes the ChainID.\n     * @dev By introducing a domain separator the DApp developers are guaranteed that there can be no signature collision.\n     * for more detailed information please read EIP-712.\n     */\n    function domainSeparator() external view returns (bytes32);\n\n    /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated.\n    /// @dev This only increments (doesn't decrement), and is used to help ensure that otherwise identical withdrawals have unique hashes.\n    function cumulativeWithdrawalsQueued(address staker) external view returns (uint256);\n\n    /// @notice Returns the keccak256 hash of `withdrawal`.\n    function calculateWithdrawalRoot(Withdrawal memory withdrawal) external pure returns (bytes32);\n\n    function migrateQueuedWithdrawals(IStrategyManager.DeprecatedStruct_QueuedWithdrawal[] memory withdrawalsToQueue)\n        external;\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title Minimal interface for an `Strategy` contract.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice Custom `Strategy` implementations may expand extensively on this interface.\n */\ninterface IStrategy {\n    /**\n     * @notice Used to deposit tokens into this Strategy\n     * @param token is the ERC20 token being deposited\n     * @param amount is the amount of token being deposited\n     * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's\n     * `depositIntoStrategy` function, and individual share balances are recorded in the strategyManager as well.\n     * @return newShares is the number of new shares issued at the current exchange ratio.\n     */\n    function deposit(IERC20 token, uint256 amount) external returns (uint256);\n\n    /**\n     * @notice Used to withdraw tokens from this Strategy, to the `recipient`'s address\n     * @param recipient is the address to receive the withdrawn funds\n     * @param token is the ERC20 token being transferred out\n     * @param amountShares is the amount of shares being withdrawn\n     * @dev This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's\n     * other functions, and individual share balances are recorded in the strategyManager as well.\n     */\n    function withdraw(address recipient, IERC20 token, uint256 amountShares) external;\n\n    /**\n     * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy.\n     * @notice In contrast to `sharesToUnderlyingView`, this function **may** make state modifications\n     * @param amountShares is the amount of shares to calculate its conversion into the underlying token\n     * @return The amount of underlying tokens corresponding to the input `amountShares`\n     * @dev Implementation for these functions in particular may vary significantly for different strategies\n     */\n    function sharesToUnderlying(uint256 amountShares) external returns (uint256);\n\n    /**\n     * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.\n     * @notice In contrast to `underlyingToSharesView`, this function **may** make state modifications\n     * @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares\n     * @return The amount of underlying tokens corresponding to the input `amountShares`\n     * @dev Implementation for these functions in particular may vary significantly for different strategies\n     */\n    function underlyingToShares(uint256 amountUnderlying) external returns (uint256);\n\n    /**\n     * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in\n     * this strategy. In contrast to `userUnderlyingView`, this function **may** make state modifications\n     */\n    function userUnderlying(address user) external returns (uint256);\n\n    /**\n     * @notice convenience function for fetching the current total shares of `user` in this strategy, by\n     * querying the `strategyManager` contract\n     */\n    function shares(address user) external view returns (uint256);\n\n    /**\n     * @notice Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy.\n     * @notice In contrast to `sharesToUnderlying`, this function guarantees no state modifications\n     * @param amountShares is the amount of shares to calculate its conversion into the underlying token\n     * @return The amount of shares corresponding to the input `amountUnderlying`\n     * @dev Implementation for these functions in particular may vary significantly for different strategies\n     */\n    function sharesToUnderlyingView(uint256 amountShares) external view returns (uint256);\n\n    /**\n     * @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.\n     * @notice In contrast to `underlyingToShares`, this function guarantees no state modifications\n     * @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion into strategy shares\n     * @return The amount of shares corresponding to the input `amountUnderlying`\n     * @dev Implementation for these functions in particular may vary significantly for different strategies\n     */\n    function underlyingToSharesView(uint256 amountUnderlying) external view returns (uint256);\n\n    /**\n     * @notice convenience function for fetching the current underlying value of all of the `user`'s shares in\n     * this strategy. In contrast to `userUnderlying`, this function guarantees no state modifications\n     */\n    function userUnderlyingView(address user) external view returns (uint256);\n\n    /// @notice The underlying token for shares in this Strategy\n    function underlyingToken() external view returns (IERC20);\n\n    /// @notice The total number of extant shares in this Strategy\n    function totalShares() external view returns (uint256);\n\n    /// @notice Returns either a brief string explaining the strategy's goal & purpose, or a link to metadata that explains in more detail.\n    function explanation() external view returns (string memory);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/ISignatureUtils.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\n/**\n * @title The interface for common signature utilities.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n */\ninterface ISignatureUtils {\n    // @notice Struct that bundles together a signature and an expiration time for the signature. Used primarily for stack management.\n    struct SignatureWithExpiry {\n        // the signature itself, formatted as a single bytes object\n        bytes signature;\n        // the expiration timestamp (UTC) of the signature\n        uint256 expiry;\n    }\n\n    // @notice Struct that bundles together a signature, a salt for uniqueness, and an expiration time for the signature. Used primarily for stack management.\n    struct SignatureWithSaltAndExpiry {\n        // the signature itself, formatted as a single bytes object\n        bytes signature;\n        // the salt used to generate the signature\n        bytes32 salt;\n        // the expiration timestamp (UTC) of the signature\n        uint256 expiry;\n    }\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"./IStrategy.sol\";\nimport \"./ISlasher.sol\";\nimport \"./IDelegationManager.sol\";\nimport \"./IEigenPodManager.sol\";\n\n/**\n * @title Interface for the primary entrypoint for funds into EigenLayer.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice See the `StrategyManager` contract itself for implementation details.\n */\ninterface IStrategyManager {\n    /**\n     * @notice Emitted when a new deposit occurs on behalf of `staker`.\n     * @param staker Is the staker who is depositing funds into EigenLayer.\n     * @param strategy Is the strategy that `staker` has deposited into.\n     * @param token Is the token that `staker` deposited.\n     * @param shares Is the number of new shares `staker` has been granted in `strategy`.\n     */\n    event Deposit(address staker, IERC20 token, IStrategy strategy, uint256 shares);\n\n    /// @notice Emitted when `thirdPartyTransfersForbidden` is updated for a strategy and value by the owner\n    event UpdatedThirdPartyTransfersForbidden(IStrategy strategy, bool value);\n\n    /// @notice Emitted when the `strategyWhitelister` is changed\n    event StrategyWhitelisterChanged(address previousAddress, address newAddress);\n\n    /// @notice Emitted when a strategy is added to the approved list of strategies for deposit\n    event StrategyAddedToDepositWhitelist(IStrategy strategy);\n\n    /// @notice Emitted when a strategy is removed from the approved list of strategies for deposit\n    event StrategyRemovedFromDepositWhitelist(IStrategy strategy);\n\n    /**\n     * @notice Deposits `amount` of `token` into the specified `strategy`, with the resultant shares credited to `msg.sender`\n     * @param strategy is the specified strategy where deposit is to be made,\n     * @param token is the denomination in which the deposit is to be made,\n     * @param amount is the amount of token to be deposited in the strategy by the staker\n     * @return shares The amount of new shares in the `strategy` created as part of the action.\n     * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf.\n     * @dev Cannot be called by an address that is 'frozen' (this function will revert if the `msg.sender` is frozen).\n     *\n     * WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended.  This can lead to attack vectors\n     *          where the token balance and corresponding strategy shares are not in sync upon reentrancy.\n     */\n    function depositIntoStrategy(IStrategy strategy, IERC20 token, uint256 amount) external returns (uint256 shares);\n\n    /**\n     * @notice Used for depositing an asset into the specified strategy with the resultant shares credited to `staker`,\n     * who must sign off on the action.\n     * Note that the assets are transferred out/from the `msg.sender`, not from the `staker`; this function is explicitly designed\n     * purely to help one address deposit 'for' another.\n     * @param strategy is the specified strategy where deposit is to be made,\n     * @param token is the denomination in which the deposit is to be made,\n     * @param amount is the amount of token to be deposited in the strategy by the staker\n     * @param staker the staker that the deposited assets will be credited to\n     * @param expiry the timestamp at which the signature expires\n     * @param signature is a valid signature from the `staker`. either an ECDSA signature if the `staker` is an EOA, or data to forward\n     * following EIP-1271 if the `staker` is a contract\n     * @return shares The amount of new shares in the `strategy` created as part of the action.\n     * @dev The `msg.sender` must have previously approved this contract to transfer at least `amount` of `token` on their behalf.\n     * @dev A signature is required for this function to eliminate the possibility of griefing attacks, specifically those\n     * targeting stakers who may be attempting to undelegate.\n     * @dev Cannot be called if thirdPartyTransfersForbidden is set to true for this strategy\n     *\n     *  WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended.  This can lead to attack vectors\n     *          where the token balance and corresponding strategy shares are not in sync upon reentrancy\n     */\n    function depositIntoStrategyWithSignature(\n        IStrategy strategy,\n        IERC20 token,\n        uint256 amount,\n        address staker,\n        uint256 expiry,\n        bytes memory signature\n    ) external returns (uint256 shares);\n\n    /// @notice Used by the DelegationManager to remove a Staker's shares from a particular strategy when entering the withdrawal queue\n    function removeShares(address staker, IStrategy strategy, uint256 shares) external;\n\n    /// @notice Used by the DelegationManager to award a Staker some shares that have passed through the withdrawal queue\n    function addShares(address staker, IERC20 token, IStrategy strategy, uint256 shares) external;\n\n    /// @notice Used by the DelegationManager to convert withdrawn shares to tokens and send them to a recipient\n    function withdrawSharesAsTokens(address recipient, IStrategy strategy, uint256 shares, IERC20 token) external;\n\n    /// @notice Returns the current shares of `user` in `strategy`\n    function stakerStrategyShares(address user, IStrategy strategy) external view returns (uint256 shares);\n\n    /**\n     * @notice Get all details on the staker's deposits and corresponding shares\n     * @return (staker's strategies, shares in these strategies)\n     */\n    function getDeposits(address staker) external view returns (IStrategy[] memory, uint256[] memory);\n\n    /// @notice Simple getter function that returns `stakerStrategyList[staker].length`.\n    function stakerStrategyListLength(address staker) external view returns (uint256);\n\n    /**\n     * @notice Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into\n     * @param strategiesToWhitelist Strategies that will be added to the `strategyIsWhitelistedForDeposit` mapping (if they aren't in it already)\n     * @param thirdPartyTransfersForbiddenValues bool values to set `thirdPartyTransfersForbidden` to for each strategy\n     */\n    function addStrategiesToDepositWhitelist(\n        IStrategy[] calldata strategiesToWhitelist,\n        bool[] calldata thirdPartyTransfersForbiddenValues\n    ) external;\n\n    /**\n     * @notice Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into\n     * @param strategiesToRemoveFromWhitelist Strategies that will be removed to the `strategyIsWhitelistedForDeposit` mapping (if they are in it)\n     */\n    function removeStrategiesFromDepositWhitelist(IStrategy[] calldata strategiesToRemoveFromWhitelist) external;\n\n    /// @notice Returns the single, central Delegation contract of EigenLayer\n    function delegation() external view returns (IDelegationManager);\n\n    /// @notice Returns the single, central Slasher contract of EigenLayer\n    function slasher() external view returns (ISlasher);\n\n    /// @notice Returns the EigenPodManager contract of EigenLayer\n    function eigenPodManager() external view returns (IEigenPodManager);\n\n    /// @notice Returns the address of the `strategyWhitelister`\n    function strategyWhitelister() external view returns (address);\n\n    /**\n     * @notice Returns bool for whether or not `strategy` enables credit transfers. i.e enabling\n     * depositIntoStrategyWithSignature calls or queueing withdrawals to a different address than the staker.\n     */\n    function thirdPartyTransfersForbidden(IStrategy strategy) external view returns (bool);\n\n    // LIMITED BACKWARDS-COMPATIBILITY FOR DEPRECATED FUNCTIONALITY\n    // packed struct for queued withdrawals; helps deal with stack-too-deep errors\n    struct DeprecatedStruct_WithdrawerAndNonce {\n        address withdrawer;\n        uint96 nonce;\n    }\n\n    /**\n     * Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored.\n     * In functions that operate on existing queued withdrawals -- e.g. `startQueuedWithdrawalWaitingPeriod` or `completeQueuedWithdrawal`,\n     * the data is resubmitted and the hash of the submitted data is computed by `calculateWithdrawalRoot` and checked against the\n     * stored hash in order to confirm the integrity of the submitted data.\n     */\n    struct DeprecatedStruct_QueuedWithdrawal {\n        IStrategy[] strategies;\n        uint256[] shares;\n        address staker;\n        DeprecatedStruct_WithdrawerAndNonce withdrawerAndNonce;\n        uint32 withdrawalStartBlock;\n        address delegatedAddress;\n    }\n\n    function migrateQueuedWithdrawal(DeprecatedStruct_QueuedWithdrawal memory queuedWithdrawal)\n        external\n        returns (bool, bytes32);\n\n    function calculateWithdrawalRoot(DeprecatedStruct_QueuedWithdrawal memory queuedWithdrawal)\n        external\n        pure\n        returns (bytes32);\n}\n"
      },
      "lib/eigenlayer-contracts/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/ISlasher.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"./IStrategyManager.sol\";\nimport \"./IDelegationManager.sol\";\n\n/**\n * @title Interface for the primary 'slashing' contract for EigenLayer.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice See the `Slasher` contract itself for implementation details.\n */\ninterface ISlasher {\n    // struct used to store information about the current state of an operator's obligations to middlewares they are serving\n    struct MiddlewareTimes {\n        // 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\n        uint32 stalestUpdateBlock;\n        // The latest 'serveUntilBlock' from all of the middleware that the operator is serving\n        uint32 latestServeUntilBlock;\n    }\n\n    // struct used to store details relevant to a single middleware that an operator has opted-in to serving\n    struct MiddlewareDetails {\n        // the block at which the contract begins being able to finalize the operator's registration with the service via calling `recordFirstStakeUpdate`\n        uint32 registrationMayBeginAtBlock;\n        // the block before which the contract is allowed to slash the user\n        uint32 contractCanSlashOperatorUntilBlock;\n        // the block at which the middleware's view of the operator's stake was most recently updated\n        uint32 latestUpdateBlock;\n    }\n\n    /// @notice Emitted when a middleware times is added to `operator`'s array.\n    event MiddlewareTimesAdded(\n        address operator, uint256 index, uint32 stalestUpdateBlock, uint32 latestServeUntilBlock\n    );\n\n    /// @notice Emitted when `operator` begins to allow `contractAddress` to slash them.\n    event OptedIntoSlashing(address indexed operator, address indexed contractAddress);\n\n    /// @notice Emitted when `contractAddress` signals that it will no longer be able to slash `operator` after the `contractCanSlashOperatorUntilBlock`.\n    event SlashingAbilityRevoked(\n        address indexed operator, address indexed contractAddress, uint32 contractCanSlashOperatorUntilBlock\n    );\n\n    /**\n     * @notice Emitted when `slashingContract` 'freezes' the `slashedOperator`.\n     * @dev The `slashingContract` must have permission to slash the `slashedOperator`, i.e. `canSlash(slasherOperator, slashingContract)` must return 'true'.\n     */\n    event OperatorFrozen(address indexed slashedOperator, address indexed slashingContract);\n\n    /// @notice Emitted when `previouslySlashedAddress` is 'unfrozen', allowing them to again move deposited funds within EigenLayer.\n    event FrozenStatusReset(address indexed previouslySlashedAddress);\n\n    /**\n     * @notice Gives the `contractAddress` permission to slash the funds of the caller.\n     * @dev Typically, this function must be called prior to registering for a middleware.\n     */\n    function optIntoSlashing(address contractAddress) external;\n\n    /**\n     * @notice Used for 'slashing' a certain operator.\n     * @param toBeFrozen The operator to be frozen.\n     * @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.\n     * @dev The operator must have previously given the caller (which should be a contract) the ability to slash them, through a call to `optIntoSlashing`.\n     */\n    function freezeOperator(address toBeFrozen) external;\n\n    /**\n     * @notice Removes the 'frozen' status from each of the `frozenAddresses`\n     * @dev Callable only by the contract owner (i.e. governance).\n     */\n    function resetFrozenStatus(address[] calldata frozenAddresses) external;\n\n    /**\n     * @notice this function is a called by middlewares during an operator's registration to make sure the operator's stake at registration\n     *         is slashable until serveUntil\n     * @param operator the operator whose stake update is being recorded\n     * @param serveUntilBlock the block until which the operator's stake at the current block is slashable\n     * @dev adds the middleware's slashing contract to the operator's linked list\n     */\n    function recordFirstStakeUpdate(address operator, uint32 serveUntilBlock) external;\n\n    /**\n     * @notice this function is a called by middlewares during a stake update for an operator (perhaps to free pending withdrawals)\n     *         to make sure the operator's stake at updateBlock is slashable until serveUntil\n     * @param operator the operator whose stake update is being recorded\n     * @param updateBlock the block for which the stake update is being recorded\n     * @param serveUntilBlock the block until which the operator's stake at updateBlock is slashable\n     * @param insertAfter the element of the operators linked list that the currently updating middleware should be inserted after\n     * @dev insertAfter should be calculated offchain before making the transaction that calls this. this is subject to race conditions,\n     *      but it is anticipated to be rare and not detrimental.\n     */\n    function recordStakeUpdate(address operator, uint32 updateBlock, uint32 serveUntilBlock, uint256 insertAfter)\n        external;\n\n    /**\n     * @notice this function is a called by middlewares during an operator's deregistration to make sure the operator's stake at deregistration\n     *         is slashable until serveUntil\n     * @param operator the operator whose stake update is being recorded\n     * @param serveUntilBlock the block until which the operator's stake at the current block is slashable\n     * @dev removes the middleware's slashing contract to the operator's linked list and revokes the middleware's (i.e. caller's) ability to\n     * slash `operator` once `serveUntil` is reached\n     */\n    function recordLastStakeUpdateAndRevokeSlashingAbility(address operator, uint32 serveUntilBlock) external;\n\n    /// @notice The StrategyManager contract of EigenLayer\n    function strategyManager() external view returns (IStrategyManager);\n\n    /// @notice The DelegationManager contract of EigenLayer\n    function delegation() external view returns (IDelegationManager);\n\n    /**\n     * @notice Used to determine whether `staker` is actively 'frozen'. If a staker is frozen, then they are potentially subject to\n     * slashing of their funds, and cannot cannot deposit or withdraw from the strategyManager until the slashing process is completed\n     * and the staker's status is reset (to 'unfrozen').\n     * @param staker The staker of interest.\n     * @return Returns 'true' if `staker` themselves has their status set to frozen, OR if the staker is delegated\n     * to an operator who has their status set to frozen. Otherwise returns 'false'.\n     */\n    function isFrozen(address staker) external view returns (bool);\n\n    /// @notice Returns true if `slashingContract` is currently allowed to slash `toBeSlashed`.\n    function canSlash(address toBeSlashed, address slashingContract) external view returns (bool);\n\n    /// @notice Returns the block until which `serviceContract` is allowed to slash the `operator`.\n    function contractCanSlashOperatorUntilBlock(address operator, address serviceContract)\n        external\n        view\n        returns (uint32);\n\n    /// @notice Returns the block at which the `serviceContract` last updated its view of the `operator`'s stake\n    function latestUpdateBlock(address operator, address serviceContract) external view returns (uint32);\n\n    /// @notice A search routine for finding the correct input value of `insertAfter` to `recordStakeUpdate` / `_updateMiddlewareList`.\n    function getCorrectValueForInsertAfter(address operator, uint32 updateBlock) external view returns (uint256);\n\n    /**\n     * @notice Returns 'true' if `operator` can currently complete a withdrawal started at the `withdrawalStartBlock`, with `middlewareTimesIndex` used\n     * to specify the index of a `MiddlewareTimes` struct in the operator's list (i.e. an index in `operatorToMiddlewareTimes[operator]`). The specified\n     * struct is consulted as proof of the `operator`'s ability (or lack thereof) to complete the withdrawal.\n     * This function will return 'false' if the operator cannot currently complete a withdrawal started at the `withdrawalStartBlock`, *or* in the event\n     * that an incorrect `middlewareTimesIndex` is supplied, even if one or more correct inputs exist.\n     * @param operator Either the operator who queued the withdrawal themselves, or if the withdrawing party is a staker who delegated to an operator,\n     * this address is the operator *who the staker was delegated to* at the time of the `withdrawalStartBlock`.\n     * @param withdrawalStartBlock The block number at which the withdrawal was initiated.\n     * @param middlewareTimesIndex Indicates an index in `operatorToMiddlewareTimes[operator]` to consult as proof of the `operator`'s ability to withdraw\n     * @dev The correct `middlewareTimesIndex` input should be computable off-chain.\n     */\n    function canWithdraw(address operator, uint32 withdrawalStartBlock, uint256 middlewareTimesIndex)\n        external\n        returns (bool);\n\n    /**\n     * operator =>\n     *  [\n     *      (\n     *          the least recent update block of all of the middlewares it's serving/served,\n     *          latest time that the stake bonded at that update needed to serve until\n     *      )\n     *  ]\n     */\n    function operatorToMiddlewareTimes(address operator, uint256 arrayIndex)\n        external\n        view\n        returns (MiddlewareTimes memory);\n\n    /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator].length`\n    function middlewareTimesLength(address operator) external view returns (uint256);\n\n    /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].stalestUpdateBlock`.\n    function getMiddlewareTimesIndexStalestUpdateBlock(address operator, uint32 index) external view returns (uint32);\n\n    /// @notice Getter function for fetching `operatorToMiddlewareTimes[operator][index].latestServeUntil`.\n    function getMiddlewareTimesIndexServeUntilBlock(address operator, uint32 index) external view returns (uint32);\n\n    /// @notice Getter function for fetching `_operatorToWhitelistedContractsByUpdate[operator].size`.\n    function operatorWhitelistedContractsLinkedListSize(address operator) external view returns (uint256);\n\n    /// @notice Getter function for fetching a single node in the operator's linked list (`_operatorToWhitelistedContractsByUpdate[operator]`).\n    function operatorWhitelistedContractsLinkedListEntry(address operator, address node)\n        external\n        view\n        returns (bool, uint256, uint256);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IEigenPodManager.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\";\nimport \"./IETHPOSDeposit.sol\";\nimport \"./IStrategyManager.sol\";\nimport \"./IEigenPod.sol\";\nimport \"./IBeaconChainOracle.sol\";\nimport \"./IPausable.sol\";\nimport \"./ISlasher.sol\";\nimport \"./IStrategy.sol\";\n\n/**\n * @title Interface for factory that creates and manages solo staking pods that have their withdrawal credentials pointed to EigenLayer.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n */\ninterface IEigenPodManager is IPausable {\n    /// @notice Emitted to notify the update of the beaconChainOracle address\n    event BeaconOracleUpdated(address indexed newOracleAddress);\n\n    /// @notice Emitted to notify the deployment of an EigenPod\n    event PodDeployed(address indexed eigenPod, address indexed podOwner);\n\n    /// @notice Emitted to notify a deposit of beacon chain ETH recorded in the strategy manager\n    event BeaconChainETHDeposited(address indexed podOwner, uint256 amount);\n\n    /// @notice Emitted when the balance of an EigenPod is updated\n    event PodSharesUpdated(address indexed podOwner, int256 sharesDelta);\n\n    /// @notice Emitted when a withdrawal of beacon chain ETH is completed\n    event BeaconChainETHWithdrawalCompleted(\n        address indexed podOwner,\n        uint256 shares,\n        uint96 nonce,\n        address delegatedAddress,\n        address withdrawer,\n        bytes32 withdrawalRoot\n    );\n\n    event DenebForkTimestampUpdated(uint64 newValue);\n\n    /**\n     * @notice Creates an EigenPod for the sender.\n     * @dev Function will revert if the `msg.sender` already has an EigenPod.\n     * @dev Returns EigenPod address\n     */\n    function createPod() external returns (address);\n\n    /**\n     * @notice Stakes for a new beacon chain validator on the sender's EigenPod.\n     * Also creates an EigenPod for the sender if they don't have one already.\n     * @param pubkey The 48 bytes public key of the beacon chain validator.\n     * @param signature The validator's signature of the deposit data.\n     * @param depositDataRoot The root/hash of the deposit data for the validator's deposit.\n     */\n    function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable;\n\n    /**\n     * @notice Changes the `podOwner`'s shares by `sharesDelta` and performs a call to the DelegationManager\n     * to ensure that delegated shares are also tracked correctly\n     * @param podOwner is the pod owner whose balance is being updated.\n     * @param sharesDelta is the change in podOwner's beaconChainETHStrategy shares\n     * @dev Callable only by the podOwner's EigenPod contract.\n     * @dev Reverts if `sharesDelta` is not a whole Gwei amount\n     */\n    function recordBeaconChainETHBalanceUpdate(address podOwner, int256 sharesDelta) external;\n\n    /**\n     * @notice Updates the oracle contract that provides the beacon chain state root\n     * @param newBeaconChainOracle is the new oracle contract being pointed to\n     * @dev Callable only by the owner of this contract (i.e. governance)\n     */\n    function updateBeaconChainOracle(IBeaconChainOracle newBeaconChainOracle) external;\n\n    /// @notice Returns the address of the `podOwner`'s EigenPod if it has been deployed.\n    function ownerToPod(address podOwner) external view returns (IEigenPod);\n\n    /// @notice Returns the address of the `podOwner`'s EigenPod (whether it is deployed yet or not).\n    function getPod(address podOwner) external view returns (IEigenPod);\n\n    /// @notice The ETH2 Deposit Contract\n    function ethPOS() external view returns (IETHPOSDeposit);\n\n    /// @notice Beacon proxy to which the EigenPods point\n    function eigenPodBeacon() external view returns (IBeacon);\n\n    /// @notice Oracle contract that provides updates to the beacon chain's state\n    function beaconChainOracle() external view returns (IBeaconChainOracle);\n\n    /// @notice Returns the beacon block root at `timestamp`. Reverts if the Beacon block root at `timestamp` has not yet been finalized.\n    function getBlockRootAtTimestamp(uint64 timestamp) external view returns (bytes32);\n\n    /// @notice EigenLayer's StrategyManager contract\n    function strategyManager() external view returns (IStrategyManager);\n\n    /// @notice EigenLayer's Slasher contract\n    function slasher() external view returns (ISlasher);\n\n    /// @notice Returns 'true' if the `podOwner` has created an EigenPod, and 'false' otherwise.\n    function hasPod(address podOwner) external view returns (bool);\n\n    /// @notice Returns the number of EigenPods that have been created\n    function numPods() external view returns (uint256);\n\n    /**\n     * @notice Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy.\n     * @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\n     * decrease between the pod owner queuing and completing a withdrawal.\n     * When the pod owner's shares would otherwise increase, this \"deficit\" is decreased first _instead_.\n     * Likewise, when a withdrawal is completed, this \"deficit\" is decreased and the withdrawal amount is decreased; We can think of this\n     * as the withdrawal \"paying off the deficit\".\n     */\n    function podOwnerShares(address podOwner) external view returns (int256);\n\n    /// @notice returns canonical, virtual beaconChainETH strategy\n    function beaconChainETHStrategy() external view returns (IStrategy);\n\n    /**\n     * @notice Used by the DelegationManager to remove a pod owner's shares while they're in the withdrawal queue.\n     * Simply decreases the `podOwner`'s shares by `shares`, down to a minimum of zero.\n     * @dev This function reverts if it would result in `podOwnerShares[podOwner]` being less than zero, i.e. it is forbidden for this function to\n     * result in the `podOwner` incurring a \"share deficit\". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive\n     * shares from the operator to whom the staker is delegated.\n     * @dev Reverts if `shares` is not a whole Gwei amount\n     */\n    function removeShares(address podOwner, uint256 shares) external;\n\n    /**\n     * @notice Increases the `podOwner`'s shares by `shares`, paying off deficit if possible.\n     * Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue\n     * @dev Returns the number of shares added to `podOwnerShares[podOwner]` above zero, which will be less than the `shares` input\n     * in the event that the podOwner has an existing shares deficit (i.e. `podOwnerShares[podOwner]` starts below zero)\n     * @dev Reverts if `shares` is not a whole Gwei amount\n     */\n    function addShares(address podOwner, uint256 shares) external returns (uint256);\n\n    /**\n     * @notice Used by the DelegationManager to complete a withdrawal, sending tokens to some destination address\n     * @dev Prioritizes decreasing the podOwner's share deficit, if they have one\n     * @dev Reverts if `shares` is not a whole Gwei amount\n     */\n    function withdrawSharesAsTokens(address podOwner, address destination, uint256 shares) external;\n\n    /**\n     * @notice the deneb hard fork timestamp used to determine which proof path to use for proving a withdrawal\n     */\n    function denebForkTimestamp() external view returns (uint64);\n\n    /**\n     * setting the deneb hard fork timestamp by the eigenPodManager owner\n     * @dev this function is designed to be called twice.  Once, it is set to type(uint64).max\n     * prior to the actual deneb fork timestamp being set, and then the second time it is set\n     * to the actual deneb fork timestamp.\n     */\n    function setDenebForkTimestamp(uint64 newDenebForkTimestamp) external;\n}\n"
      },
      "lib/eigenlayer-contracts/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IETHPOSDeposit.sol": {
        "content": "// ┏━━━┓━┏┓━┏┓━━┏━━━┓━━┏━━━┓━━━━┏━━━┓━━━━━━━━━━━━━━━━━━━┏┓━━━━━┏━━━┓━━━━━━━━━┏┓━━━━━━━━━━━━━━┏┓━\n// ┃┏━━┛┏┛┗┓┃┃━━┃┏━┓┃━━┃┏━┓┃━━━━┗┓┏┓┃━━━━━━━━━━━━━━━━━━┏┛┗┓━━━━┃┏━┓┃━━━━━━━━┏┛┗┓━━━━━━━━━━━━┏┛┗┓\n// ┃┗━━┓┗┓┏┛┃┗━┓┗┛┏┛┃━━┃┃━┃┃━━━━━┃┃┃┃┏━━┓┏━━┓┏━━┓┏━━┓┏┓┗┓┏┛━━━━┃┃━┗┛┏━━┓┏━┓━┗┓┏┛┏━┓┏━━┓━┏━━┓┗┓┏┛\n// ┃┏━━┛━┃┃━┃┏┓┃┏━┛┏┛━━┃┃━┃┃━━━━━┃┃┃┃┃┏┓┃┃┏┓┃┃┏┓┃┃━━┫┣┫━┃┃━━━━━┃┃━┏┓┃┏┓┃┃┏┓┓━┃┃━┃┏┛┗━┓┃━┃┏━┛━┃┃━\n// ┃┗━━┓━┃┗┓┃┃┃┃┃┃┗━┓┏┓┃┗━┛┃━━━━┏┛┗┛┃┃┃━┫┃┗┛┃┃┗┛┃┣━━┃┃┃━┃┗┓━━━━┃┗━┛┃┃┗┛┃┃┃┃┃━┃┗┓┃┃━┃┗┛┗┓┃┗━┓━┃┗┓\n// ┗━━━┛━┗━┛┗┛┗┛┗━━━┛┗┛┗━━━┛━━━━┗━━━┛┗━━┛┃┏━┛┗━━┛┗━━┛┗┛━┗━┛━━━━┗━━━┛┗━━┛┗┛┗┛━┗━┛┗┛━┗━━━┛┗━━┛━┗━┛\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┃┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┗┛━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n// SPDX-License-Identifier: CC0-1.0\n\npragma solidity >=0.5.0;\n\n// This interface is designed to be compatible with the Vyper version.\n/// @notice This is the Ethereum 2.0 deposit contract interface.\n/// For more information see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs\ninterface IETHPOSDeposit {\n    /// @notice A processed deposit event.\n    event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index);\n\n    /// @notice Submit a Phase 0 DepositData object.\n    /// @param pubkey A BLS12-381 public key.\n    /// @param withdrawal_credentials Commitment to a public key for withdrawals.\n    /// @param signature A BLS12-381 signature.\n    /// @param deposit_data_root The SHA-256 hash of the SSZ-encoded DepositData object.\n    /// Used as a protection against malformed input.\n    function deposit(\n        bytes calldata pubkey,\n        bytes calldata withdrawal_credentials,\n        bytes calldata signature,\n        bytes32 deposit_data_root\n    ) external payable;\n\n    /// @notice Query the current deposit root hash.\n    /// @return The deposit root hash.\n    function get_deposit_root() external view returns (bytes32);\n\n    /// @notice Query the current deposit count.\n    /// @return The deposit count encoded as a little endian 64-bit number.\n    function get_deposit_count() external view returns (bytes memory);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IEigenPod.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"../libraries/BeaconChainProofs.sol\";\nimport \"./IEigenPodManager.sol\";\nimport \"./IBeaconChainOracle.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title The implementation contract used for restaking beacon chain ETH on EigenLayer\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice The main functionalities are:\n * - creating new ETH validators with their withdrawal credentials pointed to this contract\n * - proving from beacon chain state roots that withdrawal credentials are pointed to this contract\n * - proving from beacon chain state roots the balances of ETH validators with their withdrawal credentials\n *   pointed to this contract\n * - updating aggregate balances in the EigenPodManager\n * - withdrawing eth when withdrawals are initiated\n * @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose\n *   to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts\n */\ninterface IEigenPod {\n    enum VALIDATOR_STATUS {\n        INACTIVE, // doesnt exist\n        ACTIVE, // staked on ethpos and withdrawal credentials are pointed to the EigenPod\n        WITHDRAWN // withdrawn from the Beacon Chain\n\n    }\n\n    struct ValidatorInfo {\n        // index of the validator in the beacon chain\n        uint64 validatorIndex;\n        // amount of beacon chain ETH restaked on EigenLayer in gwei\n        uint64 restakedBalanceGwei;\n        //timestamp of the validator's most recent balance update\n        uint64 mostRecentBalanceUpdateTimestamp;\n        // status of the validator\n        VALIDATOR_STATUS status;\n    }\n\n    /**\n     * @notice struct used to store amounts related to proven withdrawals in memory. Used to help\n     * manage stack depth and optimize the number of external calls, when batching withdrawal operations.\n     */\n    struct VerifiedWithdrawal {\n        // amount to send to a podOwner from a proven withdrawal\n        uint256 amountToSendGwei;\n        // difference in shares to be recorded in the eigenPodManager, as a result of the withdrawal\n        int256 sharesDeltaGwei;\n    }\n\n    enum PARTIAL_WITHDRAWAL_CLAIM_STATUS {\n        REDEEMED,\n        PENDING,\n        FAILED\n    }\n\n    /// @notice Emitted when an ETH validator stakes via this eigenPod\n    event EigenPodStaked(bytes pubkey);\n\n    /// @notice Emitted when an ETH validator's withdrawal credentials are successfully verified to be pointed to this eigenPod\n    event ValidatorRestaked(uint40 validatorIndex);\n\n    /// @notice Emitted when an ETH validator's  balance is proven to be updated.  Here newValidatorBalanceGwei\n    //  is the validator's balance that is credited on EigenLayer.\n    event ValidatorBalanceUpdated(uint40 validatorIndex, uint64 balanceTimestamp, uint64 newValidatorBalanceGwei);\n\n    /// @notice Emitted when an ETH validator is prove to have withdrawn from the beacon chain\n    event FullWithdrawalRedeemed(\n        uint40 validatorIndex, uint64 withdrawalTimestamp, address indexed recipient, uint64 withdrawalAmountGwei\n    );\n\n    /// @notice Emitted when a partial withdrawal claim is successfully redeemed\n    event PartialWithdrawalRedeemed(\n        uint40 validatorIndex, uint64 withdrawalTimestamp, address indexed recipient, uint64 partialWithdrawalAmountGwei\n    );\n\n    /// @notice Emitted when restaked beacon chain ETH is withdrawn from the eigenPod.\n    event RestakedBeaconChainETHWithdrawn(address indexed recipient, uint256 amount);\n\n    /// @notice Emitted when podOwner enables restaking\n    event RestakingActivated(address indexed podOwner);\n\n    /// @notice Emitted when ETH is received via the `receive` fallback\n    event NonBeaconChainETHReceived(uint256 amountReceived);\n\n    /// @notice Emitted when ETH that was previously received via the `receive` fallback is withdrawn\n    event NonBeaconChainETHWithdrawn(address indexed recipient, uint256 amountWithdrawn);\n\n    /// @notice The max amount of eth, in gwei, that can be restaked per validator\n    function MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR() external view returns (uint64);\n\n    /// @notice the amount of execution layer ETH in this contract that is staked in EigenLayer (i.e. withdrawn from beaconchain but not EigenLayer),\n    function withdrawableRestakedExecutionLayerGwei() external view returns (uint64);\n\n    /// @notice any ETH deposited into the EigenPod contract via the `receive` fallback function\n    function nonBeaconChainETHBalanceWei() external view returns (uint256);\n\n    /// @notice Used to initialize the pointers to contracts crucial to the pod's functionality, in beacon proxy construction from EigenPodManager\n    function initialize(address owner) external;\n\n    /// @notice Called by EigenPodManager when the owner wants to create another ETH validator.\n    function stake(bytes calldata pubkey, bytes calldata signature, bytes32 depositDataRoot) external payable;\n\n    /**\n     * @notice Transfers `amountWei` in ether from this contract to the specified `recipient` address\n     * @notice Called by EigenPodManager to withdrawBeaconChainETH that has been added to the EigenPod's balance due to a withdrawal from the beacon chain.\n     * @dev The podOwner must have already proved sufficient withdrawals, so that this pod's `withdrawableRestakedExecutionLayerGwei` exceeds the\n     * `amountWei` input (when converted to GWEI).\n     * @dev Reverts if `amountWei` is not a whole Gwei amount\n     */\n    function withdrawRestakedBeaconChainETH(address recipient, uint256 amount) external;\n\n    /// @notice The single EigenPodManager for EigenLayer\n    function eigenPodManager() external view returns (IEigenPodManager);\n\n    /// @notice The owner of this EigenPod\n    function podOwner() external view returns (address);\n\n    /// @notice an indicator of whether or not the podOwner has ever \"fully restaked\" by successfully calling `verifyCorrectWithdrawalCredentials`.\n    function hasRestaked() external view returns (bool);\n\n    /**\n     * @notice The latest timestamp at which the pod owner withdrew the balance of the pod, via calling `withdrawBeforeRestaking`.\n     * @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.\n     * Proofs for this pod are only valid against Beacon Chain state roots corresponding to timestamps after the stored `mostRecentWithdrawalTimestamp`.\n     */\n    function mostRecentWithdrawalTimestamp() external view returns (uint64);\n\n    /// @notice Returns the validatorInfo struct for the provided pubkeyHash\n    function validatorPubkeyHashToInfo(bytes32 validatorPubkeyHash) external view returns (ValidatorInfo memory);\n\n    /// @notice Returns the validatorInfo struct for the provided pubkey\n    function validatorPubkeyToInfo(bytes calldata validatorPubkey) external view returns (ValidatorInfo memory);\n\n    ///@notice mapping that tracks proven withdrawals\n    function provenWithdrawal(bytes32 validatorPubkeyHash, uint64 slot) external view returns (bool);\n\n    /// @notice This returns the status of a given validator\n    function validatorStatus(bytes32 pubkeyHash) external view returns (VALIDATOR_STATUS);\n\n    /// @notice This returns the status of a given validator pubkey\n    function validatorStatus(bytes calldata validatorPubkey) external view returns (VALIDATOR_STATUS);\n\n    /**\n     * @notice This function verifies that the withdrawal credentials of validator(s) owned by the podOwner are pointed to\n     * 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\n     * root, marks the validator as 'active' in EigenLayer, and credits the restaked ETH in Eigenlayer.\n     * @param oracleTimestamp is the Beacon Chain timestamp whose state root the `proof` will be proven against.\n     * @param validatorIndices is the list of indices of the validators being proven, refer to consensus specs\n     * @param withdrawalCredentialProofs is an array of proofs, where each proof proves each ETH validator's balance and withdrawal credentials\n     * against a beacon chain state root\n     * @param validatorFields are the fields of the \"Validator Container\", refer to consensus specs\n     * for details: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator\n     */\n    function verifyWithdrawalCredentials(\n        uint64 oracleTimestamp,\n        BeaconChainProofs.StateRootProof calldata stateRootProof,\n        uint40[] calldata validatorIndices,\n        bytes[] calldata withdrawalCredentialProofs,\n        bytes32[][] calldata validatorFields\n    ) external;\n\n    /**\n     * @notice This function records an update (either increase or decrease) in the pod's balance in the StrategyManager.\n     *            It also verifies a merkle proof of the validator's current beacon chain balance.\n     * @param oracleTimestamp The oracleTimestamp whose state root the `proof` will be proven against.\n     *        Must be within `VERIFY_BALANCE_UPDATE_WINDOW_SECONDS` of the current block.\n     * @param validatorIndices is the list of indices of the validators being proven, refer to consensus specs\n     * @param validatorFieldsProofs proofs against the `beaconStateRoot` for each validator in `validatorFields`\n     * @param validatorFields are the fields of the \"Validator Container\", refer to consensus specs\n     * @dev For more details on the Beacon Chain spec, see: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator\n     */\n    function verifyBalanceUpdates(\n        uint64 oracleTimestamp,\n        uint40[] calldata validatorIndices,\n        BeaconChainProofs.StateRootProof calldata stateRootProof,\n        bytes[] calldata validatorFieldsProofs,\n        bytes32[][] calldata validatorFields\n    ) external;\n\n    /**\n     * @notice This function records full and partial withdrawals on behalf of one of the Ethereum validators for this EigenPod\n     * @param oracleTimestamp is the timestamp of the oracle slot that the withdrawal is being proven against\n     * @param withdrawalProofs is the information needed to check the veracity of the block numbers and withdrawals being proven\n     * @param validatorFieldsProofs is the proof of the validator's fields' in the validator tree\n     * @param withdrawalFields are the fields of the withdrawals being proven\n     * @param validatorFields are the fields of the validators being proven\n     */\n    function verifyAndProcessWithdrawals(\n        uint64 oracleTimestamp,\n        BeaconChainProofs.StateRootProof calldata stateRootProof,\n        BeaconChainProofs.WithdrawalProof[] calldata withdrawalProofs,\n        bytes[] calldata validatorFieldsProofs,\n        bytes32[][] calldata validatorFields,\n        bytes32[][] calldata withdrawalFields\n    ) external;\n\n    /**\n     * @notice Called by the pod owner to activate restaking by withdrawing\n     * all existing ETH from the pod and preventing further withdrawals via\n     * \"withdrawBeforeRestaking()\"\n     */\n    function activateRestaking() external;\n\n    /// @notice Called by the pod owner to withdraw the balance of the pod when `hasRestaked` is set to false\n    function withdrawBeforeRestaking() external;\n\n    /// @notice Called by the pod owner to withdraw the nonBeaconChainETHBalanceWei\n    function withdrawNonBeaconChainETHBalanceWei(address recipient, uint256 amountToWithdraw) external;\n\n    /// @notice called by owner of a pod to remove any ERC20s deposited in the pod\n    function recoverTokens(IERC20[] memory tokenList, uint256[] memory amountsToWithdraw, address recipient) external;\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IBeaconChainOracle.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\n/**\n * @title Interface for the BeaconStateOracle contract.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n */\ninterface IBeaconChainOracle {\n    /// @notice The block number to state root mapping.\n    function timestampToBlockRoot(uint256 timestamp) external view returns (bytes32);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IPausable.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport \"../interfaces/IPauserRegistry.sol\";\n\n/**\n * @title Adds pausability to a contract, with pausing & unpausing controlled by the `pauser` and `unpauser` of a PauserRegistry contract.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n * @notice Contracts that inherit from this contract may define their own `pause` and `unpause` (and/or related) functions.\n * These functions should be permissioned as \"onlyPauser\" which defers to a `PauserRegistry` for determining access control.\n * @dev Pausability is implemented using a uint256, which allows up to 256 different single bit-flags; each bit can potentially pause different functionality.\n * Inspiration for this was taken from the NearBridge design here https://etherscan.io/address/0x3FEFc5A4B1c02f21cBc8D3613643ba0635b9a873#code.\n * 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,\n * you can only flip (any number of) switches to off/0 (aka \"paused\").\n * If you want a pauseXYZ function that just flips a single bit / \"pausing flag\", it will:\n * 1) 'bit-wise and' (aka `&`) a flag with the current paused state (as a uint256)\n * 2) update the paused state to this new value\n * @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`\n * indicates specifically that if the *third bit* of `_paused` is flipped -- i.e. it is a '1' -- then deposits should be paused\n */\ninterface IPausable {\n    /// @notice Emitted when the `pauserRegistry` is set to `newPauserRegistry`.\n    event PauserRegistrySet(IPauserRegistry pauserRegistry, IPauserRegistry newPauserRegistry);\n\n    /// @notice Emitted when the pause is triggered by `account`, and changed to `newPausedStatus`.\n    event Paused(address indexed account, uint256 newPausedStatus);\n\n    /// @notice Emitted when the pause is lifted by `account`, and changed to `newPausedStatus`.\n    event Unpaused(address indexed account, uint256 newPausedStatus);\n\n    /// @notice Address of the `PauserRegistry` contract that this contract defers to for determining access control (for pausing).\n    function pauserRegistry() external view returns (IPauserRegistry);\n\n    /**\n     * @notice This function is used to pause an EigenLayer contract's functionality.\n     * It is permissioned to the `pauser` address, which is expected to be a low threshold multisig.\n     * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once.\n     * @dev This function can only pause functionality, and thus cannot 'unflip' any bit in `_paused` from 1 to 0.\n     */\n    function pause(uint256 newPausedStatus) external;\n\n    /**\n     * @notice Alias for `pause(type(uint256).max)`.\n     */\n    function pauseAll() external;\n\n    /**\n     * @notice This function is used to unpause an EigenLayer contract's functionality.\n     * It is permissioned to the `unpauser` address, which is expected to be a high threshold multisig or governance contract.\n     * @param newPausedStatus represents the new value for `_paused` to take, which means it may flip several bits at once.\n     * @dev This function can only unpause functionality, and thus cannot 'flip' any bit in `_paused` from 0 to 1.\n     */\n    function unpause(uint256 newPausedStatus) external;\n\n    /// @notice Returns the current paused status as a uint256.\n    function paused() external view returns (uint256);\n\n    /// @notice Returns 'true' if the `indexed`th bit of `_paused` is 1, and 'false' otherwise\n    function paused(uint8 index) external view returns (bool);\n\n    /// @notice Allows the unpauser to set a new pauser registry\n    function setPauserRegistry(IPauserRegistry newPauserRegistry) external;\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/libraries/BeaconChainProofs.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\n\nimport \"./Merkle.sol\";\nimport \"../libraries/Endian.sol\";\n\n//Utility library for parsing and PHASE0 beacon chain block headers\n//SSZ Spec: https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md#merkleization\n//BeaconBlockHeader Spec: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconblockheader\n//BeaconState Spec: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconstate\nlibrary BeaconChainProofs {\n    // constants are the number of fields and the heights of the different merkle trees used in merkleizing beacon chain containers\n    uint256 internal constant BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT = 3;\n\n    uint256 internal constant BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT = 4;\n\n    uint256 internal constant BEACON_STATE_FIELD_TREE_HEIGHT = 5;\n\n    uint256 internal constant VALIDATOR_FIELD_TREE_HEIGHT = 3;\n\n    //Note: changed in the deneb hard fork from 4->5\n    uint256 internal constant EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT_DENEB = 5;\n    uint256 internal constant EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT_CAPELLA = 4;\n\n    // SLOTS_PER_HISTORICAL_ROOT = 2**13, so tree height is 13\n    uint256 internal constant BLOCK_ROOTS_TREE_HEIGHT = 13;\n\n    //HISTORICAL_ROOTS_LIMIT = 2**24, so tree height is 24\n    uint256 internal constant HISTORICAL_SUMMARIES_TREE_HEIGHT = 24;\n\n    //Index of block_summary_root in historical_summary container\n    uint256 internal constant BLOCK_SUMMARY_ROOT_INDEX = 0;\n\n    // tree height for hash tree of an individual withdrawal container\n    uint256 internal constant WITHDRAWAL_FIELD_TREE_HEIGHT = 2;\n\n    uint256 internal constant VALIDATOR_TREE_HEIGHT = 40;\n\n    // MAX_WITHDRAWALS_PER_PAYLOAD = 2**4, making tree height = 4\n    uint256 internal constant WITHDRAWALS_TREE_HEIGHT = 4;\n\n    //in beacon block body https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#beaconblockbody\n    uint256 internal constant EXECUTION_PAYLOAD_INDEX = 9;\n\n    // in beacon block header https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconblockheader\n    uint256 internal constant SLOT_INDEX = 0;\n    uint256 internal constant STATE_ROOT_INDEX = 3;\n    uint256 internal constant BODY_ROOT_INDEX = 4;\n    // in beacon state https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#beaconstate\n    uint256 internal constant VALIDATOR_TREE_ROOT_INDEX = 11;\n    uint256 internal constant HISTORICAL_SUMMARIES_INDEX = 27;\n\n    // in validator https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator\n    uint256 internal constant VALIDATOR_PUBKEY_INDEX = 0;\n    uint256 internal constant VALIDATOR_WITHDRAWAL_CREDENTIALS_INDEX = 1;\n    uint256 internal constant VALIDATOR_BALANCE_INDEX = 2;\n    uint256 internal constant VALIDATOR_WITHDRAWABLE_EPOCH_INDEX = 7;\n\n    // in execution payload header\n    uint256 internal constant TIMESTAMP_INDEX = 9;\n\n    //in execution payload\n    uint256 internal constant WITHDRAWALS_INDEX = 14;\n\n    // in withdrawal\n    uint256 internal constant WITHDRAWAL_VALIDATOR_INDEX_INDEX = 1;\n    uint256 internal constant WITHDRAWAL_VALIDATOR_AMOUNT_INDEX = 3;\n\n    //Misc Constants\n\n    /// @notice The number of slots each epoch in the beacon chain\n    uint64 internal constant SLOTS_PER_EPOCH = 32;\n\n    /// @notice The number of seconds in a slot in the beacon chain\n    uint64 internal constant SECONDS_PER_SLOT = 12;\n\n    /// @notice Number of seconds per epoch: 384 == 32 slots/epoch * 12 seconds/slot\n    uint64 internal constant SECONDS_PER_EPOCH = SLOTS_PER_EPOCH * SECONDS_PER_SLOT;\n\n    bytes8 internal constant UINT64_MASK = 0xffffffffffffffff;\n\n    /// @notice This struct contains the merkle proofs and leaves needed to verify a partial/full withdrawal\n    struct WithdrawalProof {\n        bytes withdrawalProof;\n        bytes slotProof;\n        bytes executionPayloadProof;\n        bytes timestampProof;\n        bytes historicalSummaryBlockRootProof;\n        uint64 blockRootIndex;\n        uint64 historicalSummaryIndex;\n        uint64 withdrawalIndex;\n        bytes32 blockRoot;\n        bytes32 slotRoot;\n        bytes32 timestampRoot;\n        bytes32 executionPayloadRoot;\n    }\n\n    /// @notice This struct contains the root and proof for verifying the state root against the oracle block root\n    struct StateRootProof {\n        bytes32 beaconStateRoot;\n        bytes proof;\n    }\n\n    /**\n     * @notice This function verifies merkle proofs of the fields of a certain validator against a beacon chain state root\n     * @param validatorIndex the index of the proven validator\n     * @param beaconStateRoot is the beacon chain state root to be proven against.\n     * @param validatorFieldsProof is the data used in proving the validator's fields\n     * @param validatorFields the claimed fields of the validator\n     */\n    function verifyValidatorFields(\n        bytes32 beaconStateRoot,\n        bytes32[] calldata validatorFields,\n        bytes calldata validatorFieldsProof,\n        uint40 validatorIndex\n    ) internal view {\n        require(\n            validatorFields.length == 2 ** VALIDATOR_FIELD_TREE_HEIGHT,\n            \"BeaconChainProofs.verifyValidatorFields: Validator fields has incorrect length\"\n        );\n\n        /**\n         * Note: the length of the validator merkle proof is BeaconChainProofs.VALIDATOR_TREE_HEIGHT + 1.\n         * There is an additional layer added by hashing the root with the length of the validator list\n         */\n        require(\n            validatorFieldsProof.length == 32 * ((VALIDATOR_TREE_HEIGHT + 1) + BEACON_STATE_FIELD_TREE_HEIGHT),\n            \"BeaconChainProofs.verifyValidatorFields: Proof has incorrect length\"\n        );\n        uint256 index = (VALIDATOR_TREE_ROOT_INDEX << (VALIDATOR_TREE_HEIGHT + 1)) | uint256(validatorIndex);\n        // merkleize the validatorFields to get the leaf to prove\n        bytes32 validatorRoot = Merkle.merkleizeSha256(validatorFields);\n\n        // verify the proof of the validatorRoot against the beaconStateRoot\n        require(\n            Merkle.verifyInclusionSha256({\n                proof: validatorFieldsProof,\n                root: beaconStateRoot,\n                leaf: validatorRoot,\n                index: index\n            }),\n            \"BeaconChainProofs.verifyValidatorFields: Invalid merkle proof\"\n        );\n    }\n\n    /**\n     * @notice This function verifies the latestBlockHeader against the state root. the latestBlockHeader is\n     * a tracked in the beacon state.\n     * @param beaconStateRoot is the beacon chain state root to be proven against.\n     * @param stateRootProof is the provided merkle proof\n     * @param latestBlockRoot is hashtree root of the latest block header in the beacon state\n     */\n    function verifyStateRootAgainstLatestBlockRoot(\n        bytes32 latestBlockRoot,\n        bytes32 beaconStateRoot,\n        bytes calldata stateRootProof\n    ) internal view {\n        require(\n            stateRootProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT),\n            \"BeaconChainProofs.verifyStateRootAgainstLatestBlockRoot: Proof has incorrect length\"\n        );\n        //Next we verify the slot against the blockRoot\n        require(\n            Merkle.verifyInclusionSha256({\n                proof: stateRootProof,\n                root: latestBlockRoot,\n                leaf: beaconStateRoot,\n                index: STATE_ROOT_INDEX\n            }),\n            \"BeaconChainProofs.verifyStateRootAgainstLatestBlockRoot: Invalid latest block header root merkle proof\"\n        );\n    }\n\n    /**\n     * @notice This function verifies the slot and the withdrawal fields for a given withdrawal\n     * @param withdrawalProof is the provided set of merkle proofs\n     * @param withdrawalFields is the serialized withdrawal container to be proven\n     */\n    function verifyWithdrawal(\n        bytes32 beaconStateRoot,\n        bytes32[] calldata withdrawalFields,\n        WithdrawalProof calldata withdrawalProof,\n        uint64 denebForkTimestamp\n    ) internal view {\n        require(\n            withdrawalFields.length == 2 ** WITHDRAWAL_FIELD_TREE_HEIGHT,\n            \"BeaconChainProofs.verifyWithdrawal: withdrawalFields has incorrect length\"\n        );\n\n        require(\n            withdrawalProof.blockRootIndex < 2 ** BLOCK_ROOTS_TREE_HEIGHT,\n            \"BeaconChainProofs.verifyWithdrawal: blockRootIndex is too large\"\n        );\n        require(\n            withdrawalProof.withdrawalIndex < 2 ** WITHDRAWALS_TREE_HEIGHT,\n            \"BeaconChainProofs.verifyWithdrawal: withdrawalIndex is too large\"\n        );\n\n        require(\n            withdrawalProof.historicalSummaryIndex < 2 ** HISTORICAL_SUMMARIES_TREE_HEIGHT,\n            \"BeaconChainProofs.verifyWithdrawal: historicalSummaryIndex is too large\"\n        );\n\n        //Note: post deneb hard fork, the number of exection payload header fields increased from 15->17, adding an extra level to the tree height\n        uint256 executionPayloadHeaderFieldTreeHeight = (getWithdrawalTimestamp(withdrawalProof) < denebForkTimestamp)\n            ? EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT_CAPELLA\n            : EXECUTION_PAYLOAD_HEADER_FIELD_TREE_HEIGHT_DENEB;\n        require(\n            withdrawalProof.withdrawalProof.length\n                == 32 * (executionPayloadHeaderFieldTreeHeight + WITHDRAWALS_TREE_HEIGHT + 1),\n            \"BeaconChainProofs.verifyWithdrawal: withdrawalProof has incorrect length\"\n        );\n        require(\n            withdrawalProof.executionPayloadProof.length\n                == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT + BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT),\n            \"BeaconChainProofs.verifyWithdrawal: executionPayloadProof has incorrect length\"\n        );\n        require(\n            withdrawalProof.slotProof.length == 32 * (BEACON_BLOCK_HEADER_FIELD_TREE_HEIGHT),\n            \"BeaconChainProofs.verifyWithdrawal: slotProof has incorrect length\"\n        );\n        require(\n            withdrawalProof.timestampProof.length == 32 * (executionPayloadHeaderFieldTreeHeight),\n            \"BeaconChainProofs.verifyWithdrawal: timestampProof has incorrect length\"\n        );\n\n        require(\n            withdrawalProof.historicalSummaryBlockRootProof.length\n                == 32\n                    * (BEACON_STATE_FIELD_TREE_HEIGHT + (HISTORICAL_SUMMARIES_TREE_HEIGHT + 1) + 1 + (BLOCK_ROOTS_TREE_HEIGHT)),\n            \"BeaconChainProofs.verifyWithdrawal: historicalSummaryBlockRootProof has incorrect length\"\n        );\n        /**\n         * Note: Here, the \"1\" in \"1 + (BLOCK_ROOTS_TREE_HEIGHT)\" signifies that extra step of choosing the \"block_root_summary\" within the individual\n         * \"historical_summary\". Everywhere else it signifies merkelize_with_mixin, where the length of an array is hashed with the root of the array,\n         * but not here.\n         */\n        uint256 historicalBlockHeaderIndex = (\n            HISTORICAL_SUMMARIES_INDEX << ((HISTORICAL_SUMMARIES_TREE_HEIGHT + 1) + 1 + (BLOCK_ROOTS_TREE_HEIGHT))\n        ) | (uint256(withdrawalProof.historicalSummaryIndex) << (1 + (BLOCK_ROOTS_TREE_HEIGHT)))\n            | (BLOCK_SUMMARY_ROOT_INDEX << (BLOCK_ROOTS_TREE_HEIGHT)) | uint256(withdrawalProof.blockRootIndex);\n\n        require(\n            Merkle.verifyInclusionSha256({\n                proof: withdrawalProof.historicalSummaryBlockRootProof,\n                root: beaconStateRoot,\n                leaf: withdrawalProof.blockRoot,\n                index: historicalBlockHeaderIndex\n            }),\n            \"BeaconChainProofs.verifyWithdrawal: Invalid historicalsummary merkle proof\"\n        );\n\n        //Next we verify the slot against the blockRoot\n        require(\n            Merkle.verifyInclusionSha256({\n                proof: withdrawalProof.slotProof,\n                root: withdrawalProof.blockRoot,\n                leaf: withdrawalProof.slotRoot,\n                index: SLOT_INDEX\n            }),\n            \"BeaconChainProofs.verifyWithdrawal: Invalid slot merkle proof\"\n        );\n\n        {\n            // Next we verify the executionPayloadRoot against the blockRoot\n            uint256 executionPayloadIndex =\n                (BODY_ROOT_INDEX << (BEACON_BLOCK_BODY_FIELD_TREE_HEIGHT)) | EXECUTION_PAYLOAD_INDEX;\n            require(\n                Merkle.verifyInclusionSha256({\n                    proof: withdrawalProof.executionPayloadProof,\n                    root: withdrawalProof.blockRoot,\n                    leaf: withdrawalProof.executionPayloadRoot,\n                    index: executionPayloadIndex\n                }),\n                \"BeaconChainProofs.verifyWithdrawal: Invalid executionPayload merkle proof\"\n            );\n        }\n\n        // Next we verify the timestampRoot against the executionPayload root\n        require(\n            Merkle.verifyInclusionSha256({\n                proof: withdrawalProof.timestampProof,\n                root: withdrawalProof.executionPayloadRoot,\n                leaf: withdrawalProof.timestampRoot,\n                index: TIMESTAMP_INDEX\n            }),\n            \"BeaconChainProofs.verifyWithdrawal: Invalid timestamp merkle proof\"\n        );\n\n        {\n            /**\n             * Next we verify the withdrawal fields against the executionPayloadRoot:\n             * First we compute the withdrawal_index, then we merkleize the\n             * withdrawalFields container to calculate the withdrawalRoot.\n             *\n             * Note: Merkleization of the withdrawals root tree uses MerkleizeWithMixin, i.e., the length of the array is hashed with the root of\n             * the array.  Thus we shift the WITHDRAWALS_INDEX over by WITHDRAWALS_TREE_HEIGHT + 1 and not just WITHDRAWALS_TREE_HEIGHT.\n             */\n            uint256 withdrawalIndex =\n                (WITHDRAWALS_INDEX << (WITHDRAWALS_TREE_HEIGHT + 1)) | uint256(withdrawalProof.withdrawalIndex);\n            bytes32 withdrawalRoot = Merkle.merkleizeSha256(withdrawalFields);\n            require(\n                Merkle.verifyInclusionSha256({\n                    proof: withdrawalProof.withdrawalProof,\n                    root: withdrawalProof.executionPayloadRoot,\n                    leaf: withdrawalRoot,\n                    index: withdrawalIndex\n                }),\n                \"BeaconChainProofs.verifyWithdrawal: Invalid withdrawal merkle proof\"\n            );\n        }\n    }\n\n    /**\n     * @notice This function replicates the ssz hashing of a validator's pubkey, outlined below:\n     *  hh := ssz.NewHasher()\n     *  hh.PutBytes(validatorPubkey[:])\n     *  validatorPubkeyHash := hh.Hash()\n     *  hh.Reset()\n     */\n    function hashValidatorBLSPubkey(bytes memory validatorPubkey) internal pure returns (bytes32 pubkeyHash) {\n        require(validatorPubkey.length == 48, \"Input should be 48 bytes in length\");\n        return sha256(abi.encodePacked(validatorPubkey, bytes16(0)));\n    }\n\n    /**\n     * @dev Retrieve the withdrawal timestamp\n     */\n    function getWithdrawalTimestamp(WithdrawalProof memory withdrawalProof) internal pure returns (uint64) {\n        return Endian.fromLittleEndianUint64(withdrawalProof.timestampRoot);\n    }\n\n    /**\n     * @dev Converts the withdrawal's slot to an epoch\n     */\n    function getWithdrawalEpoch(WithdrawalProof memory withdrawalProof) internal pure returns (uint64) {\n        return Endian.fromLittleEndianUint64(withdrawalProof.slotRoot) / SLOTS_PER_EPOCH;\n    }\n\n    /**\n     * Indices for validator fields (refer to consensus specs):\n     * 0: pubkey\n     * 1: withdrawal credentials\n     * 2: effective balance\n     * 3: slashed?\n     * 4: activation elligibility epoch\n     * 5: activation epoch\n     * 6: exit epoch\n     * 7: withdrawable epoch\n     */\n\n    /**\n     * @dev Retrieves a validator's pubkey hash\n     */\n    function getPubkeyHash(bytes32[] memory validatorFields) internal pure returns (bytes32) {\n        return validatorFields[VALIDATOR_PUBKEY_INDEX];\n    }\n\n    function getWithdrawalCredentials(bytes32[] memory validatorFields) internal pure returns (bytes32) {\n        return validatorFields[VALIDATOR_WITHDRAWAL_CREDENTIALS_INDEX];\n    }\n\n    /**\n     * @dev Retrieves a validator's effective balance (in gwei)\n     */\n    function getEffectiveBalanceGwei(bytes32[] memory validatorFields) internal pure returns (uint64) {\n        return Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_BALANCE_INDEX]);\n    }\n\n    /**\n     * @dev Retrieves a validator's withdrawable epoch\n     */\n    function getWithdrawableEpoch(bytes32[] memory validatorFields) internal pure returns (uint64) {\n        return Endian.fromLittleEndianUint64(validatorFields[VALIDATOR_WITHDRAWABLE_EPOCH_INDEX]);\n    }\n\n    /**\n     * Indices for withdrawal fields (refer to consensus specs):\n     * 0: withdrawal index\n     * 1: validator index\n     * 2: execution address\n     * 3: withdrawal amount\n     */\n\n    /**\n     * @dev Retrieves a withdrawal's validator index\n     */\n    function getValidatorIndex(bytes32[] memory withdrawalFields) internal pure returns (uint40) {\n        return uint40(Endian.fromLittleEndianUint64(withdrawalFields[WITHDRAWAL_VALIDATOR_INDEX_INDEX]));\n    }\n\n    /**\n     * @dev Retrieves a withdrawal's withdrawal amount (in gwei)\n     */\n    function getWithdrawalAmountGwei(bytes32[] memory withdrawalFields) internal pure returns (uint64) {\n        return Endian.fromLittleEndianUint64(withdrawalFields[WITHDRAWAL_VALIDATOR_AMOUNT_INDEX]);\n    }\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/interfaces/IPauserRegistry.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\n/**\n * @title Interface for the `PauserRegistry` contract.\n * @author Layr Labs, Inc.\n * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service\n */\ninterface IPauserRegistry {\n    event PauserStatusChanged(address pauser, bool canPause);\n\n    event UnpauserChanged(address previousUnpauser, address newUnpauser);\n\n    /// @notice Mapping of addresses to whether they hold the pauser role.\n    function isPauser(address pauser) external view returns (bool);\n\n    /// @notice Unique address that holds the unpauser role. Capable of changing *both* the pauser and unpauser addresses.\n    function unpauser() external view returns (address);\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/libraries/Merkle.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Tree proofs.\n *\n * The tree and the proofs can be generated using our\n * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].\n * You will find a quickstart guide in the readme.\n *\n * WARNING: You should avoid using leaf values that are 64 bytes long prior to\n * hashing, or use a hash function other than keccak256 for hashing leaves.\n * This is because the concatenation of a sorted pair of internal nodes in\n * the merkle tree could be reinterpreted as a leaf value.\n * OpenZeppelin's JavaScript library generates merkle trees that are safe\n * against this attack out of the box.\n */\nlibrary Merkle {\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. The tree is built assuming `leaf` is\n     * the 0 indexed `index`'th leaf from the bottom left of the tree.\n     *\n     * Note this is for a Merkle tree using the keccak/sha3 hash function\n     */\n    function verifyInclusionKeccak(bytes memory proof, bytes32 root, bytes32 leaf, uint256 index)\n        internal\n        pure\n        returns (bool)\n    {\n        return processInclusionProofKeccak(proof, leaf, index) == root;\n    }\n\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. The tree is built assuming `leaf` is\n     * the 0 indexed `index`'th leaf from the bottom left of the tree.\n     *\n     * _Available since v4.4._\n     *\n     * Note this is for a Merkle tree using the keccak/sha3 hash function\n     */\n    function processInclusionProofKeccak(bytes memory proof, bytes32 leaf, uint256 index)\n        internal\n        pure\n        returns (bytes32)\n    {\n        require(\n            proof.length != 0 && proof.length % 32 == 0,\n            \"Merkle.processInclusionProofKeccak: proof length should be a non-zero multiple of 32\"\n        );\n        bytes32 computedHash = leaf;\n        for (uint256 i = 32; i <= proof.length; i += 32) {\n            if (index % 2 == 0) {\n                // if ith bit of index is 0, then computedHash is a left sibling\n                assembly {\n                    mstore(0x00, computedHash)\n                    mstore(0x20, mload(add(proof, i)))\n                    computedHash := keccak256(0x00, 0x40)\n                    index := div(index, 2)\n                }\n            } else {\n                // if ith bit of index is 1, then computedHash is a right sibling\n                assembly {\n                    mstore(0x00, mload(add(proof, i)))\n                    mstore(0x20, computedHash)\n                    computedHash := keccak256(0x00, 0x40)\n                    index := div(index, 2)\n                }\n            }\n        }\n        return computedHash;\n    }\n\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. The tree is built assuming `leaf` is\n     * the 0 indexed `index`'th leaf from the bottom left of the tree.\n     *\n     * Note this is for a Merkle tree using the sha256 hash function\n     */\n    function verifyInclusionSha256(bytes memory proof, bytes32 root, bytes32 leaf, uint256 index)\n        internal\n        view\n        returns (bool)\n    {\n        return processInclusionProofSha256(proof, leaf, index) == root;\n    }\n\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. The tree is built assuming `leaf` is\n     * the 0 indexed `index`'th leaf from the bottom left of the tree.\n     *\n     * _Available since v4.4._\n     *\n     * Note this is for a Merkle tree using the sha256 hash function\n     */\n    function processInclusionProofSha256(bytes memory proof, bytes32 leaf, uint256 index)\n        internal\n        view\n        returns (bytes32)\n    {\n        require(\n            proof.length != 0 && proof.length % 32 == 0,\n            \"Merkle.processInclusionProofSha256: proof length should be a non-zero multiple of 32\"\n        );\n        bytes32[1] memory computedHash = [leaf];\n        for (uint256 i = 32; i <= proof.length; i += 32) {\n            if (index % 2 == 0) {\n                // if ith bit of index is 0, then computedHash is a left sibling\n                assembly {\n                    mstore(0x00, mload(computedHash))\n                    mstore(0x20, mload(add(proof, i)))\n                    if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) { revert(0, 0) }\n                    index := div(index, 2)\n                }\n            } else {\n                // if ith bit of index is 1, then computedHash is a right sibling\n                assembly {\n                    mstore(0x00, mload(add(proof, i)))\n                    mstore(0x20, mload(computedHash))\n                    if iszero(staticcall(sub(gas(), 2000), 2, 0x00, 0x40, computedHash, 0x20)) { revert(0, 0) }\n                    index := div(index, 2)\n                }\n            }\n        }\n        return computedHash[0];\n    }\n\n    /**\n     * @notice this function returns the merkle root of a tree created from a set of leaves using sha256 as its hash function\n     *  @param leaves the leaves of the merkle tree\n     *  @return The computed Merkle root of the tree.\n     *  @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.\n     */\n    function merkleizeSha256(bytes32[] memory leaves) internal pure returns (bytes32) {\n        //there are half as many nodes in the layer above the leaves\n        uint256 numNodesInLayer = leaves.length / 2;\n        //create a layer to store the internal nodes\n        bytes32[] memory layer = new bytes32[](numNodesInLayer);\n        //fill the layer with the pairwise hashes of the leaves\n        for (uint256 i = 0; i < numNodesInLayer; i++) {\n            layer[i] = sha256(abi.encodePacked(leaves[2 * i], leaves[2 * i + 1]));\n        }\n        //the next layer above has half as many nodes\n        numNodesInLayer /= 2;\n        //while we haven't computed the root\n        while (numNodesInLayer != 0) {\n            //overwrite the first numNodesInLayer nodes in layer with the pairwise hashes of their children\n            for (uint256 i = 0; i < numNodesInLayer; i++) {\n                layer[i] = sha256(abi.encodePacked(layer[2 * i], layer[2 * i + 1]));\n            }\n            //the next layer above has half as many nodes\n            numNodesInLayer /= 2;\n        }\n        //the first node in the layer is the root\n        return layer[0];\n    }\n}\n"
      },
      "lib/eigenlayer-contracts/src/contracts/libraries/Endian.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.0;\n\nlibrary Endian {\n    /**\n     * @notice Converts a little endian-formatted uint64 to a big endian-formatted uint64\n     * @param lenum little endian-formatted uint64 input, provided as 'bytes32' type\n     * @return n The big endian-formatted uint64\n     * @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)\n     * through a right-shift/shr operation.\n     */\n    function fromLittleEndianUint64(bytes32 lenum) internal pure returns (uint64 n) {\n        // the number needs to be stored in little-endian encoding (ie in bytes 0-8)\n        n = uint64(uint256(lenum >> 192));\n        return (n >> 56) | ((0x00FF000000000000 & n) >> 40) | ((0x0000FF0000000000 & n) >> 24)\n            | ((0x000000FF00000000 & n) >> 8) | ((0x00000000FF000000 & n) << 8) | ((0x0000000000FF0000 & n) << 24)\n            | ((0x000000000000FF00 & n) << 40) | ((0x00000000000000FF & n) << 56);\n    }\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "forge-std/=lib/forge-std/src/",
        "eigenlayer-middleware/=lib/eigenlayer-middleware/src/",
        "eigenlayer-core/=lib/eigenlayer-contracts/src/",
        "@openzeppelin-upgrades/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/",
        "@openzeppelin/=lib/eigenlayer-contracts/lib/openzeppelin-contracts/",
        "ds-test/=lib/eigenlayer-contracts/lib/ds-test/src/",
        "eigenlayer-contracts/=lib/eigenlayer-contracts/",
        "openzeppelin-contracts-upgradeable/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/",
        "openzeppelin-contracts/=lib/eigenlayer-contracts/lib/openzeppelin-contracts/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs"
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "london",
      "libraries": {}
    }
  }}