Fix typo in Versioned Transactions (#28213)

This commit is contained in:
Abraar 2022-10-04 13:59:24 +05:30 committed by GitHub
parent 8cc8a0656a
commit 8d3e924dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ The Solana runtime supports two transaction versions:
## Max supported transaction version
All RPC requests that return a transaction **_should_** specify the highest version of transactions they will support in their application using the `maxSupportedTransactionVersion` option. Including [`getBlock`](./clients/jsonrpc-api.md#getblock) and [`getTransaction`](./clients/jsonrpc-api.md#gettransaction),
All RPC requests that return a transaction **_should_** specify the highest version of transactions they will support in their application using the `maxSupportedTransactionVersion` option, including [`getBlock`](./clients/jsonrpc-api.md#getblock) and [`getTransaction`](./clients/jsonrpc-api.md#gettransaction).
An RPC request will fail if a [Versioned Transaction](./versioned-transactions.md) is returned that is higher than the set `maxSupportedTransactionVersion`. (i.e. if a version `0` transaction is returned when `legacy` is selected)
@ -78,7 +78,7 @@ Below is an example of how to create a Versioned Transaction, using the `@solana
Firstly, import the web3.js library and create a `connection` to your desired cluster.
We then define the recent `blockhash` and `minRent` we will need for our transaction and the account.
We then define the recent `blockhash` and `minRent` we will need for our transaction and the account:
```js
const web3 = require("@solana/web3.js");
@ -132,7 +132,7 @@ You can sign the transaction by either:
> NOTE:
> After calling the `transaction.sign()` method, all the previous transaction `signatures` will be fully replaced by new signatures created from the provided in `Signers`.
After your `VersionedTransaction` has been signed by all required accounts, you can send it to the cluster and `await` the response.
After your `VersionedTransaction` has been signed by all required accounts, you can send it to the cluster and `await` the response:
```js
// send our v0 transaction to the cluster