feat: fund mcms pdas [CLD-2765]#101
Conversation
Introduce a ChangeSetV2 flow to transfer ownable contracts to the MCMS timelock, with per-family registry, EVM sequence, datastore validation, and an end-to-end test.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
… ggoh/CLD-2762/transfer-to-mcms
… ggoh/CLD-2762/transfer-to-mcms
Release impact (release-please)
PR title: Merging this PR as-is will contribute a minor bump to the next release-please release PR. Conventional commit → bump
Update the PR title before merge if you need a different bump (squash commit message = PR title). Preview is based on this PR title only. The release-please release PR may include other unreleased commits already on |
There was a problem hiding this comment.
Pull request overview
Introduces a new Solana-focused “fund MCMS PDAs” changeset implementation that resolves MCMS/timelock refs from the datastore via the Solana MCMS reader, validates prerequisites (refs + deployer balance), and executes funding transfers via an operations sequence/operation.
Changes:
- Adds a Solana changeset (
Changeset) that validates MCMS refs and deployer SOL balance, then funds the resolved signer PDAs per-chain. - Adds new operations building blocks (
OpFundKey,SeqFundSolanaMCMPDAs,SeqFundMCMPDAs) plus helpers for resolving PDAs from datastore refs. - Adds comprehensive unit/integration tests for helpers, validation, operation, sequences, and the changeset end-to-end behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| mcms/solana/fund-mcm-pdas/validate.go | Preconditions validation for datastore refs and deployer SOL balance. |
| mcms/solana/fund-mcm-pdas/validate_test.go | Tests for ref validation and balance validation behavior. |
| mcms/solana/fund-mcm-pdas/types.go | Changeset config types and required funding calculation. |
| mcms/solana/fund-mcm-pdas/types_test.go | Tests for RequiredFunding and envFromSeqDeps. |
| mcms/solana/fund-mcm-pdas/sequence.go | Sequences to fund explicit targets and datastore-resolved PDAs. |
| mcms/solana/fund-mcm-pdas/sequence_test.go | Tests for sequence execution, chain mismatch, and error/success paths. |
| mcms/solana/fund-mcm-pdas/operation.go | Operation that transfers lamports from deployer to a target account. |
| mcms/solana/fund-mcm-pdas/operation_test.go | Tests covering successful funding and failure scenarios. |
| mcms/solana/fund-mcm-pdas/helpers.go | Datastore ref resolution into signer PDAs and funding targets. |
| mcms/solana/fund-mcm-pdas/helpers_test.go | Tests for target resolution and PDA parsing error cases. |
| mcms/solana/fund-mcm-pdas/doc.go | Package documentation and required reader import note. |
| mcms/solana/fund-mcm-pdas/changeset.go | Top-level changeset wiring: verify + apply with sequence aggregation and output building. |
| mcms/solana/fund-mcm-pdas/changeset_test.go | End-to-end tests for preconditions and apply (including real instruction inspection). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
… only applicable to solana
graham-chainlink
left a comment
There was a problem hiding this comment.
You have to rebase main again.
Signed-off-by: Pablo Estrada <139084212+ecPablo@users.noreply.github.com>
|




Refactors fund mcms pdas for solana to use new conventions and helpers
AI Summary
This pull request refactors the EVM operations utility usage throughout the MCMS legacy codebase. The main change is replacing references to the old
oputilpackage with the newmcms/evm/operationspackage, updating both import paths and type usages. This streamlines code maintenance and ensures all EVM-related operations use the centralized, updated implementation.Migration to new EVM operations utility:
All imports and usages of
legacy/mcms/internal/family/evm/oputilhave been replaced withmcms/evm/operationsacross multiple files, including changes to type names and function calls. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]All usages of EVM operation types and functions (e.g.,
EVMDeployInput,RetryDeploymentWithGasBoost,EVMCallOutput,NewEVMDeployOperation,NewEVMCallOperation) have been updated to reference the new package, ensuring consistency and removing legacy dependencies. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Type and identifier updates:
EVMCallOutput,EVMDeployInput, operation variables) have been updated to use the new package, ensuring type compatibility and clarity. [1] [2] [3] [4] [5] [6]Operation registration and execution:
OpDeployCallProxy,OpDeployTimelock,OpGrantRole,OpEVMSetConfigMCM,OpDeployProposerMCM,OpDeployBypasserMCM,OpDeployCancellerMCM) now use the newoperationspackage for construction and configuration. [1] [2] [3] [4] [5] [6]This refactor ensures all EVM-related operations are routed through the updated, centralized utility, reducing technical debt and simplifying future maintenance.