Conversation
Collaborator
Author
|
cargo test should_decode_create_swig_instruction --features=rust_sdk_test -- --nocapture |
tracy-codes
requested changes
Aug 1, 2025
Contributor
tracy-codes
left a comment
There was a problem hiding this comment.
This looks great so far! I think if we can set the output type to be json or in something like a set of solana tranasction instructions struct types that we can then either base58 encode or base64 encode, that would take this to the next level here.
Collaborator
Author
|
@tracy-codes I have added support for JSON outputs with a small hack in states crate {
"instruction_type": "Sign",
"description": "Sign a transaction",
"role_id": 0,
"authority_type": "Ed25519",
"data": null,
"fee_payer": "Frtjd3aVM7A9HCP5VCkyjCn3KtBEhSDycY9t4Qs9ntTt",
"account_summary": [
{
"account_id": "Frtjd3aVM7A9HCP5VCkyjCn3KtBEhSDycY9t4Qs9ntTt",
"account_name": null,
"pre_balance": 9998365280,
"post_balance": 9998360280,
"balance_change": -5000
},
{
"account_id": "7JKfJaxbNSqvzMryvQMeAejxCR4odjHj1vh3Jxnuxgu8",
"account_name": null,
"pre_balance": 0,
"post_balance": 100000000,
"balance_change": 100000000
},
{
"account_id": "Add51oQvYk863Rp35W4Hzv1Uk3GHLTnbn2tSuiFDoDJc",
"account_name": null,
"pre_balance": 10001614720,
"post_balance": 9901614720,
"balance_change": -100000000
}
]
} |
tracy-codes
reviewed
Aug 7, 2025
tracy-codes
reviewed
Aug 7, 2025
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.
This PR introduces transaction decoding and simulation capabilities to the SWIG Rust SDK, enhancing the devex with better transaction visibility and debugging tools.
New decoder.rs module with comprehensive SWIG instruction decoding