-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
feat: support versioned txs in sendTransaction
and simulateTransaction
#27528
Conversation
d5d2468
to
7a37847
Compare
Codecov Report
@@ Coverage Diff @@
## master #27528 +/- ##
=========================================
- Coverage 76.9% 75.9% -1.0%
=========================================
Files 48 52 +4
Lines 2505 2684 +179
Branches 355 374 +19
=========================================
+ Hits 1927 2038 +111
- Misses 448 510 +62
- Partials 130 136 +6 |
4dfed44
to
12d8281
Compare
While we're changing the signatures anyway, maybe go full-on config object style. /** @deprecated */
simulateTransaction(
transactionOrMessage: Transaction | Message,
signers?: Array<Signer>,
includeAccounts?: boolean | Array<PublicKey>,
): Promise<...>
simulateTransaction(config: SimulateTransactionConfig): Promise<...>;
async simulateTransaction(
transactionOrConfig: Transaction | SimulateTransactionConfig,
signers?: Array<Signer>,
includeAccounts?: boolean | Array<PublicKey>,
): Promise<...> {
// ...
} |
Now is definitely the time to do something like that but I prefer to keep the transaction as a separate arg since it mirrors the RPC API request structure. Thanks for the suggestion though! |
Problem
Not possible to use the
Connection.sendTransaction
andConnection.simulateTransaction
methods with versioned transactions.Summary of Changes
Connection.sendTransaction
andConnection.simulateTransaction
without using aVersionedTransaction
class.Fixes #