chore: move all legacy code into single legacy/ pkg#48
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates previously scattered “legacy” functionality under a single legacy/ package namespace, updating import paths and package names accordingly, while introducing a couple of small common changeset helpers.
Changes:
- Migrate Solana/EVM/Aptos legacy state + MCMS helpers into
legacy/pkg/...and update all internal references/imports. - Rename legacy package declarations (e.g.,
package legacy→ chain-specific packages likepackage solana,package evm) and adjust consumers. - Add reusable common changeset helpers (
ApproveToken,RunChangeset) and add Solana legacysolutilshelpers (artifact download + funding).
Reviewed changes
Copilot reviewed 40 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/family/solana/sequences/sequence.go | Update legacy Solana imports/types to new legacy/pkg/family/solana location. |
| pkg/family/solana/operations/operation.go | Switch Solana operations to use legacy Solana state/types from legacy/. |
| pkg/family/solana/mcms_pda.go | Change PDA helpers to accept legacy Solana PDASeed from legacy/. |
| pkg/family/solana/mcms_pda_test.go | Update tests to use legacy Solana PDASeed type from legacy/. |
| pkg/family/evm/operations/utils.go | Repoint MCMS propose utils + EVM legacy state imports to legacy/. |
| pkg/family/evm/operations/utils_test.go | Update tests to use legacy MCMS changesets and EVM state from legacy/. |
| pkg/common/changeset/token_approve.go | Add helper to approve ERC20 allowances using env-provided EVM chain. |
| pkg/common/changeset/token_approve_test.go | Add simulated EVM test coverage for ApproveToken. |
| pkg/common/changeset/test_helpers.go | Update test helpers to use legacy EVM state package path. |
| pkg/common/changeset/run_changeset.go | Add helper for running a nested changeset with precondition verification. |
| mcms/operations/grant_role_timelock.go | Update Solana legacy state import to legacy/. |
| mcms/operations/firedrill.go | Update legacy propose utils + legacy chain state imports to legacy/. |
| mcms/operations/firedrill_test.go | Update legacy EVM state import to legacy/. |
| link/changesets/deploy_link_token_test.go | Update legacy EVM state import to legacy/. |
| legacy/pkg/family/solana/testutils/preload.go | Update Solana solutils import to new legacy path. |
| legacy/pkg/family/solana/testutils/fund.go | Update imports to new legacy Solana state + solutils paths. |
| legacy/pkg/family/solana/testutils/datastore.go | Update imports to new legacy Solana state + solutils paths. |
| legacy/pkg/family/solana/testutils/artifacts.go | Update Solana solutils import to new legacy path. |
| legacy/pkg/family/solana/state.go | Rename package to solana under legacy/pkg/family/solana. |
| legacy/pkg/family/solana/state_test.go | Align tests with renamed legacy Solana package. |
| legacy/pkg/family/solana/proposal_adapter.go | Rename package to solana under legacy/pkg/family/solana. |
| legacy/pkg/family/solana/fund.go | Rename package to solana under legacy/pkg/family/solana. |
| legacy/pkg/family/solana/fund_test.go | Align tests with renamed legacy Solana package. |
| legacy/pkg/family/solana/changesets/access_controller.go | Rename legacy Solana changesets package to changesets and update imports. |
| legacy/pkg/family/solana/changesets/deploy_mcm.go | Rename legacy Solana changesets package to changesets and update imports. |
| legacy/pkg/family/solana/changesets/deploy_timelock.go | Rename legacy Solana changesets package to changesets and update imports. |
| legacy/pkg/family/solana/changesets/deploy_mcms_with_timelock.go | Update legacy Solana changesets to import legacy Solana state from legacy/. |
| legacy/pkg/family/solana/solutils/fund.go | Add Solana funding helper in legacy solutils. |
| legacy/pkg/family/solana/solutils/directory.go | Add legacy Solana program directory/constants. |
| legacy/pkg/family/solana/solutils/artifacts.go | Add legacy Solana artifact download/extract helpers. |
| legacy/pkg/family/solana/solutils/artifacts_test.go | Add tests for artifact download/extraction helper. |
| legacy/pkg/family/evm/state.go | Rename package to evm under legacy/pkg/family/evm. |
| legacy/pkg/family/evm/state_test.go | Align tests with renamed legacy EVM package. |
| legacy/pkg/family/evm/proposal_adapter.go | Rename package to evm under legacy/pkg/family/evm. |
| legacy/pkg/family/evm/ownable.go | Rename package to evm under legacy/pkg/family/evm. |
| legacy/pkg/family/evm/changesets/deploy_mcms_with_timelock.go | Update imports to use legacy EVM state from legacy/. |
| legacy/pkg/family/aptos/state.go | Rename package to aptos under legacy/pkg/family/aptos. |
| legacy/pkg/family/aptos/state_test.go | Align tests with renamed legacy Aptos package. |
| legacy/mcms/proposeutils/propose.go | Update propose utils to use legacy EVM/Solana state packages under legacy/. |
| legacy/mcms/proposeutils/propose_test.go | Add/adjust tests for proposeutils behaviors under new legacy location. |
| legacy/mcms/changesets/grant_role_timelock.go | Rename legacy MCMS changesets package to changesets and update imports. |
| legacy/mcms/changesets/grant_role_timelock_test.go | Align tests with renamed legacy MCMS changesets package. |
| legacy/mcms/changesets/fund_mcm_pdas.go | Rename legacy MCMS changesets package to changesets and update imports. |
| legacy/mcms/changesets/fund_mcm_pdas_test.go | Align tests with renamed legacy MCMS changesets package. |
| legacy/mcms/changesets/firedrill.go | Rename legacy MCMS changesets package to changesets and update imports. |
| legacy/mcms/changesets/firedrill_test.go | Align tests with renamed legacy MCMS changesets package. |
| legacy/mcms/changesets/deploy_mcms_with_timelock.go | Update legacy MCMS orchestrator changeset to use legacy/pkg/... imports. |
| legacy/mcms/changesets/deploy_mcms_with_timelock_test.go | Update imports and helpers to new legacy Solana/EVM package locations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gustavogama-cll
approved these changes
May 8, 2026
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.
Move all legacy code to a single
legacy/pkg. There's some functions like mcms and link operations and sequences that I feel could be rescued so I left them out of legacy. We can decide if we move them back to legacy if we find out the structure of them is not ideal during the new changesets refactoring.