Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 0a05970

Browse files
authored
Upgrade web3 to 0.78.0 and sdk to 1.3.13 (#537)
* Update `sendAndConfirmTransaction` to use `preflightCommitment` of `recent`. For the token tests, on my machine, it took roughly 18.5 seconds, and with `skipPreflight: true` it was about 21.5 seconds.
1 parent 72ec14a commit 0a05970

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

bpf-sdk-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
channel=${1:-v1.3.12}
4+
channel=${1:-v1.3.13}
55
installDir="$(dirname "$0")"/bin
66
cacheDir=~/.cache/solana-bpf-sdk/"$channel"
77

token-swap/js/client/util/send-and-confirm-transaction.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export function sendAndConfirmTransaction(
1515
...signers: Array<Account>
1616
): Promise<TransactionSignature> {
1717
return realSendAndConfirmTransaction(connection, transaction, signers, {
18-
skipPreflight: true,
18+
skipPreflight: false,
1919
commitment: 'recent',
20+
preflightCommitment: 'recent',
2021
});
2122
}

token-swap/js/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

token-swap/js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"/lib",
2323
"/module.flow.js"
2424
],
25-
"testnetDefaultChannel": "v1.3.9",
25+
"testnetDefaultChannel": "v1.3.13",
2626
"scripts": {
2727
"build": "rollup -c",
2828
"start": "babel-node --ignore node_modules cli/main.js",
@@ -46,7 +46,7 @@
4646
"keywords": [],
4747
"dependencies": {
4848
"@babel/runtime": "^7.11.2",
49-
"@solana/web3.js": "^0.77.0",
49+
"@solana/web3.js": "^0.78.0",
5050
"bn.js": "^5.1.3",
5151
"buffer-layout": "^1.2.0",
5252
"dotenv": "8.2.0",

token/js/client/util/send-and-confirm-transaction.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export function sendAndConfirmTransaction(
1515
...signers: Array<Account>
1616
): Promise<TransactionSignature> {
1717
return realSendAndConfirmTransaction(connection, transaction, signers, {
18-
skipPreflight: true,
18+
skipPreflight: false,
1919
commitment: 'recent',
20+
preflightCommitment: 'recent',
2021
});
2122
}

token/js/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

token/js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"/lib",
2323
"/module.flow.js"
2424
],
25-
"testnetDefaultChannel": "v1.3.9",
25+
"testnetDefaultChannel": "v1.3.13",
2626
"scripts": {
2727
"build": "rollup -c",
2828
"start": "babel-node cli/main.js",
@@ -45,7 +45,7 @@
4545
},
4646
"dependencies": {
4747
"@babel/runtime": "^7.10.5",
48-
"@solana/web3.js": "^0.77.0",
48+
"@solana/web3.js": "^0.78.0",
4949
"bn.js": "^5.0.0",
5050
"buffer-layout": "^1.2.0",
5151
"dotenv": "8.2.0",

0 commit comments

Comments
 (0)