Open
Conversation
…e + SubmitWithdrawals factories (#96) * feat: add `maxValues` for `CSMSettleElStealingPenalty` * feat: rename factory. introduce curated v2 things * fix * feat: add `name` for factory * fix: name in scripts * fix: more renames * feat: add deployment script for CM * feat: add SubmitWithdrawals factory * chore: pin solidity 0.8.6 * chore: add name to the factory * feat: add deploy script for SubmitWithdrawals * test: add scenario/integration test for SubmitWithdrawals * feat: rename set vetted gate tree factory * feat: allowed gates registry * fix: review * chore: make allowedGates private variable * test: few tweaks to allowed gate registry * fix: use the updated method * refactor: rename the factory one more time * fix: `reportWithdrawnValidators` -> `reportSlashedWithdrawnValidators` * feat: settle general delayed penalty deploy script * feat: Create\Update MetaRegistry operator group factory * fix: review * feat: initial gates for registry, tests * fix: remove acceptance tests * fix: create or update group review * feat: add `name` for AllowedMerkleGateRegistry * feat: add `txHash` to artifacts --------- Co-authored-by: madlabman <10616301+madlabman@users.noreply.github.com>
…e share factories (#102) * feat: allow consolidation factory * chore: add comment * fix: review * fix: add `consolidationManager` * feat: UpdateStakingModuleShareLimits ET Factory (#99) * feat: UpdateStakingModuleShareLimits ET Factory * fixes for review * feat: add deployment and acceptance tests for UpdateStakingModuleShareLimits --------- Co-authored-by: Sergey Khomutinin <31664571+skhomuti@users.noreply.github.com>
mkurayan
reviewed
Mar 6, 2026
dgusakov
reviewed
Mar 13, 2026
There was a problem hiding this comment.
Pull request overview
Adds new Easy Track EVMScript factories and supporting infra for CMv2 / CSMv3 / SRv3 motions, plus scenarios/stubs/interfaces needed to test and deploy them across networks.
Changes:
- Introduces new EVMScript factories for: updating staking module share limits, settling general delayed penalties, reporting slashed-withdrawn validators, creating/updating MetaRegistry operator groups, and allowing consolidation pairs.
- Adds/updates supporting Solidity interfaces + test stubs (MetaRegistry, ConsolidationMigrator, CSModule node-operator stubs, StakingRouter updates) and expands scenario + unit test coverage.
- Extends Python utils/fixtures to expose CM/CSM0x02 wiring and adds deployment scripts for the new factories/registry.
Reviewed changes
Copilot reviewed 59 out of 60 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/lido.py | Adds optional consolidation_migrator address + optional contract wiring. |
| utils/dual_governance.py | Refactors contract lookup to resolve network dynamically via helper. |
| utils/csm0x02.py | Adds CSM0x02 address/contract helper module. |
| utils/csm.py | Extends CSM wiring with allowed merkle gates registry address/interface. |
| utils/config.py | Hard-fails if Brownie network cannot be resolved. |
| utils/cm.py | Adds CM (curated module) address/contract helper module. |
| tests/test_allowed_merkle_gates_registry.py | Adds unit tests for AllowedMerkleGatesRegistry behavior. |
| tests/scenario/test_update_staking_module_share_limits_scenario.py | Adds scenario test for SR module share limit update motion. |
| tests/scenario/test_settle_general_delayed_penalty_scenario.py | Adds scenario test for settling general delayed penalties via motion. |
| tests/scenario/test_report_withdrawals_for_slashed_validators_scenario.py | Adds scenario test for reporting slashed withdrawn validators via motion. |
| tests/scenario/test_merkle_gate_scenario.py | Adds scenario test for SetMerkleGateTree factory flow. |
| tests/scenario/test_csm_vetted_gate_scenario.py | Removes old vetted-gate scenario. |
| tests/scenario/test_create_or_update_operator_group_scenario.py | Adds scenario test for CMv2 MetaRegistry group create/update via motion. |
| tests/scenario/test_allow_consolidation_pair_scenario.py | Adds scenario test for allowing consolidation pairs via motion. |
| tests/scenario/conftest.py | Adds helpers/fixtures for “use deployed contracts” mode + impersonation utilities. |
| tests/evm_script_factories/test_update_staking_module_share_limits.py | Adds unit tests for UpdateStakingModuleShareLimits factory. |
| tests/evm_script_factories/test_settle_general_delayed_penalty.py | Adds unit tests for SettleGeneralDelayedPenalty factory. |
| tests/evm_script_factories/test_set_merkle_gate_tree.py | Adds unit tests for SetMerkleGateTree factory. |
| tests/evm_script_factories/test_report_withdrawals_for_slashed_validators.py | Adds unit tests for ReportWithdrawalsForSlashedValidators factory. |
| tests/evm_script_factories/test_csm_settle_el_stealing_penalty.py | Removes old EL stealing penalty factory tests. |
| tests/evm_script_factories/test_csm_set_vetted_gate_tree.py | Removes old vetted-gate factory tests. |
| tests/evm_script_factories/test_create_or_update_operator_group.py | Adds unit tests for CreateOrUpdateOperatorGroup factory. |
| tests/evm_script_factories/test_allow_consolidation_pair.py | Adds unit tests for AllowConsolidationPair factory. |
| tests/conftest.py | Adds CM/CSM0x02 fixtures + allowed registry/gate helpers + SR consolidation migrator fixture. |
| scripts/deploy_update_staking_module_share_limits_factory.py | Adds deployment script for UpdateStakingModuleShareLimits factory. |
| scripts/deploy_settle_general_delayed_penalty_factory.py | Adds deployment script for SettleGeneralDelayedPenalty factory. |
| scripts/deploy_set_merkle_gate_tree_factory.py | Adds deployment script for SetMerkleGateTree factory. |
| scripts/deploy_report_withdrawals_for_slashed_validator_factory.py | Adds deployment script for ReportWithdrawalsForSlashedValidators factory. |
| scripts/deploy_csm_settle_el_stealing_factory.py | Removes old EL stealing factory deployment script. |
| scripts/deploy_csm_set_vetted_gate_tree_factory.py | Removes old vetted gate factory deployment script. |
| scripts/deploy_create_or_update_operator_group_factory.py | Adds deployment script for CreateOrUpdateOperatorGroup factory. |
| scripts/deploy_allowed_merkle_gates_registry.py | Adds deployment script for AllowedMerkleGatesRegistry. |
| scripts/deploy_allow_consolidation_pair_factory.py | Adds deployment script for AllowConsolidationPair factory. |
| scripts/acceptance_test_csm_settle_el_stealing_setup.py | Removes old acceptance setup script. |
| scripts/acceptance_test_csm_set_vetted_gate_tree_setup.py | Removes old acceptance setup script. |
| interfaces/CSModule.json | Updates CSModule ABI to CSMv3 surface (node operators, penalties, withdrawals reporting). |
| contracts/test/StakingRouterStub.sol | Adds updateModuleShares + event + test helper setter. |
| contracts/test/NodeOperatorsRegistryStub.sol | Adds canPerform + reward address setter to support consolidation tests. |
| contracts/test/MetaRegistryStub.sol | Adds MetaRegistry stub used by operator-group factory tests. |
| contracts/test/MerkleGateStub.sol | Renames/adjusts stub to represent MerkleGate (not VettedGate). |
| contracts/test/ConsolidationMigratorStub.sol | Adds consolidation migrator stub used by consolidation pair tests. |
| contracts/test/CSModuleNodeOperatorsStub.sol | Adds minimal ICSModule implementation for node-operator activity checks. |
| contracts/test/CSLikeModuleStub.sol | Adds module-like stub supporting accounting + settle/report flows for tests. |
| contracts/interfaces/IVettedGate.sol | Removes old vetted gate interface. |
| contracts/interfaces/IStakingRouter.sol | Extends interface with updateModuleShares. |
| contracts/interfaces/IMetaRegistry.sol | Adds MetaRegistry interface used by CMv2 factory. |
| contracts/interfaces/IMerkleGate.sol | Adds MerkleGate interface used by SetMerkleGateTree factory. |
| contracts/interfaces/IConsolidationMigrator.sol | Adds ConsolidationMigrator interface used by consolidation pair factory/tests. |
| contracts/interfaces/ICSModule.sol | Updates ICSModule interface to “general delayed penalty” + withdrawals reporting + activity checks. |
| contracts/interfaces/ICSAccounting.sol | Adds accounting interface for locked bond reads. |
| contracts/interfaces/IAllowedMerkleGatesRegistry.sol | Adds registry interface for gate allowlist checks. |
| contracts/EVMScriptFactories/UpdateStakingModuleShareLimits.sol | New SR factory that validates deltas/current values and emits update call. |
| contracts/EVMScriptFactories/SettleGeneralDelayedPenalty.sol | New CSM factory to settle delayed penalties with max-amount validation. |
| contracts/EVMScriptFactories/SetMerkleGateTree.sol | Reworks gate-tree factory to support any allowed IMerkleGate via registry allowlist. |
| contracts/EVMScriptFactories/ReportWithdrawalsForSlashedValidators.sol | New CSM factory to report slashed withdrawn validators. |
| contracts/EVMScriptFactories/CreateOrUpdateOperatorGroup.sol | New CMv2 factory validating and encoding MetaRegistry operator group updates. |
| contracts/EVMScriptFactories/CSMSettleELStealingPenalty.sol | Removes old factory. |
| contracts/EVMScriptFactories/AllowConsolidationPair.sol | New SR factory to allow consolidation pairs with NOR permission checks. |
| contracts/AllowedMerkleGatesRegistry.sol | New registry contract to maintain allowed MerkleGate addresses. |
| .gitignore | Ignores typings/, direnv, tags, etc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… _addGate, add tests Agent-Logs-Url: https://github.com/lidofinance/easy-track/sessions/a18fe8d1-6aff-4870-97df-51bfeacd5895 Co-authored-by: vgorkavenko <32727352+vgorkavenko@users.noreply.github.com>
mkurayan
reviewed
Apr 13, 2026
| sourceModuleId = sourceModuleId_; | ||
| targetModuleId = targetModuleId_; | ||
| consolidationMigrator = IConsolidationMigrator(_consolidationMigrator); | ||
| metaRegistry = ICuratedModule(sourceModuleAddress).META_REGISTRY(); |
There was a problem hiding this comment.
@vgorkavenko The source module is legacy NOR module, it does not have META_REGISTRY
vgorkavenko
commented
Apr 14, 2026
vgorkavenko
commented
Apr 14, 2026
Comment on lines
+141
to
+166
| function _validateInputData( | ||
| address creator, | ||
| AllowConsolidationPairInput memory input | ||
| ) private view { | ||
|
|
||
| INodeOperatorsRegistry sourceModule = INodeOperatorsRegistry(stakingRouter.getStakingModule(sourceModuleId).stakingModuleAddress); | ||
|
|
||
| uint256 sourceCount = sourceModule.getNodeOperatorsCount(); | ||
| require(input.sourceOperatorId < sourceCount, ERROR_SOURCE_OPERATOR_ID_DOES_NOT_EXIST); | ||
|
|
||
| (bool active, , address rewardAddress, , , , ) = sourceModule.getNodeOperator( | ||
| input.sourceOperatorId, | ||
| false | ||
| ); | ||
| require(active, ERROR_NODE_OPERATOR_IS_NOT_ACTIVE); | ||
|
|
||
| uint256[] memory roleParams = new uint256[](1); | ||
| roleParams[0] = input.sourceOperatorId; | ||
| require( | ||
| creator == rewardAddress || | ||
| sourceModule.canPerform(creator, MANAGE_SIGNING_KEYS_ROLE, roleParams), | ||
| ERROR_CALLER_IS_NOT_SOURCE_OPERATOR_OWNER_OR_MANAGER | ||
| ); | ||
|
|
||
| _validateOperatorIds(input.sourceOperatorId, input.targetOperatorIds); | ||
| } |
Check warning
Code scanning / Slither
Unused return Medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fill in test fixtures before deployment
Hoodi Addresses
Mainnet Addresses