From d125ed4364b7288f14559608e9161109032b06de Mon Sep 17 00:00:00 2001 From: Tejas Badadare Date: Fri, 11 Apr 2025 10:18:17 -0700 Subject: [PATCH 1/2] doc: reduce duplication --- .../price-feeds/use-real-time-data/solana.mdx | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pages/price-feeds/use-real-time-data/solana.mdx b/pages/price-feeds/use-real-time-data/solana.mdx index 0d81369e..ecca4484 100644 --- a/pages/price-feeds/use-real-time-data/solana.mdx +++ b/pages/price-feeds/use-real-time-data/solana.mdx @@ -361,20 +361,18 @@ await pythSolanaReceiver.provider.sendAll( 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. -### Example Application - -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: +## Additional Resources -- A React frontend for interacting with the contract -- A Solana program that consumes TWAP updates -- Complete transaction building for posting and consuming TWAP data +You may find these additional resources helpful for developing your Solana application. -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. +### Example Application -## Additional Resources +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. +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. The example includes: -You may find these additional resources helpful for developing your Solana application. +- A React frontend for interacting with the contract +- Solana programs that consumes spot price updates (Price Update Accounts) and time-averaged price updates (TWAP Accounts) +- Complete transaction building for posting and consuming price data -### Example application +The example allows users to send a USD-denominated amount of SOL using either spot prices or TWAP prices. -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. From ced1cf334d91c3a821089ad7a72e9d253f2cde8d Mon Sep 17 00:00:00 2001 From: Tejas Badadare Date: Fri, 11 Apr 2025 10:19:57 -0700 Subject: [PATCH 2/2] ci: fmt --- pages/price-feeds/use-real-time-data/solana.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/price-feeds/use-real-time-data/solana.mdx b/pages/price-feeds/use-real-time-data/solana.mdx index ecca4484..40de846d 100644 --- a/pages/price-feeds/use-real-time-data/solana.mdx +++ b/pages/price-feeds/use-real-time-data/solana.mdx @@ -368,11 +368,10 @@ You may find these additional resources helpful for developing your Solana appli ### Example Application 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. -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. The example includes: +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. + +The example includes: - A React frontend for interacting with the contract - Solana programs that consumes spot price updates (Price Update Accounts) and time-averaged price updates (TWAP Accounts) - Complete transaction building for posting and consuming price data - -The example allows users to send a USD-denominated amount of SOL using either spot prices or TWAP prices. -