|
1 | 1 | import { Callout, Tabs, Steps } from "nextra/components";
|
2 | 2 |
|
3 |
| -# Integrate Pyth Lazer as a Consumer on Solana |
| 3 | +# Integrate Pyth Lazer as a Consumer on Solana and Fogo |
4 | 4 |
|
5 |
| -This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **Solana**. |
| 5 | +This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **Solana and Fogo**. |
6 | 6 |
|
7 | 7 | Integrating with Pyth Lazer in smart contracts as a consumer is a three-step process:
|
8 | 8 |
|
9 |
| -1. **Use** Pyth Lazer SDK into Solana smart contracts to parse the price updates. |
| 9 | +1. **Use** Pyth Lazer SDK into SVM smart contracts to parse the price updates. |
10 | 10 | 2. **Subscribe** to Pyth Lazer websocket to receive price updates on backend or frontend.
|
11 | 11 | 3. **Include** the price updates into the smart contract transactions.
|
12 | 12 |
|
13 | 13 | <Steps>
|
14 | 14 |
|
15 | 15 | ### Use Pyth Lazer SDK in smart contracts
|
16 | 16 |
|
17 |
| -Pyth Lazer provides a [Solana SDK](https://docs.rs/pyth-lazer-solana-contract/latest/pyth_lazer_solana_contract/), which allows consumers to parse and verify the price updates on Solana-compatible chains. |
| 17 | +Pyth Lazer provides a [Solana SDK](https://docs.rs/pyth-lazer-solana-contract/latest/pyth_lazer_solana_contract/), |
| 18 | +which allows consumers to parse and verify the price updates on Solana-compatible chains (such as Fogo). |
18 | 19 |
|
19 | 20 | To start, add the following to your `Cargo.toml` file (please check the current latest version at [crates.io](https://crates.io/crates/pyth-lazer-solana-contract)):
|
20 | 21 |
|
@@ -43,7 +44,7 @@ You may also add any other accounts your contract needs.
|
43 | 44 | Github](https://github.com/pyth-network/pyth-examples/tree/main/lazer/solana).
|
44 | 45 | </Callout>
|
45 | 46 |
|
46 |
| -The following code can be used to set up a new instruction within a Solana contract: |
| 47 | +The following code can be used to set up a new instruction within a SVM contract: |
47 | 48 |
|
48 | 49 | ```rust copy
|
49 | 50 | use num_derive::FromPrimitive;
|
@@ -153,12 +154,12 @@ invoke(
|
153 | 154 | ```
|
154 | 155 |
|
155 | 156 | <Callout type="info" icon="💡">
|
156 |
| - Note: When using native ed25519 signatures on Solana, we must use the built-in |
157 |
| - ed25519 program provided by the Solana runtime. This program can't be invoked |
| 157 | + Note: When using native ed25519 signatures on SVM, we must use the built-in |
| 158 | + ed25519 program provided by the SVM runtime. This program can't be invoked |
158 | 159 | from another contract. Instead, it must be called in an explicit instruction
|
159 | 160 | within the submitted transaction. This means that the sender of the
|
160 | 161 | transaction must include that instruction in the transaction. Our SDK
|
161 |
| - leverages Solana runtime capabilities to ensure the ed25519 program has been |
| 162 | + leverages SVM runtime capabilities to ensure the ed25519 program has been |
162 | 163 | correctly called in the transaction.
|
163 | 164 | </Callout>
|
164 | 165 |
|
@@ -267,7 +268,7 @@ let mut tx = Transaction::new_with_payer(
|
267 | 268 |
|
268 | 269 | ## Additional Resources
|
269 | 270 |
|
270 |
| -You may find these additional resources helpful for integrating Pyth Lazer into your Solana smart contracts. |
| 271 | +You may find these additional resources helpful for integrating Pyth Lazer into your SVM smart contracts. |
271 | 272 |
|
272 | 273 | ### Price Feed IDs
|
273 | 274 |
|
|
0 commit comments