Conversation
|
b80cb68 to
34ab99c
Compare
34ab99c to
70c631a
Compare
There was a problem hiding this comment.
Pull request overview
Refactors the MCMS fork execution helpers by splitting chain-specific inspector/executor construction into per-chain files and keeping chain_helpers.go focused on shared selector-family dispatch. This aims to keep behavior consistent while making per-chain tweaks (Aptos/Sui/etc.) easier to locate and extend.
Changes:
- Added selector-family detection and dispatch for inspector/executor/timelock-executor creation.
- Introduced per-chain helper files (EVM/Solana/Aptos/Sui/Ton) for chain-specific construction/validation hooks.
- Added unit tests covering selector family lookup and several error paths.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| engine/cld/commands/mcms/chain_helpers.go | Adds selector-family dispatch and shared helper functions (newChainAccessor, selectorFamily). |
| engine/cld/commands/mcms/chain_helpers_evm.go | EVM-specific builder wrappers (currently passthrough to chainwrappers). |
| engine/cld/commands/mcms/chain_helpers_solana.go | Solana-specific builder wrappers (currently passthrough to chainwrappers). |
| engine/cld/commands/mcms/chain_helpers_aptos.go | Aptos builders with action→role validation hook before delegating to chainwrappers. |
| engine/cld/commands/mcms/chain_helpers_sui.go | Sui builders with metadata parsing/validation hook before delegating to chainwrappers. |
| engine/cld/commands/mcms/chain_helpers_ton.go | Ton-specific builder wrappers (currently passthrough to chainwrappers). |
| engine/cld/commands/mcms/chain_helpers_test.go | Adds unit tests for selector-family and error-path behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|


We split the big chain_helpers.go into per-chain files so Aptos/Sui tweaks and the like have an obvious home, while the main file just does the shared “figure out family and dispatch” stuff. Behavior should be the same—same chainwrappers calls and default fallback—just easier to find and edit.
https://smartcontract-it.atlassian.net/browse/CLD-1183