Skip to content

chore: move all legacy code into single legacy/ pkg#48

Merged
ecPablo merged 2 commits intomainfrom
ecpablo/move-to-legacy-pkg
May 8, 2026
Merged

chore: move all legacy code into single legacy/ pkg#48
ecPablo merged 2 commits intomainfrom
ecpablo/move-to-legacy-pkg

Conversation

@ecPablo
Copy link
Copy Markdown
Contributor

@ecPablo ecPablo commented May 8, 2026

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.

@ecPablo ecPablo marked this pull request as ready for review May 8, 2026 15:09
@ecPablo ecPablo requested a review from a team as a code owner May 8, 2026 15:09
Copilot AI review requested due to automatic review settings May 8, 2026 15:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 like package solana, package evm) and adjust consumers.
  • Add reusable common changeset helpers (ApproveToken, RunChangeset) and add Solana legacy solutils helpers (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.

@ecPablo ecPablo merged commit f04fe26 into main May 8, 2026
13 checks passed
@ecPablo ecPablo deleted the ecpablo/move-to-legacy-pkg branch May 8, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants