Skip to content

lazer: Add mentions to Fogo #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/lazer/integrate-as-consumer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

The following guides demonstrate how to integrate Pyth Lazer as a consumer in your application.

Lazer is available in Solana and EVM. Please consult the following guides to get started:
Lazer is available in Solana, Fogo, and EVM. Please consult the following guides to get started:

- [Solana](integrate-as-consumer/svm)
- [Solana and Fogo](integrate-as-consumer/svm)
- [EVM](integrate-as-consumer/evm)

Lazer price feeds can also be used in off-chain applications. See the
Expand Down
2 changes: 1 addition & 1 deletion pages/lazer/integrate-as-consumer/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"evm": "on EVM chains",
"svm": "on Solana"
"svm": "on Solana and Fogo"
}
19 changes: 10 additions & 9 deletions pages/lazer/integrate-as-consumer/svm.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import { Callout, Tabs, Steps } from "nextra/components";

# Integrate Pyth Lazer as a Consumer on Solana
# Integrate Pyth Lazer as a Consumer on Solana and Fogo

This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **Solana**.
This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **Solana and Fogo**.

Integrating with Pyth Lazer in smart contracts as a consumer is a three-step process:

1. **Use** Pyth Lazer SDK into Solana smart contracts to parse the price updates.
1. **Use** Pyth Lazer SDK into SVM smart contracts to parse the price updates.
2. **Subscribe** to Pyth Lazer websocket to receive price updates on backend or frontend.
3. **Include** the price updates into the smart contract transactions.

<Steps>

### Use Pyth Lazer SDK in smart contracts

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.
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 (such as Fogo).

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

Expand Down Expand Up @@ -43,7 +44,7 @@ You may also add any other accounts your contract needs.
Github](https://github.com/pyth-network/pyth-examples/tree/main/lazer/solana).
</Callout>

The following code can be used to set up a new instruction within a Solana contract:
The following code can be used to set up a new instruction within a SVM contract:

```rust copy
use num_derive::FromPrimitive;
Expand Down Expand Up @@ -153,12 +154,12 @@ invoke(
```

<Callout type="info" icon="💡">
Note: When using native ed25519 signatures on Solana, we must use the built-in
ed25519 program provided by the Solana runtime. This program can't be invoked
Note: When using native ed25519 signatures on SVM, we must use the built-in
ed25519 program provided by the SVM runtime. This program can't be invoked
from another contract. Instead, it must be called in an explicit instruction
within the submitted transaction. This means that the sender of the
transaction must include that instruction in the transaction. Our SDK
leverages Solana runtime capabilities to ensure the ed25519 program has been
leverages SVM runtime capabilities to ensure the ed25519 program has been
correctly called in the transaction.
</Callout>

Expand Down Expand Up @@ -267,7 +268,7 @@ let mut tx = Transaction::new_with_payer(

## Additional Resources

You may find these additional resources helpful for integrating Pyth Lazer into your Solana smart contracts.
You may find these additional resources helpful for integrating Pyth Lazer into your SVM smart contracts.

### Price Feed IDs

Expand Down
Loading