Skip to content

Commit fdfa1b7

Browse files
doc(solana/twap): reduce duplication in example app documentation (#665)
* doc: reduce duplication * ci: fmt
1 parent d92c3da commit fdfa1b7

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

pages/price-feeds/use-real-time-data/solana.mdx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,20 +361,17 @@ await pythSolanaReceiver.provider.sendAll(
361361

362362
For a complete example of posting TWAP updates to Solana, see the [post_twap_update.ts example script](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/solana/sdk/js/pyth_solana_receiver/examples/post_twap_update.ts) in the Pyth crosschain repository.
363363

364-
### Example Application
365-
366-
See an end-to-end example of using Price Update Accounts for spot prices or TWAP Accounts for time-averaged prices in the [SendUSD Solana Demo App](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/solana/send_usd). It demonstrates how to fetch data from Hermes, post it to Solana, and consume it from a smart contract. The example includes:
367-
368-
- A React frontend for interacting with the contract
369-
- A Solana program that consumes TWAP updates
370-
- Complete transaction building for posting and consuming TWAP data
371-
372-
The example allows users to send a USD-denominated amount of SOL using either spot prices or TWAP prices, demonstrating how TWAP can be used to reduce the impact of price volatility.
373-
374364
## Additional Resources
375365

376366
You may find these additional resources helpful for developing your Solana application.
377367

378-
### Example application
368+
### Example Application
369+
370+
See an end-to-end example of using Pyth Network prices in the [SendUSD Solana Demo App](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/solana/send_usd). The app allows users to send a USD-denominated amount of SOL using either spot prices or TWAP prices.
371+
It demonstrates how to fetch price data from Hermes from a frontend, post it to the Solana blockchain, and consume it from a smart contract.
379372

380-
The [Solana example application](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/solana/send_usd) is an end-to-end application that uses Pyth Network prices on the Solana blockchain and in a frontend.
373+
The example includes:
374+
375+
- A React frontend for interacting with the contract
376+
- Solana programs that consumes spot price updates (Price Update Accounts) and time-averaged price updates (TWAP Accounts)
377+
- Complete transaction building for posting and consuming price data

0 commit comments

Comments
 (0)