feat(tempo): infer multisig config from account in prepareTransactionRequest#4713
Merged
Conversation
…Request Multisig transactions no longer need a `multisig` field — pass the `Account.fromMultisig` account to `prepareTransactionRequest` and the config is inferred from it. `fromMultisig` also accepts a raw config (normalized internally), and the prepared request carries the multisig account as sender so it doesn't need re-passing to `sendTransaction`. Amp-Thread-ID: https://ampcode.com/threads/T-019e8cab-fd02-709f-9185-a2766192718b
|
| Name | Type |
|---|---|
| viem | Minor |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
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.
Follow-up DX improvement to the native multisig support added in #4710 (the feature is still unreleased).
What changed
Account.fromMultisigaccepts a raw config — it normalizes viaMultisigConfig.frominternally, so callers don't need to call it themselves.account— pass the multisig account toprepareTransactionRequestand omit themultisigfield. The runtime inference lives inchainConfig.ts(derives the config fromaccount.source === 'multisig', setsfrom, keeps the multisig account as sender).sendTransaction.Notes
prepareTransactionRequest.tsis untouched). A tempo-exclusive field (calls/feeToken/multisig) narrows the prepared request's type totempo.infer multisig from account); full multisig e2e suite passes (5/5) against a multisig-enabled localnet.