fix(cli): accept base58-encoded transaction_message in vault_transaction_create (closes #159)#184
Open
cryptomotifs wants to merge 1 commit into
Conversation
…ion_create Closes Squads-Protocol#159. The `--transaction-message` flag was typed as `Vec<u8>`, which clap parses as one `u8` per `--transaction-message` invocation. Real `VaultTransactionMessage` payloads are many bytes long, so there is no way to actually pass one through this argument as written; the CLI appears to accept the flag but cannot accept a real message. Take the transaction message as a single base58-encoded string and decode it inside a `clap::value_parser`. The decoded `Vec<u8>` flows through the rest of the function unchanged. Base58 matches the rest of the Squads CLI (e.g. `multisig_pubkey` is already a base58 string parsed via `Pubkey::from_str`) and uses the `bs58` re-export already available via `solana_sdk`.
|
@cryptomotifs is attempting to deploy a commit to the squads Team on Vercel. A member of the Team first needs to authorize it. |
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
Closes #159.
--transaction-messageonsquads-multisig-cli vault-transaction-createis typed asVec<u8>, which clap parses as one byte per--transaction-messageinvocation. A realVaultTransactionMessageis many bytes long, so as-written there is no way to actually pass one through this argument — the CLI accepts the flag but cannot accept a real message (which is what #159 reports).Fix
Take the message as a single base58-encoded string and decode it inside a
clap::value_parser. The decodedVec<u8>flows through the rest of the function unchanged — the on-chain instruction continues to receive the same bytes.Base58 matches the rest of the Squads CLI (
multisig_pubkeyis already base58 parsed viaPubkey::from_str) andbs58is already available viasolana_sdkso no new dependency is added.Usage after fix
Test plan
solana-sdkdependency (no new crate added).🤖 Generated with Claude Code