refactor(futarchy): replace vault transaction account with transaction_index arg#446
Open
refactor(futarchy): replace vault transaction account with transaction_index arg#446
Conversation
…n_index arg in admin_approve_multisig_proposal
Contributor
Author
|
Despite us likely not needing it immediately, I still think we should add this. It is a minor change that allows us to run batch txns when we need them. cc @R-K-H lmk if you agree |
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.
Summary
Replaces the
vault_transactionaccount inadmin_approve_multisig_proposalwith atransaction_indexargument, enabling approval of Squads multisig proposals via batch transactions.Changes
admin_approve_multisig_proposal.rs: Removed thevault_transactionaccount from theAdminApproveMultisigProposalaccounts struct. Instead, the instruction now acceptsAdminApproveMultisigProposalArgscontaining atransaction_index: u64. Thesquads_multisig_proposalPDA is now derived using this index directly, rather than reading it from a passed-in vault transaction account.lib.rs: Updated the instruction signature to accept and forward the newargsparameter, withaccess_controlvalidation wired throughvalidate(&args).transactionIndexinstead of thevaultTransactionaccount.Motivation
Previously, approving a multisig proposal required passing the full
vault_transactionaccount, which prevented batching multiple approve calls in a single Solana transaction (since each would reference a different vault transaction account that needed to be resolved). By taking the transaction index as a simpleu64argument and deriving the proposal PDA on-chain, callers can now batch multiple approvals without needing to supply additional accounts.