This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: support versioned txs in sendTransaction
and simulateTransaction
#27528
Merged
Conversation
This file contains 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
jstarry
force-pushed
the
web3/send-versioned-tx
branch
from
September 1, 2022 15:07
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 |
jstarry
force-pushed
the
web3/send-versioned-tx
branch
from
September 6, 2022 13:59
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! |
This was referenced Sep 28, 2022
This was referenced Oct 4, 2022
This was referenced Oct 28, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 #