-
-
Notifications
You must be signed in to change notification settings - Fork 256
chore: remove multichain deprecated package #5960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mcmire
left a comment
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adonesky1
left a comment
There was a problem hiding this comment.
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
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
## 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 cae3e22. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Explanation
As follow-up work to the previous splitting of the
multichainpackage into 3 new packages@metamask/chain-agnostic-permission@metamask/eip1193-permission-middleware@multichain/multichain-api-middlewaredone 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