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-feeds/solana/using-data-feeds-solana.mdx
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ import { Tabs } from "@components/Tabs"
17
17
18
18
<Asidetype="note"title="SDK v2 is now available">
19
19
20
-
The Chainlink [Solana SDK v2 is now available](https://crates.io/crates/chainlink_solana/), offering improved performance with lower compute unit usage through direct account reads instead of Cross-Program Invocation (CPI). This guide demonstrates the v2 SDK pattern. If you're using the v1 SDK, see the [migration guide](#migrating-from-v1-to-v2) to upgrade.
20
+
The Chainlink [Solana SDK v2 is now available](https://crates.io/crates/chainlink_solana/), offering improved performance with lower compute unit usage through direct account reads instead of Cross-Program Invocation (CPI). This guide demonstrates the v2 SDK pattern. If you're using the v1 SDK, see the [migration guide below](#migrating-from-v1-to-v2) to upgrade.
21
21
22
22
</Aside>
23
23
@@ -56,7 +56,7 @@ Import the Chainlink Solana Crate into your project and use the code sample to m
56
56
chainlink_solana = "2.0.8"
57
57
```
58
58
59
-
If you're using the **Anchor framework** (identified by `anchor-lang` in your dependencies), also add:
59
+
If you're using [Anchor](https://www.anchor-lang.com/docs), also add:
60
60
61
61
```toml
62
62
[dependencies]
@@ -65,8 +65,8 @@ Import the Chainlink Solana Crate into your project and use the code sample to m
65
65
```
66
66
67
67
1. Choose the code sample that matches your project setup:
68
-
-**Rust (vanilla)**
69
-
-**Rust with Anchor**
68
+
-**Rust (Anchor)**
69
+
-**Rust (Vanilla)**
70
70
71
71
Both samples demonstrate SDK v2, which reads data directly from the feed account. The code samples have the following components:
72
72
-`read_feed_v2`: Reads feed data directly from the account data with the feed owner verification
@@ -77,22 +77,29 @@ Import the Chainlink Solana Crate into your project and use the code sample to m
77
77
78
78
{/* prettier-ignore */}
79
79
<Tabsclient:visible>
80
-
<Fragmentslot="tab.rust">Rust</Fragment>
81
-
<Fragmentslot="tab.anchor">Rust with Anchor</Fragment>
consumed 1826 of 1306895 compute units', 'Program return: HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny CA==',
108
-
'Program HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny success', 'Program log: SOL / USD price is 93.76988029', ]
109
-
```
110
-
</Fragment>
111
111
</Tabs>
112
112
113
113
To learn more about Solana and Anchor, see the [Solana Documentation](https://docs.solana.com/) and the [Anchor Documentation](https://www.anchor-lang.com/).
0 commit comments