-
Notifications
You must be signed in to change notification settings - Fork 2
feat: support versioned solana txs #502
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
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull request overview
This pull request enhances the Solana connector to support both legacy and versioned transactions while handling multiple encoding formats. The implementation adds auto-detection of transaction encoding (base64 vs hex) and automatic fallback between VersionedTransaction and legacy Transaction deserialization.
Key changes:
- Added encoding detection logic to handle both base64 and hex-encoded transaction payloads
- Implemented try-catch pattern to deserialize VersionedTransaction first, falling back to legacy Transaction
- Imported VersionedTransaction from @solana/web3.js
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request updates the Solana connector to improve transaction deserialization and support both legacy and versioned transactions. The main change is to handle both base64 and hex-encoded transaction payloads, and to correctly deserialize either a legacy
Transactionor aVersionedTransactionbefore sending it.Transaction deserialization improvements:
sendTransactionmethod to detect whether the input transaction is base64 or hex-encoded, and to deserialize it as either aVersionedTransactionor a legacyTransactionas appropriate. This ensures compatibility with both transaction formats and encoding types.VersionedTransactionimport from@solana/web3.jsto support the new deserialization logic.