Skip to content

Commit 6218f79

Browse files
authored
Switch to BPFLoader2 and latest Solana (solana-labs#83)
1 parent b8a26d2 commit 6218f79

File tree

7 files changed

+185
-113
lines changed

7 files changed

+185
-113
lines changed

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"keywords": [],
1010
"author": "",
1111
"license": "MIT",
12-
"testnetDefaultChannel": "v1.3.15",
12+
"testnetDefaultChannel": "v1.3.17",
1313
"scripts": {
1414
"start": "babel-node src/client/main.js",
1515
"lint": "npm run pretty && eslint .",
@@ -40,7 +40,7 @@
4040
"prettier": "^2.0.2"
4141
},
4242
"dependencies": {
43-
"@solana/web3.js": "^0.78.2",
43+
"@solana/web3.js": "^0.80.2",
4444
"babel-cli": "^6.26.0",
4545
"babel-core": "^6.26.3",
4646
"babel-eslint": "^10.0.1",

src/client/hello_world.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Account,
55
Connection,
66
BpfLoader,
7-
BPF_LOADER_DEPRECATED_PROGRAM_ID,
7+
BPF_LOADER_PROGRAM_ID,
88
PublicKey,
99
LAMPORTS_PER_SOL,
1010
SystemProgram,
@@ -122,7 +122,7 @@ export async function loadProgram(): Promise<void> {
122122
payerAccount,
123123
programAccount,
124124
data,
125-
BPF_LOADER_DEPRECATED_PROGRAM_ID,
125+
BPF_LOADER_PROGRAM_ID,
126126
);
127127
programId = programAccount.publicKey;
128128
console.log('Program loaded to account', programId.toBase58());

src/program-c/src/helloworld/helloworld.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* @brief C-based Helloworld BPF program
33
*/
44
#include <solana_sdk.h>
5-
#include <deserialize_deprecated.h>
65

76
uint64_t helloworld(SolParameters *params) {
87

@@ -41,7 +40,7 @@ extern uint64_t entrypoint(const uint8_t *input) {
4140
SolAccountInfo accounts[1];
4241
SolParameters params = (SolParameters){.ka = accounts};
4342

44-
if (!sol_deserialize_deprecated(input, &params, SOL_ARRAY_SIZE(accounts))) {
43+
if (!sol_deserialize(input, &params, SOL_ARRAY_SIZE(accounts))) {
4544
return ERROR_INVALID_ARGUMENT;
4645
}
4746

0 commit comments

Comments
 (0)