{"file_path":"contracts/0.4.24/Lido.sol","creation_status":"success","source_code":"// SPDX-FileCopyrightText: 2025 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n/* See contracts/COMPILERS.md */\npragma solidity 0.4.24;\n\nimport {AragonApp, UnstructuredStorage} from \"@aragon/os/contracts/apps/AragonApp.sol\";\nimport {SafeMath} from \"@aragon/os/contracts/lib/math/SafeMath.sol\";\n\nimport {ILidoLocator} from \"../common/interfaces/ILidoLocator.sol\";\n\nimport {StETHPermit} from \"./StETHPermit.sol\";\nimport {Versioned} from \"./utils/Versioned.sol\";\nimport {StakeLimitUtils, StakeLimitUnstructuredStorage, StakeLimitState} from \"./lib/StakeLimitUtils.sol\";\nimport {UnstructuredStorageExt} from \"./utils/UnstructuredStorageExt.sol\";\nimport {Math256} from \"../common/lib/Math256.sol\";\n\ninterface IStakingRouter {\n    function getTotalFeeE4Precision() external view returns (uint16 totalFee);\n\n    function TOTAL_BASIS_POINTS() external view returns (uint256);\n\n    function getWithdrawalCredentials() external view returns (bytes32);\n\n    function getStakingFeeAggregateDistributionE4Precision()\n        external\n        view\n        returns (uint16 modulesFee, uint16 treasuryFee);\n\n    function receiveDepositableEther() external payable;\n}\n\ninterface IWithdrawalQueue {\n    function unfinalizedStETH() external view returns (uint256);\n    function isBunkerModeActive() external view returns (bool);\n    function finalize(uint256 _lastIdToFinalize, uint256 _maxShareRate) external payable;\n}\n\ninterface ILidoExecutionLayerRewardsVault {\n    function withdrawRewards(uint256 _maxAmount) external returns (uint256 amount);\n}\n\ninterface IWithdrawalVault {\n    function withdrawWithdrawals(uint256 _amount) external;\n}\n\ninterface IAccountingOracle {\n    /// @dev returns a tuple instead of a structure to avoid allocating memory\n    function getProcessingState()\n        external\n        view\n        returns (\n            uint256 currentFrameRefSlot,\n            uint256 processingDeadlineTime,\n            bytes32 mainDataHash,\n            bool mainDataSubmitted,\n            bytes32 extraDataHash,\n            uint256 extraDataFormat,\n            bool extraDataSubmitted,\n            uint256 extraDataItemsCount,\n            uint256 extraDataItemsSubmitted\n        );\n    function getLastProcessingRefSlot() external view returns (uint256);\n    function getCurrentFrame() external view returns (uint256 refSlot, uint256 refSlotTimestamp);\n}\n\n/**\n * @title Liquid staking pool implementation\n *\n * Lido is an Ethereum liquid staking protocol solving the problem of frozen staked ether on the Consensus Layer\n * being unavailable for transfers and DeFi on the Execution Layer.\n *\n * Since balances of all token holders change when the amount of total pooled ether\n * changes, this token cannot fully implement ERC20 standard: it only emits `Transfer`\n * events upon explicit transfer between holders. In contrast, when the Lido oracle reports\n * rewards, no `Transfer` events are emitted: doing so would require an event for each token holder\n * and thus running an unbounded loop.\n *\n * ######### STRUCTURED STORAGE #########\n * NB: The order of inheritance must preserve the structured storage layout of the previous versions.\n *\n * @dev Lido is derived from `StETHPermit` that has a structured storage:\n * SLOT 0: mapping (address => uint256) private shares (`StETH`)\n * SLOT 1: mapping (address => mapping (address => uint256)) private allowances (`StETH`)\n * SLOT 2: mapping (address => uint256) internal noncesByAddress (`StETHPermit`)\n *\n * `Versioned` and `AragonApp` both don't have the pre-allocated structured storage.\n */\ncontract Lido is Versioned, StETHPermit, AragonApp {\n    using SafeMath for uint256;\n    using UnstructuredStorage for bytes32;\n    using UnstructuredStorageExt for bytes32;\n    using StakeLimitUnstructuredStorage for bytes32;\n    using StakeLimitUtils for StakeLimitState.Data;\n\n    /// ACL Roles\n    bytes32 public constant PAUSE_ROLE = 0x139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d; // keccak256(\"PAUSE_ROLE\");\n    bytes32 public constant RESUME_ROLE = 0x2fc10cc8ae19568712f7a176fb4978616a610650813c9d05326c34abb62749c7; // keccak256(\"RESUME_ROLE\");\n    bytes32 public constant STAKING_PAUSE_ROLE = 0x84ea57490227bc2be925c684e2a367071d69890b629590198f4125a018eb1de8; // keccak256(\"STAKING_PAUSE_ROLE\")\n    bytes32 public constant STAKING_CONTROL_ROLE = 0xa42eee1333c0758ba72be38e728b6dadb32ea767de5b4ddbaea1dae85b1b051f; // keccak256(\"STAKING_CONTROL_ROLE\")\n    bytes32 public constant BUFFER_RESERVE_MANAGER_ROLE =\n        0x33969636f1fbf3d7d062d4de4a08e7bd3c46606ec28b3a4398d2665be559b921; // keccak256(\"BUFFER_RESERVE_MANAGER_ROLE\")\n\n    uint256 private constant DEPOSIT_SIZE = 32 ether;\n\n    uint256 internal constant TOTAL_BASIS_POINTS = 10000;\n\n    /// @dev storage slot position for the total and external shares (from StETH contract)\n    /// Since version 3, high 128 bits are used for the external shares\n    /// |----- 128 bit -----|------ 128 bit -------|\n    /// |   external shares |     total shares     |\n    /// keccak256(\"lido.StETH.totalAndExternalShares\")\n    bytes32 internal constant TOTAL_AND_EXTERNAL_SHARES_POSITION = TOTAL_SHARES_POSITION_LOW128;\n\n    /// @dev storage slot position for the Lido protocol contracts locator\n    /// Since version 3, high 96 bits are used for the max external ratio BP\n    /// |----- 96 bit -----|------ 160 bit -------|\n    /// |max external ratio| lido locator address |\n    /// keccak256(\"lido.Lido.lidoLocatorAndMaxExternalRatio\")\n    bytes32 internal constant LOCATOR_AND_MAX_EXTERNAL_RATIO_POSITION =\n        0xd92bc31601d11a10411d08f59b7146d8a5915af253cde25f8e66b67beb4be223;\n\n    /// @dev amount of ether (on the current Ethereum side) buffered on this smart contract balance\n    ///      and amount of ether deposited since last report\n    /// depositedPostReport lifecycle:\n    ///   1) increased by `withdrawDepositableEther()` as CL deposits are performed;\n    ///   2) resets on report processing via `processClStateUpdate()`\n    /// |------ 128 bit --------|----- 128 bit ------|\n    /// | deposited post report |   buffered ether   |\n    /// keccak256(\"lido.Lido.bufferedEtherAndDepositedPostReport\");\n    bytes32 internal constant BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION =\n        0x81a11fa1111afa59b50051f60ccf604a39d96acb484dc467ad8eadb4a63f0a5f;\n\n    /// @dev an internal counter accumulates the ETH deposited after the reporting period/frame changes\n    ///      and unique identifier for the last deposit's frame (in this case, it's current refSlot)\n    /// keccak256(\"lido.Lido.depositedNextReportAndLastDepositNonce\")\n    bytes32 internal constant DEPOSITED_NEXT_REPORT_AND_LAST_DEPOSIT_NONCE_POSITION =\n        0x8d3ed945c7718edcdb639b1235f2bbe3fa81f4a6cec7a436d8ea13fbc502d957;\n\n    /// @dev CL validators and pending balances packed into one slot\n    /// |----- 128 bit ------|------ 128 bit --------|\n    /// | CL pending balance | CL validators balance |\n    /// keccak256(\"lido.Lido.clValidatorsBalanceAndClPendingBalance\");\n    bytes32 internal constant CL_VALIDATORS_BALANCE_AND_CL_PENDING_BALANCE_POSITION =\n        0x096e465397f38e659238ccd5d5a2c434ced54a63fd8d694045bfb058ab9d8112;\n\n    /// @dev number of initial seed deposits (incrementing counter), ex. deposited validators\n    /// keccak256(\"lido.Lido.seedDepositsCount\");\n    bytes32 internal constant SEED_DEPOSITS_COUNT_POSITION =\n        0x3f0eaa2c0f16ff9775c078f3df30470d8c042317b24ad1defa240b1c3e10b238;\n\n    /// @dev storage slot position of the staking rate limit structure\n    /// keccak256(\"lido.Lido.stakeLimit\");\n    bytes32 internal constant STAKING_STATE_POSITION =\n        0xa3678de4a579be090bed1177e0a24f77cc29d181ac22fd7688aca344d8938015;\n\n    /// @dev storage slot position for the total amount of execution layer rewards received by Lido contract.\n    /// keccak256(\"lido.Lido.totalELRewardsCollected\");\n    bytes32 internal constant TOTAL_EL_REWARDS_COLLECTED_POSITION =\n        0xafe016039542d12eec0183bb0b1ffc2ca45b027126a494672fba4154ee77facb;\n\n    /// @dev Storage slot for deposit reserve.\n    /// Holds buffered ether that remains depositable even when withdrawals demand exists.\n    /// Lifecycle:\n    ///   1) can be decreased by `setDepositsReserveTarget()` when target is lowered;\n    ///   2) consumed by `withdrawDepositableEther()` as CL deposits are performed;\n    ///   3) synced to target on report processing via `_updateBufferedEtherAllocation()`\n    /// keccak256(\"lido.Lido.depositsReserve\")\n    bytes32 internal constant DEPOSITS_RESERVE_POSITION =\n        0xda4fbe3b9cbd98dfae5dff538bbff4ba61f38979d4d7419bcd006f3e6250ec13;\n\n    /// @dev Storage slot for deposits reserve target.\n    /// Stores governance-configured value that deposits reserve is restored to on each oracle report.\n    /// Set via `setDepositsReserveTarget()`, gated by `BUFFER_RESERVE_MANAGER_ROLE`\n    /// keccak256(\"lido.Lido.depositsReserveTarget\")\n    bytes32 internal constant DEPOSITS_RESERVE_TARGET_POSITION =\n        0x3d3e9bd6e90e5d1f1c6839835bcbe5746a47c9a013d1eae6e80c248264c06a81;\n\n    // Staking was paused (don't accept user's ether submits)\n    event StakingPaused();\n    // Staking was resumed (accept user's ether submits)\n    event StakingResumed();\n    // Staking limit was set (rate limits user's submits)\n    event StakingLimitSet(uint256 maxStakeLimit, uint256 stakeLimitIncreasePerBlock);\n    // Staking limit was removed\n    event StakingLimitRemoved();\n\n    // Emitted when CL balances are updated by the oracle\n    event CLBalancesUpdated(uint256 indexed reportTimestamp, uint256 clValidatorsBalance, uint256 clPendingBalance);\n    // Emitted when depositedPostReport is updated\n    event DepositedPostReportUpdated(uint256 depositedPostReport);\n\n    // Emitted when depositedValidators value is changed\n    event DepositedValidatorsChanged(uint256 depositedValidators);\n\n    // Emitted when oracle accounting report processed\n    // @dev `preCLBalance` is actually the principal CL balance: the sum of the previous report's\n    //      CL validators balance, CL pending balance, and deposited balance since the last report.\n    //      The parameter name is kept for ABI backward compatibility.\n    event ETHDistributed(\n        uint256 indexed reportTimestamp,\n        uint256 preCLBalance, // actually its preCLBalance + deposits due to compatibility reasons\n        uint256 postCLBalance,\n        uint256 withdrawalsWithdrawn,\n        uint256 executionLayerRewardsWithdrawn,\n        uint256 postBufferedEther\n    );\n\n    // Emitted when the token is rebased (an accounting oracle report is delivered)\n    event TokenRebased(\n        uint256 indexed reportTimestamp,\n        uint256 timeElapsed,\n        uint256 preTotalShares,\n        uint256 preTotalEther,\n        uint256 postTotalShares,\n        uint256 postTotalEther,\n        uint256 sharesMintedAsFees\n    );\n\n    // Lido locator set\n    event LidoLocatorSet(address lidoLocator);\n\n    // The amount of ETH withdrawn from LidoExecutionLayerRewardsVault to Lido\n    event ELRewardsReceived(uint256 amount);\n\n    // The amount of ETH withdrawn from WithdrawalVault to Lido\n    event WithdrawalsReceived(uint256 amount);\n\n    // Records a deposit made by a user\n    event Submitted(address indexed sender, uint256 amount, address referral);\n\n    // The `amount` of ether was sent to the deposit_contract.deposit function\n    event Unbuffered(uint256 amount);\n\n    // Internal share rate updated\n    event InternalShareRateUpdated(\n        uint256 indexed reportTimestamp,\n        uint256 postInternalShares,\n        uint256 postInternalEther,\n        uint256 sharesMintedAsFees\n    );\n\n    // External shares minted for receiver\n    event ExternalSharesMinted(address indexed receiver, uint256 amountOfShares);\n\n    // External shares burned for account\n    event ExternalSharesBurnt(uint256 amountOfShares);\n\n    // Maximum ratio of external shares to total shares in basis points set\n    event MaxExternalRatioBPSet(uint256 maxExternalRatioBP);\n\n    // External ether transferred to buffer\n    event ExternalEtherTransferredToBuffer(uint256 amount);\n\n    // Bad debt internalized\n    event ExternalBadDebtInternalized(uint256 amountOfShares);\n\n    // Emitted when current deposits reserve is updated.\n    // Can be emitted from `withdrawDepositableEther()`, `collectRewardsAndProcessWithdrawals()`,\n    // and `setDepositsReserveTarget()` when target is lowered below current reserve.\n    event DepositsReserveSet(uint256 depositsReserve);\n\n    // Emitted when deposits reserve target is set via `setDepositsReserveTarget()`.\n    // Emitted even if the new value equals the previous one\n    event DepositsReserveTargetSet(uint256 depositsReserveTarget);\n\n    /**\n     * @notice Initializer function for scratch deploy of Lido contract\n     *\n     * @param _lidoLocator lido locator contract\n     * @param _eip712StETH eip712 helper contract for StETH\n     *\n     * @dev NB: by default, staking and the whole Lido pool are in paused state\n     * @dev The contract's balance must be non-zero to mint initial shares of stETH\n     */\n    function initialize(address _lidoLocator, address _eip712StETH, uint256 _depositsReserveTarget) public payable onlyInit {\n        _bootstrapInitialHolder(); // stone in the elevator\n\n        _setLidoLocator(_lidoLocator);\n        emit LidoLocatorSet(_lidoLocator);\n        _initializeEIP712StETH(_eip712StETH);\n\n        _setContractVersion(4);\n\n        ILidoLocator locator = ILidoLocator(_lidoLocator);\n\n        _approve(_withdrawalQueue(locator), _burner(locator), INFINITE_ALLOWANCE);\n        _setDepositsReserveTarget(_depositsReserveTarget);\n        initialized();\n    }\n\n    /**\n     * @notice A function to finalize upgrade to v4 (from v3). Can be called only once\n     * @param _depositsReserveTarget initial value for deposits reserve target (in wei)\n     */\n    function finalizeUpgrade_v4(uint256 _depositsReserveTarget) external {\n        require(hasInitialized(), \"NOT_INITIALIZED\");\n\n        /// @dev prevent migration if the last oracle report wasn't submitted, otherwise deposits\n        ///      made after refSlot and before migration (i.e. report's tx) will be lost\n        IAccountingOracle oracle = _accountingOracle();\n        (,,, bool mainDataSubmitted,,,,,) = oracle.getProcessingState();\n        require(mainDataSubmitted, \"NO_REPORT\");\n\n        _checkContractVersion(3);\n        _setContractVersion(4);\n        _migrateStorage_v3_to_v4();\n        _setDepositsReserveTarget(_depositsReserveTarget);\n    }\n\n    function _migrateStorage_v3_to_v4() internal {\n        /// @dev storage slots used in v3\n        // keccak256(\"lido.Lido.clBalanceAndClValidators\")\n        bytes32 CL_BALANCE_AND_CL_VALIDATORS_POSITION =\n            0xc36804a03ec742b57b141e4e5d8d3bd1ddb08451fd0f9983af8aaab357a78e2f;\n        // keccak256(\"lido.Lido.bufferedEtherAndDepositedValidators\");\n        bytes32 BUFFERED_ETHER_AND_DEPOSITED_VALIDATORS_POSITION =\n            0xa84c096ee27e195f25d7b6c7c2a03229e49f1a2a5087e57ce7d7127707942fe3;\n\n        (uint256 clValidatorsBalance, uint256 clValidators) =\n            CL_BALANCE_AND_CL_VALIDATORS_POSITION.getLowAndHighUint128();\n        (uint256 bufferedEther, uint256 depositedValidators) =\n            BUFFERED_ETHER_AND_DEPOSITED_VALIDATORS_POSITION.getLowAndHighUint128();\n\n        /// @dev convert ex-transientBalance to amount submitted to the Deposit contract\n        ///      after the last accounting oracle report\n        uint256 depositedPostReport = (depositedValidators - clValidators) * DEPOSIT_SIZE;\n        _setBufferedEtherAndDepositedPostReport(bufferedEther, depositedPostReport);\n        /// @dev Since migration is only possible after a report and before the next frame begins,\n        ///      the transient balance will apply to the current frame\n        (uint256 curNonce,) = _getCurrentFrame(); // get current refslot\n        _setDepositedNextReportAndLastDepositNonce(depositedPostReport, curNonce);\n\n        /// @dev no pending balance at the moment of upgrade\n        _setClValidatorsBalanceAndClPendingBalance(clValidatorsBalance, 0);\n        _setSeedDepositsCount(depositedValidators);\n\n        // wipe out the slots\n        CL_BALANCE_AND_CL_VALIDATORS_POSITION.setStorageUint256(0);\n        BUFFERED_ETHER_AND_DEPOSITED_VALIDATORS_POSITION.setStorageUint256(0);\n    }\n\n    /**\n     * @notice Stop accepting new ether to the protocol\n     *\n     * @dev While accepting new ether is stopped, calls to the `submit` function,\n     * as well as to the default payable function, will revert.\n     */\n    function pauseStaking() external {\n        _auth(STAKING_PAUSE_ROLE);\n        require(!isStakingPaused(), \"ALREADY_PAUSED\");\n\n        _pauseStaking();\n    }\n\n    /**\n     * @notice Resume accepting new ether to the protocol (if `pauseStaking` was called previously)\n     * NB: Staking could be rate-limited by imposing a limit on the stake amount\n     * at each moment in time, see `setStakingLimit()` and `removeStakingLimit()`\n     *\n     * @dev Preserves staking limit if it was set previously\n     */\n    function resumeStaking() external {\n        _auth(STAKING_CONTROL_ROLE);\n        require(hasInitialized(), \"NOT_INITIALIZED\");\n        _whenNotStopped();\n        require(isStakingPaused(), \"ALREADY_RESUMED\");\n\n        _resumeStaking();\n    }\n\n    /**\n     * @notice Set the staking rate limit\n     *\n     * ▲ Stake limit\n     * │.....  .....   ........ ...            ....     ... Stake limit = max\n     * │      .       .        .   .   .      .    . . .\n     * │     .       .              . .  . . .      . .\n     * │            .                .  . . .\n     * │──────────────────────────────────────────────────> Time\n     * │     ^      ^          ^   ^^^  ^ ^ ^     ^^^ ^     Stake events\n     *\n     * @dev Reverts if:\n     * - `_maxStakeLimit` == 0\n     * - `_maxStakeLimit` >= 2^95 (1/2 of uint96)\n     * - `_maxStakeLimit` < `_stakeLimitIncreasePerBlock`\n     * - `_maxStakeLimit` / `_stakeLimitIncreasePerBlock` >= 2^32 (only if `_stakeLimitIncreasePerBlock` != 0)\n     *\n     * @param _maxStakeLimit max stake limit value\n     * @param _stakeLimitIncreasePerBlock stake limit increase per single block\n     */\n    function setStakingLimit(uint256 _maxStakeLimit, uint256 _stakeLimitIncreasePerBlock) external {\n        _auth(STAKING_CONTROL_ROLE);\n\n        require(_maxStakeLimit <= uint96(-1) / 2, \"TOO_LARGE_MAX_STAKE_LIMIT\");\n\n        STAKING_STATE_POSITION.setStorageStakeLimitStruct(\n            STAKING_STATE_POSITION.getStorageStakeLimitStruct()\n                .setStakingLimit(_maxStakeLimit, _stakeLimitIncreasePerBlock)\n        );\n\n        emit StakingLimitSet(_maxStakeLimit, _stakeLimitIncreasePerBlock);\n    }\n\n    /**\n     * @notice Remove the staking rate limit\n     */\n    function removeStakingLimit() external {\n        _auth(STAKING_CONTROL_ROLE);\n\n        STAKING_STATE_POSITION.setStorageStakeLimitStruct(\n            STAKING_STATE_POSITION.getStorageStakeLimitStruct().removeStakingLimit()\n        );\n\n        emit StakingLimitRemoved();\n    }\n\n    /**\n     * @notice Check staking state: whether it's paused or not\n     */\n    function isStakingPaused() public view returns (bool) {\n        return STAKING_STATE_POSITION.getStorageStakeLimitStruct().isStakingPaused();\n    }\n\n    /**\n     * @return the maximum amount of ether that can be staked in the current block\n     * @dev Special return values:\n     * - 2^256 - 1 if staking is unlimited;\n     * - 0 if staking is paused or if limit is exhausted.\n     */\n    function getCurrentStakeLimit() external view returns (uint256) {\n        return _getCurrentStakeLimit(STAKING_STATE_POSITION.getStorageStakeLimitStruct());\n    }\n\n    /**\n     * @notice Get the full info about current stake limit params and state\n     * @dev Might be used for the advanced integration requests.\n     * @return isStakingPaused_ staking pause state (equivalent to return of isStakingPaused())\n     * @return isStakingLimitSet whether the stake limit is set\n     * @return currentStakeLimit current stake limit (equivalent to return of getCurrentStakeLimit())\n     * @return maxStakeLimit max stake limit\n     * @return maxStakeLimitGrowthBlocks blocks needed to restore max stake limit from the fully exhausted state\n     * @return prevStakeLimit previously reached stake limit\n     * @return prevStakeBlockNumber previously seen block number\n     */\n    function getStakeLimitFullInfo()\n        external\n        view\n        returns (\n            bool isStakingPaused_,\n            bool isStakingLimitSet,\n            uint256 currentStakeLimit,\n            uint256 maxStakeLimit,\n            uint256 maxStakeLimitGrowthBlocks,\n            uint256 prevStakeLimit,\n            uint256 prevStakeBlockNumber\n        )\n    {\n        StakeLimitState.Data memory stakeLimitData = STAKING_STATE_POSITION.getStorageStakeLimitStruct();\n\n        isStakingPaused_ = stakeLimitData.isStakingPaused();\n        isStakingLimitSet = stakeLimitData.isStakingLimitSet();\n\n        currentStakeLimit = _getCurrentStakeLimit(stakeLimitData);\n\n        maxStakeLimit = stakeLimitData.maxStakeLimit;\n        maxStakeLimitGrowthBlocks = stakeLimitData.maxStakeLimitGrowthBlocks;\n        prevStakeLimit = stakeLimitData.prevStakeLimit;\n        prevStakeBlockNumber = stakeLimitData.prevStakeBlockNumber;\n    }\n\n    /**\n     * @return the maximum allowed external shares ratio as basis points of total shares [0-10000]\n     */\n    function getMaxExternalRatioBP() external view returns (uint256) {\n        return _getMaxExternalRatioBP();\n    }\n\n    /**\n     * @notice Set the maximum allowed external shares ratio as basis points of total shares\n     * @param _maxExternalRatioBP The maximum ratio in basis points [0-10000]\n     */\n    function setMaxExternalRatioBP(uint256 _maxExternalRatioBP) external {\n        _auth(STAKING_CONTROL_ROLE);\n\n        _setMaxExternalRatioBP(_maxExternalRatioBP);\n    }\n\n    /**\n     * @notice Send funds to the pool and mint StETH to the `msg.sender` address\n     * @dev Users are able to submit their funds by sending ether to the contract address\n     * Unlike vanilla Ethereum Deposit contract, accepting only 32-Ether transactions, Lido\n     * accepts payments of any size. Submitted ether is stored in the buffer until someone calls\n     * deposit() and pushes it to the Ethereum Deposit contract.\n     */\n    // solhint-disable-next-line no-complex-fallback\n    function() external payable {\n        // protection against accidental submissions by calling non-existent function\n        require(msg.data.length == 0, \"NON_EMPTY_DATA\");\n        _submit(0);\n    }\n\n    /**\n     * @notice Send funds to the pool with the optional `_referral` parameter and mint StETH to the `msg.sender` address\n     * @param _referral optional referral address\n     * @return Amount of StETH shares minted\n     */\n    function submit(address _referral) external payable returns (uint256) {\n        return _submit(_referral);\n    }\n\n    /**\n     * @notice A payable function for execution layer rewards. Can be called only by `ExecutionLayerRewardsVault`\n     * @dev We need a dedicated function because funds received by the default payable function\n     * are treated as a user deposit\n     */\n    function receiveELRewards() external payable {\n        _auth(_elRewardsVault());\n\n        TOTAL_EL_REWARDS_COLLECTED_POSITION.setStorageUint256(getTotalELRewardsCollected().add(msg.value));\n\n        emit ELRewardsReceived(msg.value);\n    }\n\n    /**\n     * @notice A payable function for withdrawals acquisition. Can be called only by `WithdrawalVault`\n     * @dev We need a dedicated function because funds received by the default payable function\n     * are treated as a user deposit\n     */\n    function receiveWithdrawals() external payable {\n        _auth(_withdrawalVault());\n\n        emit WithdrawalsReceived(msg.value);\n    }\n\n    /**\n     * @notice Stop pool routine operations\n     */\n    function stop() external {\n        _auth(PAUSE_ROLE);\n\n        _stop();\n        _pauseStaking();\n    }\n\n    /**\n     * @notice Resume pool routine operations\n     * @dev Staking is resumed after this call using the previously set limits (if any)\n     */\n    function resume() external {\n        _auth(RESUME_ROLE);\n\n        _resume();\n        _resumeStaking();\n    }\n\n    /**\n     * @return the amount of ether temporarily buffered on this contract balance\n     * @dev Buffered balance is kept on the contract from the moment the funds are received from user\n     * until the moment they are actually sent to the official Deposit contract or used to fulfill withdrawal requests\n     */\n    function getBufferedEther() external view returns (uint256) {\n        return _getBufferedEther();\n    }\n\n    /**\n     * @notice Buffered ether split into reserve buckets.\n     * @param total Total buffered ether, equal to `getBufferedEther()`.\n     * @param unreserved Buffer remainder after both reserves are filled. Available for additional CL deposits\n     *        beyond the deposits reserve\n     * @param depositsReserve Buffer portion available for CL deposits, protected from withdrawals demand.\n     *        Resets on each oracle report, decreases via `withdrawDepositableEther()`\n     * @param withdrawalsReserve Buffer portion allocated to unfinalized withdrawals. Not depositable to CL.\n     *        Zero when all withdrawal requests are finalized\n     */\n    struct BufferedEtherAllocation {\n        uint256 total;\n        uint256 unreserved;\n        uint256 depositsReserve;\n        uint256 withdrawalsReserve;\n    }\n\n    /**\n     * @notice Calculates buffered ether allocation across reserves\n     * @dev Buffer is split by priority:\n     *\n     *      1. depositsReserve    - per-frame CL deposit allowance, filled first\n     *      2. withdrawalsReserve - covers unfinalized withdrawal requests\n     *      3. unreserved         - excess, available for additional CL deposits\n     *\n     *      ┌─────────── Total Buffered Ether ───────────┐\n     *      ├────────────────────┬───────────────────────┼─────┬──────────────┐\n     *      │●●●●●●●●●●●●●●●●●●●●│●●●●●●●●●●●●●●●●●●●●●●●●○○○○○│○○○○○○○○○○○○○○│\n     *      ├────────────────────┼───────────────────────┼─────┼──────────────┤\n     *      └─ Deposits Reserve ─┼─ Withdrawals Reserve ─┘     ├─ Unreserved ─┘\n     *                           └───── Unfinalized stETH ─────┘\n     *\n     *      ● - covered by Buffered Ether\n     *      ○ - not covered by Buffered Ether\n     *\n     *      depositsReserve    = min(total, stored deposits reserve)\n     *      withdrawalsReserve = min(total - depositsReserve, unfinalizedStETH)\n     *      unreserved         = total - depositsReserve - withdrawalsReserve\n     */\n    function _getBufferedEtherAllocation() internal view returns (BufferedEtherAllocation allocation) {\n        uint256 remaining = _getBufferedEther();\n        allocation.total = remaining;\n\n        allocation.depositsReserve = Math256.min(remaining, DEPOSITS_RESERVE_POSITION.getStorageUint256());\n        remaining -= allocation.depositsReserve;\n\n        allocation.withdrawalsReserve = Math256.min(remaining, _withdrawalQueue().unfinalizedStETH());\n        remaining -= allocation.withdrawalsReserve;\n\n        allocation.unreserved = remaining;\n    }\n\n    /**\n     * @notice Returns the currently effective deposits reserve — buffer portion available for CL deposits, protected\n     *         from withdrawals demand\n     * @dev Capped by current buffered ether. See `_getBufferedEtherAllocation()`\n     */\n    function getDepositsReserve() external view returns (uint256 depositsReserve) {\n        return _getBufferedEtherAllocation().depositsReserve;\n    }\n\n    /**\n     * @dev Stores new deposits reserve value and emits DepositsReserveSet event\n     */\n    function _setDepositsReserve(uint256 _newDepositsReserve) internal {\n        DEPOSITS_RESERVE_POSITION.setStorageUint256(_newDepositsReserve);\n        emit DepositsReserveSet(_newDepositsReserve);\n    }\n\n    /**\n     * @notice Returns the currently effective withdrawals reserve\n     * @dev This reserve is computed after deposits reserve is applied\n     * @return Amount reserved to satisfy unfinalized withdrawals\n     */\n    function getWithdrawalsReserve() external view returns (uint256) {\n        return _getBufferedEtherAllocation().withdrawalsReserve;\n    }\n\n    /**\n     * @notice Returns configured target for deposits reserve\n     * @return depositsReserveTarget Configured reserve target in wei\n     */\n    function getDepositsReserveTarget() public view returns (uint256) {\n        return DEPOSITS_RESERVE_TARGET_POSITION.getStorageUint256();\n    }\n\n    /**\n     * @notice Sets deposits reserve target\n     * @param _newDepositsReserveTarget New target value in wei\n     */\n    function setDepositsReserveTarget(uint256 _newDepositsReserveTarget) external {\n        _auth(BUFFER_RESERVE_MANAGER_ROLE);\n\n        _setDepositsReserveTarget(_newDepositsReserveTarget);\n    }\n\n    /**\n     * @notice Store deposits reserve target\n     * @dev Always updates target and emits DepositsReserveTargetSet\n     *      If target is lowered below current reserve, reserve is reduced immediately\n     *      If target is increased, reserve is not increased here and is synced on report processing via\n     *      `_updateBufferedEtherAllocation()`\n     * @param _newDepositsReserveTarget New target value in wei\n     */\n    function _setDepositsReserveTarget(uint256 _newDepositsReserveTarget) internal {\n        DEPOSITS_RESERVE_TARGET_POSITION.setStorageUint256(_newDepositsReserveTarget);\n        emit DepositsReserveTargetSet(_newDepositsReserveTarget);\n\n        uint256 currentDepositsReserve = DEPOSITS_RESERVE_POSITION.getStorageUint256();\n        // Do not increase reserve mid-frame: this could reduce available ETH for withdrawals finalization\n        // relative to the report reference slot assumptions. Increases are applied on oracle report processing.\n        if (_newDepositsReserveTarget < currentDepositsReserve) {\n            _setDepositsReserve(_newDepositsReserveTarget);\n        }\n    }\n\n    /**\n     * @return the amount of ether held by external sources to back external shares\n     */\n    function getExternalEther() external view returns (uint256) {\n        return _getExternalEther(_getInternalEther());\n    }\n\n    /**\n     * @return the total amount of shares backed by external ether sources\n     */\n    function getExternalShares() external view returns (uint256) {\n        return _getExternalShares();\n    }\n\n    /**\n     * @return the maximum amount of external shares that can be minted under the current external ratio limit\n     */\n    function getMaxMintableExternalShares() external view returns (uint256) {\n        return _getMaxMintableExternalShares();\n    }\n\n    /**\n     * @return the total amount of Execution Layer rewards collected to the Lido contract\n     * @dev ether received through LidoExecutionLayerRewardsVault is kept on this contract's balance the same way\n     * as other buffered ether is kept (until it gets deposited or withdrawn)\n     */\n    function getTotalELRewardsCollected() public view returns (uint256) {\n        return TOTAL_EL_REWARDS_COLLECTED_POSITION.getStorageUint256();\n    }\n\n    /**\n     * @return the Lido Locator address\n     */\n    function getLidoLocator() external view returns (ILidoLocator) {\n        return _getLidoLocator();\n    }\n\n    /**\n     * @dev DEPRECATED: Use getBalanceStats() for new integrations\n     * @notice Get the key values related to the Consensus Layer side of the contract.\n     * @return depositedValidators - number of deposited validators from Lido contract side\n     * @return beaconValidators - number of Lido validators visible on Consensus Layer, reported by oracle\n     * @return beaconBalance - total amount of ether on the Consensus Layer side (sum of all the balances of Lido validators)\n     */\n    function getBeaconStat()\n        external\n        view\n        returns (uint256 depositedValidators, uint256 beaconValidators, uint256 beaconBalance)\n    {\n        depositedValidators = _getSeedDepositsCount();\n        (uint256 clValidatorsBalance, uint256 clPendingBalance) = _getClValidatorsBalanceAndClPendingBalance();\n        /// @dev Since there is now no gap between the deposit on EL and its observation on the CL layer,\n        ///      for compatibility, beaconValidators = depositedValidators.\n        /// @dev beaconBalance returned as sum of active and pending balances because this amounts\n        ///      are visible on the CL side at moment of report\n        return (depositedValidators, depositedValidators, clValidatorsBalance.add(clPendingBalance));\n    }\n\n    /// @notice Returns current (i.e. from last report) CL balances and deposit sums since the last report\n    /// @return clValidatorsBalanceAtLastReport Sum of validator's active balances in wei\n    /// @return clPendingBalanceAtLastReport Sum of validator's pending deposits in wei\n    /// @return depositedSinceLastReport Deposits made since last oracle report in wei\n    /// @return depositedForCurrentReport Deposits made since last oracle report and up to\n    ///         the most recent refSlot in wei\n    function getBalanceStats()\n        external\n        view\n        returns (\n            uint256 clValidatorsBalanceAtLastReport,\n            uint256 clPendingBalanceAtLastReport,\n            uint256 depositedSinceLastReport,\n            uint256 depositedForCurrentReport\n        )\n    {\n        (clValidatorsBalanceAtLastReport, clPendingBalanceAtLastReport) = _getClValidatorsBalanceAndClPendingBalance();\n\n        depositedSinceLastReport = _getDepositedPostReport();\n        (depositedForCurrentReport,) = _getDepositedNextReportAdjusted();\n        /// @dev depositedNextReport is always less than or equal to depositedPostReport, so we can safely subtract\n        depositedForCurrentReport = depositedSinceLastReport - depositedForCurrentReport;\n    }\n\n    /**\n     * To accurately track the ETH that was deposited between the refSlot and the report transaction, we use the following\n     * approach:\n     *\n     * Data structure can be represented as:\n     *   - lastNonce - last deposit refSlot\n     *   - depositedPostReport - total sum of all deposits across all periods since the last successful report\n     *   - depositedNextReport - sum of deposits within the current reporting period, to be included in the next report\n     *\n     * Flow diagram:\n     *                                                              NOW\n     *                     ┌── depositedPostReport ────────────────┐ ↓\n     *      │○○○○○○○○○○○○○○│○●●○○R○○○●○○●○│○○●●●○○●○●○○○○│○○●●○○●○○●○○○○│\n     *      ┆         lastReport-↑       currentRefSlot-↑└────⁠┬────┘\n     *      ┆              ┆ currentReportFrame-↓        ┆    └depositedNextReport\n     *      ⁠║   frame X    ⁠║   frame X+1  ⁠║   frame X+2  ⁠║   frame X+3  ⁠║\n     *\n     *       R - report transaction slot\n     *       ● - slot with deposits\n     *       ○ - empty slot\n     *       ⁠║ - frame refSlot\n     *\n     * Logic:\n     *   - On any read/write operation, we first retrieve currentNonce (currentRefSlot)\n     *   - Whenever the nonce changes (i.e. the reporting period changes), we reset depositedNextReport to zero\n     *   - To obtain the exact deposit amount for the reporting periods, we compute:  depositedPostReport - depositedNextReport\n     *   - On each deposit, both counters are incremented:  depositedPostReport += amount and depositedNextReport += amount\n     *   - At reporting time, deposits already accounted for in the report are excluded from depositedPostReport, leaving\n     *     only the current period: depositedPostReport = depositedNextReport\n     */\n    /// @dev read and adjust the `depositedNextReport` value according to the current frame\n    function _getDepositedNextReportAdjusted() internal view returns (uint256 depositedNextReport, uint256 curNonce) {\n        uint256 lastNonce;\n        (depositedNextReport, lastNonce) = _getDepositedNextReportAndLastDepositNonce();\n        (curNonce,) = _getCurrentFrame(); // get current refSlot\n        if (curNonce != lastNonce) {\n            // treating all unsettled amounts as belonging to previous periods (aka nonces),\n            // i.e., as already settled (accounted in upcoming report)\n            depositedNextReport = 0;\n        }\n    }\n\n    /// @dev get currentFrameRefSlot from oracle processing state\n    function _getCurrentFrame() internal view returns (uint256 refSlot, uint256 refSlotTimestamp) {\n        (refSlot, refSlotTimestamp) = _accountingOracle().getCurrentFrame();\n    }\n\n    /**\n     * @notice Check that Lido allows depositing buffered ether to the Consensus Layer\n     * @dev Depends on the bunker mode and protocol pause state\n     */\n    function canDeposit() public view returns (bool) {\n        return !_withdrawalQueue().isBunkerModeActive() && !isStopped();\n    }\n\n    /**\n     * @return the amount of ether in the buffer that can be deposited to the Consensus Layer\n     * @dev Equals buffered ether minus withdrawals reserve from `_getBufferedEtherAllocation()`\n     */\n    function getDepositableEther() external view returns (uint256) {\n        return _getDepositableEther(_getBufferedEtherAllocation());\n    }\n\n    /**\n     * @notice Calculates depositable amount from precomputed buffer allocation\n     * @return Depositable amount, equal to `allocation.depositsReserve + allocation.unreserved`\n     */\n    function _getDepositableEther(BufferedEtherAllocation allocation) internal pure returns (uint256) {\n        return allocation.depositsReserve + allocation.unreserved;\n    }\n\n    /**\n     * @dev Spends depositable buffer and updates stored deposits reserve accordingly.\n     *      Decreases stored deposits reserve by spent amount, bounded below by zero\n     */\n    function _spendDepositableEther(uint256 _depositAmount) internal {\n        BufferedEtherAllocation memory allocation = _getBufferedEtherAllocation();\n        uint256 depositableEther = _getDepositableEther(allocation);\n        require(_depositAmount <= depositableEther, \"NOT_ENOUGH_ETHER\");\n\n        /// @dev the requested amount will be sent to DepositContract, so we increment\n        ///      depositedPostReport counter to keep _getInternalEther value correct\n        uint256 depositedPostReport = _getDepositedPostReport().add(_depositAmount);\n        _setBufferedEtherAndDepositedPostReport(allocation.total.sub(_depositAmount), depositedPostReport);\n        emit DepositedPostReportUpdated(depositedPostReport);\n        emit Unbuffered(_depositAmount);\n\n        (uint256 depositedNextReport, uint256 curNonce) = _getDepositedNextReportAdjusted();\n        depositedNextReport = depositedNextReport.add(_depositAmount);\n        _setDepositedNextReportAndLastDepositNonce(depositedNextReport, curNonce);\n\n        uint256 storedDepositsReserve = DEPOSITS_RESERVE_POSITION.getStorageUint256();\n        if (storedDepositsReserve > 0) {\n            _setDepositsReserve(storedDepositsReserve > _depositAmount ? storedDepositsReserve - _depositAmount : 0);\n        }\n    }\n\n    /**\n     * @notice Withdraw `_amount` of buffer to Staking Router\n     * @dev Can be called only by the Staking Router contract\n     * @notice _seedDepositsCount - DEPRECATED, it is used only for backward compatibility\n     *\n     * @param _amount amount of ETH to withdraw\n     * @param _seedDepositsCount amount of seed deposits. In case of top up this value will be equal to 0\n     */\n    function withdrawDepositableEther(uint256 _amount, uint256 _seedDepositsCount) external {\n        require(canDeposit(), \"CAN_NOT_DEPOSIT\");\n        IStakingRouter stakingRouter = _stakingRouter();\n        _auth(address(stakingRouter));\n        require(_amount != 0, \"ZERO_AMOUNT\");\n\n        _spendDepositableEther(_amount);\n\n        if (_seedDepositsCount > 0) {\n            uint256 newSeedDepositsCount = _getSeedDepositsCount().add(_seedDepositsCount);\n            _setSeedDepositsCount(newSeedDepositsCount);\n            /// @dev event name is kept for backward compatibility\n            emit DepositedValidatorsChanged(newSeedDepositsCount);\n        }\n\n        /// @dev forward the requested amount of ether to the StakingRouter\n        stakingRouter.receiveDepositableEther.value(_amount)();\n    }\n\n    /**\n     * @notice Mint stETH shares\n     * @param _recipient recipient of the shares\n     * @param _amountOfShares amount of shares to mint\n     * @dev can be called only by accounting\n     */\n    function mintShares(address _recipient, uint256 _amountOfShares) external {\n        _auth(_accounting());\n        _whenNotStopped();\n\n        _mintShares(_recipient, _amountOfShares);\n        _emitTransferAfterMintingShares(_recipient, _amountOfShares);\n    }\n\n    /**\n     * @notice Burn stETH shares from the `msg.sender` address\n     * @param _amountOfShares amount of shares to burn\n     * @dev can be called only by burner\n     */\n    function burnShares(uint256 _amountOfShares) external {\n        _auth(_burner());\n        _whenNotStopped();\n\n        uint256 preRebaseTokenAmount = getPooledEthByShares(_amountOfShares);\n        _burnShares(msg.sender, _amountOfShares);\n        uint256 postRebaseTokenAmount = getPooledEthByShares(_amountOfShares);\n\n        // Historically, Lido contract does not emit Transfer to zero address events\n        // for burning but emits SharesBurnt instead, so it's kept here for compatibility\n        _emitSharesBurnt(msg.sender, preRebaseTokenAmount, postRebaseTokenAmount, _amountOfShares);\n    }\n\n    /**\n     * @notice Mint shares backed by external ether sources\n     * @param _recipient Address to receive the minted shares\n     * @param _amountOfShares Amount of shares to mint\n     * @dev Can be called only by VaultHub\n     *      NB: Reverts if the external balance limit is exceeded.\n     */\n    function mintExternalShares(address _recipient, uint256 _amountOfShares) external {\n        require(_amountOfShares != 0, \"MINT_ZERO_AMOUNT_OF_SHARES\");\n        _auth(_vaultHub());\n        _whenNotStopped();\n\n        require(_amountOfShares <= _getMaxMintableExternalShares(), \"EXTERNAL_BALANCE_LIMIT_EXCEEDED\");\n\n        _decreaseStakingLimit(getPooledEthByShares(_amountOfShares));\n\n        _setExternalShares(_getExternalShares() + _amountOfShares);\n        _mintShares(_recipient, _amountOfShares);\n\n        _emitTransferAfterMintingShares(_recipient, _amountOfShares);\n\n        emit ExternalSharesMinted(_recipient, _amountOfShares);\n    }\n\n    /**\n     * @notice Burn external shares from the `msg.sender` address\n     * @param _amountOfShares Amount of shares to burn\n     * @dev can be called only by VaultHub\n     */\n    function burnExternalShares(uint256 _amountOfShares) external {\n        require(_amountOfShares != 0, \"BURN_ZERO_AMOUNT_OF_SHARES\");\n        _auth(_vaultHub());\n        _whenNotStopped();\n\n        uint256 externalShares = _getExternalShares();\n\n        if (externalShares < _amountOfShares) revert(\"EXT_SHARES_TOO_SMALL\");\n        _setExternalShares(externalShares - _amountOfShares);\n        _burnShares(msg.sender, _amountOfShares);\n\n        uint256 stethAmount = getPooledEthByShares(_amountOfShares);\n        _increaseStakingLimit(stethAmount);\n\n        // Historically, Lido contract does not emit Transfer to zero address events\n        // for burning but emits SharesBurnt instead, so it's kept here for compatibility\n        // we use the same `stethAmount` here as external shares burn does not change share rate\n        _emitSharesBurnt(msg.sender, stethAmount, stethAmount, _amountOfShares);\n        emit ExternalSharesBurnt(_amountOfShares);\n    }\n\n    /**\n     * @notice Transfer ether to the buffer decreasing the number of external shares in the same time\n     * @param _amountOfShares Amount of external shares to burn\n     * @dev it's an equivalent of using `submit` and then `burnExternalShares`\n     * but without any limits or pauses\n     *\n     * - msg.value is transferred to the buffer\n     */\n    function rebalanceExternalEtherToInternal(uint256 _amountOfShares) external payable {\n        require(msg.value != 0, \"ZERO_VALUE\");\n        _auth(_vaultHub());\n        _whenNotStopped();\n\n        if (msg.value != getPooledEthBySharesRoundUp(_amountOfShares)) {\n            revert(\"VALUE_SHARES_MISMATCH\");\n        }\n\n        uint256 externalShares = _getExternalShares();\n\n        if (externalShares < _amountOfShares) revert(\"EXT_SHARES_TOO_SMALL\");\n\n        // here the external balance is decreased (totalShares remains the same)\n        _setExternalShares(externalShares - _amountOfShares);\n\n        // here the buffer is increased\n        _setBufferedEther(_getBufferedEther() + msg.value);\n\n        // the result can be a smallish rebase like 1-2 wei per tx\n        // but it's not worth then using submit for it,\n        // so invariants are the same\n        emit ExternalEtherTransferredToBuffer(msg.value);\n        emit ExternalSharesBurnt(_amountOfShares);\n    }\n\n    /**\n     * @notice Process CL related state changes as a part of the report processing\n     * @dev All data validation was done by Accounting and OracleReportSanityChecker\n     * @dev Replaces validator counting in v3 with direct balance tracking for EIP-7251 support\n     * @param _reportTimestamp timestamp of the report\n     * @param _clValidatorsBalance Validators balance on the consensus layer\n     * @param _clPendingBalance Pending deposits balance on the consensus layer\n     */\n    function processClStateUpdate(uint256 _reportTimestamp, uint256 _clValidatorsBalance, uint256 _clPendingBalance)\n        external\n    {\n        _whenNotStopped();\n        _auth(_accounting());\n\n        (uint256 depositedNextReport, uint256 curNonce) = _getDepositedNextReportAdjusted();\n        /// @dev just save adjusted depositedNextReport\n        _setDepositedNextReportAndLastDepositNonce(depositedNextReport, curNonce);\n        /// @dev Since `depositedPostReport` accumulates all deposits, including those that occurred\n        ///      after `refSlot` but before the report, we must retain only the amount not\n        ///      reflected in the report\n        _setDepositedPostReport(depositedNextReport);\n        emit DepositedPostReportUpdated(depositedNextReport);\n\n        /// @dev new values of clValidatorsBalance and clPendingBalance should reflect all\n        ///      deposits during the report frame\n        _setClValidatorsBalanceAndClPendingBalance(_clValidatorsBalance, _clPendingBalance);\n        emit CLBalancesUpdated(_reportTimestamp, _clValidatorsBalance, _clPendingBalance);\n    }\n\n    /**\n     * @notice Internalize external bad debt\n     * @param _amountOfShares amount of shares to internalize\n     */\n    function internalizeExternalBadDebt(uint256 _amountOfShares) external {\n        require(_amountOfShares != 0, \"BAD_DEBT_ZERO_SHARES\");\n        _whenNotStopped();\n        _auth(_accounting());\n\n        uint256 externalShares = _getExternalShares();\n\n        require(externalShares >= _amountOfShares, \"EXT_SHARES_TOO_SMALL\");\n\n        // total shares remains the same\n        // external shares are decreased\n        // => external ether is decreased as well\n        // internal shares are increased\n        // internal ether stays the same\n        // => total pooled ether is decreased\n        // => share rate is decreased\n        // ==> losses are split between token holders\n        _setExternalShares(externalShares - _amountOfShares);\n\n        emit ExternalBadDebtInternalized(_amountOfShares);\n        emit ExternalSharesBurnt(_amountOfShares);\n    }\n\n    /**\n     * @notice Process withdrawals and collect rewards as a part of the report processing\n     * @dev All data validation was done by Accounting and OracleReportSanityChecker\n     * @param _reportTimestamp timestamp of the report\n     * @param _reportClBalance total balance of validators reported by the oracle\n     * @param _principalCLBalance total balance of validators in the previous report and deposits made since then\n     * @param _withdrawalsToWithdraw amount of withdrawals to collect from WithdrawalsVault\n     * @param _elRewardsToWithdraw amount of EL rewards to collect from ELRewardsVault\n     * @param _lastWithdrawalRequestToFinalize last withdrawal request ID to finalize\n     * @param _withdrawalsShareRate share rate used to fulfill withdrawal requests\n     * @param _etherToLockOnWithdrawalQueue amount of ETH to lock on the WithdrawalQueue to fulfill withdrawal requests\n     */\n    function collectRewardsAndProcessWithdrawals(\n        uint256 _reportTimestamp,\n        uint256 _reportClBalance,\n        uint256 _principalCLBalance,\n        uint256 _withdrawalsToWithdraw,\n        uint256 _elRewardsToWithdraw,\n        uint256 _lastWithdrawalRequestToFinalize,\n        uint256 _withdrawalsShareRate,\n        uint256 _etherToLockOnWithdrawalQueue\n    ) external {\n        _whenNotStopped();\n\n        ILidoLocator locator = _getLidoLocator();\n        _auth(_accounting(locator));\n\n        // withdraw execution layer rewards and put them to the buffer\n        if (_elRewardsToWithdraw > 0) {\n            _elRewardsVault(locator).withdrawRewards(_elRewardsToWithdraw);\n        }\n\n        // withdraw withdrawals and put them to the buffer\n        if (_withdrawalsToWithdraw > 0) {\n            _withdrawalVault(locator).withdrawWithdrawals(_withdrawalsToWithdraw);\n        }\n\n        // finalize withdrawals (send ether, assign shares for burning)\n        if (_etherToLockOnWithdrawalQueue > 0) {\n            _withdrawalQueue(locator)\n            .finalize\n            .value(_etherToLockOnWithdrawalQueue)(_lastWithdrawalRequestToFinalize, _withdrawalsShareRate);\n        }\n\n        uint256 postBufferedEther = _getBufferedEther()\n            .add(_elRewardsToWithdraw) // Collected from ELVault\n            .add(_withdrawalsToWithdraw) // Collected from WithdrawalVault\n            .sub(_etherToLockOnWithdrawalQueue); // Sent to WithdrawalQueue\n\n        _setBufferedEther(postBufferedEther);\n        _updateBufferedEtherAllocation();\n\n        emit ETHDistributed(\n            _reportTimestamp,\n            _principalCLBalance,\n            _reportClBalance,\n            _withdrawalsToWithdraw,\n            _elRewardsToWithdraw,\n            postBufferedEther\n        );\n    }\n\n    /**\n     * @dev Syncs stored deposits reserve to configured target after oracle report processing\n     */\n    function _updateBufferedEtherAllocation() internal {\n        uint256 depositsReserveTarget = getDepositsReserveTarget();\n        uint256 depositsReserve = DEPOSITS_RESERVE_POSITION.getStorageUint256();\n\n        if (depositsReserve < depositsReserveTarget) {\n            _setDepositsReserve(depositsReserveTarget);\n        }\n    }\n\n    /**\n     * @notice Emits the `TokenRebase` and `InternalShareRateUpdated` events\n     * @param _reportTimestamp timestamp of the refSlot block for the report applied\n     * @param _timeElapsed seconds since the previous applied report\n     * @param _preTotalShares the total number of shares before the oracle report tx\n     * @param _preTotalEther the total amount of ether before the oracle report tx\n     * @param _postTotalShares the total number of shares after the oracle report tx\n     * @param _postTotalEther the total amount of ether after the oracle report tx\n     * @param _postInternalShares the total number of internal shares after the oracle report tx\n     * @param _postInternalEther the total amount of internal ether after the oracle tx\n     * @param _sharesMintedAsFees the number of shares minted to pay fees to Lido and StakingModules\n     * @dev these events are used to calculate protocol gross (without protocol fees deducted) and net APR (StETH APR)\n     *\n     *      preShareRate = preTotalEther * 1e27 / preTotalShares\n     *      postShareRate = postTotalEther * 1e27 / postTotalShares\n     *      NET_APR = SECONDS_IN_YEAR * ((postShareRate - preShareRate) / preShareRate) / timeElapsed\n     *      postShareRateNoFees = postInternalEther * 1e27 / (postInternalShares - sharesMintedAsFees)\n     *      GROSS_APR = SECONDS_IN_YEAR * (postShareRateNoFees - preShareRate) / preShareRate / timeElapsed\n     *\n     */\n    function emitTokenRebase(\n        uint256 _reportTimestamp,\n        uint256 _timeElapsed,\n        uint256 _preTotalShares,\n        uint256 _preTotalEther,\n        uint256 _postTotalShares,\n        uint256 _postTotalEther,\n        uint256 _postInternalShares,\n        uint256 _postInternalEther,\n        uint256 _sharesMintedAsFees\n    ) external {\n        _auth(_accounting());\n\n        emit TokenRebased(\n            _reportTimestamp,\n            _timeElapsed,\n            _preTotalShares,\n            _preTotalEther,\n            _postTotalShares,\n            _postTotalEther,\n            _sharesMintedAsFees\n        );\n\n        emit InternalShareRateUpdated(_reportTimestamp, _postInternalShares, _postInternalEther, _sharesMintedAsFees);\n    }\n\n    /**\n     * @notice Overrides default AragonApp behavior to disallow recovery.\n     */\n    function transferToVault(\n        address /* _token */\n    )\n        external\n    {\n        revert(\"NOT_SUPPORTED\");\n    }\n\n    ////////////////////////////////////////////////////////////////////////////\n    ////////////////////// DEPRECATED PUBLIC METHODS ///////////////////////////\n    ////////////////////////////////////////////////////////////////////////////\n\n    /**\n     * @notice DEPRECATED: Returns current 0x01 withdrawal credentials of deposited validators\n     * @dev DEPRECATED: use StakingRouter.getWithdrawalCredentials() instead\n     */\n    function getWithdrawalCredentials() external view returns (bytes32) {\n        return _stakingRouter().getWithdrawalCredentials();\n    }\n\n    /**\n     * @notice DEPRECATED: Returns the treasury address\n     * @dev DEPRECATED: use LidoLocator.treasury()\n     */\n    function getTreasury() external view returns (address) {\n        return _getLidoLocator().treasury();\n    }\n\n    /**\n     * @notice DEPRECATED: Returns current staking rewards fee rate\n     * @dev DEPRECATED: Now fees information is stored in StakingRouter and\n     * with higher precision. Use StakingRouter.getStakingFeeAggregateDistribution() instead.\n     * @return totalFee total rewards fee in 1e4 precision (10000 is 100%). The value might be\n     * inaccurate because the actual value is truncated here to 1e4 precision.\n     */\n    function getFee() external view returns (uint16 totalFee) {\n        totalFee = _stakingRouter().getTotalFeeE4Precision();\n    }\n\n    /**\n     * @notice DEPRECATED: Returns current fee distribution, values relative to the total fee (getFee())\n     * @dev DEPRECATED: Now fees information is stored in StakingRouter and\n     * with higher precision. Use StakingRouter.getStakingFeeAggregateDistribution() instead.\n     * @return treasuryFeeBasisPoints return treasury fee in TOTAL_BASIS_POINTS (10000 is 100% fee) precision\n     * @return insuranceFeeBasisPoints always returns 0 because the capability to send fees to\n     * insurance from Lido contract is removed.\n     * @return operatorsFeeBasisPoints return total fee for all operators of all staking modules in\n     * TOTAL_BASIS_POINTS (10000 is 100% fee) precision.\n     * Previously returned total fee of all node operators of NodeOperatorsRegistry (Curated staking module now)\n     * The value might be inaccurate because the actual value is truncated here to 1e4 precision.\n     */\n    function getFeeDistribution()\n        external\n        view\n        returns (uint16 treasuryFeeBasisPoints, uint16 insuranceFeeBasisPoints, uint16 operatorsFeeBasisPoints)\n    {\n        IStakingRouter stakingRouter = _stakingRouter();\n        uint256 totalBasisPoints = stakingRouter.TOTAL_BASIS_POINTS();\n        uint256 totalFee = stakingRouter.getTotalFeeE4Precision();\n        (uint256 treasuryFeeBasisPointsAbs, uint256 operatorsFeeBasisPointsAbs) =\n            stakingRouter.getStakingFeeAggregateDistributionE4Precision();\n\n        insuranceFeeBasisPoints = 0; // explicitly set to zero\n        treasuryFeeBasisPoints = uint16((treasuryFeeBasisPointsAbs * totalBasisPoints) / totalFee);\n        operatorsFeeBasisPoints = uint16((operatorsFeeBasisPointsAbs * totalBasisPoints) / totalFee);\n    }\n\n    /// @dev Process user deposit, mint liquid tokens and increase the pool buffer\n    /// @param _referral address of referral.\n    /// @return amount of StETH shares minted\n    function _submit(address _referral) internal returns (uint256) {\n        require(msg.value != 0, \"ZERO_DEPOSIT\");\n\n        _decreaseStakingLimit(msg.value);\n\n        uint256 sharesAmount = getSharesByPooledEth(msg.value);\n\n        _mintShares(msg.sender, sharesAmount);\n\n        _setBufferedEther(_getBufferedEther() + msg.value);\n        emit Submitted(msg.sender, msg.value, _referral);\n\n        _emitTransferAfterMintingShares(msg.sender, sharesAmount);\n        return sharesAmount;\n    }\n\n    /// @dev Get the total amount of ether controlled by the protocol internally\n    /// (buffered ether + CL validators balance + CL pending balance + deposited since last report)\n    function _getInternalEther() internal view returns (uint256) {\n        (uint256 bufferedEther, uint256 depositedPostReport) = _getBufferedEtherAndDepositedPostReport();\n        (uint256 clValidatorsBalance, uint256 clPendingBalance) = _getClValidatorsBalanceAndClPendingBalance();\n\n        // With balance-based accounting, we don't need to calculate transientEther\n        // as pending deposits are already included in clPendingBalance\n        return bufferedEther.add(clValidatorsBalance).add(clPendingBalance).add(depositedPostReport);\n    }\n\n    /// @dev Calculate the amount of ether controlled by external entities\n    function _getExternalEther(uint256 _internalEther) internal view returns (uint256) {\n        (uint256 totalShares, uint256 externalShares) = _getTotalAndExternalShares();\n        uint256 internalShares = totalShares - externalShares;\n        return (externalShares * _internalEther) / internalShares;\n    }\n\n    /// @dev Get the total amount of ether controlled by the protocol and external entities\n    /// @return total balance in wei\n    function _getTotalPooledEther() internal view returns (uint256) {\n        uint256 internalEther = _getInternalEther();\n        return internalEther.add(_getExternalEther(internalEther));\n    }\n\n    /// @dev the numerator (in ether) of the share rate for StETH conversion between shares and ether and vice versa.\n    /// using the numerator and denominator different from totalShares and totalPooledEther allows to:\n    /// - avoid double precision loss on additional division on external ether calculations\n    /// - optimize gas cost of conversions between shares and ether\n    function _getShareRateNumerator() internal view returns (uint256) {\n        return _getInternalEther();\n    }\n\n    /// @dev the denominator (in shares) of the share rate for StETH conversion between shares and ether and vice versa.\n    function _getShareRateDenominator() internal view returns (uint256) {\n        (uint256 totalShares, uint256 externalShares) = _getTotalAndExternalShares();\n        uint256 internalShares = totalShares - externalShares; // never 0 because of the stone in the elevator\n        return internalShares;\n    }\n\n    /// @notice Calculate the maximum amount of external shares that can be additionally minted while maintaining\n    ///         maximum allowed external ratio limits\n    /// @return Maximum amount of external shares that can be additionally minted\n    /// @dev This function enforces the ratio between external and total shares to stay below a limit.\n    ///      The limit is defined by some maxRatioBP out of totalBP.\n    ///\n    ///      The calculation ensures: (externalShares + x) / (totalShares + x) <= maxRatioBP / totalBP\n    ///      Which gives formula: x <= (totalShares * maxRatioBP - externalShares * totalBP) / (totalBP - maxRatioBP)\n    ///\n    ///      Special cases:\n    ///      - Returns 0 if maxBP is 0 (external minting is disabled) or external shares already exceed the limit\n    ///      - Returns 2^256-1 if maxBP is 100% (external minting is unlimited)\n    function _getMaxMintableExternalShares() internal view returns (uint256) {\n        uint256 maxRatioBP = _getMaxExternalRatioBP();\n        if (maxRatioBP == 0) return 0;\n        if (maxRatioBP == TOTAL_BASIS_POINTS) return uint256(-1);\n\n        (uint256 totalShares, uint256 externalShares) = _getTotalAndExternalShares();\n\n        if (totalShares * maxRatioBP <= externalShares * TOTAL_BASIS_POINTS) return 0;\n\n        return (totalShares * maxRatioBP - externalShares * TOTAL_BASIS_POINTS) / (TOTAL_BASIS_POINTS - maxRatioBP);\n    }\n\n    function _pauseStaking() internal {\n        STAKING_STATE_POSITION.setStorageStakeLimitStruct(\n            STAKING_STATE_POSITION.getStorageStakeLimitStruct().setStakeLimitPauseState(true)\n        );\n\n        emit StakingPaused();\n    }\n\n    function _resumeStaking() internal {\n        STAKING_STATE_POSITION.setStorageStakeLimitStruct(\n            STAKING_STATE_POSITION.getStorageStakeLimitStruct().setStakeLimitPauseState(false)\n        );\n\n        emit StakingResumed();\n    }\n\n    function _getCurrentStakeLimit(StakeLimitState.Data memory _stakeLimitData) internal view returns (uint256) {\n        if (_stakeLimitData.isStakingPaused()) {\n            return 0;\n        }\n        if (!_stakeLimitData.isStakingLimitSet()) {\n            return uint256(-1);\n        }\n\n        return _stakeLimitData.calculateCurrentStakeLimit();\n    }\n\n    /// @dev note that staking limit may be increased by burnExternalShares function\n    function _decreaseStakingLimit(uint256 _amount) internal {\n        StakeLimitState.Data memory stakeLimitData = STAKING_STATE_POSITION.getStorageStakeLimitStruct();\n        // There is an invariant that protocol pause also implies staking pause.\n        // Thus, no need to check protocol pause explicitly.\n        require(!stakeLimitData.isStakingPaused(), \"STAKING_PAUSED\");\n\n        if (stakeLimitData.isStakingLimitSet()) {\n            uint256 currentStakeLimit = stakeLimitData.calculateCurrentStakeLimit();\n            require(_amount <= currentStakeLimit, \"STAKE_LIMIT\");\n\n            STAKING_STATE_POSITION.setStorageStakeLimitStruct(\n                stakeLimitData.updatePrevStakeLimit(currentStakeLimit - _amount)\n            );\n        }\n    }\n\n    function _increaseStakingLimit(uint256 _amount) internal {\n        StakeLimitState.Data memory stakeLimitData = STAKING_STATE_POSITION.getStorageStakeLimitStruct();\n        /// NB: burning external shares must be allowed even when staking is paused to allow external ether withdrawals\n        if (stakeLimitData.isStakingLimitSet() && !stakeLimitData.isStakingPaused()) {\n            uint256 newStakeLimit = stakeLimitData.calculateCurrentStakeLimit() + _amount;\n\n            STAKING_STATE_POSITION.setStorageStakeLimitStruct(stakeLimitData.updatePrevStakeLimit(newStakeLimit));\n        }\n    }\n\n    /// @dev Bytecode size-efficient analog of the `auth(_role)` modifier\n    /// @param _role Permission name\n    function _auth(bytes32 _role) internal view {\n        require(canPerform(msg.sender, _role, new uint256[](0)), \"APP_AUTH_FAILED\");\n    }\n\n    /// @dev simple address-based auth\n    function _auth(address _address) internal view {\n        require(msg.sender == _address, \"APP_AUTH_FAILED\");\n    }\n\n    function _stakingRouter() internal view returns (IStakingRouter) {\n        return IStakingRouter(_getLidoLocator().stakingRouter());\n    }\n\n    function _withdrawalQueue(ILidoLocator _locator) internal view returns (IWithdrawalQueue) {\n        return IWithdrawalQueue(_locator.withdrawalQueue());\n    }\n\n    function _withdrawalQueue() internal view returns (IWithdrawalQueue) {\n        return _withdrawalQueue(_getLidoLocator());\n    }\n\n    function _vaultHub() internal view returns (address) {\n        return _getLidoLocator().vaultHub();\n    }\n\n    function _burner(ILidoLocator _locator) internal view returns (address) {\n        return _locator.burner();\n    }\n\n    function _burner() internal view returns (address) {\n        return _getLidoLocator().burner();\n    }\n\n    function _accounting(ILidoLocator _locator) internal view returns (address) {\n        return _locator.accounting();\n    }\n\n    function _accounting() internal view returns (address) {\n        return _accounting(_getLidoLocator());\n    }\n\n    function _accountingOracle() internal view returns (IAccountingOracle) {\n        return IAccountingOracle(_getLidoLocator().accountingOracle());\n    }\n\n    function _elRewardsVault(ILidoLocator _locator) internal view returns (ILidoExecutionLayerRewardsVault) {\n        return ILidoExecutionLayerRewardsVault(_locator.elRewardsVault());\n    }\n\n    function _elRewardsVault() internal view returns (address) {\n        return address(_elRewardsVault(_getLidoLocator()));\n    }\n\n    function _withdrawalVault(ILidoLocator _locator) internal view returns (IWithdrawalVault) {\n        return IWithdrawalVault(_locator.withdrawalVault());\n    }\n\n    function _withdrawalVault() internal view returns (address) {\n        return address(_withdrawalVault(_getLidoLocator()));\n    }\n\n    /// @notice Mints shares on behalf of 0xdead address,\n    /// the shares amount is equal to the contract's balance.\n    ///\n    /// Allows to get rid of zero checks for `totalShares` and `totalPooledEther`\n    /// and overcome corner cases.\n    ///\n    /// NB: reverts if the current contract's balance is zero.\n    ///\n    /// @dev must be invoked before using the token\n    function _bootstrapInitialHolder() internal {\n        uint256 balance = address(this).balance;\n        assert(balance != 0);\n\n        if (_getTotalShares() == 0) {\n            // if protocol is empty, bootstrap it with the contract's balance\n            // address(0xdead) is a holder for initial shares\n            _setBufferedEther(balance);\n            // emitting `Submitted` before Transfer events to preserve events order in tx\n            emit Submitted(INITIAL_TOKEN_HOLDER, balance, 0);\n            _mintInitialShares(balance);\n        }\n    }\n\n    function _getExternalShares() internal view returns (uint256) {\n        return TOTAL_AND_EXTERNAL_SHARES_POSITION.getHighUint128();\n    }\n\n    function _setExternalShares(uint256 _externalShares) internal {\n        TOTAL_AND_EXTERNAL_SHARES_POSITION.setHighUint128(_externalShares);\n    }\n\n    function _getTotalAndExternalShares() internal view returns (uint256, uint256) {\n        return TOTAL_AND_EXTERNAL_SHARES_POSITION.getLowAndHighUint128();\n    }\n\n    // helpers: buffered ether and deposited ether since last report\n\n    function _getBufferedEther() internal view returns (uint256) {\n        return BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION.getLowUint128();\n    }\n\n    function _getDepositedPostReport() internal view returns (uint256) {\n        return BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION.getHighUint128();\n    }\n\n    function _getBufferedEtherAndDepositedPostReport() internal view returns (uint256, uint256) {\n        return BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION.getLowAndHighUint128();\n    }\n\n    function _setBufferedEther(uint256 _newBufferedEther) internal {\n        BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION.setLowUint128(_newBufferedEther);\n    }\n\n    function _setDepositedPostReport(uint256 _newDepositedPostReport) internal {\n        BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION.setHighUint128(_newDepositedPostReport);\n    }\n\n    function _setBufferedEtherAndDepositedPostReport(uint256 _newBufferedEther, uint256 _newDepositedPostReport)\n        internal\n    {\n        BUFFERED_ETHER_AND_DEPOSITED_POST_REPORT_POSITION.setLowAndHighUint128(\n            _newBufferedEther, _newDepositedPostReport\n        );\n    }\n\n    function _getDepositedNextReportAndLastDepositNonce() internal view returns (uint256, uint256) {\n        return DEPOSITED_NEXT_REPORT_AND_LAST_DEPOSIT_NONCE_POSITION.getLowAndHighUint128();\n    }\n\n    function _setDepositedNextReportAndLastDepositNonce(uint256 _depositedNextReport, uint256 _lastDepositNonce)\n        internal\n    {\n        DEPOSITED_NEXT_REPORT_AND_LAST_DEPOSIT_NONCE_POSITION.setLowAndHighUint128(\n            _depositedNextReport, _lastDepositNonce\n        );\n    }\n\n    // helpers: [DEPRECATED] deposited validators count\n\n    function _getSeedDepositsCount() internal view returns (uint256) {\n        return SEED_DEPOSITS_COUNT_POSITION.getLowUint128();\n    }\n\n    function _setSeedDepositsCount(uint256 _newSeedDepositsCount) internal {\n        SEED_DEPOSITS_COUNT_POSITION.setLowUint128(_newSeedDepositsCount);\n    }\n\n    // helpers: CL validators and pending balances\n\n    function _getClValidatorsBalanceAndClPendingBalance() internal view returns (uint256, uint256) {\n        return CL_VALIDATORS_BALANCE_AND_CL_PENDING_BALANCE_POSITION.getLowAndHighUint128();\n    }\n\n    function _setClValidatorsBalanceAndClPendingBalance(uint256 _newClValidatorsBalance, uint256 _newClPendingBalance)\n        internal\n    {\n        CL_VALIDATORS_BALANCE_AND_CL_PENDING_BALANCE_POSITION.setLowAndHighUint128(\n            _newClValidatorsBalance, _newClPendingBalance\n        );\n    }\n\n    // ---\n\n    function _setLidoLocator(address _newLidoLocator) internal {\n        LOCATOR_AND_MAX_EXTERNAL_RATIO_POSITION.setLowUint160(uint160(_newLidoLocator));\n    }\n\n    function _getLidoLocator() internal view returns (ILidoLocator) {\n        return ILidoLocator(LOCATOR_AND_MAX_EXTERNAL_RATIO_POSITION.getLowUint160());\n    }\n\n    function _setMaxExternalRatioBP(uint256 _newMaxExternalRatioBP) internal {\n        require(_newMaxExternalRatioBP <= TOTAL_BASIS_POINTS, \"INVALID_MAX_EXTERNAL_RATIO\");\n\n        LOCATOR_AND_MAX_EXTERNAL_RATIO_POSITION.setHighUint96(_newMaxExternalRatioBP);\n\n        emit MaxExternalRatioBPSet(_newMaxExternalRatioBP);\n    }\n\n    function _getMaxExternalRatioBP() internal view returns (uint256) {\n        return LOCATOR_AND_MAX_EXTERNAL_RATIO_POSITION.getHighUint96();\n    }\n}\n","deployed_bytecode":"0x6080604052600436106103cb5760003560e01c63ffffffff1680630103349c1461042e578063046f7da21461045857806306f187a41461046f57806306fdde031461049357806307da68f51461051d5780630803fac01461053257806308c37d551461055b578063095ea7b314610570578063136dd43c1461059457806314457a32146105a95780631574d953146105c15780631794bb3c146105d657806318160ddd146105f357806319208451146106085780631b250097146106205780631ea7ca89146106515780632087400e1461066657806323b872dd146106815780632914b9bd146106ab5780632cb5f784146107205780632de03aa11461073b578063313ce5671461075057806332f0a3b51461077b5780633644e5151461079057806337cfdaca146105f3578063389ed267146107a557806338ac3c55146107ba57806339509351146107f55780633b19e84a146108195780633f683b6a1461082e57806347b714e0146108435780634ad509b214610858578063528c198a146108605780635639671514610884578063574ff50d14610899578063609c4c6c146108b757806363021d8b146108cc578063648c51e7146108e1578063665b4b0b146108f95780636d7804591461094857806370a082311461097257806372e62e56146109935780637475f913146109ab578063752f77f1146109c057806378ffcfe2146109fb5780637a28fb8814610a035780637c8d9e3814610a1b5780637e7db6e114610a265780637ecebe0014610a4757806380afdea814610a6857806384b0196e14610a7d578063853c637d14610b855780638831f09e14610b9d5780638a5e568814610bb25780638aa1043514610bc75780638b3dd74914610bdc5780638ee1c0a814610bf15780638fcb4e5b14610c095780639271e3e614610c2d57806395d89b4114610c5a5780639861f8e514610c6f5780639ca5a3d014610c845780639d4941d814610c99578063a1658fad14610cba578063a1903eab14610d21578063a457c2d714610d35578063a479e50814610d59578063a9059cbb14610d6e578063ae2e353814610d92578063b3320d9a14610dc5578063ced72f8714610dda578063d4aae0c414610e06578063d5002f2e14610e1b578063d505accf14610e30578063dd62ed3e14610e69578063de4796ed14610e90578063e16a906514610ea5578063e654ff1714610eba578063e78a587514610ecf578063eb85262f14610ee4578063f0bfd7e814610ef9578063f2cfa87d14610f0e578063f352e17e14610f23578063f5eb42dc14610f3b578063f999c50614610f5c578063fa64ebac14610f71575b3615610421576040805160e560020a62461bcd02815260206004820152600e60248201527f4e4f4e5f454d5054595f44415441000000000000000000000000000000000000604482015290519081900360640190fd5b61042b6000610f86565b50005b34801561043a57600080fd5b50610446600435611063565b60408051918252519081900360200190f35b34801561046457600080fd5b5061046d6110f6565b005b34801561047b57600080fd5b5061046d600160a060020a0360043516602435611131565b34801561049f57600080fd5b506104a861127a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104e25781810151838201526020016104ca565b50505050905090810190601f16801561050f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561052957600080fd5b5061046d6112b1565b34801561053e57600080fd5b506105476112ea565b604080519115158252519081900360200190f35b34801561056757600080fd5b50610446611313565b34801561057c57600080fd5b50610547600160a060020a0360043516602435611337565b3480156105a057600080fd5b5061044661134d565b3480156105b557600080fd5b5061046d60043561135f565b3480156105cd57600080fd5b50610446611394565b61046d600160a060020a03600435811690602435166044356113c4565b3480156105ff57600080fd5b50610446611526565b34801561061457600080fd5b50610446600435611530565b34801561062c57600080fd5b5061046d60043560243560443560643560843560a43560c43560e435610104356115bd565b34801561065d57600080fd5b5061054761166e565b34801561067257600080fd5b5061046d60043560243561168f565b34801561068d57600080fd5b50610547600160a060020a036004358116906024351660443561181d565b3480156106b757600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261070494369492936024939284019190819084018382808284375094975061183f9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561072c57600080fd5b5061046d600435602435611922565b34801561074757600080fd5b50610446611a23565b34801561075c57600080fd5b50610765611a47565b6040805160ff9092168252519081900360200190f35b34801561078757600080fd5b50610704611a4c565b34801561079c57600080fd5b50610446611ac1565b3480156107b157600080fd5b50610446611b22565b3480156107c657600080fd5b506107cf611b46565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561080157600080fd5b50610547600160a060020a0360043516602435611b7a565b34801561082557600080fd5b50610704611bbb565b34801561083a57600080fd5b50610547611bff565b34801561084f57600080fd5b50610446611c1e565b61046d611c28565b34801561086c57600080fd5b5061046d600160a060020a0360043516602435611ca4565b34801561089057600080fd5b50610446611cd0565b3480156108a557600080fd5b5061046d600435602435604435611d14565b3480156108c357600080fd5b50610446611dc7565b3480156108d857600080fd5b50610446611de8565b3480156108ed57600080fd5b5061046d600435611df2565b34801561090557600080fd5b5061090e611f35565b6040805197151588529515156020880152868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561095457600080fd5b50610446600160a060020a0360043581169060243516604435611fc6565b34801561097e57600080fd5b50610446600160a060020a0360043516612002565b34801561099f57600080fd5b5061046d600435612015565b3480156109b757600080fd5b5061046d612152565b3480156109cc57600080fd5b506109d561222d565b6040805161ffff9485168152928416602084015292168183015290519081900360600190f35b61046d612402565b348015610a0f57600080fd5b50610446600435612442565b61046d6004356124bb565b348015610a3257600080fd5b50610547600160a060020a0360043516612669565b348015610a5357600080fd5b50610446600160a060020a036004351661266f565b348015610a7457600080fd5b5061044661268a565b348015610a8957600080fd5b50610a926126b5565b60408051908101839052600160a060020a038216606082015260808082528551908201528451819060208083019160a084019189019080838360005b83811015610ae6578181015183820152602001610ace565b50505050905090810190601f168015610b135780820380516001836020036101000a031916815260200191505b50838103825286518152865160209182019188019080838360005b83811015610b46578181015183820152602001610b2e565b50505050905090810190601f168015610b735780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b348015610b9157600080fd5b5061046d600435612804565b348015610ba957600080fd5b5061044661284c565b348015610bbe57600080fd5b50610446612856565b348015610bd357600080fd5b50610446612869565b348015610be857600080fd5b50610446612894565b348015610bfd57600080fd5b5061046d6004356128bf565b348015610c1557600080fd5b50610446600160a060020a0360043516602435612a14565b348015610c3957600080fd5b5061046d60043560243560443560643560843560a43560c43560e435612a40565b348015610c6657600080fd5b506104a8612c5e565b348015610c7b57600080fd5b50610704612c95565b348015610c9057600080fd5b50610446612cc0565b348015610ca557600080fd5b5061046d600160a060020a0360043516612cca565b348015610cc657600080fd5b506040805160206004604435818101358381028086018501909652808552610547958335600160a060020a0316956024803596369695606495939492019291829185019084908082843750949750612d1a9650505050505050565b610446600160a060020a0360043516612e65565b348015610d4157600080fd5b50610547600160a060020a0360043516602435612e70565b348015610d6557600080fd5b50610704612f01565b348015610d7a57600080fd5b50610547600160a060020a0360043516602435612fb6565b348015610d9e57600080fd5b50610da7612fc3565b60408051938452602084019290925282820152519081900360600190f35b348015610dd157600080fd5b5061046d613001565b348015610de657600080fd5b50610def613065565b6040805161ffff9092168252519081900360200190f35b348015610e1257600080fd5b506107046130a9565b348015610e2757600080fd5b506104466130d4565b348015610e3c57600080fd5b5061046d600160a060020a036004358116906024351660443560643560ff6084351660a43560c4356130de565b348015610e7557600080fd5b50610446600160a060020a036004358116906024351661331e565b348015610e9c57600080fd5b50610547613349565b348015610eb157600080fd5b5061044661335c565b348015610ec657600080fd5b5061070461336e565b348015610edb57600080fd5b50610547613378565b348015610ef057600080fd5b506104466133f8565b348015610f0557600080fd5b5061044661341c565b348015610f1a57600080fd5b5061044661342f565b348015610f2f57600080fd5b5061046d600435613441565b348015610f4757600080fd5b50610446600160a060020a0360043516613461565b348015610f6857600080fd5b5061046d61346c565b348015610f7d57600080fd5b506104466134f2565b600080341515610fe0576040805160e560020a62461bcd02815260206004820152600c60248201527f5a45524f5f4445504f5349540000000000000000000000000000000000000000604482015290519081900360640190fd5b610fe93461351d565b610ff234611530565b9050610ffe3382613624565b506110113461100b6137c6565b016137df565b60408051348152600160a060020a0385166020820152815133927f96a25c8ce0baabc1fdefd93e9ed25d8e092a3332f3aa9a41722b5697231d1d1a928290030190a261105d33826137fd565b92915050565b600080806fffffffffffffffffffffffffffffffff84106110ce576040805160e560020a62461bcd02815260206004820152601060248201527f5348415245535f544f4f5f4c4152474500000000000000000000000000000000604482015290519081900360640190fd5b6110d6613812565b91506110e061381c565b90506110ee8285028261383d565b949350505050565b61111f7f2fc10cc8ae19568712f7a176fb4978616a610650813c9d05326c34abb62749c7613865565b6111276138d7565b61112f613929565b565b801515611188576040805160e560020a62461bcd02815260206004820152601a60248201527f4d494e545f5a45524f5f414d4f554e545f4f465f534841524553000000000000604482015290519081900360640190fd5b61119861119361397f565b6139c3565b6111a0613a23565b6111a8613a90565b8111156111ff576040805160e560020a62461bcd02815260206004820152601f60248201527f45585445524e414c5f42414c414e43455f4c494d49545f455843454544454400604482015290519081900360640190fd5b61121061120b82612442565b61351d565b6112228161121c613b07565b01613b20565b61122c8282613624565b5061123782826137fd565b604080518281529051600160a060020a038416917fee473f96486a2f4b93ccb6729f121223e96975db6e0d6a5ef01f56477e3eab3b919081900360200190a25050565b60408051808201909152601781527f4c6971756964207374616b656420457468657220322e30000000000000000000602082015290565b6112da7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d613865565b6112e2613b3e565b61112f613b90565b6000806112f5612894565b9050801580159061130d57508061130a613bda565b10155b91505090565b7f33969636f1fbf3d7d062d4de4a08e7bd3c46606ec28b3a4398d2665be559b92181565b6000611344338484613bde565b50600192915050565b600080516020615c4483398151915281565b6113887f33969636f1fbf3d7d062d4de4a08e7bd3c46606ec28b3a4398d2665be559b921613865565b61139181613d00565b50565b60006113bf7f3d3e9bd6e90e5d1f1c6839835bcbe5746a47c9a013d1eae6e80c248264c06a81613d8f565b905090565b60006113ce612894565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901561148f5760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561145457818101518382015260200161143c565b50505050905090810190601f1680156114815780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50611498613d93565b6114a184613dfa565b60408051600160a060020a038616815290517f61f9416d3c29deb4e424342445a2b132738430becd9fa275e11297c90668b22e9181900360200190a16114e683613e21565b6114f06004613f58565b508261150f6114fe82613fbe565b61150783613ffb565b600019613bde565b61151882613d00565b611520614038565b50505050565b60006113bf6140fe565b60006fffffffffffffffffffffffffffffffff8210611599576040805160e560020a62461bcd02815260206004820152600d60248201527f4554485f544f4f5f4c4152474500000000000000000000000000000000000000604482015290519081900360640190fd5b6115a1613812565b6115a961381c565b83028115156115b457fe5b0490505b919050565b6115c8611193614124565b6040805189815260208101899052808201889052606081018790526080810186905260a0810183905290518a917fff08c3ef606d198e316ef5b822193c489965899eb4e3c248cea1a4626c3eda50919081900360c00190a2604080518481526020810184905280820183905290518a917faf00d86be4cd299db16aa59803992e174fa88b67d81a0c7dd0148f9a75606a8d919081900360600190a2505050505050505050565b60006113bf61168a600080516020615cc4833981519152614136565b614189565b60008061169a613378565b15156116f0576040805160e560020a62461bcd02815260206004820152600f60248201527f43414e5f4e4f545f4445504f5349540000000000000000000000000000000000604482015290519081900360640190fd5b6116f8614194565b9150611703826139c3565b83151561175a576040805160e560020a62461bcd02815260206004820152600b60248201527f5a45524f5f414d4f554e54000000000000000000000000000000000000000000604482015290519081900360640190fd5b611763846141d8565b60008311156117c35761178483611778614354565b9063ffffffff61437f16565b905061178f8161440d565b6040805182815290517fe0aacfc334457703148118055ec794ac17654c6f918d29638ba3b18003cee5ff9181900360200190a15b81600160a060020a03166313ae8460856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117fe57600080fd5b505af1158015611812573d6000803e3d6000fd5b505050505050505050565b600061182a84338461443d565b6118358484846144d1565b5060019392505050565b6000611849612f01565b600160a060020a03166304bf2a7f836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118a457818101518382015260200161188c565b50505050905090810190601f1680156118d15780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156118f057600080fd5b505af1158015611904573d6000803e3d6000fd5b505050506040513d602081101561191a57600080fd5b505192915050565b611939600080516020615c44833981519152613865565b6b7fffffffffffffffffffffff82111561199d576040805160e560020a62461bcd02815260206004820152601960248201527f544f4f5f4c415247455f4d41585f5354414b455f4c494d495400000000000000604482015290519081900360640190fd5b6119e46119c983836119bc600080516020615cc4833981519152614136565b919063ffffffff6144f516565b600080516020615cc48339815191529063ffffffff61471916565b604080518381526020810183905281517fce9fddf6179affa1ea7bf36d80a6bf0284e0f3b91f4b2fa6eea2af923e7fac2d929181900390910190a15050565b7f2fc10cc8ae19568712f7a176fb4978616a610650813c9d05326c34abb62749c781565b601290565b6000611a566130a9565b600160a060020a03166332f0a3b56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b505af1158015611aa4573d6000803e3d6000fd5b505050506040513d6020811015611aba57600080fd5b5051905090565b6000611acb612c95565b600160a060020a031663b8f120b3306040518263ffffffff1660e01b81526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015611a9057600080fd5b7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d81565b600080600080611b54614774565b9094509250611b616147a8565b9150611b6b6147c1565b50939492939192918303919050565b336000818152600160209081526040808320600160a060020a03871684529091528120549091611344918590611bb6908663ffffffff61437f16565b613bde565b6000611bc56147ef565b600160a060020a03166361d027b36040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b6000611c18600080516020615c24833981519152613d8f565b15905090565b60006113bf6137c6565b611c33611193614808565b611c6f611c42346117786134f2565b7fafe016039542d12eec0183bb0b1ffc2ca45b027126a494672fba4154ee77facb9063ffffffff61481a16565b6040805134815290517fd27f9b0c98bdee27044afa149eadcd2047d6399cb6613a45c5b87e6aca76e6b59181900360200190a1565b611caf611193614124565b611cb7613a23565b611cc18282613624565b50611ccc82826137fd565b5050565b6000611cda614194565b600160a060020a031663563967156040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b600080611d1f613a23565b611d2a611193614124565b611d326147c1565b91509150611d40828261481e565b611d498261484f565b6040805183815290517fd87d7ff193e5d1560bdbe21e4e14d13dde0de4e49a03812517640af0a2d5c42c9181900360200190a1611d86848461486d565b6040805185815260208101859052815187927fc091cf4d34e62bb075bf8dadd00496528c94b8f3fdec3affd7414840847017d2928290030190a25050505050565b60006113bf611de3600080516020615cc4833981519152614136565b61489e565b60006113bf613b07565b6000811515611e4b576040805160e560020a62461bcd02815260206004820152601460248201527f4241445f444542545f5a45524f5f534841524553000000000000000000000000604482015290519081900360640190fd5b611e53613a23565b611e5e611193614124565b611e66613b07565b905081811015611ec0576040805160e560020a62461bcd02815260206004820152601460248201527f4558545f5348415245535f544f4f5f534d414c4c000000000000000000000000604482015290519081900360640190fd5b611ecb828203613b20565b6040805183815290517f4e80196ef1285462b2c4ee20f88e18e58c59e405eec6fd51f5fd1d614bc98a7f9181900360200190a16040805183815290517fad21467656c56eb8c99f7916faa12f7a657a04d8802100acec62e92451ac56069181900360200190a15050565b6000806000806000806000611f48615bd3565b611f5f600080516020615cc4833981519152614136565b9050611f6a81614189565b9750611f75816148d7565b9650611f808161489e565b955080606001516001606060020a03169450806040015163ffffffff16935080602001516001606060020a03169250806000015163ffffffff1691505090919293949596565b600080611fd283612442565b9050611fdf85338361443d565b611fea8585856148e9565b611ff685858386614aed565b8091505b509392505050565b600061105d61201083614b89565b612442565b60008082151561206f576040805160e560020a62461bcd02815260206004820152601a60248201527f4255524e5f5a45524f5f414d4f554e545f4f465f534841524553000000000000604482015290519081900360640190fd5b61207a61119361397f565b612082613a23565b61208a613b07565b9150828210156120e4576040805160e560020a62461bcd02815260206004820152601460248201527f4558545f5348415245535f544f4f5f534d414c4c000000000000000000000000604482015290519081900360640190fd5b6120ef838303613b20565b6120f93384614ba4565b5061210383612442565b905061210e81614cd8565b61211a33828386614d3b565b6040805184815290517fad21467656c56eb8c99f7916faa12f7a657a04d8802100acec62e92451ac56069181900360200190a1505050565b612169600080516020615c44833981519152613865565b6121716112ea565b15156121c7576040805160e560020a62461bcd02815260206004820152600f60248201527f4e4f545f494e495449414c495a45440000000000000000000000000000000000604482015290519081900360640190fd5b6121cf613a23565b6121d761166e565b1515611127576040805160e560020a62461bcd02815260206004820152600f60248201527f414c52454144595f524553554d45440000000000000000000000000000000000604482015290519081900360640190fd5b600080600080600080600080612241614194565b945084600160a060020a031663271662ec6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561227e57600080fd5b505af1158015612292573d6000803e3d6000fd5b505050506040513d60208110156122a857600080fd5b5051604080517f9fbb7bae0000000000000000000000000000000000000000000000000000000081529051919550600160a060020a03871691639fbb7bae916004808201926020929091908290030181600087803b15801561230957600080fd5b505af115801561231d573d6000803e3d6000fd5b505050506040513d602081101561233357600080fd5b5051604080517fefcdcc0e000000000000000000000000000000000000000000000000000000008152815161ffff9093169550600160a060020a0388169263efcdcc0e926004808401939192918290030181600087803b15801561239657600080fd5b505af11580156123aa573d6000803e3d6000fd5b505050506040513d60408110156123c057600080fd5b5080516020909101516000985061ffff9182169350169050828483028115156123e557fe5b049750828482028115156123f557fe5b0495505050505050909192565b61240d611193614d8d565b6040805134815290517f6e5086f7e1ab04bd826e77faae35b1bcfe31bd144623361a40ea4af51670b1c39181900360200190a1565b60006fffffffffffffffffffffffffffffffff82106124ab576040805160e560020a62461bcd02815260206004820152601060248201527f5348415245535f544f4f5f4c4152474500000000000000000000000000000000604482015290519081900360640190fd5b6124b361381c565b6115a9613812565b6000341515612514576040805160e560020a62461bcd02815260206004820152600a60248201527f5a45524f5f56414c554500000000000000000000000000000000000000000000604482015290519081900360640190fd5b61251f61119361397f565b612527613a23565b61253082611063565b3414612586576040805160e560020a62461bcd02815260206004820152601560248201527f56414c55455f5348415245535f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b61258e613b07565b9050818110156125e8576040805160e560020a62461bcd02815260206004820152601460248201527f4558545f5348415245535f544f4f5f534d414c4c000000000000000000000000604482015290519081900360640190fd5b6125f3828203613b20565b6125ff3461100b6137c6565b6040805134815290517f4ee34277c93491eeca655ad5c42ae1c193a5719e1c8837df9058af7696817cce9181900360200190a16040805183815290517fad21467656c56eb8c99f7916faa12f7a657a04d8802100acec62e92451ac56069181900360200190a15050565b50600190565b600160a060020a031660009081526002602052604090205490565b60006113bf7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b613d8f565b6060806000806126c3612c95565b600160a060020a031663f4409319306040518263ffffffff1660e01b81526004018082600160a060020a0316600160a060020a03168152602001915050600060405180830381600087803b15801561271a57600080fd5b505af115801561272e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052608081101561275757600080fd5b81019080805164010000000081111561276f57600080fd5b8201602081018481111561278257600080fd5b815164010000000081118282018710171561279c57600080fd5b505092919060200180516401000000008111156127b857600080fd5b820160208101848111156127cb57600080fd5b81516401000000008111828201871017156127e557600080fd5b5050602082015160409092015194985096509450919250505090919293565b600080612812611193614d9f565b61281a613a23565b61282383612442565b915061282f3384614ba4565b5061283983612442565b905061284733838386614d3b565b505050565b60006113bf613a90565b6000612860614de3565b60600151905090565b60006113bf7f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6613d8f565b60006113bf7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e613d8f565b6000806128ca6112ea565b1515612920576040805160e560020a62461bcd02815260206004820152600f60248201527f4e4f545f494e495449414c495a45440000000000000000000000000000000000604482015290519081900360640190fd5b612928614eab565b915081600160a060020a0316638f7797c26040518163ffffffff1660e01b815260040161012060405180830381600087803b15801561296657600080fd5b505af115801561297a573d6000803e3d6000fd5b505050506040513d61012081101561299157600080fd5b506060015190508015156129ef576040805160e560020a62461bcd02815260206004820152600960248201527f4e4f5f5245504f52540000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6129f96003614eef565b612a036004613f58565b612a0b614f4d565b61284783613d00565b600080612a223385856148e9565b612a2b83612442565b9050612a3933858386614aed565b9392505050565b600080612a4b613a23565b612a536147ef565b9150612a6161119383615020565b6000861115612ae557612a738261505d565b600160a060020a0316639342c8f4876040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015612ab857600080fd5b505af1158015612acc573d6000803e3d6000fd5b505050506040513d6020811015612ae257600080fd5b50505b6000871115612b5557612af78261509a565b600160a060020a0316633194528a886040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612b3c57600080fd5b505af1158015612b50573d6000803e3d6000fd5b505050505b6000831115612bce57612b6782613fbe565b600160a060020a031663b6013cef8487876040518463ffffffff1660e01b815260040180838152602001828152602001925050506000604051808303818588803b158015612bb457600080fd5b505af1158015612bc8573d6000803e3d6000fd5b50505050505b612bee83612be2896117788a6117786137c6565b9063ffffffff6150d716565b9050612bf9816137df565b612c0161516b565b60408051898152602081018b9052808201899052606081018890526080810183905290518b917f92dd3cb149a1eebd51fd8c2a3653fd96f30c4ac01d4f850fc16d46abd6c3e92f919081900360a00190a250505050505050505050565b60408051808201909152600581527f7374455448000000000000000000000000000000000000000000000000000000602082015290565b60006113bf7f42b2d95e1ce15ce63bf9a8d9f6312cf44b23415c977ffa3b884333422af8941c613d8f565b60006113bf6151a2565b6040805160e560020a62461bcd02815260206004820152600d60248201527f4e4f545f535550504f5254454400000000000000000000000000000000000000604482015290519081900360640190fd5b600080612d256112ea565b1515612d345760009150611ffa565b612d3c6130a9565b9050600160a060020a0381161515612d575760009150611ffa565b80600160a060020a031663fdef9106863087612d72886151bb565b60405163ffffffff861660e01b8152600160a060020a03808616600483019081529085166024830152604482018490526080606483019081528351608484015283519192909160a490910190602085019080838360005b83811015612de1578181015183820152602001612dc9565b50505050905090810190601f168015612e0e5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015612e3057600080fd5b505af1158015612e44573d6000803e3d6000fd5b505050506040513d6020811015612e5a57600080fd5b505195945050505050565b600061105d82610f86565b336000908152600160209081526040808320600160a060020a038616845290915281205482811015612eec576040805160e560020a62461bcd02815260206004820152601460248201527f414c4c4f57414e43455f42454c4f575f5a45524f000000000000000000000000604482015290519081900360640190fd5b6118353385611bb6848763ffffffff6150d716565b600080612f0c6130a9565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb60048201527fddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd6160248201529051600160a060020a03929092169163be00bbd8916044808201926020929091908290030181600087803b1580156118f057600080fd5b60006113443384846144d1565b6000806000806000612fd3614354565b9450612fdd614774565b90925090508480612ff4848463ffffffff61437f16565b9450945094505050909192565b613018600080516020615c44833981519152613865565b61303a6119c9613035600080516020615cc4833981519152614136565b6151c5565b6040517f9b2a687c198898fcc32a33bbc610d478f177a73ab7352023e6cc1de5bf12a3df90600090a1565b600061306f614194565b600160a060020a0316639fbb7bae6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b60006113bf7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b613d8f565b60006113bf6151d8565b60008042861015613139576040805160e560020a62461bcd02815260206004820152601060248201527f444541444c494e455f4558504952454400000000000000000000000000000000604482015290519081900360640190fd5b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9898989613166836151f1565b60408051602080820197909752600160a060020a0395861681830152939094166060840152608083019190915260a082015260c08082018a90528251808303909101815260e090910191829052805190928291908401908083835b602083106131e05780518252601f1990920191602091820191016131c1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150613217612c95565b604080517f804e5eb3000000000000000000000000000000000000000000000000000000008152306004820152602481018590529051600160a060020a03929092169163804e5eb3916044808201926020929091908290030181600087803b15801561328257600080fd5b505af1158015613296573d6000803e3d6000fd5b505050506040513d60208110156132ac57600080fd5b505190506132bd898287878761523b565b1515613313576040805160e560020a62461bcd02815260206004820152601160248201527f494e56414c49445f5349474e4154555245000000000000000000000000000000604482015290519081900360640190fd5b611812898989613bde565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600019613356612894565b14905090565b60006113bf613369615400565b615440565b60006113bf6147ef565b600061338261546e565b600160a060020a0316632b95b7816040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156133bc57600080fd5b505af11580156133d0573d6000803e3d6000fd5b505050506040513d60208110156133e657600080fd5b50511580156113bf5750611c18611bff565b7f84ea57490227bc2be925c684e2a367071d69890b629590198f4125a018eb1de881565b6000613426614de3565b60400151905090565b60006113bf61343c614de3565b615480565b613458600080516020615c44833981519152613865565b6113918161548f565b600061105d82614b89565b6134957f84ea57490227bc2be925c684e2a367071d69890b629590198f4125a018eb1de8613865565b61349d61166e565b156112e2576040805160e560020a62461bcd02815260206004820152600e60248201527f414c52454144595f504155534544000000000000000000000000000000000000604482015290519081900360640190fd5b60006113bf7fafe016039542d12eec0183bb0b1ffc2ca45b027126a494672fba4154ee77facb613d8f565b613525615bd3565b600061353e600080516020615cc4833981519152614136565b915061354982614189565b1561359e576040805160e560020a62461bcd02815260206004820152600e60248201527f5354414b494e475f504155534544000000000000000000000000000000000000604482015290519081900360640190fd5b6135a7826148d7565b15612847576135b58261553d565b90508083111561360f576040805160e560020a62461bcd02815260206004820152600b60248201527f5354414b455f4c494d4954000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128476119c98385840363ffffffff61561c16565b6000600160a060020a0383161515613686576040805160e560020a62461bcd02815260206004820152601160248201527f4d494e545f544f5f5a45524f5f41444452000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383163014156136e7576040805160e560020a62461bcd02815260206004820152601660248201527f4d494e545f544f5f53544554485f434f4e545241435400000000000000000000604482015290519081900360640190fd5b6136f3826117786151d8565b90506fffffffffffffffffffffffffffffffff1981161561375e576040805160e560020a62461bcd02815260206004820152600f60248201527f5348415245535f4f564552464c4f570000000000000000000000000000000000604482015290519081900360640190fd5b61377c600080516020615c648339815191528263ffffffff61566016565b600160a060020a0383166000908152602081905260409020546137a5908363ffffffff61437f16565b600160a060020a039093166000908152602081905260409020929092555090565b60006113bf600080516020615ca48339815191526156a4565b611391600080516020615ca48339815191528263ffffffff61566016565b611ccc60008361380c84612442565b84614aed565b60006113bf615400565b60008060008061382a6156c7565b9250925081830390508093505b50505090565b6000821561385c57816001840381151561385357fe5b04600101612a39565b60009392505050565b6040805160008152602081019091526138819033908390612d1a565b1515611391576040805160e560020a62461bcd02815260206004820152600f60248201527f4150505f415554485f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b6138df6156e1565b6138fe600080516020615c24833981519152600163ffffffff61481a16565b6040517f62451d457bc659158be6e6247f56ec1df424a5c7597f71c20c2bc44e0965c8f990600090a1565b6139546119c96000613948600080516020615cc4833981519152614136565b9063ffffffff61574d16565b6040517fedaeeae9aed70c4545d3ab0065713261c9cee8d6cf5c8b07f52f0a65fd91efda90600090a1565b60006139896147ef565b600160a060020a0316636dd6e80b6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b33600160a060020a03821614611391576040805160e560020a62461bcd02815260206004820152600f60248201527f4150505f415554485f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b613a3a600080516020615c24833981519152613d8f565b151561112f576040805160e560020a62461bcd02815260206004820152601360248201527f434f4e54524143545f49535f53544f5050454400000000000000000000000000604482015290519081900360640190fd5b600080600080613a9e6151a2565b9250821515613ab05760009350613837565b612710831415613ac4576000199350613837565b613acc6156c7565b9092509050612710810283830211613ae75760009350613837565b8261271003612710820284840203811515613afe57fe5b04935050505090565b60006113bf600080516020615c64833981519152615772565b611391600080516020615c648339815191528263ffffffff61578716565b613b46613a23565b613b65600080516020615c24833981519152600063ffffffff61481a16565b6040517f7acc84e34091ae817647a4c49116f5cc07f319078ba80f8f5fde37ea7e25cbd690600090a1565b613baf6119c96001613948600080516020615cc4833981519152614136565b6040517f26d1807b479eaba249c1214b82e4b65bbb0cc73ee8a17901324b1ef1b5904e4990600090a1565b4390565b600160a060020a0383161515613c3e576040805160e560020a62461bcd02815260206004820152601660248201527f415050524f56455f46524f4d5f5a45524f5f4144445200000000000000000000604482015290519081900360640190fd5b600160a060020a0382161515613c9e576040805160e560020a62461bcd02815260206004820152601460248201527f415050524f56455f544f5f5a45524f5f41444452000000000000000000000000604482015290519081900360640190fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000613d327f3d3e9bd6e90e5d1f1c6839835bcbe5746a47c9a013d1eae6e80c248264c06a818363ffffffff61481a16565b6040805183815290517f72cc060f0ebe226352283dbe16fdcdb0d674f306ad980fbfa3d4b6932fee0b1e9181900360200190a1613d7c600080516020615ce4833981519152613d8f565b905080821015611ccc57611ccc826157bc565b5490565b3031801515613d9e57fe5b613da66151d8565b151561139157613db5816137df565b6040805182815260006020820152815161dead927f96a25c8ce0baabc1fdefd93e9ed25d8e092a3332f3aa9a41722b5697231d1d1a928290030190a261139181615810565b611391600080516020615c84833981519152600160a060020a03831663ffffffff61582916565b600160a060020a0381161515613e81576040805160e560020a62461bcd02815260206004820152601060248201527f5a45524f5f454950373132535445544800000000000000000000000000000000604482015290519081900360640190fd5b6000613e8b612c95565b600160a060020a031614613ee9576040805160e560020a62461bcd02815260206004820152601760248201527f45495037313253544554485f414c52454144595f534554000000000000000000604482015290519081900360640190fd5b613f197f42b2d95e1ce15ce63bf9a8d9f6312cf44b23415c977ffa3b884333422af8941c8263ffffffff61481a16565b60408051600160a060020a038316815290517fb80a5409082a3729c9fc139f8b41192c40e85252752df2c07caebd613086ca839181900360200190a150565b613f887f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a68263ffffffff61481a16565b6040805182815290517ffddcded6b4f4730c226821172046b48372d3cd963c159701ae1b7c3bcac541bb9181900360200190a150565b600081600160a060020a03166337d5fe996040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b600081600160a060020a03166327810b6e6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b614040612894565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156140c55760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360008381101561145457818101518382015260200161143c565b5061112f6140d1613bda565b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e9063ffffffff61481a16565b600080614109615400565b905061130d61411782615440565b829063ffffffff61437f16565b60006113bf6141316147ef565b615020565b61413e615bd3565b600061414983613d8f565b63ffffffff600082901c811684526001606060020a03602083811c821690860152608083901c909116604085015260a09190911c16606083015250919050565b5163ffffffff161590565b600061419e6147ef565b600160a060020a031663ef6c064c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b6141e0615bfa565b60008060008060006141f0614de3565b95506141fb86615480565b945084871115614255576040805160e560020a62461bcd02815260206004820152601060248201527f4e4f545f454e4f5547485f455448455200000000000000000000000000000000604482015290519081900360640190fd5b614261876117786147a8565b86519094506142809061427a908963ffffffff6150d716565b85615865565b6040805185815290517fd87d7ff193e5d1560bdbe21e4e14d13dde0de4e49a03812517640af0a2d5c42c9181900360200190a16040805188815290517f76a397bea5768d4fca97ef47792796e35f98dc81b16c1de84e28a818e1f971089181900360200190a16142ee6147c1565b9093509150614303838863ffffffff61437f16565b925061430f838361481e565b614326600080516020615ce4833981519152613d8f565b9050600081111561434b5761434b878211614342576000614346565b8782035b6157bc565b50505050505050565b60006113bf7f3f0eaa2c0f16ff9775c078f3df30470d8c042317b24ad1defa240b1c3e10b2386156a4565b60408051808201909152601181527f4d4154485f4144445f4f564552464c4f5700000000000000000000000000000060208201526000908383019084821015611ffa5760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360008381101561145457818101518382015260200161143c565b6113917f3f0eaa2c0f16ff9775c078f3df30470d8c042317b24ad1defa240b1c3e10b2388263ffffffff61566016565b600160a060020a03808416600090815260016020908152604080832093861683529290522054600019811461152057818110156144c4576040805160e560020a62461bcd02815260206004820152601260248201527f414c4c4f57414e43455f45584345454445440000000000000000000000000000604482015290519081900360640190fd5b6115208484848403613bde565b60006144dc82611530565b90506144e98484836148e9565b61152084848484614aed565b6144fd615bd3565b821515614554576040805160e560020a62461bcd02815260206004820152601460248201527f5a45524f5f4d41585f5354414b455f4c494d4954000000000000000000000000604482015290519081900360640190fd5b6001606060020a038311156145b3576040805160e560020a62461bcd02815260206004820152601960248201527f544f4f5f4c415247455f4d41585f5354414b455f4c494d495400000000000000604482015290519081900360640190fd5b8183101561460b576040805160e560020a62461bcd02815260206004820152601860248201527f544f4f5f4c415247455f4c494d49545f494e4352454153450000000000000000604482015290519081900360640190fd5b811580614627575063ffffffff828481151561462357fe5b0411155b151561467d576040805160e560020a62461bcd02815260206004820152601860248201527f544f4f5f534d414c4c5f4c494d49545f494e4352454153450000000000000000604482015290519081900360640190fd5b835163ffffffff16158061469c575060608401516001606060020a0316155b806146b3575083602001516001606060020a031683105b156146c8576001606060020a03831660208501525b8115156146d65760006146e3565b81838115156146e157fe5b045b63ffffffff90811660408601526001606060020a0384166060860152845116156147115763ffffffff431684525b509192915050565b611ccc60a082606001516001606060020a0316901b6080836040015163ffffffff16901b602084602001516001606060020a0316901b6000856000015163ffffffff16901b171717836000191661481a90919063ffffffff16565b6000806147a07f096e465397f38e659238ccd5d5a2c434ced54a63fd8d694045bfb058ab9d8112615884565b915091509091565b60006113bf600080516020615ca4833981519152615772565b60008060006147ce6158b3565b90935090506147db6158df565b5091508082146147ea57600092505b509091565b60006113bf600080516020615c8483398151915261595f565b60006113bf6148156147ef565b61505d565b9055565b611ccc7f8d3ed945c7718edcdb639b1235f2bbe3fa81f4a6cec7a436d8ea13fbc502d957838363ffffffff61597216565b611391600080516020615ca48339815191528263ffffffff61578716565b611ccc7f096e465397f38e659238ccd5d5a2c434ced54a63fd8d694045bfb058ab9d8112838363ffffffff61597216565b60006148a982614189565b156148b6575060006115b8565b6148bf826148d7565b15156148ce57506000196115b8565b61105d8261553d565b606001516001606060020a0316151590565b6000600160a060020a038416151561494b576040805160e560020a62461bcd02815260206004820152601760248201527f5452414e534645525f46524f4d5f5a45524f5f41444452000000000000000000604482015290519081900360640190fd5b600160a060020a03831615156149ab576040805160e560020a62461bcd02815260206004820152601560248201527f5452414e534645525f544f5f5a45524f5f414444520000000000000000000000604482015290519081900360640190fd5b600160a060020a038316301415614a0c576040805160e560020a62461bcd02815260206004820152601a60248201527f5452414e534645525f544f5f53544554485f434f4e5452414354000000000000604482015290519081900360640190fd5b614a14613a23565b50600160a060020a03831660009081526020819052604090205480821115614a86576040805160e560020a62461bcd02815260206004820152601060248201527f42414c414e43455f455843454544454400000000000000000000000000000000604482015290519081900360640190fd5b614a96818363ffffffff6150d716565b600160a060020a038086166000908152602081905260408082209390935590851681522054614acb908363ffffffff61437f16565b600160a060020a03909316600090815260208190526040902092909255505050565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a382600160a060020a031684600160a060020a03167f9d9c909296d9c674451c0c24f02cb64981eb3b727f99865939192f880a755dcb836040518082815260200191505060405180910390a350505050565b600160a060020a031660009081526020819052604090205490565b600080600160a060020a0384161515614c07576040805160e560020a62461bcd02815260206004820152601360248201527f4255524e5f46524f4d5f5a45524f5f4144445200000000000000000000000000604482015290519081900360640190fd5b50600160a060020a03831660009081526020819052604090205480831115614c79576040805160e560020a62461bcd02815260206004820152601060248201527f42414c414e43455f455843454544454400000000000000000000000000000000604482015290519081900360640190fd5b614c8583612be26151d8565b9150614ca5600080516020615c648339815191528363ffffffff61566016565b614cb5818463ffffffff6150d716565b600160a060020a0390941660009081526020819052604090209390935592915050565b614ce0615bd3565b6000614cf9600080516020615cc4833981519152614136565b9150614d04826148d7565b8015614d165750614d1482614189565b155b156128475782614d258361553d565b0190506128476119c9838363ffffffff61561c16565b60408051848152602081018490528082018390529051600160a060020a038616917f8b2a1e1ad5e0578c3dd82494156e985dade827a87c573b5c1c7716a32162ad64919081900360600190a250505050565b60006113bf614d9a6147ef565b61509a565b6000614da96147ef565b600160a060020a03166327810b6e6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b614deb615bfa565b6000614df56137c6565b8083529050614e1a81614e15600080516020615ce4833981519152613d8f565b61599a565b604083018190529003614e9a81614e2f61546e565b600160a060020a031663d0fb84e86040518163ffffffff1660e01b8152600401602060405180830381600087803b158015614e6957600080fd5b505af1158015614e7d573d6000803e3d6000fd5b505050506040513d6020811015614e9357600080fd5b505161599a565b606083018190529003602082015290565b6000614eb56147ef565b600160a060020a0316635a2031f96040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b614ef7612869565b8114611391576040805160e560020a62461bcd02815260206004820152601b60248201527f554e45585045435445445f434f4e54524143545f56455253494f4e0000000000604482015290519081900360640190fd5b7fc36804a03ec742b57b141e4e5d8d3bd1ddb08451fd0f9983af8aaab357a78e2f7fa84c096ee27e195f25d7b6c7c2a03229e49f1a2a5087e57ce7d7127707942fe360008080808080614f9f88615884565b9096509450614fad87615884565b935093506801bc16d674ec800000858403029150614fcb8483615865565b614fd36158df565b509050614fe0828261481e565b614feb86600061486d565b614ff48361440d565b61500588600063ffffffff61481a16565b61501687600063ffffffff61481a16565b5050505050505050565b600081600160a060020a0316639624e83e6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b600081600160a060020a031663e441d25f6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b600081600160a060020a03166369d421486040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b60408051808201909152601281527f4d4154485f5355425f554e444552464c4f57000000000000000000000000000060208201526000908190848411156151635760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360008381101561145457818101518382015260200161143c565b505050900390565b600080615176611394565b915061518f600080516020615ce4833981519152613d8f565b905081811015611ccc57611ccc826157bc565b60006113bf600080516020615c848339815191526159b0565b8051602002815290565b6151cd615bd3565b506000606082015290565b60006113bf600080516020615c648339815191526156a4565b600160a060020a03811660009081526002602052604090205461521b81600163ffffffff61437f16565b600160a060020a0390921660009081526002602052604090209190915590565b6000606080600061524b896159bd565b156153d15760408051602080820189905281830188905260ff8a1660f81b606083015282516041818403018152606183018452608583018c815260a58401948552815160c585015281519197507f1626ba7e00000000000000000000000000000000000000000000000000000000948d9489949293919260e5909101919085019080838360005b838110156152ea5781810151838201526020016152d2565b50505050905090810190601f1680156153175780820380516001836020036101000a031916815260200191505b509350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509150604051602081016040526020818451602086018d5afa60203d146001821416156153a557815192505b50507f1626ba7e00000000000000000000000000000000000000000000000000000000811493506153f4565b88600160a060020a03166153e7898989896159c5565b600160a060020a03161493505b50505095945050505050565b6000806000806000615410615b2f565b9350935061541c614774565b9092509050615437836117788381888763ffffffff61437f16565b94505050505090565b60008060008061544e6156c7565b9250925081830390508085830281151561546457fe5b0495945050505050565b60006113bf61547b6147ef565b613fbe565b60208101516040909101510190565b6127108111156154e9576040805160e560020a62461bcd02815260206004820152601a60248201527f494e56414c49445f4d41585f45585445524e414c5f524154494f000000000000604482015290519081900360640190fd5b615507600080516020615c848339815191528263ffffffff615b4916565b6040805182815290517f13c514ee70ee403f89bdf5ab83908edba92a77e3a61e19b774670c0a2cb2d7e69181900360200190a150565b600080600080846040015163ffffffff16600014151561558657846040015163ffffffff1685606001516001606060020a031681151561557957fe5b046001606060020a031692505b846000015163ffffffff1643039150828202905084606001516001606060020a031685602001516001606060020a0316106155ed576155e86155d586602001516001606060020a031683615b6b565b86606001516001606060020a0316615b8b565b615613565b6156138186602001516001606060020a03160186606001516001606060020a0316615bad565b95945050505050565b615624615bd3565b6001606060020a0382111561563557fe5b825163ffffffff16151561564557fe5b506001606060020a031660208201524363ffffffff16815290565b60006fffffffffffffffffffffffffffffffff1961567d84613d8f565b169050612847836fffffffffffffffffffffffffffffffff8416831763ffffffff61481a16565b60006fffffffffffffffffffffffffffffffff6156c083613d8f565b1692915050565b6000806147a0600080516020615c64833981519152615884565b6156f8600080516020615c24833981519152613d8f565b1561112f576040805160e560020a62461bcd02815260206004820152601260248201527f434f4e54524143545f49535f4143544956450000000000000000000000000000604482015290519081900360640190fd5b615755615bd3565b816157605743615763565b60005b63ffffffff1683525090919050565b6000608061577f83613d8f565b901c92915050565b60006fffffffffffffffffffffffffffffffff6157a384613d8f565b16905061284783608084901b831763ffffffff61481a16565b6157da600080516020615ce48339815191528263ffffffff61481a16565b6040805182815290517f257937ce49d8cbbe1d68a2be7297a18a6e2830528d9154a0f131e5094e8946139181900360200190a150565b61581c61dead82613624565b5061139161dead826137fd565b611ccc600160a060020a03821673ffffffffffffffffffffffffffffffffffffffff1961585585613d8f565b859291161763ffffffff61481a16565b611ccc600080516020615ca4833981519152838363ffffffff61597216565b6000808061589184613d8f565b6fffffffffffffffffffffffffffffffff81169560809190911c945092505050565b6000806147a07f8d3ed945c7718edcdb639b1235f2bbe3fa81f4a6cec7a436d8ea13fbc502d957615884565b6000806158ea614eab565b600160a060020a03166372f79b136040518163ffffffff1660e01b81526004016040805180830381600087803b15801561592357600080fd5b505af1158015615937573d6000803e3d6000fd5b505050506040513d604081101561594d57600080fd5b50805160209091015190939092509050565b6000600160a060020a036156c083613d8f565b61284783608083901b6fffffffffffffffffffffffffffffffff85161763ffffffff61481a16565b60008183106159a95781612a39565b5090919050565b600060a061577f83613d8f565b6000903b1190565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083821c1115615a68576040805160e560020a62461bcd02815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60408051600080825260208083018085528a905260ff8916838501526060830188905260808301879052925160019360a0808501949193601f19840193928390039091019190865af1158015615ac2573d6000803e3d6000fd5b5050604051601f190151915050600160a060020a0381161515615613576040805160e560020a62461bcd02815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b6000806147a0600080516020615ca4833981519152615884565b611ccc600160a060020a03615b5d84613d8f565b84911660a084901b1761481a565b600080615b788484615bcf565b9050806001038385030291505092915050565b600080615b988484615bcf565b90508083028160010385020191505092915050565b600080615bba8484615bcf565b90508060010383028185020191505092915050565b1190565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6080604051908101604052806000815260200160008152602001600081526020016000815250905600644132c4ddd5bb6f0655d5fe2870dcec7870e6be4758890f366b83441f9fdecea42eee1333c0758ba72be38e728b6dadb32ea767de5b4ddbaea1dae85b1b051f6038150aecaa250d524370a0fdcdec13f2690e0723eaf277f41d7cae26b359e6d92bc31601d11a10411d08f59b7146d8a5915af253cde25f8e66b67beb4be22381a11fa1111afa59b50051f60ccf604a39d96acb484dc467ad8eadb4a63f0a5fa3678de4a579be090bed1177e0a24f77cc29d181ac22fd7688aca344d8938015da4fbe3b9cbd98dfae5dff538bbff4ba61f38979d4d7419bcd006f3e6250ec13a165627a7a7230582004506343672daee1a10cfda641b05c63e70a50c0b10b29386069251b9bb50aba0029","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"constantinople","libraries":{},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}}},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.4.24+commit.e67f0147","is_verified_via_verifier_alliance":false,"verified_at":"2026-07-15T06:52:41.991593Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60806040526200003e7f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a660001962000054602090811b6200481a17901c565b6200004e6200005860201b60201c565b6200026b565b9055565b620000686200015a60201b60201c565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562000144576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101562000108578181015183820152602001620000ee565b50505050905090810190601f168015620001365780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50620001586000196200018d60201b60201c565b565b60006200018860008051602062005faa83398151915260001b600019166200026760201b62003d8f1760201c565b905090565b6200019d6200015a60201b60201c565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156200023c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101562000108578181015183820152602001620000ee565b506200026460008051602062005faa8339815191528262000054602090811b6200481a17901c565b50565b5490565b615d2f806200027b6000396000f3006080604052600436106103cb5760003560e01c63ffffffff1680630103349c1461042e578063046f7da21461045857806306f187a41461046f57806306fdde031461049357806307da68f51461051d5780630803fac01461053257806308c37d551461055b578063095ea7b314610570578063136dd43c1461059457806314457a32146105a95780631574d953146105c15780631794bb3c146105d657806318160ddd146105f357806319208451146106085780631b250097146106205780631ea7ca89146106515780632087400e1461066657806323b872dd146106815780632914b9bd146106ab5780632cb5f784146107205780632de03aa11461073b578063313ce5671461075057806332f0a3b51461077b5780633644e5151461079057806337cfdaca146105f3578063389ed267146107a557806338ac3c55146107ba57806339509351146107f55780633b19e84a146108195780633f683b6a1461082e57806347b714e0146108435780634ad509b214610858578063528c198a146108605780635639671514610884578063574ff50d14610899578063609c4c6c146108b757806363021d8b146108cc578063648c51e7146108e1578063665b4b0b146108f95780636d7804591461094857806370a082311461097257806372e62e56146109935780637475f913146109ab578063752f77f1146109c057806378ffcfe2146109fb5780637a28fb8814610a035780637c8d9e3814610a1b5780637e7db6e114610a265780637ecebe0014610a4757806380afdea814610a6857806384b0196e14610a7d578063853c637d14610b855780638831f09e14610b9d5780638a5e568814610bb25780638aa1043514610bc75780638b3dd74914610bdc5780638ee1c0a814610bf15780638fcb4e5b14610c095780639271e3e614610c2d57806395d89b4114610c5a5780639861f8e514610c6f5780639ca5a3d014610c845780639d4941d814610c99578063a1658fad14610cba578063a1903eab14610d21578063a457c2d714610d35578063a479e50814610d59578063a9059cbb14610d6e578063ae2e353814610d92578063b3320d9a14610dc5578063ced72f8714610dda578063d4aae0c414610e06578063d5002f2e14610e1b578063d505accf14610e30578063dd62ed3e14610e69578063de4796ed14610e90578063e16a906514610ea5578063e654ff1714610eba578063e78a587514610ecf578063eb85262f14610ee4578063f0bfd7e814610ef9578063f2cfa87d14610f0e578063f352e17e14610f23578063f5eb42dc14610f3b578063f999c50614610f5c578063fa64ebac14610f71575b3615610421576040805160e560020a62461bcd02815260206004820152600e60248201527f4e4f4e5f454d5054595f44415441000000000000000000000000000000000000604482015290519081900360640190fd5b61042b6000610f86565b50005b34801561043a57600080fd5b50610446600435611063565b60408051918252519081900360200190f35b34801561046457600080fd5b5061046d6110f6565b005b34801561047b57600080fd5b5061046d600160a060020a0360043516602435611131565b34801561049f57600080fd5b506104a861127a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104e25781810151838201526020016104ca565b50505050905090810190601f16801561050f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561052957600080fd5b5061046d6112b1565b34801561053e57600080fd5b506105476112ea565b604080519115158252519081900360200190f35b34801561056757600080fd5b50610446611313565b34801561057c57600080fd5b50610547600160a060020a0360043516602435611337565b3480156105a057600080fd5b5061044661134d565b3480156105b557600080fd5b5061046d60043561135f565b3480156105cd57600080fd5b50610446611394565b61046d600160a060020a03600435811690602435166044356113c4565b3480156105ff57600080fd5b50610446611526565b34801561061457600080fd5b50610446600435611530565b34801561062c57600080fd5b5061046d60043560243560443560643560843560a43560c43560e435610104356115bd565b34801561065d57600080fd5b5061054761166e565b34801561067257600080fd5b5061046d60043560243561168f565b34801561068d57600080fd5b50610547600160a060020a036004358116906024351660443561181d565b3480156106b757600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261070494369492936024939284019190819084018382808284375094975061183f9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561072c57600080fd5b5061046d600435602435611922565b34801561074757600080fd5b50610446611a23565b34801561075c57600080fd5b50610765611a47565b6040805160ff9092168252519081900360200190f35b34801561078757600080fd5b50610704611a4c565b34801561079c57600080fd5b50610446611ac1565b3480156107b157600080fd5b50610446611b22565b3480156107c657600080fd5b506107cf611b46565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561080157600080fd5b50610547600160a060020a0360043516602435611b7a565b34801561082557600080fd5b50610704611bbb565b34801561083a57600080fd5b50610547611bff565b34801561084f57600080fd5b50610446611c1e565b61046d611c28565b34801561086c57600080fd5b5061046d600160a060020a0360043516602435611ca4565b34801561089057600080fd5b50610446611cd0565b3480156108a557600080fd5b5061046d600435602435604435611d14565b3480156108c357600080fd5b50610446611dc7565b3480156108d857600080fd5b50610446611de8565b3480156108ed57600080fd5b5061046d600435611df2565b34801561090557600080fd5b5061090e611f35565b6040805197151588529515156020880152868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561095457600080fd5b50610446600160a060020a0360043581169060243516604435611fc6565b34801561097e57600080fd5b50610446600160a060020a0360043516612002565b34801561099f57600080fd5b5061046d600435612015565b3480156109b757600080fd5b5061046d612152565b3480156109cc57600080fd5b506109d561222d565b6040805161ffff9485168152928416602084015292168183015290519081900360600190f35b61046d612402565b348015610a0f57600080fd5b50610446600435612442565b61046d6004356124bb565b348015610a3257600080fd5b50610547600160a060020a0360043516612669565b348015610a5357600080fd5b50610446600160a060020a036004351661266f565b348015610a7457600080fd5b5061044661268a565b348015610a8957600080fd5b50610a926126b5565b60408051908101839052600160a060020a038216606082015260808082528551908201528451819060208083019160a084019189019080838360005b83811015610ae6578181015183820152602001610ace565b50505050905090810190601f168015610b135780820380516001836020036101000a031916815260200191505b50838103825286518152865160209182019188019080838360005b83811015610b46578181015183820152602001610b2e565b50505050905090810190601f168015610b735780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b348015610b9157600080fd5b5061046d600435612804565b348015610ba957600080fd5b5061044661284c565b348015610bbe57600080fd5b50610446612856565b348015610bd357600080fd5b50610446612869565b348015610be857600080fd5b50610446612894565b348015610bfd57600080fd5b5061046d6004356128bf565b348015610c1557600080fd5b50610446600160a060020a0360043516602435612a14565b348015610c3957600080fd5b5061046d60043560243560443560643560843560a43560c43560e435612a40565b348015610c6657600080fd5b506104a8612c5e565b348015610c7b57600080fd5b50610704612c95565b348015610c9057600080fd5b50610446612cc0565b348015610ca557600080fd5b5061046d600160a060020a0360043516612cca565b348015610cc657600080fd5b506040805160206004604435818101358381028086018501909652808552610547958335600160a060020a0316956024803596369695606495939492019291829185019084908082843750949750612d1a9650505050505050565b610446600160a060020a0360043516612e65565b348015610d4157600080fd5b50610547600160a060020a0360043516602435612e70565b348015610d6557600080fd5b50610704612f01565b348015610d7a57600080fd5b50610547600160a060020a0360043516602435612fb6565b348015610d9e57600080fd5b50610da7612fc3565b60408051938452602084019290925282820152519081900360600190f35b348015610dd157600080fd5b5061046d613001565b348015610de657600080fd5b50610def613065565b6040805161ffff9092168252519081900360200190f35b348015610e1257600080fd5b506107046130a9565b348015610e2757600080fd5b506104466130d4565b348015610e3c57600080fd5b5061046d600160a060020a036004358116906024351660443560643560ff6084351660a43560c4356130de565b348015610e7557600080fd5b50610446600160a060020a036004358116906024351661331e565b348015610e9c57600080fd5b50610547613349565b348015610eb157600080fd5b5061044661335c565b348015610ec657600080fd5b5061070461336e565b348015610edb57600080fd5b50610547613378565b348015610ef057600080fd5b506104466133f8565b348015610f0557600080fd5b5061044661341c565b348015610f1a57600080fd5b5061044661342f565b348015610f2f57600080fd5b5061046d600435613441565b348015610f4757600080fd5b50610446600160a060020a0360043516613461565b348015610f6857600080fd5b5061046d61346c565b348015610f7d57600080fd5b506104466134f2565b600080341515610fe0576040805160e560020a62461bcd02815260206004820152600c60248201527f5a45524f5f4445504f5349540000000000000000000000000000000000000000604482015290519081900360640190fd5b610fe93461351d565b610ff234611530565b9050610ffe3382613624565b506110113461100b6137c6565b016137df565b60408051348152600160a060020a0385166020820152815133927f96a25c8ce0baabc1fdefd93e9ed25d8e092a3332f3aa9a41722b5697231d1d1a928290030190a261105d33826137fd565b92915050565b600080806fffffffffffffffffffffffffffffffff84106110ce576040805160e560020a62461bcd02815260206004820152601060248201527f5348415245535f544f4f5f4c4152474500000000000000000000000000000000604482015290519081900360640190fd5b6110d6613812565b91506110e061381c565b90506110ee8285028261383d565b949350505050565b61111f7f2fc10cc8ae19568712f7a176fb4978616a610650813c9d05326c34abb62749c7613865565b6111276138d7565b61112f613929565b565b801515611188576040805160e560020a62461bcd02815260206004820152601a60248201527f4d494e545f5a45524f5f414d4f554e545f4f465f534841524553000000000000604482015290519081900360640190fd5b61119861119361397f565b6139c3565b6111a0613a23565b6111a8613a90565b8111156111ff576040805160e560020a62461bcd02815260206004820152601f60248201527f45585445524e414c5f42414c414e43455f4c494d49545f455843454544454400604482015290519081900360640190fd5b61121061120b82612442565b61351d565b6112228161121c613b07565b01613b20565b61122c8282613624565b5061123782826137fd565b604080518281529051600160a060020a038416917fee473f96486a2f4b93ccb6729f121223e96975db6e0d6a5ef01f56477e3eab3b919081900360200190a25050565b60408051808201909152601781527f4c6971756964207374616b656420457468657220322e30000000000000000000602082015290565b6112da7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d613865565b6112e2613b3e565b61112f613b90565b6000806112f5612894565b9050801580159061130d57508061130a613bda565b10155b91505090565b7f33969636f1fbf3d7d062d4de4a08e7bd3c46606ec28b3a4398d2665be559b92181565b6000611344338484613bde565b50600192915050565b600080516020615c4483398151915281565b6113887f33969636f1fbf3d7d062d4de4a08e7bd3c46606ec28b3a4398d2665be559b921613865565b61139181613d00565b50565b60006113bf7f3d3e9bd6e90e5d1f1c6839835bcbe5746a47c9a013d1eae6e80c248264c06a81613d8f565b905090565b60006113ce612894565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901561148f5760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561145457818101518382015260200161143c565b50505050905090810190601f1680156114815780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50611498613d93565b6114a184613dfa565b60408051600160a060020a038616815290517f61f9416d3c29deb4e424342445a2b132738430becd9fa275e11297c90668b22e9181900360200190a16114e683613e21565b6114f06004613f58565b508261150f6114fe82613fbe565b61150783613ffb565b600019613bde565b61151882613d00565b611520614038565b50505050565b60006113bf6140fe565b60006fffffffffffffffffffffffffffffffff8210611599576040805160e560020a62461bcd02815260206004820152600d60248201527f4554485f544f4f5f4c4152474500000000000000000000000000000000000000604482015290519081900360640190fd5b6115a1613812565b6115a961381c565b83028115156115b457fe5b0490505b919050565b6115c8611193614124565b6040805189815260208101899052808201889052606081018790526080810186905260a0810183905290518a917fff08c3ef606d198e316ef5b822193c489965899eb4e3c248cea1a4626c3eda50919081900360c00190a2604080518481526020810184905280820183905290518a917faf00d86be4cd299db16aa59803992e174fa88b67d81a0c7dd0148f9a75606a8d919081900360600190a2505050505050505050565b60006113bf61168a600080516020615cc4833981519152614136565b614189565b60008061169a613378565b15156116f0576040805160e560020a62461bcd02815260206004820152600f60248201527f43414e5f4e4f545f4445504f5349540000000000000000000000000000000000604482015290519081900360640190fd5b6116f8614194565b9150611703826139c3565b83151561175a576040805160e560020a62461bcd02815260206004820152600b60248201527f5a45524f5f414d4f554e54000000000000000000000000000000000000000000604482015290519081900360640190fd5b611763846141d8565b60008311156117c35761178483611778614354565b9063ffffffff61437f16565b905061178f8161440d565b6040805182815290517fe0aacfc334457703148118055ec794ac17654c6f918d29638ba3b18003cee5ff9181900360200190a15b81600160a060020a03166313ae8460856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117fe57600080fd5b505af1158015611812573d6000803e3d6000fd5b505050505050505050565b600061182a84338461443d565b6118358484846144d1565b5060019392505050565b6000611849612f01565b600160a060020a03166304bf2a7f836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118a457818101518382015260200161188c565b50505050905090810190601f1680156118d15780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156118f057600080fd5b505af1158015611904573d6000803e3d6000fd5b505050506040513d602081101561191a57600080fd5b505192915050565b611939600080516020615c44833981519152613865565b6b7fffffffffffffffffffffff82111561199d576040805160e560020a62461bcd02815260206004820152601960248201527f544f4f5f4c415247455f4d41585f5354414b455f4c494d495400000000000000604482015290519081900360640190fd5b6119e46119c983836119bc600080516020615cc4833981519152614136565b919063ffffffff6144f516565b600080516020615cc48339815191529063ffffffff61471916565b604080518381526020810183905281517fce9fddf6179affa1ea7bf36d80a6bf0284e0f3b91f4b2fa6eea2af923e7fac2d929181900390910190a15050565b7f2fc10cc8ae19568712f7a176fb4978616a610650813c9d05326c34abb62749c781565b601290565b6000611a566130a9565b600160a060020a03166332f0a3b56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b505af1158015611aa4573d6000803e3d6000fd5b505050506040513d6020811015611aba57600080fd5b5051905090565b6000611acb612c95565b600160a060020a031663b8f120b3306040518263ffffffff1660e01b81526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015611a9057600080fd5b7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d81565b600080600080611b54614774565b9094509250611b616147a8565b9150611b6b6147c1565b50939492939192918303919050565b336000818152600160209081526040808320600160a060020a03871684529091528120549091611344918590611bb6908663ffffffff61437f16565b613bde565b6000611bc56147ef565b600160a060020a03166361d027b36040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b6000611c18600080516020615c24833981519152613d8f565b15905090565b60006113bf6137c6565b611c33611193614808565b611c6f611c42346117786134f2565b7fafe016039542d12eec0183bb0b1ffc2ca45b027126a494672fba4154ee77facb9063ffffffff61481a16565b6040805134815290517fd27f9b0c98bdee27044afa149eadcd2047d6399cb6613a45c5b87e6aca76e6b59181900360200190a1565b611caf611193614124565b611cb7613a23565b611cc18282613624565b50611ccc82826137fd565b5050565b6000611cda614194565b600160a060020a031663563967156040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b600080611d1f613a23565b611d2a611193614124565b611d326147c1565b91509150611d40828261481e565b611d498261484f565b6040805183815290517fd87d7ff193e5d1560bdbe21e4e14d13dde0de4e49a03812517640af0a2d5c42c9181900360200190a1611d86848461486d565b6040805185815260208101859052815187927fc091cf4d34e62bb075bf8dadd00496528c94b8f3fdec3affd7414840847017d2928290030190a25050505050565b60006113bf611de3600080516020615cc4833981519152614136565b61489e565b60006113bf613b07565b6000811515611e4b576040805160e560020a62461bcd02815260206004820152601460248201527f4241445f444542545f5a45524f5f534841524553000000000000000000000000604482015290519081900360640190fd5b611e53613a23565b611e5e611193614124565b611e66613b07565b905081811015611ec0576040805160e560020a62461bcd02815260206004820152601460248201527f4558545f5348415245535f544f4f5f534d414c4c000000000000000000000000604482015290519081900360640190fd5b611ecb828203613b20565b6040805183815290517f4e80196ef1285462b2c4ee20f88e18e58c59e405eec6fd51f5fd1d614bc98a7f9181900360200190a16040805183815290517fad21467656c56eb8c99f7916faa12f7a657a04d8802100acec62e92451ac56069181900360200190a15050565b6000806000806000806000611f48615bd3565b611f5f600080516020615cc4833981519152614136565b9050611f6a81614189565b9750611f75816148d7565b9650611f808161489e565b955080606001516001606060020a03169450806040015163ffffffff16935080602001516001606060020a03169250806000015163ffffffff1691505090919293949596565b600080611fd283612442565b9050611fdf85338361443d565b611fea8585856148e9565b611ff685858386614aed565b8091505b509392505050565b600061105d61201083614b89565b612442565b60008082151561206f576040805160e560020a62461bcd02815260206004820152601a60248201527f4255524e5f5a45524f5f414d4f554e545f4f465f534841524553000000000000604482015290519081900360640190fd5b61207a61119361397f565b612082613a23565b61208a613b07565b9150828210156120e4576040805160e560020a62461bcd02815260206004820152601460248201527f4558545f5348415245535f544f4f5f534d414c4c000000000000000000000000604482015290519081900360640190fd5b6120ef838303613b20565b6120f93384614ba4565b5061210383612442565b905061210e81614cd8565b61211a33828386614d3b565b6040805184815290517fad21467656c56eb8c99f7916faa12f7a657a04d8802100acec62e92451ac56069181900360200190a1505050565b612169600080516020615c44833981519152613865565b6121716112ea565b15156121c7576040805160e560020a62461bcd02815260206004820152600f60248201527f4e4f545f494e495449414c495a45440000000000000000000000000000000000604482015290519081900360640190fd5b6121cf613a23565b6121d761166e565b1515611127576040805160e560020a62461bcd02815260206004820152600f60248201527f414c52454144595f524553554d45440000000000000000000000000000000000604482015290519081900360640190fd5b600080600080600080600080612241614194565b945084600160a060020a031663271662ec6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561227e57600080fd5b505af1158015612292573d6000803e3d6000fd5b505050506040513d60208110156122a857600080fd5b5051604080517f9fbb7bae0000000000000000000000000000000000000000000000000000000081529051919550600160a060020a03871691639fbb7bae916004808201926020929091908290030181600087803b15801561230957600080fd5b505af115801561231d573d6000803e3d6000fd5b505050506040513d602081101561233357600080fd5b5051604080517fefcdcc0e000000000000000000000000000000000000000000000000000000008152815161ffff9093169550600160a060020a0388169263efcdcc0e926004808401939192918290030181600087803b15801561239657600080fd5b505af11580156123aa573d6000803e3d6000fd5b505050506040513d60408110156123c057600080fd5b5080516020909101516000985061ffff9182169350169050828483028115156123e557fe5b049750828482028115156123f557fe5b0495505050505050909192565b61240d611193614d8d565b6040805134815290517f6e5086f7e1ab04bd826e77faae35b1bcfe31bd144623361a40ea4af51670b1c39181900360200190a1565b60006fffffffffffffffffffffffffffffffff82106124ab576040805160e560020a62461bcd02815260206004820152601060248201527f5348415245535f544f4f5f4c4152474500000000000000000000000000000000604482015290519081900360640190fd5b6124b361381c565b6115a9613812565b6000341515612514576040805160e560020a62461bcd02815260206004820152600a60248201527f5a45524f5f56414c554500000000000000000000000000000000000000000000604482015290519081900360640190fd5b61251f61119361397f565b612527613a23565b61253082611063565b3414612586576040805160e560020a62461bcd02815260206004820152601560248201527f56414c55455f5348415245535f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b61258e613b07565b9050818110156125e8576040805160e560020a62461bcd02815260206004820152601460248201527f4558545f5348415245535f544f4f5f534d414c4c000000000000000000000000604482015290519081900360640190fd5b6125f3828203613b20565b6125ff3461100b6137c6565b6040805134815290517f4ee34277c93491eeca655ad5c42ae1c193a5719e1c8837df9058af7696817cce9181900360200190a16040805183815290517fad21467656c56eb8c99f7916faa12f7a657a04d8802100acec62e92451ac56069181900360200190a15050565b50600190565b600160a060020a031660009081526002602052604090205490565b60006113bf7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b613d8f565b6060806000806126c3612c95565b600160a060020a031663f4409319306040518263ffffffff1660e01b81526004018082600160a060020a0316600160a060020a03168152602001915050600060405180830381600087803b15801561271a57600080fd5b505af115801561272e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052608081101561275757600080fd5b81019080805164010000000081111561276f57600080fd5b8201602081018481111561278257600080fd5b815164010000000081118282018710171561279c57600080fd5b505092919060200180516401000000008111156127b857600080fd5b820160208101848111156127cb57600080fd5b81516401000000008111828201871017156127e557600080fd5b5050602082015160409092015194985096509450919250505090919293565b600080612812611193614d9f565b61281a613a23565b61282383612442565b915061282f3384614ba4565b5061283983612442565b905061284733838386614d3b565b505050565b60006113bf613a90565b6000612860614de3565b60600151905090565b60006113bf7f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6613d8f565b60006113bf7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e613d8f565b6000806128ca6112ea565b1515612920576040805160e560020a62461bcd02815260206004820152600f60248201527f4e4f545f494e495449414c495a45440000000000000000000000000000000000604482015290519081900360640190fd5b612928614eab565b915081600160a060020a0316638f7797c26040518163ffffffff1660e01b815260040161012060405180830381600087803b15801561296657600080fd5b505af115801561297a573d6000803e3d6000fd5b505050506040513d61012081101561299157600080fd5b506060015190508015156129ef576040805160e560020a62461bcd02815260206004820152600960248201527f4e4f5f5245504f52540000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6129f96003614eef565b612a036004613f58565b612a0b614f4d565b61284783613d00565b600080612a223385856148e9565b612a2b83612442565b9050612a3933858386614aed565b9392505050565b600080612a4b613a23565b612a536147ef565b9150612a6161119383615020565b6000861115612ae557612a738261505d565b600160a060020a0316639342c8f4876040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015612ab857600080fd5b505af1158015612acc573d6000803e3d6000fd5b505050506040513d6020811015612ae257600080fd5b50505b6000871115612b5557612af78261509a565b600160a060020a0316633194528a886040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612b3c57600080fd5b505af1158015612b50573d6000803e3d6000fd5b505050505b6000831115612bce57612b6782613fbe565b600160a060020a031663b6013cef8487876040518463ffffffff1660e01b815260040180838152602001828152602001925050506000604051808303818588803b158015612bb457600080fd5b505af1158015612bc8573d6000803e3d6000fd5b50505050505b612bee83612be2896117788a6117786137c6565b9063ffffffff6150d716565b9050612bf9816137df565b612c0161516b565b60408051898152602081018b9052808201899052606081018890526080810183905290518b917f92dd3cb149a1eebd51fd8c2a3653fd96f30c4ac01d4f850fc16d46abd6c3e92f919081900360a00190a250505050505050505050565b60408051808201909152600581527f7374455448000000000000000000000000000000000000000000000000000000602082015290565b60006113bf7f42b2d95e1ce15ce63bf9a8d9f6312cf44b23415c977ffa3b884333422af8941c613d8f565b60006113bf6151a2565b6040805160e560020a62461bcd02815260206004820152600d60248201527f4e4f545f535550504f5254454400000000000000000000000000000000000000604482015290519081900360640190fd5b600080612d256112ea565b1515612d345760009150611ffa565b612d3c6130a9565b9050600160a060020a0381161515612d575760009150611ffa565b80600160a060020a031663fdef9106863087612d72886151bb565b60405163ffffffff861660e01b8152600160a060020a03808616600483019081529085166024830152604482018490526080606483019081528351608484015283519192909160a490910190602085019080838360005b83811015612de1578181015183820152602001612dc9565b50505050905090810190601f168015612e0e5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015612e3057600080fd5b505af1158015612e44573d6000803e3d6000fd5b505050506040513d6020811015612e5a57600080fd5b505195945050505050565b600061105d82610f86565b336000908152600160209081526040808320600160a060020a038616845290915281205482811015612eec576040805160e560020a62461bcd02815260206004820152601460248201527f414c4c4f57414e43455f42454c4f575f5a45524f000000000000000000000000604482015290519081900360640190fd5b6118353385611bb6848763ffffffff6150d716565b600080612f0c6130a9565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb60048201527fddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd6160248201529051600160a060020a03929092169163be00bbd8916044808201926020929091908290030181600087803b1580156118f057600080fd5b60006113443384846144d1565b6000806000806000612fd3614354565b9450612fdd614774565b90925090508480612ff4848463ffffffff61437f16565b9450945094505050909192565b613018600080516020615c44833981519152613865565b61303a6119c9613035600080516020615cc4833981519152614136565b6151c5565b6040517f9b2a687c198898fcc32a33bbc610d478f177a73ab7352023e6cc1de5bf12a3df90600090a1565b600061306f614194565b600160a060020a0316639fbb7bae6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b60006113bf7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b613d8f565b60006113bf6151d8565b60008042861015613139576040805160e560020a62461bcd02815260206004820152601060248201527f444541444c494e455f4558504952454400000000000000000000000000000000604482015290519081900360640190fd5b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9898989613166836151f1565b60408051602080820197909752600160a060020a0395861681830152939094166060840152608083019190915260a082015260c08082018a90528251808303909101815260e090910191829052805190928291908401908083835b602083106131e05780518252601f1990920191602091820191016131c1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209150613217612c95565b604080517f804e5eb3000000000000000000000000000000000000000000000000000000008152306004820152602481018590529051600160a060020a03929092169163804e5eb3916044808201926020929091908290030181600087803b15801561328257600080fd5b505af1158015613296573d6000803e3d6000fd5b505050506040513d60208110156132ac57600080fd5b505190506132bd898287878761523b565b1515613313576040805160e560020a62461bcd02815260206004820152601160248201527f494e56414c49445f5349474e4154555245000000000000000000000000000000604482015290519081900360640190fd5b611812898989613bde565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600019613356612894565b14905090565b60006113bf613369615400565b615440565b60006113bf6147ef565b600061338261546e565b600160a060020a0316632b95b7816040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156133bc57600080fd5b505af11580156133d0573d6000803e3d6000fd5b505050506040513d60208110156133e657600080fd5b50511580156113bf5750611c18611bff565b7f84ea57490227bc2be925c684e2a367071d69890b629590198f4125a018eb1de881565b6000613426614de3565b60400151905090565b60006113bf61343c614de3565b615480565b613458600080516020615c44833981519152613865565b6113918161548f565b600061105d82614b89565b6134957f84ea57490227bc2be925c684e2a367071d69890b629590198f4125a018eb1de8613865565b61349d61166e565b156112e2576040805160e560020a62461bcd02815260206004820152600e60248201527f414c52454144595f504155534544000000000000000000000000000000000000604482015290519081900360640190fd5b60006113bf7fafe016039542d12eec0183bb0b1ffc2ca45b027126a494672fba4154ee77facb613d8f565b613525615bd3565b600061353e600080516020615cc4833981519152614136565b915061354982614189565b1561359e576040805160e560020a62461bcd02815260206004820152600e60248201527f5354414b494e475f504155534544000000000000000000000000000000000000604482015290519081900360640190fd5b6135a7826148d7565b15612847576135b58261553d565b90508083111561360f576040805160e560020a62461bcd02815260206004820152600b60248201527f5354414b455f4c494d4954000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128476119c98385840363ffffffff61561c16565b6000600160a060020a0383161515613686576040805160e560020a62461bcd02815260206004820152601160248201527f4d494e545f544f5f5a45524f5f41444452000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383163014156136e7576040805160e560020a62461bcd02815260206004820152601660248201527f4d494e545f544f5f53544554485f434f4e545241435400000000000000000000604482015290519081900360640190fd5b6136f3826117786151d8565b90506fffffffffffffffffffffffffffffffff1981161561375e576040805160e560020a62461bcd02815260206004820152600f60248201527f5348415245535f4f564552464c4f570000000000000000000000000000000000604482015290519081900360640190fd5b61377c600080516020615c648339815191528263ffffffff61566016565b600160a060020a0383166000908152602081905260409020546137a5908363ffffffff61437f16565b600160a060020a039093166000908152602081905260409020929092555090565b60006113bf600080516020615ca48339815191526156a4565b611391600080516020615ca48339815191528263ffffffff61566016565b611ccc60008361380c84612442565b84614aed565b60006113bf615400565b60008060008061382a6156c7565b9250925081830390508093505b50505090565b6000821561385c57816001840381151561385357fe5b04600101612a39565b60009392505050565b6040805160008152602081019091526138819033908390612d1a565b1515611391576040805160e560020a62461bcd02815260206004820152600f60248201527f4150505f415554485f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b6138df6156e1565b6138fe600080516020615c24833981519152600163ffffffff61481a16565b6040517f62451d457bc659158be6e6247f56ec1df424a5c7597f71c20c2bc44e0965c8f990600090a1565b6139546119c96000613948600080516020615cc4833981519152614136565b9063ffffffff61574d16565b6040517fedaeeae9aed70c4545d3ab0065713261c9cee8d6cf5c8b07f52f0a65fd91efda90600090a1565b60006139896147ef565b600160a060020a0316636dd6e80b6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b33600160a060020a03821614611391576040805160e560020a62461bcd02815260206004820152600f60248201527f4150505f415554485f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b613a3a600080516020615c24833981519152613d8f565b151561112f576040805160e560020a62461bcd02815260206004820152601360248201527f434f4e54524143545f49535f53544f5050454400000000000000000000000000604482015290519081900360640190fd5b600080600080613a9e6151a2565b9250821515613ab05760009350613837565b612710831415613ac4576000199350613837565b613acc6156c7565b9092509050612710810283830211613ae75760009350613837565b8261271003612710820284840203811515613afe57fe5b04935050505090565b60006113bf600080516020615c64833981519152615772565b611391600080516020615c648339815191528263ffffffff61578716565b613b46613a23565b613b65600080516020615c24833981519152600063ffffffff61481a16565b6040517f7acc84e34091ae817647a4c49116f5cc07f319078ba80f8f5fde37ea7e25cbd690600090a1565b613baf6119c96001613948600080516020615cc4833981519152614136565b6040517f26d1807b479eaba249c1214b82e4b65bbb0cc73ee8a17901324b1ef1b5904e4990600090a1565b4390565b600160a060020a0383161515613c3e576040805160e560020a62461bcd02815260206004820152601660248201527f415050524f56455f46524f4d5f5a45524f5f4144445200000000000000000000604482015290519081900360640190fd5b600160a060020a0382161515613c9e576040805160e560020a62461bcd02815260206004820152601460248201527f415050524f56455f544f5f5a45524f5f41444452000000000000000000000000604482015290519081900360640190fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000613d327f3d3e9bd6e90e5d1f1c6839835bcbe5746a47c9a013d1eae6e80c248264c06a818363ffffffff61481a16565b6040805183815290517f72cc060f0ebe226352283dbe16fdcdb0d674f306ad980fbfa3d4b6932fee0b1e9181900360200190a1613d7c600080516020615ce4833981519152613d8f565b905080821015611ccc57611ccc826157bc565b5490565b3031801515613d9e57fe5b613da66151d8565b151561139157613db5816137df565b6040805182815260006020820152815161dead927f96a25c8ce0baabc1fdefd93e9ed25d8e092a3332f3aa9a41722b5697231d1d1a928290030190a261139181615810565b611391600080516020615c84833981519152600160a060020a03831663ffffffff61582916565b600160a060020a0381161515613e81576040805160e560020a62461bcd02815260206004820152601060248201527f5a45524f5f454950373132535445544800000000000000000000000000000000604482015290519081900360640190fd5b6000613e8b612c95565b600160a060020a031614613ee9576040805160e560020a62461bcd02815260206004820152601760248201527f45495037313253544554485f414c52454144595f534554000000000000000000604482015290519081900360640190fd5b613f197f42b2d95e1ce15ce63bf9a8d9f6312cf44b23415c977ffa3b884333422af8941c8263ffffffff61481a16565b60408051600160a060020a038316815290517fb80a5409082a3729c9fc139f8b41192c40e85252752df2c07caebd613086ca839181900360200190a150565b613f887f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a68263ffffffff61481a16565b6040805182815290517ffddcded6b4f4730c226821172046b48372d3cd963c159701ae1b7c3bcac541bb9181900360200190a150565b600081600160a060020a03166337d5fe996040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b600081600160a060020a03166327810b6e6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b614040612894565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156140c55760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360008381101561145457818101518382015260200161143c565b5061112f6140d1613bda565b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e9063ffffffff61481a16565b600080614109615400565b905061130d61411782615440565b829063ffffffff61437f16565b60006113bf6141316147ef565b615020565b61413e615bd3565b600061414983613d8f565b63ffffffff600082901c811684526001606060020a03602083811c821690860152608083901c909116604085015260a09190911c16606083015250919050565b5163ffffffff161590565b600061419e6147ef565b600160a060020a031663ef6c064c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b6141e0615bfa565b60008060008060006141f0614de3565b95506141fb86615480565b945084871115614255576040805160e560020a62461bcd02815260206004820152601060248201527f4e4f545f454e4f5547485f455448455200000000000000000000000000000000604482015290519081900360640190fd5b614261876117786147a8565b86519094506142809061427a908963ffffffff6150d716565b85615865565b6040805185815290517fd87d7ff193e5d1560bdbe21e4e14d13dde0de4e49a03812517640af0a2d5c42c9181900360200190a16040805188815290517f76a397bea5768d4fca97ef47792796e35f98dc81b16c1de84e28a818e1f971089181900360200190a16142ee6147c1565b9093509150614303838863ffffffff61437f16565b925061430f838361481e565b614326600080516020615ce4833981519152613d8f565b9050600081111561434b5761434b878211614342576000614346565b8782035b6157bc565b50505050505050565b60006113bf7f3f0eaa2c0f16ff9775c078f3df30470d8c042317b24ad1defa240b1c3e10b2386156a4565b60408051808201909152601181527f4d4154485f4144445f4f564552464c4f5700000000000000000000000000000060208201526000908383019084821015611ffa5760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360008381101561145457818101518382015260200161143c565b6113917f3f0eaa2c0f16ff9775c078f3df30470d8c042317b24ad1defa240b1c3e10b2388263ffffffff61566016565b600160a060020a03808416600090815260016020908152604080832093861683529290522054600019811461152057818110156144c4576040805160e560020a62461bcd02815260206004820152601260248201527f414c4c4f57414e43455f45584345454445440000000000000000000000000000604482015290519081900360640190fd5b6115208484848403613bde565b60006144dc82611530565b90506144e98484836148e9565b61152084848484614aed565b6144fd615bd3565b821515614554576040805160e560020a62461bcd02815260206004820152601460248201527f5a45524f5f4d41585f5354414b455f4c494d4954000000000000000000000000604482015290519081900360640190fd5b6001606060020a038311156145b3576040805160e560020a62461bcd02815260206004820152601960248201527f544f4f5f4c415247455f4d41585f5354414b455f4c494d495400000000000000604482015290519081900360640190fd5b8183101561460b576040805160e560020a62461bcd02815260206004820152601860248201527f544f4f5f4c415247455f4c494d49545f494e4352454153450000000000000000604482015290519081900360640190fd5b811580614627575063ffffffff828481151561462357fe5b0411155b151561467d576040805160e560020a62461bcd02815260206004820152601860248201527f544f4f5f534d414c4c5f4c494d49545f494e4352454153450000000000000000604482015290519081900360640190fd5b835163ffffffff16158061469c575060608401516001606060020a0316155b806146b3575083602001516001606060020a031683105b156146c8576001606060020a03831660208501525b8115156146d65760006146e3565b81838115156146e157fe5b045b63ffffffff90811660408601526001606060020a0384166060860152845116156147115763ffffffff431684525b509192915050565b611ccc60a082606001516001606060020a0316901b6080836040015163ffffffff16901b602084602001516001606060020a0316901b6000856000015163ffffffff16901b171717836000191661481a90919063ffffffff16565b6000806147a07f096e465397f38e659238ccd5d5a2c434ced54a63fd8d694045bfb058ab9d8112615884565b915091509091565b60006113bf600080516020615ca4833981519152615772565b60008060006147ce6158b3565b90935090506147db6158df565b5091508082146147ea57600092505b509091565b60006113bf600080516020615c8483398151915261595f565b60006113bf6148156147ef565b61505d565b9055565b611ccc7f8d3ed945c7718edcdb639b1235f2bbe3fa81f4a6cec7a436d8ea13fbc502d957838363ffffffff61597216565b611391600080516020615ca48339815191528263ffffffff61578716565b611ccc7f096e465397f38e659238ccd5d5a2c434ced54a63fd8d694045bfb058ab9d8112838363ffffffff61597216565b60006148a982614189565b156148b6575060006115b8565b6148bf826148d7565b15156148ce57506000196115b8565b61105d8261553d565b606001516001606060020a0316151590565b6000600160a060020a038416151561494b576040805160e560020a62461bcd02815260206004820152601760248201527f5452414e534645525f46524f4d5f5a45524f5f41444452000000000000000000604482015290519081900360640190fd5b600160a060020a03831615156149ab576040805160e560020a62461bcd02815260206004820152601560248201527f5452414e534645525f544f5f5a45524f5f414444520000000000000000000000604482015290519081900360640190fd5b600160a060020a038316301415614a0c576040805160e560020a62461bcd02815260206004820152601a60248201527f5452414e534645525f544f5f53544554485f434f4e5452414354000000000000604482015290519081900360640190fd5b614a14613a23565b50600160a060020a03831660009081526020819052604090205480821115614a86576040805160e560020a62461bcd02815260206004820152601060248201527f42414c414e43455f455843454544454400000000000000000000000000000000604482015290519081900360640190fd5b614a96818363ffffffff6150d716565b600160a060020a038086166000908152602081905260408082209390935590851681522054614acb908363ffffffff61437f16565b600160a060020a03909316600090815260208190526040902092909255505050565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a382600160a060020a031684600160a060020a03167f9d9c909296d9c674451c0c24f02cb64981eb3b727f99865939192f880a755dcb836040518082815260200191505060405180910390a350505050565b600160a060020a031660009081526020819052604090205490565b600080600160a060020a0384161515614c07576040805160e560020a62461bcd02815260206004820152601360248201527f4255524e5f46524f4d5f5a45524f5f4144445200000000000000000000000000604482015290519081900360640190fd5b50600160a060020a03831660009081526020819052604090205480831115614c79576040805160e560020a62461bcd02815260206004820152601060248201527f42414c414e43455f455843454544454400000000000000000000000000000000604482015290519081900360640190fd5b614c8583612be26151d8565b9150614ca5600080516020615c648339815191528363ffffffff61566016565b614cb5818463ffffffff6150d716565b600160a060020a0390941660009081526020819052604090209390935592915050565b614ce0615bd3565b6000614cf9600080516020615cc4833981519152614136565b9150614d04826148d7565b8015614d165750614d1482614189565b155b156128475782614d258361553d565b0190506128476119c9838363ffffffff61561c16565b60408051848152602081018490528082018390529051600160a060020a038616917f8b2a1e1ad5e0578c3dd82494156e985dade827a87c573b5c1c7716a32162ad64919081900360600190a250505050565b60006113bf614d9a6147ef565b61509a565b6000614da96147ef565b600160a060020a03166327810b6e6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b614deb615bfa565b6000614df56137c6565b8083529050614e1a81614e15600080516020615ce4833981519152613d8f565b61599a565b604083018190529003614e9a81614e2f61546e565b600160a060020a031663d0fb84e86040518163ffffffff1660e01b8152600401602060405180830381600087803b158015614e6957600080fd5b505af1158015614e7d573d6000803e3d6000fd5b505050506040513d6020811015614e9357600080fd5b505161599a565b606083018190529003602082015290565b6000614eb56147ef565b600160a060020a0316635a2031f96040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9057600080fd5b614ef7612869565b8114611391576040805160e560020a62461bcd02815260206004820152601b60248201527f554e45585045435445445f434f4e54524143545f56455253494f4e0000000000604482015290519081900360640190fd5b7fc36804a03ec742b57b141e4e5d8d3bd1ddb08451fd0f9983af8aaab357a78e2f7fa84c096ee27e195f25d7b6c7c2a03229e49f1a2a5087e57ce7d7127707942fe360008080808080614f9f88615884565b9096509450614fad87615884565b935093506801bc16d674ec800000858403029150614fcb8483615865565b614fd36158df565b509050614fe0828261481e565b614feb86600061486d565b614ff48361440d565b61500588600063ffffffff61481a16565b61501687600063ffffffff61481a16565b5050505050505050565b600081600160a060020a0316639624e83e6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b600081600160a060020a031663e441d25f6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b600081600160a060020a03166369d421486040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118f057600080fd5b60408051808201909152601281527f4d4154485f5355425f554e444552464c4f57000000000000000000000000000060208201526000908190848411156151635760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360008381101561145457818101518382015260200161143c565b505050900390565b600080615176611394565b915061518f600080516020615ce4833981519152613d8f565b905081811015611ccc57611ccc826157bc565b60006113bf600080516020615c848339815191526159b0565b8051602002815290565b6151cd615bd3565b506000606082015290565b60006113bf600080516020615c648339815191526156a4565b600160a060020a03811660009081526002602052604090205461521b81600163ffffffff61437f16565b600160a060020a0390921660009081526002602052604090209190915590565b6000606080600061524b896159bd565b156153d15760408051602080820189905281830188905260ff8a1660f81b606083015282516041818403018152606183018452608583018c815260a58401948552815160c585015281519197507f1626ba7e00000000000000000000000000000000000000000000000000000000948d9489949293919260e5909101919085019080838360005b838110156152ea5781810151838201526020016152d2565b50505050905090810190601f1680156153175780820380516001836020036101000a031916815260200191505b509350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509150604051602081016040526020818451602086018d5afa60203d146001821416156153a557815192505b50507f1626ba7e00000000000000000000000000000000000000000000000000000000811493506153f4565b88600160a060020a03166153e7898989896159c5565b600160a060020a03161493505b50505095945050505050565b6000806000806000615410615b2f565b9350935061541c614774565b9092509050615437836117788381888763ffffffff61437f16565b94505050505090565b60008060008061544e6156c7565b9250925081830390508085830281151561546457fe5b0495945050505050565b60006113bf61547b6147ef565b613fbe565b60208101516040909101510190565b6127108111156154e9576040805160e560020a62461bcd02815260206004820152601a60248201527f494e56414c49445f4d41585f45585445524e414c5f524154494f000000000000604482015290519081900360640190fd5b615507600080516020615c848339815191528263ffffffff615b4916565b6040805182815290517f13c514ee70ee403f89bdf5ab83908edba92a77e3a61e19b774670c0a2cb2d7e69181900360200190a150565b600080600080846040015163ffffffff16600014151561558657846040015163ffffffff1685606001516001606060020a031681151561557957fe5b046001606060020a031692505b846000015163ffffffff1643039150828202905084606001516001606060020a031685602001516001606060020a0316106155ed576155e86155d586602001516001606060020a031683615b6b565b86606001516001606060020a0316615b8b565b615613565b6156138186602001516001606060020a03160186606001516001606060020a0316615bad565b95945050505050565b615624615bd3565b6001606060020a0382111561563557fe5b825163ffffffff16151561564557fe5b506001606060020a031660208201524363ffffffff16815290565b60006fffffffffffffffffffffffffffffffff1961567d84613d8f565b169050612847836fffffffffffffffffffffffffffffffff8416831763ffffffff61481a16565b60006fffffffffffffffffffffffffffffffff6156c083613d8f565b1692915050565b6000806147a0600080516020615c64833981519152615884565b6156f8600080516020615c24833981519152613d8f565b1561112f576040805160e560020a62461bcd02815260206004820152601260248201527f434f4e54524143545f49535f4143544956450000000000000000000000000000604482015290519081900360640190fd5b615755615bd3565b816157605743615763565b60005b63ffffffff1683525090919050565b6000608061577f83613d8f565b901c92915050565b60006fffffffffffffffffffffffffffffffff6157a384613d8f565b16905061284783608084901b831763ffffffff61481a16565b6157da600080516020615ce48339815191528263ffffffff61481a16565b6040805182815290517f257937ce49d8cbbe1d68a2be7297a18a6e2830528d9154a0f131e5094e8946139181900360200190a150565b61581c61dead82613624565b5061139161dead826137fd565b611ccc600160a060020a03821673ffffffffffffffffffffffffffffffffffffffff1961585585613d8f565b859291161763ffffffff61481a16565b611ccc600080516020615ca4833981519152838363ffffffff61597216565b6000808061589184613d8f565b6fffffffffffffffffffffffffffffffff81169560809190911c945092505050565b6000806147a07f8d3ed945c7718edcdb639b1235f2bbe3fa81f4a6cec7a436d8ea13fbc502d957615884565b6000806158ea614eab565b600160a060020a03166372f79b136040518163ffffffff1660e01b81526004016040805180830381600087803b15801561592357600080fd5b505af1158015615937573d6000803e3d6000fd5b505050506040513d604081101561594d57600080fd5b50805160209091015190939092509050565b6000600160a060020a036156c083613d8f565b61284783608083901b6fffffffffffffffffffffffffffffffff85161763ffffffff61481a16565b60008183106159a95781612a39565b5090919050565b600060a061577f83613d8f565b6000903b1190565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083821c1115615a68576040805160e560020a62461bcd02815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60408051600080825260208083018085528a905260ff8916838501526060830188905260808301879052925160019360a0808501949193601f19840193928390039091019190865af1158015615ac2573d6000803e3d6000fd5b5050604051601f190151915050600160a060020a0381161515615613576040805160e560020a62461bcd02815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b6000806147a0600080516020615ca4833981519152615884565b611ccc600160a060020a03615b5d84613d8f565b84911660a084901b1761481a565b600080615b788484615bcf565b9050806001038385030291505092915050565b600080615b988484615bcf565b90508083028160010385020191505092915050565b600080615bba8484615bcf565b90508060010383028185020191505092915050565b1190565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6080604051908101604052806000815260200160008152602001600081526020016000815250905600644132c4ddd5bb6f0655d5fe2870dcec7870e6be4758890f366b83441f9fdecea42eee1333c0758ba72be38e728b6dadb32ea767de5b4ddbaea1dae85b1b051f6038150aecaa250d524370a0fdcdec13f2690e0723eaf277f41d7cae26b359e6d92bc31601d11a10411d08f59b7146d8a5915af253cde25f8e66b67beb4be22381a11fa1111afa59b50051f60ccf604a39d96acb484dc467ad8eadb4a63f0a5fa3678de4a579be090bed1177e0a24f77cc29d181ac22fd7688aca344d8938015da4fbe3b9cbd98dfae5dff538bbff4ba61f38979d4d7419bcd006f3e6250ec13a165627a7a7230582004506343672daee1a10cfda641b05c63e70a50c0b10b29386069251b9bb50aba0029ebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e","name":"Lido","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"constantinople","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"@aragon/os/contracts/common/Initializable.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./TimeHelpers.sol\";\nimport \"./UnstructuredStorage.sol\";\n\n\ncontract Initializable is TimeHelpers {\n    using UnstructuredStorage for bytes32;\n\n    // keccak256(\"aragonOS.initializable.initializationBlock\")\n    bytes32 internal constant INITIALIZATION_BLOCK_POSITION = 0xebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e;\n\n    string private constant ERROR_ALREADY_INITIALIZED = \"INIT_ALREADY_INITIALIZED\";\n    string private constant ERROR_NOT_INITIALIZED = \"INIT_NOT_INITIALIZED\";\n\n    modifier onlyInit {\n        require(getInitializationBlock() == 0, ERROR_ALREADY_INITIALIZED);\n        _;\n    }\n\n    modifier isInitialized {\n        require(hasInitialized(), ERROR_NOT_INITIALIZED);\n        _;\n    }\n\n    /**\n    * @return Block number in which the contract was initialized\n    */\n    function getInitializationBlock() public view returns (uint256) {\n        return INITIALIZATION_BLOCK_POSITION.getStorageUint256();\n    }\n\n    /**\n    * @return Whether the contract has been initialized by the time of the current block\n    */\n    function hasInitialized() public view returns (bool) {\n        uint256 initializationBlock = getInitializationBlock();\n        return initializationBlock != 0 && getBlockNumber() >= initializationBlock;\n    }\n\n    /**\n    * @dev Function to be called by top level contract after initialization has finished.\n    */\n    function initialized() internal onlyInit {\n        INITIALIZATION_BLOCK_POSITION.setStorageUint256(getBlockNumber());\n    }\n\n    /**\n    * @dev Function to be called by top level contract after initialization to enable the contract\n    *      at a future block number rather than immediately.\n    */\n    function initializedAt(uint256 _blockNumber) internal onlyInit {\n        INITIALIZATION_BLOCK_POSITION.setStorageUint256(_blockNumber);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/VaultRecoverable.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"../lib/token/ERC20.sol\";\nimport \"./EtherTokenConstant.sol\";\nimport \"./IsContract.sol\";\nimport \"./IVaultRecoverable.sol\";\nimport \"./SafeERC20.sol\";\n\n\ncontract VaultRecoverable is IVaultRecoverable, EtherTokenConstant, IsContract {\n    using SafeERC20 for ERC20;\n\n    string private constant ERROR_DISALLOWED = \"RECOVER_DISALLOWED\";\n    string private constant ERROR_VAULT_NOT_CONTRACT = \"RECOVER_VAULT_NOT_CONTRACT\";\n    string private constant ERROR_TOKEN_TRANSFER_FAILED = \"RECOVER_TOKEN_TRANSFER_FAILED\";\n\n    /**\n     * @notice Send funds to recovery Vault. This contract should never receive funds,\n     *         but in case it does, this function allows one to recover them.\n     * @param _token Token balance to be sent to recovery vault.\n     */\n    function transferToVault(address _token) external {\n        require(allowRecoverability(_token), ERROR_DISALLOWED);\n        address vault = getRecoveryVault();\n        require(isContract(vault), ERROR_VAULT_NOT_CONTRACT);\n\n        uint256 balance;\n        if (_token == ETH) {\n            balance = address(this).balance;\n            vault.transfer(balance);\n        } else {\n            ERC20 token = ERC20(_token);\n            balance = token.staticBalanceOf(this);\n            require(token.safeTransfer(vault, balance), ERROR_TOKEN_TRANSFER_FAILED);\n        }\n\n        emit RecoverToVault(vault, _token, balance);\n    }\n\n    /**\n    * @dev By default deriving from AragonApp makes it recoverable\n    * @param token Token address that would be recovered\n    * @return bool whether the app allows the recovery\n    */\n    function allowRecoverability(address token) public view returns (bool) {\n        return true;\n    }\n\n    // Cast non-implemented interface to be public so we can use it internally\n    function getRecoveryVault() public view returns (address);\n}\n"},{"file_path":"@aragon/os/contracts/evmscript/EVMScriptRunner.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./IEVMScriptExecutor.sol\";\nimport \"./IEVMScriptRegistry.sol\";\n\nimport \"../apps/AppStorage.sol\";\nimport \"../kernel/KernelConstants.sol\";\nimport \"../common/Initializable.sol\";\n\n\ncontract EVMScriptRunner is AppStorage, Initializable, EVMScriptRegistryConstants, KernelNamespaceConstants {\n    string private constant ERROR_EXECUTOR_UNAVAILABLE = \"EVMRUN_EXECUTOR_UNAVAILABLE\";\n    string private constant ERROR_PROTECTED_STATE_MODIFIED = \"EVMRUN_PROTECTED_STATE_MODIFIED\";\n\n    /* This is manually crafted in assembly\n    string private constant ERROR_EXECUTOR_INVALID_RETURN = \"EVMRUN_EXECUTOR_INVALID_RETURN\";\n    */\n\n    event ScriptResult(address indexed executor, bytes script, bytes input, bytes returnData);\n\n    function getEVMScriptExecutor(bytes _script) public view returns (IEVMScriptExecutor) {\n        return IEVMScriptExecutor(getEVMScriptRegistry().getScriptExecutor(_script));\n    }\n\n    function getEVMScriptRegistry() public view returns (IEVMScriptRegistry) {\n        address registryAddr = kernel().getApp(KERNEL_APP_ADDR_NAMESPACE, EVMSCRIPT_REGISTRY_APP_ID);\n        return IEVMScriptRegistry(registryAddr);\n    }\n\n    function runScript(bytes _script, bytes _input, address[] _blacklist)\n        internal\n        isInitialized\n        protectState\n        returns (bytes)\n    {\n        IEVMScriptExecutor executor = getEVMScriptExecutor(_script);\n        require(address(executor) != address(0), ERROR_EXECUTOR_UNAVAILABLE);\n\n        bytes4 sig = executor.execScript.selector;\n        bytes memory data = abi.encodeWithSelector(sig, _script, _input, _blacklist);\n\n        bytes memory output;\n        assembly {\n            let success := delegatecall(\n                gas,                // forward all gas\n                executor,           // address\n                add(data, 0x20),    // calldata start\n                mload(data),        // calldata length\n                0,                  // don't write output (we'll handle this ourselves)\n                0                   // don't write output\n            )\n\n            output := mload(0x40) // free mem ptr get\n\n            switch success\n            case 0 {\n                // If the call errored, forward its full error data\n                returndatacopy(output, 0, returndatasize)\n                revert(output, returndatasize)\n            }\n            default {\n                switch gt(returndatasize, 0x3f)\n                case 0 {\n                    // Need at least 0x40 bytes returned for properly ABI-encoded bytes values,\n                    // revert with \"EVMRUN_EXECUTOR_INVALID_RETURN\"\n                    // See remix: doing a `revert(\"EVMRUN_EXECUTOR_INVALID_RETURN\")` always results in\n                    // this memory layout\n                    mstore(output, 0x08c379a000000000000000000000000000000000000000000000000000000000)         // error identifier\n                    mstore(add(output, 0x04), 0x0000000000000000000000000000000000000000000000000000000000000020) // starting offset\n                    mstore(add(output, 0x24), 0x000000000000000000000000000000000000000000000000000000000000001e) // reason length\n                    mstore(add(output, 0x44), 0x45564d52554e5f4558454355544f525f494e56414c49445f52455455524e0000) // reason\n\n                    revert(output, 100) // 100 = 4 + 3 * 32 (error identifier + 3 words for the ABI encoded error)\n                }\n                default {\n                    // Copy result\n                    //\n                    // Needs to perform an ABI decode for the expected `bytes` return type of\n                    // `executor.execScript()` as solidity will automatically ABI encode the returned bytes as:\n                    //    [ position of the first dynamic length return value = 0x20 (32 bytes) ]\n                    //    [ output length (32 bytes) ]\n                    //    [ output content (N bytes) ]\n                    //\n                    // Perform the ABI decode by ignoring the first 32 bytes of the return data\n                    let copysize := sub(returndatasize, 0x20)\n                    returndatacopy(output, 0x20, copysize)\n\n                    mstore(0x40, add(output, copysize)) // free mem ptr set\n                }\n            }\n        }\n\n        emit ScriptResult(address(executor), _script, _input, output);\n\n        return output;\n    }\n\n    modifier protectState {\n        address preKernel = address(kernel());\n        bytes32 preAppId = appId();\n        _; // exec\n        require(address(kernel()) == preKernel, ERROR_PROTECTED_STATE_MODIFIED);\n        require(appId() == preAppId, ERROR_PROTECTED_STATE_MODIFIED);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/kernel/KernelConstants.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ncontract KernelAppIds {\n    /* Hardcoded constants to save gas\n    bytes32 internal constant KERNEL_CORE_APP_ID = apmNamehash(\"kernel\");\n    bytes32 internal constant KERNEL_DEFAULT_ACL_APP_ID = apmNamehash(\"acl\");\n    bytes32 internal constant KERNEL_DEFAULT_VAULT_APP_ID = apmNamehash(\"vault\");\n    */\n    bytes32 internal constant KERNEL_CORE_APP_ID = 0x3b4bf6bf3ad5000ecf0f989d5befde585c6860fea3e574a4fab4c49d1c177d9c;\n    bytes32 internal constant KERNEL_DEFAULT_ACL_APP_ID = 0xe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a;\n    bytes32 internal constant KERNEL_DEFAULT_VAULT_APP_ID = 0x7e852e0fcfce6551c13800f1e7476f982525c2b5277ba14b24339c68416336d1;\n}\n\n\ncontract KernelNamespaceConstants {\n    /* Hardcoded constants to save gas\n    bytes32 internal constant KERNEL_CORE_NAMESPACE = keccak256(\"core\");\n    bytes32 internal constant KERNEL_APP_BASES_NAMESPACE = keccak256(\"base\");\n    bytes32 internal constant KERNEL_APP_ADDR_NAMESPACE = keccak256(\"app\");\n    */\n    bytes32 internal constant KERNEL_CORE_NAMESPACE = 0xc681a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8;\n    bytes32 internal constant KERNEL_APP_BASES_NAMESPACE = 0xf1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f;\n    bytes32 internal constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;\n}\n"},{"file_path":"contracts/common/lib/SignatureUtils.sol","source_code":"// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>\n// SPDX-License-Identifier: MIT\n\n/* See contracts/COMPILERS.md */\n// solhint-disable-next-line lido/fixed-compiler-version\npragma solidity >=0.4.24 <0.9.0;\n\nimport {ECDSA} from \"./ECDSA.sol\";\n\n\nlibrary SignatureUtils {\n    /**\n     * @dev The selector of the ERC1271's `isValidSignature(bytes32 hash, bytes signature)` function,\n     * serving at the same time as the magic value that the function should return upon success.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-1271.\n     *\n     * bytes4(keccak256(\"isValidSignature(bytes32,bytes)\")\n     */\n    bytes4 internal constant ERC1271_IS_VALID_SIGNATURE_SELECTOR = 0x1626ba7e;\n\n    /**\n     * @dev Checks signature validity.\n     *\n     * If the signer address doesn't contain any code, assumes that the address is externally owned\n     * and the signature is a ECDSA signature generated using its private key. Otherwise, issues a\n     * static call to the signer address to check the signature validity using the ERC-1271 standard.\n     */\n    function isValidSignature(\n        address signer,\n        bytes32 msgHash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal view returns (bool) {\n        if (_hasCode(signer)) {\n            bytes memory sig = abi.encodePacked(r, s, v);\n            // Solidity <0.5 generates a regular CALL instruction even if the function being called\n            // is marked as `view`, and the only way to perform a STATICCALL is to use assembly\n            bytes memory data = abi.encodeWithSelector(ERC1271_IS_VALID_SIGNATURE_SELECTOR, msgHash, sig);\n            bytes32 retval;\n            /// @solidity memory-safe-assembly\n            assembly {\n                // allocate memory for storing the return value\n                let outDataOffset := mload(0x40)\n                mstore(0x40, add(outDataOffset, 32))\n                // issue a static call and load the result if the call succeeded\n                let success := staticcall(gas(), signer, add(data, 32), mload(data), outDataOffset, 32)\n                if and(eq(success, 1), eq(returndatasize(), 32)) {\n                    retval := mload(outDataOffset)\n                }\n            }\n            return retval == bytes32(ERC1271_IS_VALID_SIGNATURE_SELECTOR);\n        } else {\n            return ECDSA.recover(msgHash, v, r, s) == signer;\n        }\n    }\n\n    function _hasCode(address addr) internal view returns (bool) {\n        uint256 size;\n        /// @solidity memory-safe-assembly\n        assembly { size := extcodesize(addr) }\n        return size > 0;\n    }\n}\n"},{"file_path":"contracts/0.4.24/utils/UnstructuredStorageExt.sol","source_code":"// SPDX-FileCopyrightText: 2025 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n\n// See contracts/COMPILERS.md\n// solhint-disable-next-line\npragma solidity 0.4.24;\n\n\nimport {UnstructuredStorage} from \"@aragon/os/contracts/apps/AragonApp.sol\";\n\nlibrary UnstructuredStorageExt {\n    using UnstructuredStorage for bytes32;\n\n    uint256 constant internal UINT128_LOW_MASK = ~uint128(0);\n    uint256 constant internal UINT128_HIGH_MASK = ~uint256(0) << 128;\n    uint256 constant internal UINT160_LOW_MASK = ~uint160(0);\n    uint256 constant internal UINT96_HIGH_MASK = ~uint256(0) << 160;\n\n    function getLowUint128(bytes32 position) internal view returns (uint256) {\n        return position.getStorageUint256() & UINT128_LOW_MASK;\n    }\n\n    function setLowUint128(bytes32 position, uint256 data) internal {\n        uint256 high128 = position.getStorageUint256() & UINT128_HIGH_MASK;\n        position.setStorageUint256(high128 | (data & UINT128_LOW_MASK));\n    }\n\n    function getHighUint128(bytes32 position) internal view returns (uint256) {\n        return position.getStorageUint256() >> 128;\n    }\n\n    function setHighUint128(bytes32 position, uint256 data) internal {\n        uint256 low128 = position.getStorageUint256() & UINT128_LOW_MASK;\n        position.setStorageUint256((data << 128) | low128);\n    }\n\n    function getLowAndHighUint128(bytes32 position) internal view returns (uint256 low, uint256 high) {\n        uint256 value = position.getStorageUint256();\n        low = value & UINT128_LOW_MASK;\n        high = value >> 128;\n    }\n\n    function setLowAndHighUint128(bytes32 position, uint256 low, uint256 high) internal {\n        position.setStorageUint256((high << 128) | (low & UINT128_LOW_MASK));\n    }\n\n    function getLowUint160(bytes32 position) internal view returns (uint256) {\n        return position.getStorageUint256() & UINT160_LOW_MASK;\n    }\n\n    function setLowUint160(bytes32 position, uint256 data) internal {\n        position.setStorageUint256((position.getStorageUint256() & UINT96_HIGH_MASK) | (data & UINT160_LOW_MASK));\n    }\n\n    function getHighUint96(bytes32 position) internal view returns (uint256) {\n        return position.getStorageUint256() >> 160;\n    }\n\n    function setHighUint96(bytes32 position, uint256 data) internal {\n        position.setStorageUint256((data << 160) | (position.getStorageUint256() & UINT160_LOW_MASK));\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/TimeHelpers.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./Uint256Helpers.sol\";\n\n\ncontract TimeHelpers {\n    using Uint256Helpers for uint256;\n\n    /**\n    * @dev Returns the current block number.\n    *      Using a function rather than `block.number` allows us to easily mock the block number in\n    *      tests.\n    */\n    function getBlockNumber() internal view returns (uint256) {\n        return block.number;\n    }\n\n    /**\n    * @dev Returns the current block number, converted to uint64.\n    *      Using a function rather than `block.number` allows us to easily mock the block number in\n    *      tests.\n    */\n    function getBlockNumber64() internal view returns (uint64) {\n        return getBlockNumber().toUint64();\n    }\n\n    /**\n    * @dev Returns the current timestamp.\n    *      Using a function rather than `block.timestamp` allows us to easily mock it in\n    *      tests.\n    */\n    function getTimestamp() internal view returns (uint256) {\n        return block.timestamp; // solium-disable-line security/no-block-members\n    }\n\n    /**\n    * @dev Returns the current timestamp, converted to uint64.\n    *      Using a function rather than `block.timestamp` allows us to easily mock it in\n    *      tests.\n    */\n    function getTimestamp64() internal view returns (uint64) {\n        return getTimestamp().toUint64();\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/Autopetrified.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./Petrifiable.sol\";\n\n\ncontract Autopetrified is Petrifiable {\n    constructor() public {\n        // Immediately petrify base (non-proxy) instances of inherited contracts on deploy.\n        // This renders them uninitializable (and unusable without a proxy).\n        petrify();\n    }\n}\n"},{"file_path":"@aragon/os/contracts/kernel/IKernel.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"../acl/IACL.sol\";\nimport \"../common/IVaultRecoverable.sol\";\n\n\ninterface IKernelEvents {\n    event SetApp(bytes32 indexed namespace, bytes32 indexed appId, address app);\n}\n\n\n// This should be an interface, but interfaces can't inherit yet :(\ncontract IKernel is IKernelEvents, IVaultRecoverable {\n    function acl() public view returns (IACL);\n    function hasPermission(address who, address where, bytes32 what, bytes how) public view returns (bool);\n\n    function setApp(bytes32 namespace, bytes32 appId, address app) public;\n    function getApp(bytes32 namespace, bytes32 appId) public view returns (address);\n}\n"},{"file_path":"contracts/common/interfaces/ILidoLocator.sol","source_code":"// SPDX-FileCopyrightText: 2025 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n// See contracts/COMPILERS.md\n// solhint-disable-next-line lido/fixed-compiler-version\npragma solidity >=0.4.24 <0.9.0;\n\ninterface ILidoLocator {\n    function accountingOracle() external view returns(address);\n    function depositSecurityModule() external view returns(address);\n    function elRewardsVault() external view returns(address);\n    function lido() external view returns(address);\n    function oracleReportSanityChecker() external view returns(address);\n    function burner() external view returns(address);\n    function stakingRouter() external view returns(address);\n    function treasury() external view returns(address);\n    function validatorsExitBusOracle() external view returns(address);\n    function withdrawalQueue() external view returns(address);\n    function withdrawalVault() external view returns(address);\n    function postTokenRebaseReceiver() external view returns(address);\n    function oracleDaemonConfig() external view returns(address);\n    function accounting() external view returns (address);\n    function predepositGuarantee() external view returns (address);\n    function wstETH() external view returns (address);\n    function vaultHub() external view returns (address);\n    function vaultFactory() external view returns (address);\n    function lazyOracle() external view returns (address);\n    function operatorGrid() external view returns (address);\n    function topUpGateway() external view returns (address);\n    function validatorExitDelayVerifier() external view returns (address);\n    function triggerableWithdrawalsGateway() external view returns (address);\n    function consolidationGateway() external view returns (address);\n\n    /// @notice Returns core Lido protocol component addresses in a single call\n    /// @dev This function provides a gas-efficient way to fetch multiple component addresses in a single call\n    function coreComponents() external view returns(\n        address elRewardsVault,\n        address oracleReportSanityChecker,\n        address stakingRouter,\n        address treasury,\n        address withdrawalQueue,\n        address withdrawalVault\n    );\n\n    /// @notice Returns addresses of components involved in processing oracle reports in the Lido contract\n    /// @dev This function provides a gas-efficient way to fetch multiple component addresses in a single call\n    function oracleReportComponents() external view returns(\n        address accountingOracle,\n        address oracleReportSanityChecker,\n        address burner,\n        address withdrawalQueue,\n        address postTokenRebaseReceiver,\n        address stakingRouter,\n        address vaultHub\n    );\n}\n"},{"file_path":"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol","source_code":"pragma solidity ^0.4.24;\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ninterface IERC20 {\n  function totalSupply() external view returns (uint256);\n\n  function balanceOf(address who) external view returns (uint256);\n\n  function allowance(address owner, address spender)\n    external view returns (uint256);\n\n  function transfer(address to, uint256 value) external returns (bool);\n\n  function approve(address spender, uint256 value)\n    external returns (bool);\n\n  function transferFrom(address from, address to, uint256 value)\n    external returns (bool);\n\n  event Transfer(\n    address indexed from,\n    address indexed to,\n    uint256 value\n  );\n\n  event Approval(\n    address indexed owner,\n    address indexed spender,\n    uint256 value\n  );\n}\n"},{"file_path":"contracts/common/lib/Math256.sol","source_code":"// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>\n// SPDX-License-Identifier: MIT\n\n// Copied from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/0457042d93d9dfd760dbaa06a4d2f1216fdbe297/contracts/utils/math/Math.sol\n\n// See contracts/COMPILERS.md\n// solhint-disable-next-line\npragma solidity >=0.4.24 <0.9.0;\n\nlibrary Math256 {\n    /// @dev Returns the largest of two numbers.\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /// @dev Returns the smallest of two numbers.\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /// @dev Returns the largest of two numbers.\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return a > b ? a : b;\n    }\n\n    /// @dev Returns the smallest of two numbers.\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return a < b ? a : b;\n    }\n\n    /// @dev Returns the ceiling of the division of two numbers.\n    ///\n    /// This differs from standard division with `/` in that it rounds up instead\n    /// of rounding down.\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /// @dev Returns absolute difference of two numbers.\n    function absDiff(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a - b : b - a;\n    }\n}\n"},{"file_path":"@aragon/os/contracts/lib/math/SafeMath.sol","source_code":"// See https://github.com/OpenZeppelin/openzeppelin-solidity/blob/d51e38758e1d985661534534d5c61e27bece5042/contracts/math/SafeMath.sol\n// Adapted to use pragma ^0.4.24 and satisfy our linter rules\n\npragma solidity ^0.4.24;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that revert on error\n */\nlibrary SafeMath {\n    string private constant ERROR_ADD_OVERFLOW = \"MATH_ADD_OVERFLOW\";\n    string private constant ERROR_SUB_UNDERFLOW = \"MATH_SUB_UNDERFLOW\";\n    string private constant ERROR_MUL_OVERFLOW = \"MATH_MUL_OVERFLOW\";\n    string private constant ERROR_DIV_ZERO = \"MATH_DIV_ZERO\";\n\n    /**\n    * @dev Multiplies two numbers, reverts on overflow.\n    */\n    function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n        // benefit is lost if 'b' is also tested.\n        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n        if (_a == 0) {\n            return 0;\n        }\n\n        uint256 c = _a * _b;\n        require(c / _a == _b, ERROR_MUL_OVERFLOW);\n\n        return c;\n    }\n\n    /**\n    * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.\n    */\n    function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\n        require(_b > 0, ERROR_DIV_ZERO); // Solidity only automatically asserts when dividing by 0\n        uint256 c = _a / _b;\n        // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\n\n        return c;\n    }\n\n    /**\n    * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n    */\n    function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\n        require(_b <= _a, ERROR_SUB_UNDERFLOW);\n        uint256 c = _a - _b;\n\n        return c;\n    }\n\n    /**\n    * @dev Adds two numbers, reverts on overflow.\n    */\n    function add(uint256 _a, uint256 _b) internal pure returns (uint256) {\n        uint256 c = _a + _b;\n        require(c >= _a, ERROR_ADD_OVERFLOW);\n\n        return c;\n    }\n\n    /**\n    * @dev Divides two numbers and returns the remainder (unsigned integer modulo),\n    * reverts when dividing by zero.\n    */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b != 0, ERROR_DIV_ZERO);\n        return a % b;\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/UnstructuredStorage.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\nlibrary UnstructuredStorage {\n    function getStorageBool(bytes32 position) internal view returns (bool data) {\n        assembly { data := sload(position) }\n    }\n\n    function getStorageAddress(bytes32 position) internal view returns (address data) {\n        assembly { data := sload(position) }\n    }\n\n    function getStorageBytes32(bytes32 position) internal view returns (bytes32 data) {\n        assembly { data := sload(position) }\n    }\n\n    function getStorageUint256(bytes32 position) internal view returns (uint256 data) {\n        assembly { data := sload(position) }\n    }\n\n    function setStorageBool(bytes32 position, bool data) internal {\n        assembly { sstore(position, data) }\n    }\n\n    function setStorageAddress(bytes32 position, address data) internal {\n        assembly { sstore(position, data) }\n    }\n\n    function setStorageBytes32(bytes32 position, bytes32 data) internal {\n        assembly { sstore(position, data) }\n    }\n\n    function setStorageUint256(bytes32 position, uint256 data) internal {\n        assembly { sstore(position, data) }\n    }\n}\n"},{"file_path":"@aragon/os/contracts/acl/ACLSyntaxSugar.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ncontract ACLSyntaxSugar {\n    function arr() internal pure returns (uint256[]) {\n        return new uint256[](0);\n    }\n\n    function arr(bytes32 _a) internal pure returns (uint256[] r) {\n        return arr(uint256(_a));\n    }\n\n    function arr(bytes32 _a, bytes32 _b) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), uint256(_b));\n    }\n\n    function arr(address _a) internal pure returns (uint256[] r) {\n        return arr(uint256(_a));\n    }\n\n    function arr(address _a, address _b) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), uint256(_b));\n    }\n\n    function arr(address _a, uint256 _b, uint256 _c) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), _b, _c);\n    }\n\n    function arr(address _a, uint256 _b, uint256 _c, uint256 _d) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), _b, _c, _d);\n    }\n\n    function arr(address _a, uint256 _b) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), uint256(_b));\n    }\n\n    function arr(address _a, address _b, uint256 _c, uint256 _d, uint256 _e) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), uint256(_b), _c, _d, _e);\n    }\n\n    function arr(address _a, address _b, address _c) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), uint256(_b), uint256(_c));\n    }\n\n    function arr(address _a, address _b, uint256 _c) internal pure returns (uint256[] r) {\n        return arr(uint256(_a), uint256(_b), uint256(_c));\n    }\n\n    function arr(uint256 _a) internal pure returns (uint256[] r) {\n        r = new uint256[](1);\n        r[0] = _a;\n    }\n\n    function arr(uint256 _a, uint256 _b) internal pure returns (uint256[] r) {\n        r = new uint256[](2);\n        r[0] = _a;\n        r[1] = _b;\n    }\n\n    function arr(uint256 _a, uint256 _b, uint256 _c) internal pure returns (uint256[] r) {\n        r = new uint256[](3);\n        r[0] = _a;\n        r[1] = _b;\n        r[2] = _c;\n    }\n\n    function arr(uint256 _a, uint256 _b, uint256 _c, uint256 _d) internal pure returns (uint256[] r) {\n        r = new uint256[](4);\n        r[0] = _a;\n        r[1] = _b;\n        r[2] = _c;\n        r[3] = _d;\n    }\n\n    function arr(uint256 _a, uint256 _b, uint256 _c, uint256 _d, uint256 _e) internal pure returns (uint256[] r) {\n        r = new uint256[](5);\n        r[0] = _a;\n        r[1] = _b;\n        r[2] = _c;\n        r[3] = _d;\n        r[4] = _e;\n    }\n}\n\n\ncontract ACLHelpers {\n    function decodeParamOp(uint256 _x) internal pure returns (uint8 b) {\n        return uint8(_x >> (8 * 30));\n    }\n\n    function decodeParamId(uint256 _x) internal pure returns (uint8 b) {\n        return uint8(_x >> (8 * 31));\n    }\n\n    function decodeParamsList(uint256 _x) internal pure returns (uint32 a, uint32 b, uint32 c) {\n        a = uint32(_x);\n        b = uint32(_x >> (8 * 4));\n        c = uint32(_x >> (8 * 8));\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/ConversionHelpers.sol","source_code":"pragma solidity ^0.4.24;\n\n\nlibrary ConversionHelpers {\n    string private constant ERROR_IMPROPER_LENGTH = \"CONVERSION_IMPROPER_LENGTH\";\n\n    function dangerouslyCastUintArrayToBytes(uint256[] memory _input) internal pure returns (bytes memory output) {\n        // Force cast the uint256[] into a bytes array, by overwriting its length\n        // Note that the bytes array doesn't need to be initialized as we immediately overwrite it\n        // with the input and a new length. The input becomes invalid from this point forward.\n        uint256 byteLength = _input.length * 32;\n        assembly {\n            output := _input\n            mstore(output, byteLength)\n        }\n    }\n\n    function dangerouslyCastBytesToUintArray(bytes memory _input) internal pure returns (uint256[] memory output) {\n        // Force cast the bytes array into a uint256[], by overwriting its length\n        // Note that the uint256[] doesn't need to be initialized as we immediately overwrite it\n        // with the input and a new length. The input becomes invalid from this point forward.\n        uint256 intsLength = _input.length / 32;\n        require(_input.length == intsLength * 32, ERROR_IMPROPER_LENGTH);\n\n        assembly {\n            output := _input\n            mstore(output, intsLength)\n        }\n    }\n}\n"},{"file_path":"@aragon/os/contracts/lib/token/ERC20.sol","source_code":"// See https://github.com/OpenZeppelin/openzeppelin-solidity/blob/a9f910d34f0ab33a1ae5e714f69f9596a02b4d91/contracts/token/ERC20/ERC20.sol\n\npragma solidity ^0.4.24;\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 {\n    function totalSupply() public view returns (uint256);\n\n    function balanceOf(address _who) public view returns (uint256);\n\n    function allowance(address _owner, address _spender)\n        public view returns (uint256);\n\n    function transfer(address _to, uint256 _value) public returns (bool);\n\n    function approve(address _spender, uint256 _value)\n        public returns (bool);\n\n    function transferFrom(address _from, address _to, uint256 _value)\n        public returns (bool);\n\n    event Transfer(\n        address indexed from,\n        address indexed to,\n        uint256 value\n    );\n\n    event Approval(\n        address indexed owner,\n        address indexed spender,\n        uint256 value\n    );\n}\n"},{"file_path":"@aragon/os/contracts/common/IVaultRecoverable.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ninterface IVaultRecoverable {\n    event RecoverToVault(address indexed vault, address indexed token, uint256 amount);\n\n    function transferToVault(address token) external;\n\n    function allowRecoverability(address token) external view returns (bool);\n    function getRecoveryVault() external view returns (address);\n}\n"},{"file_path":"@aragon/os/contracts/evmscript/IEVMScriptExecutor.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ninterface IEVMScriptExecutor {\n    function execScript(bytes script, bytes input, address[] blacklist) external returns (bytes);\n    function executorType() external pure returns (bytes32);\n}\n"},{"file_path":"@aragon/os/contracts/evmscript/IEVMScriptRegistry.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./IEVMScriptExecutor.sol\";\n\n\ncontract EVMScriptRegistryConstants {\n    /* Hardcoded constants to save gas\n    bytes32 internal constant EVMSCRIPT_REGISTRY_APP_ID = apmNamehash(\"evmreg\");\n    */\n    bytes32 internal constant EVMSCRIPT_REGISTRY_APP_ID = 0xddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd61;\n}\n\n\ninterface IEVMScriptRegistry {\n    function addScriptExecutor(IEVMScriptExecutor executor) external returns (uint id);\n    function disableScriptExecutor(uint256 executorId) external;\n\n    // TODO: this should be external\n    // See https://github.com/ethereum/solidity/issues/4832\n    function getScriptExecutor(bytes script) public view returns (IEVMScriptExecutor);\n}\n"},{"file_path":"contracts/common/interfaces/IEIP712StETH.sol","source_code":"// SPDX-FileCopyrightText: 2023 OpenZeppelin, Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n// See contracts/COMPILERS.md\n// solhint-disable-next-line\npragma solidity >=0.4.24 <0.9.0;\n\n/**\n * @dev Helper interface of EIP712 StETH-dedicated helper.\n *\n * Has an access to the CHAIN_ID opcode and relies on immutables internally\n * Both are unavailable for Solidity 0.4.24.\n */\ninterface IEIP712StETH {\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function domainSeparatorV4(address _stETH) external view returns (bytes32);\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function hashTypedDataV4(address _stETH, bytes32 _structHash) external view returns (bytes32);\n\n    /**\n     * @dev returns the fields and values that describe the domain separator\n     * used by stETH for EIP-712 signature.\n     */\n    function eip712Domain(address _stETH) external view returns (\n        string memory name,\n        string memory version,\n        uint256 chainId,\n        address verifyingContract\n    );\n}\n"},{"file_path":"@aragon/os/contracts/common/EtherTokenConstant.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\n// aragonOS and aragon-apps rely on address(0) to denote native ETH, in\n// contracts where both tokens and ETH are accepted\ncontract EtherTokenConstant {\n    address internal constant ETH = address(0);\n}\n"},{"file_path":"@aragon/os/contracts/acl/IACL.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ninterface IACL {\n    function initialize(address permissionsCreator) external;\n\n    // TODO: this should be external\n    // See https://github.com/ethereum/solidity/issues/4832\n    function hasPermission(address who, address where, bytes32 what, bytes how) public view returns (bool);\n}\n"},{"file_path":"@aragon/os/contracts/apps/AragonApp.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./AppStorage.sol\";\nimport \"../acl/ACLSyntaxSugar.sol\";\nimport \"../common/Autopetrified.sol\";\nimport \"../common/ConversionHelpers.sol\";\nimport \"../common/ReentrancyGuard.sol\";\nimport \"../common/VaultRecoverable.sol\";\nimport \"../evmscript/EVMScriptRunner.sol\";\n\n\n// Contracts inheriting from AragonApp are, by default, immediately petrified upon deployment so\n// that they can never be initialized.\n// Unless overriden, this behaviour enforces those contracts to be usable only behind an AppProxy.\n// ReentrancyGuard, EVMScriptRunner, and ACLSyntaxSugar are not directly used by this contract, but\n// are included so that they are automatically usable by subclassing contracts\ncontract AragonApp is AppStorage, Autopetrified, VaultRecoverable, ReentrancyGuard, EVMScriptRunner, ACLSyntaxSugar {\n    string private constant ERROR_AUTH_FAILED = \"APP_AUTH_FAILED\";\n\n    modifier auth(bytes32 _role) {\n        require(canPerform(msg.sender, _role, new uint256[](0)), ERROR_AUTH_FAILED);\n        _;\n    }\n\n    modifier authP(bytes32 _role, uint256[] _params) {\n        require(canPerform(msg.sender, _role, _params), ERROR_AUTH_FAILED);\n        _;\n    }\n\n    /**\n    * @dev Check whether an action can be performed by a sender for a particular role on this app\n    * @param _sender Sender of the call\n    * @param _role Role on this app\n    * @param _params Permission params for the role\n    * @return Boolean indicating whether the sender has the permissions to perform the action.\n    *         Always returns false if the app hasn't been initialized yet.\n    */\n    function canPerform(address _sender, bytes32 _role, uint256[] _params) public view returns (bool) {\n        if (!hasInitialized()) {\n            return false;\n        }\n\n        IKernel linkedKernel = kernel();\n        if (address(linkedKernel) == address(0)) {\n            return false;\n        }\n\n        return linkedKernel.hasPermission(\n            _sender,\n            address(this),\n            _role,\n            ConversionHelpers.dangerouslyCastUintArrayToBytes(_params)\n        );\n    }\n\n    /**\n    * @dev Get the recovery vault for the app\n    * @return Recovery vault address for the app\n    */\n    function getRecoveryVault() public view returns (address) {\n        // Funds recovery via a vault is only available when used with a kernel\n        return kernel().getRecoveryVault(); // if kernel is not set, it will revert\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/IsContract.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ncontract IsContract {\n    /*\n    * NOTE: this should NEVER be used for authentication\n    * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).\n    *\n    * This is only intended to be used as a sanity check that an address is actually a contract,\n    * RATHER THAN an address not being a contract.\n    */\n    function isContract(address _target) internal view returns (bool) {\n        if (_target == address(0)) {\n            return false;\n        }\n\n        uint256 size;\n        assembly { size := extcodesize(_target) }\n        return size > 0;\n    }\n}\n"},{"file_path":"contracts/common/lib/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\n\n// Extracted from:\n// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/cryptography/ECDSA.sol#L53\n// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/541e821/contracts/utils/cryptography/ECDSA.sol#L112\n\n/* See contracts/COMPILERS.md */\n// solhint-disable-next-line\npragma solidity >=0.4.24 <0.9.0;\n\n\nlibrary ECDSA {\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`).\n     * This address can then be used for verification purposes.\n     * Receives the `v`, `r` and `s` signature fields separately.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address)\n    {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, \"ECDSA: invalid signature 's' value\");\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        require(signer != address(0), \"ECDSA: invalid signature\");\n\n        return signer;\n    }\n\n    /**\n     * @dev Overload of `recover` that receives the `r` and `vs` short-signature fields separately.\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        bytes32 s;\n        uint8 v;\n        assembly {\n            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n            v := add(shr(255, vs), 27)\n        }\n        return recover(hash, v, r, s);\n    }\n}\n"},{"file_path":"contracts/0.4.24/StETH.sol","source_code":"// SPDX-FileCopyrightText: 2025 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n/* See contracts/COMPILERS.md */\npragma solidity 0.4.24;\n\nimport {IERC20} from \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport {UnstructuredStorage} from \"@aragon/os/contracts/common/UnstructuredStorage.sol\";\nimport {SafeMath} from \"@aragon/os/contracts/lib/math/SafeMath.sol\";\nimport {Pausable} from \"./utils/Pausable.sol\";\nimport {UnstructuredStorageExt} from \"./utils/UnstructuredStorageExt.sol\";\nimport {Math256} from \"../common/lib/Math256.sol\";\n\n/**\n * @title Interest-bearing ERC20-like token for Lido Liquid Stacking protocol.\n *\n * This contract is abstract. To make the contract deployable override the\n * `_getTotalPooledEther` function. `Lido.sol` contract inherits StETH and defines\n * the `_getTotalPooledEther` function.\n *\n * StETH balances are dynamic and represent the holder's share in the total amount\n * of ether controlled by the protocol. Account shares aren't normalized, so the\n * contract also stores the sum of all shares to calculate each account's token balance\n * which equals to:\n *\n *   shares[account] * _getTotalPooledEther() / _getTotalShares()\n *\n * For example, assume that we have:\n *\n *   _getTotalPooledEther() -> 10 ETH\n *   sharesOf(user1) -> 100\n *   sharesOf(user2) -> 400\n *\n * Therefore:\n *\n *   balanceOf(user1) -> 2 tokens which corresponds 2 ETH\n *   balanceOf(user2) -> 8 tokens which corresponds 8 ETH\n *\n * Since balances of all token holders change when the amount of total pooled Ether\n * changes, this token cannot fully implement ERC20 standard: it only emits `Transfer`\n * events upon explicit transfer between holders. In contrast, when total amount of\n * pooled ether increases, no `Transfer` events are generated: doing so would require\n * emitting an event for each token holder and thus running an unbounded loop.\n *\n * The token inherits from `Pausable` and uses `whenNotStopped` modifier for methods\n * which change `shares` or `allowances`. `_stop` and `_resume` functions are overridden\n * in `Lido.sol` and might be called by an account with the `PAUSE_ROLE` assigned by the\n * DAO. This is useful for emergency scenarios, e.g. a protocol bug, where one might want\n * to freeze all token transfers and approvals until the emergency is resolved.\n */\ncontract StETH is IERC20, Pausable {\n    using SafeMath for uint256;\n    using UnstructuredStorage for bytes32;\n    using UnstructuredStorageExt for bytes32;\n\n    address constant internal INITIAL_TOKEN_HOLDER = 0xdead;\n    uint256 constant internal INFINITE_ALLOWANCE = ~uint256(0);\n    uint256 constant internal UINT128_MAX = ~uint128(0);\n\n    /**\n     * @dev StETH balances are dynamic and are calculated based on the accounts' shares\n     * and the total amount of ether controlled by the protocol. Account shares aren't\n     * normalized, so the contract also stores the sum of all shares to calculate\n     * each account's token balance which equals to:\n     *\n     *   shares[account] * _getTotalPooledEther() / _getTotalShares()\n    */\n    mapping (address => uint256) private shares;\n\n    /**\n     * @dev Allowances are nominated in tokens, not token shares.\n     */\n    mapping (address => mapping (address => uint256)) private allowances;\n\n    /**\n     * @dev Storage position used for holding the total amount of shares in existence.\n     *\n     * The Lido protocol is built on top of Aragon and uses the Unstructured Storage pattern\n     * for value types:\n     *\n     * https://blog.openzeppelin.com/upgradeability-using-unstructured-storage\n     * https://blog.8bitzen.com/posts/20-02-2020-understanding-how-solidity-upgradeable-unstructured-proxies-work\n     *\n     * For reference types, conventional storage variables are used since it's non-trivial\n     * and error-prone to implement reference-type unstructured storage using Solidity v0.4;\n     * see https://github.com/lidofinance/lido-dao/issues/181#issuecomment-736098834\n     *\n     * keccak256(\"lido.StETH.totalAndExternalShares\")\n     *\n     * @dev Since version 3, high 128 bits can be used to store the external shares from Lido contract\n     */\n    bytes32 internal constant TOTAL_SHARES_POSITION_LOW128 =\n        0x6038150aecaa250d524370a0fdcdec13f2690e0723eaf277f41d7cae26b359e6;\n\n    /**\n     * @dev Bitmask for high 128 bits of 256-bit slot\n     */\n    uint256 constant internal UINT128_HIGH_MASK = ~uint256(0) << 128;\n\n    /**\n      * @notice An executed shares transfer from `sender` to `recipient`.\n      *\n      * @dev emitted in pair with an ERC20-defined `Transfer` event.\n      */\n    event TransferShares(\n        address indexed from,\n        address indexed to,\n        uint256 sharesValue\n    );\n\n    /**\n     * @notice An executed `burnShares` request\n     *\n     * @dev Reports simultaneously burnt shares amount\n     * and corresponding stETH amount.\n     * The stETH amount is calculated twice: before and after the burning incurred rebase.\n     *\n     * @param account holder of the burnt shares\n     * @param preRebaseTokenAmount amount of stETH the burnt shares corresponded to before the burn\n     * @param postRebaseTokenAmount amount of stETH the burnt shares corresponded to after the burn\n     * @param sharesAmount amount of burnt shares\n     */\n    event SharesBurnt(\n        address indexed account,\n        uint256 preRebaseTokenAmount,\n        uint256 postRebaseTokenAmount,\n        uint256 sharesAmount\n    );\n\n    /**\n     * @return the name of the token.\n     */\n    function name() external pure returns (string) {\n        return \"Liquid staked Ether 2.0\";\n    }\n\n    /**\n     * @return the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() external pure returns (string) {\n        return \"stETH\";\n    }\n\n    /**\n     * @return the number of decimals for getting user representation of a token amount.\n     */\n    function decimals() external pure returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @return the amount of tokens in existence.\n     *\n     * @dev Always equals to `_getTotalPooledEther()` since token amount\n     * is pegged to the total amount of ether controlled by the protocol.\n     */\n    function totalSupply() external view returns (uint256) {\n        return _getTotalPooledEther();\n    }\n\n    /**\n     * @return the entire amount of ether controlled by the protocol.\n     *\n     * @dev The sum of all ETH balances in the protocol, equals to the total supply of stETH.\n     */\n    function getTotalPooledEther() external view returns (uint256) {\n        return _getTotalPooledEther();\n    }\n\n    /**\n     * @return the amount of tokens owned by the `_account`.\n     *\n     * @dev Balances are dynamic and equal the `_account`'s share in the amount of the\n     * total ether controlled by the protocol. See `sharesOf`.\n     */\n    function balanceOf(address _account) external view returns (uint256) {\n        return getPooledEthByShares(_sharesOf(_account));\n    }\n\n    /**\n     * @notice Moves `_amount` tokens from the caller's account to the `_recipient` account.\n     *\n     * @return a boolean value indicating whether the operation succeeded.\n     * Emits a `Transfer` event.\n     * Emits a `TransferShares` event.\n     *\n     * Requirements:\n     *\n     * - `_recipient` cannot be the zero address or the stETH contract itself.\n     * - the caller must have a balance of at least `_amount`.\n     * - the contract must not be paused.\n     *\n     * @dev The `_amount` argument is the amount of tokens, not shares.\n     */\n    function transfer(address _recipient, uint256 _amount) external returns (bool) {\n        _transfer(msg.sender, _recipient, _amount);\n        return true;\n    }\n\n    /**\n     * @return the remaining number of tokens that `_spender` is allowed to spend\n     * on behalf of `_owner` through `transferFrom`. This is zero by default.\n     *\n     * @dev This value changes when `approve` or `transferFrom` is called.\n     */\n    function allowance(address _owner, address _spender) public view returns (uint256) {\n        return allowances[_owner][_spender];\n    }\n\n    /**\n     * @notice Sets `_amount` as the allowance of `_spender` over the caller's tokens.\n     *\n     * @dev allowance can be set to \"infinity\" (INFINITE_ALLOWANCE).\n     * In this case allowance is not to be spent on transfer, that can save some gas.\n     *\n     * @return a boolean value indicating whether the operation succeeded.\n     * Emits an `Approval` event.\n     *\n     * Requirements:\n     *\n     * - `_spender` cannot be the zero address.\n     *\n     * @dev The `_amount` argument is the amount of tokens, not shares.\n     */\n    function approve(address _spender, uint256 _amount) external returns (bool) {\n        _approve(msg.sender, _spender, _amount);\n        return true;\n    }\n\n    /**\n     * @notice Moves `_amount` tokens from `_sender` to `_recipient` using the\n     * allowance mechanism. `_amount` is then deducted from the caller's\n     * allowance if it's not infinite.\n     *\n     * @return a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a `Transfer` event.\n     * Emits a `TransferShares` event.\n     * Emits an `Approval` event if the allowance is updated.\n     *\n     * Requirements:\n     *\n     * - `_sender` cannot be the zero address.\n     * - `_recipient` cannot be the zero address or the stETH contract itself.\n     * - `_sender` must have a balance of at least `_amount`.\n     * - the caller must have allowance for `_sender`'s tokens of at least `_amount`.\n     * - the contract must not be paused.\n     *\n     * @dev The `_amount` argument is the amount of tokens, not shares.\n     */\n    function transferFrom(address _sender, address _recipient, uint256 _amount) external returns (bool) {\n        _spendAllowance(_sender, msg.sender, _amount);\n        _transfer(_sender, _recipient, _amount);\n        return true;\n    }\n\n    /**\n     * @notice Atomically increases the allowance granted to `_spender` by the caller by `_addedValue`.\n     *\n     * This is an alternative to `approve` that can be used as a mitigation for\n     * problems described in:\n     * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/b709eae01d1da91902d06ace340df6b324e6f049/contracts/token/ERC20/IERC20.sol#L57\n     * Emits an `Approval` event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `_spender` cannot be the zero address.\n     */\n    function increaseAllowance(address _spender, uint256 _addedValue) external returns (bool) {\n        _approve(msg.sender, _spender, allowances[msg.sender][_spender].add(_addedValue));\n        return true;\n    }\n\n    /**\n     * @notice Atomically decreases the allowance granted to `_spender` by the caller by `_subtractedValue`.\n     *\n     * This is an alternative to `approve` that can be used as a mitigation for\n     * problems described in:\n     * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/b709eae01d1da91902d06ace340df6b324e6f049/contracts/token/ERC20/IERC20.sol#L57\n     * Emits an `Approval` event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `_spender` cannot be the zero address.\n     * - `_spender` must have allowance for the caller of at least `_subtractedValue`.\n     */\n    function decreaseAllowance(address _spender, uint256 _subtractedValue) external returns (bool) {\n        uint256 currentAllowance = allowances[msg.sender][_spender];\n        require(currentAllowance >= _subtractedValue, \"ALLOWANCE_BELOW_ZERO\");\n        _approve(msg.sender, _spender, currentAllowance.sub(_subtractedValue));\n        return true;\n    }\n\n    /**\n     * @return the total amount of shares in existence.\n     *\n     * @dev The sum of all accounts' shares can be an arbitrary number, therefore\n     * it is necessary to store it in order to calculate each account's relative share.\n     */\n    function getTotalShares() external view returns (uint256) {\n        return _getTotalShares();\n    }\n\n    /**\n     * @return the amount of shares owned by `_account`.\n     */\n    function sharesOf(address _account) external view returns (uint256) {\n        return _sharesOf(_account);\n    }\n\n    /**\n     * @param _ethAmount the amount of ether to convert to shares. Must be less than UINT128_MAX.\n     * @return the amount of shares that corresponds to `_ethAmount` protocol-controlled Ether.\n     * @dev the result is rounded down.\n     */\n    function getSharesByPooledEth(uint256 _ethAmount) public view returns (uint256) {\n        require(_ethAmount < UINT128_MAX, \"ETH_TOO_LARGE\");\n        return (_ethAmount\n            * _getShareRateDenominator()) // denominator in shares\n            / _getShareRateNumerator(); // numerator in ether\n    }\n\n    /**\n     * @param _sharesAmount the amount of shares to convert to ether. Must be less than UINT128_MAX.\n     * @return the amount of ether that corresponds to `_sharesAmount` token shares.\n     * @dev the result is rounded down.\n     */\n    function getPooledEthByShares(uint256 _sharesAmount) public view returns (uint256) {\n        require(_sharesAmount < UINT128_MAX, \"SHARES_TOO_LARGE\");\n        return (_sharesAmount\n            * _getShareRateNumerator()) // numerator in ether\n            / _getShareRateDenominator(); // denominator in shares\n    }\n\n    /**\n     * @param _sharesAmount the amount of shares to convert to ether. Must be less than UINT128_MAX.\n     * @return the amount of ether that corresponds to `_sharesAmount` token shares.\n     * @dev The result is rounded up. So,\n     *  for `shareRate >= 0.5`, `getSharesByPooledEth(getPooledEthBySharesRoundUp(1))` will be 1.\n     */\n    function getPooledEthBySharesRoundUp(uint256 _sharesAmount) public view returns (uint256) {\n        require(_sharesAmount < UINT128_MAX, \"SHARES_TOO_LARGE\");\n        uint256 numeratorInEther = _getShareRateNumerator();\n        uint256 denominatorInShares = _getShareRateDenominator();\n\n        return Math256.ceilDiv(_sharesAmount * numeratorInEther, denominatorInShares);\n    }\n\n    /**\n     * @notice Moves `_sharesAmount` token shares from the caller's account to the `_recipient` account.\n     *\n     * @return amount of transferred tokens.\n     * Emits a `TransferShares` event.\n     * Emits a `Transfer` event.\n     *\n     * Requirements:\n     *\n     * - `_recipient` cannot be the zero address or the stETH contract itself.\n     * - the caller must have at least `_sharesAmount` shares.\n     * - the contract must not be paused.\n     *\n     * @dev The `_sharesAmount` argument is the amount of shares, not tokens.\n     */\n    function transferShares(address _recipient, uint256 _sharesAmount) external returns (uint256) {\n        _transferShares(msg.sender, _recipient, _sharesAmount);\n        uint256 tokensAmount = getPooledEthByShares(_sharesAmount);\n        _emitTransferEvents(msg.sender, _recipient, tokensAmount, _sharesAmount);\n        return tokensAmount;\n    }\n\n    /**\n     * @notice Moves `_sharesAmount` token shares from the `_sender` account to the `_recipient` account.\n     *\n     * @return amount of transferred tokens.\n     * Emits a `TransferShares` event.\n     * Emits a `Transfer` event.\n     *\n     * Requirements:\n     *\n     * - `_sender` and `_recipient` cannot be the zero addresses.\n     * - `_sender` must have at least `_sharesAmount` shares.\n     * - the caller must have allowance for `_sender`'s tokens of at least `getPooledEthByShares(_sharesAmount)`.\n     * - the contract must not be paused.\n     *\n     * @dev The `_sharesAmount` argument is the amount of shares, not tokens.\n     */\n    function transferSharesFrom(\n        address _sender, address _recipient, uint256 _sharesAmount\n    ) external returns (uint256) {\n        uint256 tokensAmount = getPooledEthByShares(_sharesAmount);\n        _spendAllowance(_sender, msg.sender, tokensAmount);\n        _transferShares(_sender, _recipient, _sharesAmount);\n        _emitTransferEvents(_sender, _recipient, tokensAmount, _sharesAmount);\n        return tokensAmount;\n    }\n\n    /**\n     * @return the total amount (in wei) of ether controlled by the protocol.\n     * @dev This is used for calculating tokens from shares and vice versa.\n     * @dev This function is required to be implemented in a derived contract.\n     */\n    function _getTotalPooledEther() internal view returns (uint256);\n\n    /**\n     * @return the numerator of the protocol's share rate (in ether).\n     * @dev used to convert shares to tokens and vice versa.\n     * @dev can be overridden in a derived contract.\n     */\n    function _getShareRateNumerator() internal view returns (uint256) {\n        return _getTotalPooledEther();\n    }\n\n    /**\n     * @return the denominator of the protocol's share rate (in shares).\n     * @dev used to convert shares to tokens and vice versa.\n     * @dev can be overridden in a derived contract.\n     */\n    function _getShareRateDenominator() internal view returns (uint256) {\n        return _getTotalShares();\n    }\n\n    /**\n     * @notice Moves `_amount` tokens from `_sender` to `_recipient`.\n     * Emits a `Transfer` event.\n     * Emits a `TransferShares` event.\n     */\n    function _transfer(address _sender, address _recipient, uint256 _amount) internal {\n        uint256 _sharesToTransfer = getSharesByPooledEth(_amount);\n        _transferShares(_sender, _recipient, _sharesToTransfer);\n        _emitTransferEvents(_sender, _recipient, _amount, _sharesToTransfer);\n    }\n\n    /**\n     * @notice Sets `_amount` as the allowance of `_spender` over the `_owner` s tokens.\n     *\n     * Emits an `Approval` event.\n     *\n     * NB: the method can be invoked even if the protocol paused.\n     *\n     * Requirements:\n     *\n     * - `_owner` cannot be the zero address.\n     * - `_spender` cannot be the zero address.\n     */\n    function _approve(address _owner, address _spender, uint256 _amount) internal {\n        require(_owner != address(0), \"APPROVE_FROM_ZERO_ADDR\");\n        require(_spender != address(0), \"APPROVE_TO_ZERO_ADDR\");\n\n        allowances[_owner][_spender] = _amount;\n        emit Approval(_owner, _spender, _amount);\n    }\n\n    /**\n     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n     *\n     * Does not update the allowance amount in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Might emit an {Approval} event.\n     */\n    function _spendAllowance(address _owner, address _spender, uint256 _amount) internal {\n        uint256 currentAllowance = allowances[_owner][_spender];\n        if (currentAllowance != INFINITE_ALLOWANCE) {\n            require(currentAllowance >= _amount, \"ALLOWANCE_EXCEEDED\");\n            _approve(_owner, _spender, currentAllowance - _amount);\n        }\n    }\n\n    /**\n     * @return the total amount of shares in existence.\n     */\n    function _getTotalShares() internal view returns (uint256) {\n        return TOTAL_SHARES_POSITION_LOW128.getLowUint128();\n    }\n\n    /**\n     * @return the amount of shares owned by `_account`.\n     */\n    function _sharesOf(address _account) internal view returns (uint256) {\n        return shares[_account];\n    }\n\n    /**\n     * @notice Moves `_sharesAmount` shares from `_sender` to `_recipient`.\n     *\n     * Requirements:\n     *\n     * - `_sender` cannot be the zero address.\n     * - `_recipient` cannot be the zero address or the `stETH` token contract itself\n     * - `_sender` must hold at least `_sharesAmount` shares.\n     * - the contract must not be paused.\n     */\n    function _transferShares(address _sender, address _recipient, uint256 _sharesAmount) internal {\n        require(_sender != address(0), \"TRANSFER_FROM_ZERO_ADDR\");\n        require(_recipient != address(0), \"TRANSFER_TO_ZERO_ADDR\");\n        require(_recipient != address(this), \"TRANSFER_TO_STETH_CONTRACT\");\n        _whenNotStopped();\n\n        uint256 currentSenderShares = shares[_sender];\n        require(_sharesAmount <= currentSenderShares, \"BALANCE_EXCEEDED\");\n\n        shares[_sender] = currentSenderShares.sub(_sharesAmount);\n        shares[_recipient] = shares[_recipient].add(_sharesAmount);\n    }\n\n    /**\n     * @notice Creates `_sharesAmount` shares and assigns them to `_recipient`, increasing the total amount of shares.\n     * @dev This doesn't increase the token total supply.\n     *\n     * NB: The method doesn't check protocol pause relying on the external enforcement.\n     *\n     * Requirements:\n     *\n     * - `_recipient` cannot be the zero address or StETH token contract itself\n     * - the contract must not be paused.\n     */\n    function _mintShares(address _recipient, uint256 _sharesAmount) internal returns (uint256 newTotalShares) {\n        require(_recipient != address(0), \"MINT_TO_ZERO_ADDR\");\n        require(_recipient != address(this), \"MINT_TO_STETH_CONTRACT\");\n\n        newTotalShares = _getTotalShares().add(_sharesAmount);\n        require(newTotalShares & UINT128_HIGH_MASK == 0, \"SHARES_OVERFLOW\");\n\n        TOTAL_SHARES_POSITION_LOW128.setLowUint128(newTotalShares);\n\n        shares[_recipient] = shares[_recipient].add(_sharesAmount);\n\n        // Notice: we're not emitting a Transfer event from the zero address here since shares mint\n        // works by taking the amount of tokens corresponding to the minted shares from all other\n        // token holders, proportionally to their share. The total supply of the token doesn't change\n        // as the result. This is equivalent to performing a send from each other token holder's\n        // address to `address`, but we cannot reflect this as it would require sending an unbounded\n        // number of events.\n    }\n\n    /**\n     * @notice Destroys `_sharesAmount` shares from `_account`'s holdings, decreasing the total amount of shares.\n     * @dev This doesn't decrease the token total supply.\n     *\n     * Requirements:\n     *\n     * - `_account` cannot be the zero address.\n     * - `_account` must hold at least `_sharesAmount` shares.\n     * - the contract must not be paused.\n     */\n    function _burnShares(address _account, uint256 _sharesAmount) internal returns (uint256 newTotalShares) {\n        require(_account != address(0), \"BURN_FROM_ZERO_ADDR\");\n\n        uint256 accountShares = shares[_account];\n        require(_sharesAmount <= accountShares, \"BALANCE_EXCEEDED\");\n\n        newTotalShares = _getTotalShares().sub(_sharesAmount);\n        TOTAL_SHARES_POSITION_LOW128.setLowUint128(newTotalShares);\n\n        shares[_account] = accountShares.sub(_sharesAmount);\n    }\n\n    /**\n     * @dev Emits {Transfer} and {TransferShares} events\n     */\n    function _emitTransferEvents(address _from, address _to, uint256 _tokenAmount, uint256 _sharesAmount) internal {\n        emit Transfer(_from, _to, _tokenAmount);\n        emit TransferShares(_from, _to, _sharesAmount);\n    }\n\n    /**\n     * @dev Emits {Transfer} and {TransferShares} events where `from` is 0 address. Indicates mint events.\n     */\n    function _emitTransferAfterMintingShares(address _to, uint256 _sharesAmount) internal {\n        _emitTransferEvents(address(0), _to, getPooledEthByShares(_sharesAmount), _sharesAmount);\n    }\n\n    /**\n     * @dev Emits {SharesBurnt} event\n     */\n    function _emitSharesBurnt(\n        address _account, uint256 _preRebaseTokenAmount, uint256 _postRebaseTokenAmount, uint256 _sharesAmount\n    ) internal {\n        emit SharesBurnt(_account, _preRebaseTokenAmount, _postRebaseTokenAmount, _sharesAmount);\n    }\n\n    /**\n     * @dev Mints shares to INITIAL_TOKEN_HOLDER\n     */\n    function _mintInitialShares(uint256 _sharesAmount) internal {\n        _mintShares(INITIAL_TOKEN_HOLDER, _sharesAmount);\n        _emitTransferAfterMintingShares(INITIAL_TOKEN_HOLDER, _sharesAmount);\n    }\n}\n"},{"file_path":"contracts/0.4.24/utils/Pausable.sol","source_code":"// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.4.24;\n\nimport {UnstructuredStorage} from \"@aragon/os/contracts/common/UnstructuredStorage.sol\";\n\ncontract Pausable {\n    using UnstructuredStorage for bytes32;\n\n    event Stopped();\n    event Resumed();\n\n    // keccak256(\"lido.Pausable.activeFlag\")\n    bytes32 internal constant ACTIVE_FLAG_POSITION =\n        0x644132c4ddd5bb6f0655d5fe2870dcec7870e6be4758890f366b83441f9fdece;\n\n    function _whenNotStopped() internal view {\n        require(ACTIVE_FLAG_POSITION.getStorageBool(), \"CONTRACT_IS_STOPPED\");\n    }\n\n    function _whenStopped() internal view {\n        require(!ACTIVE_FLAG_POSITION.getStorageBool(), \"CONTRACT_IS_ACTIVE\");\n    }\n\n    function isStopped() public view returns (bool) {\n        return !ACTIVE_FLAG_POSITION.getStorageBool();\n    }\n\n    function _stop() internal {\n        _whenNotStopped();\n\n        ACTIVE_FLAG_POSITION.setStorageBool(false);\n        emit Stopped();\n    }\n\n    function _resume() internal {\n        _whenStopped();\n\n        ACTIVE_FLAG_POSITION.setStorageBool(true);\n        emit Resumed();\n    }\n}\n"},{"file_path":"contracts/0.4.24/utils/Versioned.sol","source_code":"// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\npragma solidity 0.4.24;\n\nimport \"@aragon/os/contracts/common/UnstructuredStorage.sol\";\n\n/**\n * @title Adapted code of /contracts/0.8.9/utils/Versioned.sol\n *\n * This contract contains only core part of original Versioned.sol\n * to reduce contract size\n */\ncontract Versioned {\n    using UnstructuredStorage for bytes32;\n\n    event ContractVersionSet(uint256 version);\n\n    /// @dev Storage slot: uint256 version\n    /// Version of the initialized contract storage.\n    /// The version stored in CONTRACT_VERSION_POSITION equals to:\n    /// - 0 right after the deployment, before an initializer is invoked (and only at that moment);\n    /// - N after calling initialize(), where N is the initially deployed contract version;\n    /// - N after upgrading contract by calling finalizeUpgrade_vN().\n    bytes32 internal constant CONTRACT_VERSION_POSITION =\n        0x4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6; // keccak256(\"lido.Versioned.contractVersion\");\n\n    uint256 internal constant PETRIFIED_VERSION_MARK = uint256(-1);\n\n    constructor() public {\n        // lock version in the implementation's storage to prevent initialization\n        CONTRACT_VERSION_POSITION.setStorageUint256(PETRIFIED_VERSION_MARK);\n    }\n\n    /// @notice Returns the current contract version.\n    function getContractVersion() public view returns (uint256) {\n        return CONTRACT_VERSION_POSITION.getStorageUint256();\n    }\n\n    function _checkContractVersion(uint256 version) internal view {\n        require(version == getContractVersion(), \"UNEXPECTED_CONTRACT_VERSION\");\n    }\n\n    function _setContractVersion(uint256 version) internal {\n        CONTRACT_VERSION_POSITION.setStorageUint256(version);\n        emit ContractVersionSet(version);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/Uint256Helpers.sol","source_code":"pragma solidity ^0.4.24;\n\n\nlibrary Uint256Helpers {\n    uint256 private constant MAX_UINT64 = uint64(-1);\n\n    string private constant ERROR_NUMBER_TOO_BIG = \"UINT64_NUMBER_TOO_BIG\";\n\n    function toUint64(uint256 a) internal pure returns (uint64) {\n        require(a <= MAX_UINT64, ERROR_NUMBER_TOO_BIG);\n        return uint64(a);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/apps/AppStorage.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"../common/UnstructuredStorage.sol\";\nimport \"../kernel/IKernel.sol\";\n\n\ncontract AppStorage {\n    using UnstructuredStorage for bytes32;\n\n    /* Hardcoded constants to save gas\n    bytes32 internal constant KERNEL_POSITION = keccak256(\"aragonOS.appStorage.kernel\");\n    bytes32 internal constant APP_ID_POSITION = keccak256(\"aragonOS.appStorage.appId\");\n    */\n    bytes32 internal constant KERNEL_POSITION = 0x4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b;\n    bytes32 internal constant APP_ID_POSITION = 0xd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b;\n\n    function kernel() public view returns (IKernel) {\n        return IKernel(KERNEL_POSITION.getStorageAddress());\n    }\n\n    function appId() public view returns (bytes32) {\n        return APP_ID_POSITION.getStorageBytes32();\n    }\n\n    function setKernel(IKernel _kernel) internal {\n        KERNEL_POSITION.setStorageAddress(address(_kernel));\n    }\n\n    function setAppId(bytes32 _appId) internal {\n        APP_ID_POSITION.setStorageBytes32(_appId);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/Petrifiable.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./Initializable.sol\";\n\n\ncontract Petrifiable is Initializable {\n    // Use block UINT256_MAX (which should be never) as the initializable date\n    uint256 internal constant PETRIFIED_BLOCK = uint256(-1);\n\n    function isPetrified() public view returns (bool) {\n        return getInitializationBlock() == PETRIFIED_BLOCK;\n    }\n\n    /**\n    * @dev Function to be called by top level contract to prevent being initialized.\n    *      Useful for freezing base contracts when they're used behind proxies.\n    */\n    function petrify() internal onlyInit {\n        initializedAt(PETRIFIED_BLOCK);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/SafeERC20.sol","source_code":"// Inspired by AdEx (https://github.com/AdExNetwork/adex-protocol-eth/blob/b9df617829661a7518ee10f4cb6c4108659dd6d5/contracts/libs/SafeERC20.sol)\n// and 0x (https://github.com/0xProject/0x-monorepo/blob/737d1dc54d72872e24abce5a1dbe1b66d35fa21a/contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol#L143)\n\npragma solidity ^0.4.24;\n\nimport \"../lib/token/ERC20.sol\";\n\n\nlibrary SafeERC20 {\n    // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\n    // https://github.com/ethereum/solidity/issues/3544\n    bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\n\n    string private constant ERROR_TOKEN_BALANCE_REVERTED = \"SAFE_ERC_20_BALANCE_REVERTED\";\n    string private constant ERROR_TOKEN_ALLOWANCE_REVERTED = \"SAFE_ERC_20_ALLOWANCE_REVERTED\";\n\n    function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\n        private\n        returns (bool)\n    {\n        bool ret;\n        assembly {\n            let ptr := mload(0x40)    // free memory pointer\n\n            let success := call(\n                gas,                  // forward all gas\n                _addr,                // address\n                0,                    // no value\n                add(_calldata, 0x20), // calldata start\n                mload(_calldata),     // calldata length\n                ptr,                  // write output over free memory\n                0x20                  // uint256 return\n            )\n\n            if gt(success, 0) {\n                // Check number of bytes returned from last function call\n                switch returndatasize\n\n                // No bytes returned: assume success\n                case 0 {\n                    ret := 1\n                }\n\n                // 32 bytes returned: check if non-zero\n                case 0x20 {\n                    // Only return success if returned data was true\n                    // Already have output in ptr\n                    ret := eq(mload(ptr), 1)\n                }\n\n                // Not sure what was returned: don't mark as success\n                default { }\n            }\n        }\n        return ret;\n    }\n\n    function staticInvoke(address _addr, bytes memory _calldata)\n        private\n        view\n        returns (bool, uint256)\n    {\n        bool success;\n        uint256 ret;\n        assembly {\n            let ptr := mload(0x40)    // free memory pointer\n\n            success := staticcall(\n                gas,                  // forward all gas\n                _addr,                // address\n                add(_calldata, 0x20), // calldata start\n                mload(_calldata),     // calldata length\n                ptr,                  // write output over free memory\n                0x20                  // uint256 return\n            )\n\n            if gt(success, 0) {\n                ret := mload(ptr)\n            }\n        }\n        return (success, ret);\n    }\n\n    /**\n    * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\n    *      Note that this makes an external call to the token.\n    */\n    function safeTransfer(ERC20 _token, address _to, uint256 _amount) internal returns (bool) {\n        bytes memory transferCallData = abi.encodeWithSelector(\n            TRANSFER_SELECTOR,\n            _to,\n            _amount\n        );\n        return invokeAndCheckSuccess(_token, transferCallData);\n    }\n\n    /**\n    * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\n    *      Note that this makes an external call to the token.\n    */\n    function safeTransferFrom(ERC20 _token, address _from, address _to, uint256 _amount) internal returns (bool) {\n        bytes memory transferFromCallData = abi.encodeWithSelector(\n            _token.transferFrom.selector,\n            _from,\n            _to,\n            _amount\n        );\n        return invokeAndCheckSuccess(_token, transferFromCallData);\n    }\n\n    /**\n    * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\n    *      Note that this makes an external call to the token.\n    */\n    function safeApprove(ERC20 _token, address _spender, uint256 _amount) internal returns (bool) {\n        bytes memory approveCallData = abi.encodeWithSelector(\n            _token.approve.selector,\n            _spender,\n            _amount\n        );\n        return invokeAndCheckSuccess(_token, approveCallData);\n    }\n\n    /**\n    * @dev Static call into ERC20.balanceOf().\n    * Reverts if the call fails for some reason (should never fail).\n    */\n    function staticBalanceOf(ERC20 _token, address _owner) internal view returns (uint256) {\n        bytes memory balanceOfCallData = abi.encodeWithSelector(\n            _token.balanceOf.selector,\n            _owner\n        );\n\n        (bool success, uint256 tokenBalance) = staticInvoke(_token, balanceOfCallData);\n        require(success, ERROR_TOKEN_BALANCE_REVERTED);\n\n        return tokenBalance;\n    }\n\n    /**\n    * @dev Static call into ERC20.allowance().\n    * Reverts if the call fails for some reason (should never fail).\n    */\n    function staticAllowance(ERC20 _token, address _owner, address _spender) internal view returns (uint256) {\n        bytes memory allowanceCallData = abi.encodeWithSelector(\n            _token.allowance.selector,\n            _owner,\n            _spender\n        );\n\n        (bool success, uint256 allowance) = staticInvoke(_token, allowanceCallData);\n        require(success, ERROR_TOKEN_ALLOWANCE_REVERTED);\n\n        return allowance;\n    }\n\n    /**\n    * @dev Static call into ERC20.totalSupply().\n    * Reverts if the call fails for some reason (should never fail).\n    */\n    function staticTotalSupply(ERC20 _token) internal view returns (uint256) {\n        bytes memory totalSupplyCallData = abi.encodeWithSelector(_token.totalSupply.selector);\n\n        (bool success, uint256 totalSupply) = staticInvoke(_token, totalSupplyCallData);\n        require(success, ERROR_TOKEN_ALLOWANCE_REVERTED);\n\n        return totalSupply;\n    }\n}\n"},{"file_path":"contracts/0.4.24/StETHPermit.sol","source_code":"// SPDX-FileCopyrightText: 2023 OpenZeppelin, Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n/* See contracts/COMPILERS.md */\npragma solidity 0.4.24;\n\nimport {UnstructuredStorage} from \"@aragon/os/contracts/common/UnstructuredStorage.sol\";\n\nimport {SignatureUtils} from \"../common/lib/SignatureUtils.sol\";\nimport {IEIP712StETH} from \"../common/interfaces/IEIP712StETH.sol\";\n\nimport {StETH} from \"./StETH.sol\";\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold ether at all.\n */\ninterface IERC2612 {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     */\n    function permit(\n        address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n\n\ncontract StETHPermit is IERC2612, StETH {\n    using UnstructuredStorage for bytes32;\n\n    /**\n     * @dev Service event for initialization\n     */\n    event EIP712StETHInitialized(address eip712StETH);\n\n    /**\n     * @dev Nonces for ERC-2612 (Permit)\n     */\n    mapping(address => uint256) internal noncesByAddress;\n\n    /**\n     * @dev Storage position used for the EIP712 message utils contract\n     *\n     * keccak256(\"lido.StETHPermit.eip712StETH\")\n     */\n    bytes32 internal constant EIP712_STETH_POSITION =\n        0x42b2d95e1ce15ce63bf9a8d9f6312cf44b23415c977ffa3b884333422af8941c;\n\n    /**\n     * @dev Typehash constant for ERC-2612 (Permit)\n     *\n     * keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n     */\n    bytes32 internal constant PERMIT_TYPEHASH =\n        0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     */\n    function permit(\n        address _owner, address _spender, uint256 _value, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s\n    ) external {\n        require(block.timestamp <= _deadline, \"DEADLINE_EXPIRED\");\n\n        bytes32 structHash = keccak256(\n            abi.encode(PERMIT_TYPEHASH, _owner, _spender, _value, _useNonce(_owner), _deadline)\n        );\n\n        bytes32 hash = IEIP712StETH(getEIP712StETH()).hashTypedDataV4(address(this), structHash);\n\n        require(SignatureUtils.isValidSignature(_owner, hash, _v, _r, _s), \"INVALID_SIGNATURE\");\n        _approve(_owner, _spender, _value);\n    }\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256) {\n        return noncesByAddress[owner];\n    }\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32) {\n        return IEIP712StETH(getEIP712StETH()).domainSeparatorV4(address(this));\n    }\n\n    /**\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n     * signature.\n     *\n     * NB: comparing to the full-fledged ERC-5267 version:\n     * - `salt` and `extensions` are unused\n     * - `flags` is hex\"0f\" or 01111b\n     *\n     * @dev using shortened returns to reduce a bytecode size\n     */\n    function eip712Domain() external view returns (\n        string memory name,\n        string memory version,\n        uint256 chainId,\n        address verifyingContract\n    ) {\n        return IEIP712StETH(getEIP712StETH()).eip712Domain(address(this));\n    }\n\n    /**\n     * @dev \"Consume a nonce\": return the current value and increment.\n     */\n    function _useNonce(address _owner) internal returns (uint256 current) {\n        current = noncesByAddress[_owner];\n        noncesByAddress[_owner] = current.add(1);\n    }\n\n    /**\n     * @dev Initialize EIP712 message utils contract for stETH\n     */\n    function _initializeEIP712StETH(address _eip712StETH) internal {\n        require(_eip712StETH != address(0), \"ZERO_EIP712STETH\");\n        require(getEIP712StETH() == address(0), \"EIP712STETH_ALREADY_SET\");\n\n        EIP712_STETH_POSITION.setStorageAddress(_eip712StETH);\n\n        emit EIP712StETHInitialized(_eip712StETH);\n    }\n\n    /**\n     * @dev Get EIP712 message utils contract\n     */\n    function getEIP712StETH() public view returns (address) {\n        return EIP712_STETH_POSITION.getStorageAddress();\n    }\n}\n"},{"file_path":"contracts/0.4.24/lib/StakeLimitUtils.sol","source_code":"// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>\n// SPDX-License-Identifier: GPL-3.0\n\n/* See contracts/COMPILERS.md */\npragma solidity 0.4.24;\n\nimport {UnstructuredStorage} from \"@aragon/os/contracts/common/UnstructuredStorage.sol\";\n\n//\n// We need to pack four variables into the same 256bit-wide storage slot\n// to lower the costs per each staking request.\n//\n// As a result, slot's memory aligned as follows:\n//\n// MSB ------------------------------------------------------------------------------> LSB\n// 256____________160_________________________128_______________32_____________________ 0\n// |_______________|___________________________|________________|_______________________|\n// | maxStakeLimit | maxStakeLimitGrowthBlocks | prevStakeLimit | prevStakeBlockNumber  |\n// |<-- 96 bits -->|<---------- 32 bits ------>|<-- 96 bits --->|<----- 32 bits ------->|\n//\n//\n// NB: Internal representation conventions:\n//\n// - the `maxStakeLimitGrowthBlocks` field above represented as follows:\n// `maxStakeLimitGrowthBlocks` = `maxStakeLimit` / `stakeLimitIncreasePerBlock`\n//           32 bits                 96 bits               96 bits\n//\n//\n// - the \"staking paused\" state is encoded by `prevStakeBlockNumber` being zero,\n// - the \"staking unlimited\" state is encoded by `maxStakeLimit` being zero and `prevStakeBlockNumber` being non-zero.\n//\n\n/**\n* @notice Library for the internal structs definitions\n* @dev solidity <0.6 doesn't support top-level structs\n* using the library to have a proper namespace\n*/\nlibrary StakeLimitState {\n    /**\n      * @dev Internal representation struct (slot-wide)\n      */\n    struct Data {\n        uint32 prevStakeBlockNumber;      // block number of the previous stake submit\n        uint96 prevStakeLimit;            // limit value (<= `maxStakeLimit`) obtained on the previous stake submit\n        uint32 maxStakeLimitGrowthBlocks; // limit regeneration speed expressed in blocks\n        uint96 maxStakeLimit;             // maximum limit value\n    }\n}\n\nlibrary StakeLimitUnstructuredStorage {\n    using UnstructuredStorage for bytes32;\n\n    /// @dev Storage offset for `maxStakeLimit` (bits)\n    uint256 internal constant MAX_STAKE_LIMIT_OFFSET = 160;\n    /// @dev Storage offset for `maxStakeLimitGrowthBlocks` (bits)\n    uint256 internal constant MAX_STAKE_LIMIT_GROWTH_BLOCKS_OFFSET = 128;\n    /// @dev Storage offset for `prevStakeLimit` (bits)\n    uint256 internal constant PREV_STAKE_LIMIT_OFFSET = 32;\n    /// @dev Storage offset for `prevStakeBlockNumber` (bits)\n    uint256 internal constant PREV_STAKE_BLOCK_NUMBER_OFFSET = 0;\n\n    /**\n    * @dev Read stake limit state from the unstructured storage position\n    * @param _position storage offset\n    */\n    function getStorageStakeLimitStruct(bytes32 _position) internal view returns (StakeLimitState.Data memory stakeLimit) {\n        uint256 slotValue = _position.getStorageUint256();\n\n        stakeLimit.prevStakeBlockNumber = uint32(slotValue >> PREV_STAKE_BLOCK_NUMBER_OFFSET);\n        stakeLimit.prevStakeLimit = uint96(slotValue >> PREV_STAKE_LIMIT_OFFSET);\n        stakeLimit.maxStakeLimitGrowthBlocks = uint32(slotValue >> MAX_STAKE_LIMIT_GROWTH_BLOCKS_OFFSET);\n        stakeLimit.maxStakeLimit = uint96(slotValue >> MAX_STAKE_LIMIT_OFFSET);\n    }\n\n     /**\n    * @dev Write stake limit state to the unstructured storage position\n    * @param _position storage offset\n    * @param _data stake limit state structure instance\n    */\n    function setStorageStakeLimitStruct(bytes32 _position, StakeLimitState.Data memory _data) internal {\n        _position.setStorageUint256(\n            uint256(_data.prevStakeBlockNumber) << PREV_STAKE_BLOCK_NUMBER_OFFSET\n                | uint256(_data.prevStakeLimit) << PREV_STAKE_LIMIT_OFFSET\n                | uint256(_data.maxStakeLimitGrowthBlocks) << MAX_STAKE_LIMIT_GROWTH_BLOCKS_OFFSET\n                | uint256(_data.maxStakeLimit) << MAX_STAKE_LIMIT_OFFSET\n        );\n    }\n}\n\n/**\n* @notice Interface library with helper functions to deal with stake limit struct in a more high-level approach.\n*/\nlibrary StakeLimitUtils {\n    /**\n    * @notice Calculate stake limit for the current block.\n    * @dev using `_constGasMin`, `_constGasMax`, `_saturatingSub`, `_constGasLt` to make gas consumption independent\n    *      of the current block number\n    */\n    function calculateCurrentStakeLimit(StakeLimitState.Data memory _data) internal view returns(uint256 limit) {\n        uint256 stakeLimitIncPerBlock;\n        if (_data.maxStakeLimitGrowthBlocks != 0) {\n            stakeLimitIncPerBlock = _data.maxStakeLimit / _data.maxStakeLimitGrowthBlocks;\n        }\n\n        uint256 blocksPassed = block.number - _data.prevStakeBlockNumber;\n        uint256 change = blocksPassed * stakeLimitIncPerBlock;\n\n        limit = _data.prevStakeLimit < _data.maxStakeLimit ?\n            _constGasMin(_data.prevStakeLimit + change, _data.maxStakeLimit) :\n            _constGasMax(_saturatingSub(_data.prevStakeLimit, change), _data.maxStakeLimit);\n    }\n\n    /**\n    * @notice check if staking is on pause\n    */\n    function isStakingPaused(StakeLimitState.Data memory _data) internal pure returns(bool) {\n        return _data.prevStakeBlockNumber == 0;\n    }\n\n    /**\n    * @notice check if staking limit is set (otherwise staking is unlimited)\n    */\n    function isStakingLimitSet(StakeLimitState.Data memory _data) internal pure returns(bool) {\n        return _data.maxStakeLimit != 0;\n    }\n\n    /**\n    * @notice update stake limit repr with the desired limits\n    * @dev input `_data` param is mutated and the func returns effectively the same pointer\n    * @param _data stake limit state struct\n    * @param _maxStakeLimit stake limit max value\n    * @param _stakeLimitIncreasePerBlock stake limit increase (restoration) per block\n    */\n    function setStakingLimit(\n        StakeLimitState.Data memory _data,\n        uint256 _maxStakeLimit,\n        uint256 _stakeLimitIncreasePerBlock\n    ) internal view returns (StakeLimitState.Data memory) {\n        require(_maxStakeLimit != 0, \"ZERO_MAX_STAKE_LIMIT\");\n        require(_maxStakeLimit <= uint96(-1), \"TOO_LARGE_MAX_STAKE_LIMIT\");\n        require(_maxStakeLimit >= _stakeLimitIncreasePerBlock, \"TOO_LARGE_LIMIT_INCREASE\");\n        require(\n            (_stakeLimitIncreasePerBlock == 0)\n            || (_maxStakeLimit / _stakeLimitIncreasePerBlock <= uint32(-1)),\n            \"TOO_SMALL_LIMIT_INCREASE\"\n        );\n\n        // reset prev stake limit to the new max stake limit if\n        if (\n            // staking was paused or\n            _data.prevStakeBlockNumber == 0 ||\n            // staking was unlimited or\n            _data.maxStakeLimit == 0 ||\n            // new maximum limit value is lower than the value obtained on the previous stake submit\n            _maxStakeLimit < _data.prevStakeLimit\n        ) {\n            _data.prevStakeLimit = uint96(_maxStakeLimit);\n        }\n        _data.maxStakeLimitGrowthBlocks =\n            _stakeLimitIncreasePerBlock != 0 ? uint32(_maxStakeLimit / _stakeLimitIncreasePerBlock) : 0;\n\n        _data.maxStakeLimit = uint96(_maxStakeLimit);\n\n        if (_data.prevStakeBlockNumber != 0) {\n            _data.prevStakeBlockNumber = uint32(block.number);\n        }\n\n        return _data;\n    }\n\n    /**\n    * @notice update stake limit repr to remove the limit\n    * @dev input `_data` param is mutated and the func returns effectively the same pointer\n    * @param _data stake limit state struct\n    */\n    function removeStakingLimit(\n        StakeLimitState.Data memory _data\n    ) internal pure returns (StakeLimitState.Data memory) {\n        _data.maxStakeLimit = 0;\n\n        return _data;\n    }\n\n    /**\n    * @notice update stake limit repr after submitting user's eth\n    * @dev input `_data` param is mutated and the func returns effectively the same pointer\n    * @param _data stake limit state struct\n    * @param _newPrevStakeLimit new value for the `prevStakeLimit` field\n    */\n    function updatePrevStakeLimit(\n        StakeLimitState.Data memory _data,\n        uint256 _newPrevStakeLimit\n    ) internal view returns (StakeLimitState.Data memory) {\n        assert(_newPrevStakeLimit <= uint96(-1));\n        assert(_data.prevStakeBlockNumber != 0);\n\n        _data.prevStakeLimit = uint96(_newPrevStakeLimit);\n        _data.prevStakeBlockNumber = uint32(block.number);\n\n        return _data;\n    }\n\n    /**\n    * @notice set stake limit pause state (on or off)\n    * @dev input `_data` param is mutated and the func returns effectively the same pointer\n    * @param _data stake limit state struct\n    * @param _isPaused pause state flag\n    */\n    function setStakeLimitPauseState(\n        StakeLimitState.Data memory _data,\n        bool _isPaused\n    ) internal view returns (StakeLimitState.Data memory) {\n        _data.prevStakeBlockNumber = uint32(_isPaused ? 0 : block.number);\n\n        return _data;\n    }\n\n    /**\n     * @notice branchless less-than comparison\n     * @param a first value\n     * @param b second value\n     * @return result 1 if a < b, 0 otherwise\n     */\n    function _constGasLt(uint256 a, uint256 b) internal pure returns (uint256 result) {\n        assembly {\n            result := lt(a, b)\n        }\n    }\n\n    /**\n     * @notice find a minimum of two numbers with a constant gas consumption\n     * @dev doesn't use branching logic inside\n     * @param _lhs left hand side value\n     * @param _rhs right hand side value\n     */\n    function _constGasMin(uint256 _lhs, uint256 _rhs) internal pure returns (uint256 min) {\n        uint256 lhsIsLess = _constGasLt(_lhs, _rhs);\n        min = (_lhs * lhsIsLess) + (_rhs * (1 - lhsIsLess));\n    }\n\n    /**\n     * @notice find a maximum of two numbers with a constant gas consumption\n     * @dev doesn't use branching logic inside\n     * @param _lhs left hand side value\n     * @param _rhs right hand side value\n     */\n    function _constGasMax(uint256 _lhs, uint256 _rhs) internal pure returns (uint256 max) {\n        uint256 lhsIsLess = _constGasLt(_lhs, _rhs);\n        max = (_lhs * (1 - lhsIsLess)) + (_rhs * lhsIsLess);\n    }\n\n    /**\n     * @notice unsigned saturating subtraction, bounds to zero instead of overflowing\n     * @param a first value\n     * @param b second value\n     */\n    function _saturatingSub(uint256 a, uint256 b) internal pure returns (uint256 result) {\n        uint256 isUnderflow = _constGasLt(a, b);\n        result = (a - b) * (1 - isUnderflow);\n    }\n}\n"},{"file_path":"@aragon/os/contracts/common/ReentrancyGuard.sol","source_code":"/*\n * SPDX-License-Identifier:    MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"../common/UnstructuredStorage.sol\";\n\n\ncontract ReentrancyGuard {\n    using UnstructuredStorage for bytes32;\n\n    /* Hardcoded constants to save gas\n    bytes32 internal constant REENTRANCY_MUTEX_POSITION = keccak256(\"aragonOS.reentrancyGuard.mutex\");\n    */\n    bytes32 private constant REENTRANCY_MUTEX_POSITION = 0xe855346402235fdd185c890e68d2c4ecad599b88587635ee285bce2fda58dacb;\n\n    string private constant ERROR_REENTRANT = \"REENTRANCY_REENTRANT_CALL\";\n\n    modifier nonReentrant() {\n        // Ensure mutex is unlocked\n        require(!REENTRANCY_MUTEX_POSITION.getStorageBool(), ERROR_REENTRANT);\n\n        // Lock mutex before function call\n        REENTRANCY_MUTEX_POSITION.setStorageBool(true);\n\n        // Perform function call\n        _;\n\n        // Unlock mutex after function call\n        REENTRANCY_MUTEX_POSITION.setStorageBool(false);\n    }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"constant":true,"inputs":[{"name":"_sharesAmount","type":"uint256"}],"name":"getPooledEthBySharesRoundUp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"resume","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_amountOfShares","type":"uint256"}],"name":"mintExternalShares","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"stop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hasInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BUFFER_RESERVE_MANAGER_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"STAKING_CONTROL_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newDepositsReserveTarget","type":"uint256"}],"name":"setDepositsReserveTarget","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getDepositsReserveTarget","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lidoLocator","type":"address"},{"name":"_eip712StETH","type":"address"},{"name":"_depositsReserveTarget","type":"uint256"}],"name":"initialize","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ethAmount","type":"uint256"}],"name":"getSharesByPooledEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_reportTimestamp","type":"uint256"},{"name":"_timeElapsed","type":"uint256"},{"name":"_preTotalShares","type":"uint256"},{"name":"_preTotalEther","type":"uint256"},{"name":"_postTotalShares","type":"uint256"},{"name":"_postTotalEther","type":"uint256"},{"name":"_postInternalShares","type":"uint256"},{"name":"_postInternalEther","type":"uint256"},{"name":"_sharesMintedAsFees","type":"uint256"}],"name":"emitTokenRebase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isStakingPaused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_seedDepositsCount","type":"uint256"}],"name":"withdrawDepositableEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_script","type":"bytes"}],"name":"getEVMScriptExecutor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxStakeLimit","type":"uint256"},{"name":"_stakeLimitIncreasePerBlock","type":"uint256"}],"name":"setStakingLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RESUME_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getRecoveryVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalPooledEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PAUSE_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBalanceStats","outputs":[{"name":"clValidatorsBalanceAtLastReport","type":"uint256"},{"name":"clPendingBalanceAtLastReport","type":"uint256"},{"name":"depositedSinceLastReport","type":"uint256"},{"name":"depositedForCurrentReport","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTreasury","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isStopped","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBufferedEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"receiveELRewards","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_amountOfShares","type":"uint256"}],"name":"mintShares","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getWithdrawalCredentials","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_reportTimestamp","type":"uint256"},{"name":"_clValidatorsBalance","type":"uint256"},{"name":"_clPendingBalance","type":"uint256"}],"name":"processClStateUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentStakeLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getExternalShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfShares","type":"uint256"}],"name":"internalizeExternalBadDebt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getStakeLimitFullInfo","outputs":[{"name":"isStakingPaused_","type":"bool"},{"name":"isStakingLimitSet","type":"bool"},{"name":"currentStakeLimit","type":"uint256"},{"name":"maxStakeLimit","type":"uint256"},{"name":"maxStakeLimitGrowthBlocks","type":"uint256"},{"name":"prevStakeLimit","type":"uint256"},{"name":"prevStakeBlockNumber","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_recipient","type":"address"},{"name":"_sharesAmount","type":"uint256"}],"name":"transferSharesFrom","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfShares","type":"uint256"}],"name":"burnExternalShares","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"resumeStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getFeeDistribution","outputs":[{"name":"treasuryFeeBasisPoints","type":"uint16"},{"name":"insuranceFeeBasisPoints","type":"uint16"},{"name":"operatorsFeeBasisPoints","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"receiveWithdrawals","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_sharesAmount","type":"uint256"}],"name":"getPooledEthByShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfShares","type":"uint256"}],"name":"rebalanceExternalEtherToInternal","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"allowRecoverability","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"nonces","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"appId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eip712Domain","outputs":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfShares","type":"uint256"}],"name":"burnShares","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMaxMintableExternalShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWithdrawalsReserve","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getContractVersion","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getInitializationBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_depositsReserveTarget","type":"uint256"}],"name":"finalizeUpgrade_v4","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_sharesAmount","type":"uint256"}],"name":"transferShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_reportTimestamp","type":"uint256"},{"name":"_reportClBalance","type":"uint256"},{"name":"_principalCLBalance","type":"uint256"},{"name":"_withdrawalsToWithdraw","type":"uint256"},{"name":"_elRewardsToWithdraw","type":"uint256"},{"name":"_lastWithdrawalRequestToFinalize","type":"uint256"},{"name":"_withdrawalsShareRate","type":"uint256"},{"name":"_etherToLockOnWithdrawalQueue","type":"uint256"}],"name":"collectRewardsAndProcessWithdrawals","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getEIP712StETH","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMaxExternalRatioBP","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"address"}],"name":"transferToVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_sender","type":"address"},{"name":"_role","type":"bytes32"},{"name":"_params","type":"uint256[]"}],"name":"canPerform","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_referral","type":"address"}],"name":"submit","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getEVMScriptRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getBeaconStat","outputs":[{"name":"depositedValidators","type":"uint256"},{"name":"beaconValidators","type":"uint256"},{"name":"beaconBalance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"removeStakingLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getFee","outputs":[{"name":"totalFee","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kernel","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_deadline","type":"uint256"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPetrified","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getExternalEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLidoLocator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"canDeposit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STAKING_PAUSE_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDepositsReserve","outputs":[{"name":"depositsReserve","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDepositableEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxExternalRatioBP","type":"uint256"}],"name":"setMaxExternalRatioBP","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"}],"name":"sharesOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pauseStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTotalELRewardsCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"StakingPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"StakingResumed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"maxStakeLimit","type":"uint256"},{"indexed":false,"name":"stakeLimitIncreasePerBlock","type":"uint256"}],"name":"StakingLimitSet","type":"event"},{"anonymous":false,"inputs":[],"name":"StakingLimitRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"clValidatorsBalance","type":"uint256"},{"indexed":false,"name":"clPendingBalance","type":"uint256"}],"name":"CLBalancesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"depositedPostReport","type":"uint256"}],"name":"DepositedPostReportUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"depositedValidators","type":"uint256"}],"name":"DepositedValidatorsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"preCLBalance","type":"uint256"},{"indexed":false,"name":"postCLBalance","type":"uint256"},{"indexed":false,"name":"withdrawalsWithdrawn","type":"uint256"},{"indexed":false,"name":"executionLayerRewardsWithdrawn","type":"uint256"},{"indexed":false,"name":"postBufferedEther","type":"uint256"}],"name":"ETHDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"timeElapsed","type":"uint256"},{"indexed":false,"name":"preTotalShares","type":"uint256"},{"indexed":false,"name":"preTotalEther","type":"uint256"},{"indexed":false,"name":"postTotalShares","type":"uint256"},{"indexed":false,"name":"postTotalEther","type":"uint256"},{"indexed":false,"name":"sharesMintedAsFees","type":"uint256"}],"name":"TokenRebased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"lidoLocator","type":"address"}],"name":"LidoLocatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"ELRewardsReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawalsReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"referral","type":"address"}],"name":"Submitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Unbuffered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"postInternalShares","type":"uint256"},{"indexed":false,"name":"postInternalEther","type":"uint256"},{"indexed":false,"name":"sharesMintedAsFees","type":"uint256"}],"name":"InternalShareRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"amountOfShares","type":"uint256"}],"name":"ExternalSharesMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amountOfShares","type":"uint256"}],"name":"ExternalSharesBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"maxExternalRatioBP","type":"uint256"}],"name":"MaxExternalRatioBPSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"ExternalEtherTransferredToBuffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amountOfShares","type":"uint256"}],"name":"ExternalBadDebtInternalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"depositsReserve","type":"uint256"}],"name":"DepositsReserveSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"depositsReserveTarget","type":"uint256"}],"name":"DepositsReserveTargetSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"executor","type":"address"},{"indexed":false,"name":"script","type":"bytes"},{"indexed":false,"name":"input","type":"bytes"},{"indexed":false,"name":"returnData","type":"bytes"}],"name":"ScriptResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"vault","type":"address"},{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"RecoverToVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"eip712StETH","type":"address"}],"name":"EIP712StETHInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"sharesValue","type":"uint256"}],"name":"TransferShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":false,"name":"preRebaseTokenAmount","type":"uint256"},{"indexed":false,"name":"postRebaseTokenAmount","type":"uint256"},{"indexed":false,"name":"sharesAmount","type":"uint256"}],"name":"SharesBurnt","type":"event"},{"anonymous":false,"inputs":[],"name":"Stopped","type":"event"},{"anonymous":false,"inputs":[],"name":"Resumed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}