You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/data-streams/tutorials/solana-onchain-report-verification.mdx
+23-34Lines changed: 23 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,13 @@ Before you begin, you should have:
86
86
87
87
To complete this tutorial, you'll need:
88
88
89
-
-**Rust and Cargo**: Install the latest version using [rustup](https://rustup.rs/). Run <CopyTexttext="rustc --version"code/> to verify your installation.
89
+
-**Rust and Cargo**: Install Rust 1.79.0 or later using [rustup](https://rustup.rs/). Run <CopyTexttext="rustc --version"code/> to verify your installation.
90
90
91
-
-**Solana CLI tools**: Install the latest version following the [official guide](https://docs.solana.com/cli/install-solana-cli-tools). Run <CopyTexttext="solana --version"code/> to verify your installation.
91
+
-**Solana CLI tools**: Install Solana CLI 2.0 or later following the [official guide](https://docs.solana.com/cli/install-solana-cli-tools). Run <CopyTexttext="solana --version"code/> to verify your installation.
92
92
93
-
-**Anchor Framework**: Follow the [official installation guide](https://www.anchor-lang.com/docs/installation). Run <CopyTexttext="anchor --version"code /> to verify your installation.
93
+
-**Anchor Framework**: Install Anchor 0.31.0 or later following the [official installation guide](https://www.anchor-lang.com/docs/installation). Run <CopyTexttext="anchor --version"code /> to verify your installation.
94
+
95
+
**Important**: Using mismatched Anchor versions between your program and client can cause type incompatibilities and runtime errors.
94
96
95
97
-**Node.js and npm**: [Install Node.js 20 or later](https://nodejs.org/). Verify your installation with <CopyTexttext="node --version"code/>.
96
98
@@ -150,11 +152,9 @@ In your program's manifest file (`programs/example_verify/Cargo.toml`), add the
error: failed to parse lock file at: .../example_verify/Cargo.lock
300
-
301
-
Caused by:
302
-
lock file version 4 requires `-Znext-lockfile-bump`
303
-
```
304
-
305
-
1. Deploy your program to a Solana cluster (devnet in this example) using:
291
+
1. Deploy your program to devnet:
306
292
307
293
```bash
308
294
anchor deploy
@@ -348,11 +334,7 @@ In this section, you'll write a client script to interact with your deployed pro
348
334
anchor.setProvider(provider)
349
335
350
336
// Initialize your program using the IDL and your program ID
351
-
const program =newProgram<ExampleVerify>(
352
-
require("../target/idl/example_verify.json"),
353
-
"<YOUR_PROGRAM_ID>",
354
-
provider
355
-
)
337
+
const program =newProgram<ExampleVerify>(require("../target/idl/example_verify.json"), provider)
356
338
357
339
// Convert the hex string to a Uint8Array
358
340
// This is an example report payload for a crypto stream
@@ -462,7 +444,14 @@ In this section, you'll write a client script to interact with your deployed pro
462
444
yarn add snappy
463
445
```
464
446
465
-
`snappy` is a compression library that is used to compress the report data.
447
+
Also ensure you have the required TypeScript dependencies:
448
+
449
+
```bash
450
+
yarn add @solana/web3.js
451
+
yarn add -D ts-node typescript @types/node
452
+
```
453
+
454
+
**Note**: `snappy` is a compression library used to compress the report data before sending it to the verifier.
466
455
467
456
1. Execute the test script to interact with your program:
468
457
@@ -502,7 +491,7 @@ In this section, you'll write a client script to interact with your deployed pro
502
491
503
492
#### Program Derived Addresses (PDAs)
504
493
505
-
The verification process relies on two important PDAs that are handled automatically by the [Chainlink Data Streams Solana SDK](https://github.com/smartcontractkit/chainlink-solana/tree/develop/contracts/crates/chainlink-solana-data-streams):
494
+
The verification process relies on two important PDAs that are handled automatically by the [Chainlink Data Streams Solana SDK](https://github.com/smartcontractkit/chainlink-data-streams-solana):
506
495
507
496
-**Verifier config account PDA**:
508
497
- Derived using the verifier program ID as a seed
@@ -541,13 +530,13 @@ When working with different versions of [Data Stream reports](/data-streams/refe
0 commit comments