Skip to content

chore: remove multichain deprecated package - #5960

Merged
ffmcgee725 merged 9 commits into
mainfrom
chore/deprecate-multichain-package
Jun 12, 2025
Merged

chore: remove multichain deprecated package#5960
ffmcgee725 merged 9 commits into
mainfrom
chore/deprecate-multichain-package

Conversation

@ffmcgee725

@ffmcgee725ffmcgee725 commented Jun 11, 2025

Copy link
Copy Markdown
Member

Explanation

As follow-up work to the previous splitting of the multichain package into 3 new packages

@metamask/chain-agnostic-permission
@metamask/eip1193-permission-middleware
@multichain/multichain-api-middleware

done in the following PR, we now want to completely deprecate/remove the legacy package and later mark it as deprecated while also linking to the new packages in npm.

References

Changelog

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@ffmcgee725
ffmcgee725 marked this pull request as ready for review June 12, 2025 08:26
@ffmcgee725
ffmcgee725 requested review from a team as code ownersJune 12, 2025 08:26

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One thing but otherwise looks good!

Comment threadREADME.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like there are more things to remove here, can you run yarn update-readme-content? I see four lines to remove when I do that:

 multichain --> controller_utils;
multichain --> json_rpc_engine;
multichain --> network_controller;
multichain --> permission_controller;

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@adonesky1adonesky1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM other than @mcmire 's request

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@ffmcgee725
ffmcgee725 enabled auto-merge (squash) June 12, 2025 16:55
@ffmcgee725
ffmcgee725 merged commit 5929b43 into mainJun 12, 2025
@ffmcgee725
ffmcgee725 deleted the chore/deprecate-multichain-package branch June 12, 2025 16:59
matthewwalsh0 added a commit that referenced this pull request Oct 16, 2025
## Explanation
When publishing a transaction, a batch is automatically created if
`batchTransactions` are found on the `TransactionMeta`.
If this batch can be achieved via EIP-7702, we currently add a new
transaction that supersedes the original.
While the original transaction promise currently resolves or rejects
based on the new EIP-7702 transaction, its status is changed to
`dropped` and duplicate metrics are generated in the clients given two
transactions are ultimately created and submitted.
This PR instead converts the original transaction to EIP-7702 by
updating the transaction parameters and re-signing the original
transaction.
## References
Related to
[#5959](MetaMask/MetaMask-planning#5959)
[#5960](MetaMask/MetaMask-planning#5960)
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Converts existing transactions to EIP-7702 when publishing batches,
adds newSignature support to onPublish, and refactors publish flow with
a default/extra publish hook; updates batch utils to estimate
gas/re-sign and tests accordingly.
> > - **Transaction publish flow**:
> - Introduce `#defaultPublishHook` to encapsulate publish/trace and
fallback submission.
> - Use `ExtraTransactionsPublishHook` when `txMeta.batchTransactions`
exist; it now receives `getTransaction` and `originalPublishHook` and
can call the original hook when provided a `newSignature`.
> - **Batch processing (EIP-7702)**:
> - Convert an existing transaction to EIP-7702 on publish (update
`txParams`, estimate gas via new `estimateGas` hook, set `batchId`,
re-sign) instead of creating a new superseding tx.
> - Add helpers `convertTransactionToEIP7702` and
`updateTransactionSignature`.
> - **Types**:
> - Extend `TransactionBatchSingleRequest.existingTransaction.onPublish`
to accept optional `newSignature`.
> - **Controller/utils API**:
> - Pass `estimateGas` into `addTransactionBatch`.
> - **Tests/Changelog**:
> - Update tests for new publish and batch behaviors.
> - Changelog entry noting EIP-7702 conversion and `newSignature`
addition.
> > <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cae3e227b201edf0d496590ad6e529a5ddc6f4a9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ffmcgee725@mcmire@adonesky1