Skip to content

Commit da607d4

Browse files
committed
nits
1 parent c7fa6f7 commit da607d4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/content/data-feeds/solana/using-data-feeds-solana.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Tabs } from "@components/Tabs"
1717

1818
<Aside type="note" title="SDK v2 is now available">
1919

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.
2121

2222
</Aside>
2323

@@ -56,7 +56,7 @@ Import the Chainlink Solana Crate into your project and use the code sample to m
5656
chainlink_solana = "2.0.8"
5757
```
5858

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:
6060

6161
```toml
6262
[dependencies]
@@ -65,8 +65,8 @@ Import the Chainlink Solana Crate into your project and use the code sample to m
6565
```
6666

6767
1. Choose the code sample that matches your project setup:
68-
- **Rust (vanilla)**
69-
- **Rust with Anchor**
68+
- **Rust (Anchor)**
69+
- **Rust (Vanilla)**
7070

7171
Both samples demonstrate SDK v2, which reads data directly from the feed account. The code samples have the following components:
7272
- `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
7777

7878
{/* prettier-ignore */}
7979
<Tabs client:visible>
80-
<Fragment slot="tab.rust">Rust</Fragment>
81-
<Fragment slot="tab.anchor">Rust with Anchor</Fragment>
82-
<Fragment slot="panel.rust">
83-
<CodeSample src="samples/Solana/PriceFeeds/on-chain-read.rs" />
84-
</Fragment>
80+
<Fragment slot="tab.anchor">Rust (Anchor)</Fragment>
81+
<Fragment slot="tab.rust">Rust (Vanilla)</Fragment>
8582
<Fragment slot="panel.anchor">
8683
<CodeSample src="samples/Solana/PriceFeeds/on-chain-read-anchor.rs" />
8784
</Fragment>
85+
<Fragment slot="panel.rust">
86+
<CodeSample src="samples/Solana/PriceFeeds/on-chain-read.rs" />
87+
</Fragment>
8888
</Tabs>
8989

9090
Program Transaction logs:
9191

9292
{/* prettier-ignore */}
9393
<Tabs client:visible>
94-
<Fragment slot="tab.rust">Rust</Fragment>
95-
<Fragment slot="tab.rustAnchor">Rust with Anchor</Fragment>
94+
<Fragment slot="tab.anchor">Rust (Anchor)</Fragment>
95+
<Fragment slot="tab.rust">Rust (Vanilla)</Fragment>
96+
<Fragment slot="panel.anchor">
97+
```shell Rust with Anchor
98+
Fetching transaction logs... [ 'Program HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny
99+
consumed 1826 of 1306895 compute units', 'Program return: HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny CA==',
100+
'Program HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny success', 'Program log: SOL / USD price is 93.76988029', ]
101+
```
102+
</Fragment>
96103
<Fragment slot="panel.rust">
97104
```shell Rust
98105
> Program logged: "Chainlink Price Feed Consumer entrypoint" > Program logged: "SOL / USD price is
@@ -101,13 +108,6 @@ Program Transaction logs:
101108
HNYSbr77Jc9LhHeb9tx53SrWbWfNBnQzQrM4b3BB3PCR CA==
102109
```
103110
</Fragment>
104-
<Fragment slot="panel.rustAnchor">
105-
```shell Rust with Anchor
106-
Fetching transaction logs... [ 'Program HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny
107-
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>
111111
</Tabs>
112112

113113
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

Comments
 (0)