diff --git a/pyth-sdk-solana/README.md b/pyth-sdk-solana/README.md index cf2b49a..db3318a 100644 --- a/pyth-sdk-solana/README.md +++ b/pyth-sdk-solana/README.md @@ -89,7 +89,7 @@ For more information on the different types of Pyth accounts, see the [account s ## Off-chain Example Programs -The example [eth_price](examples/eth_price.rs) program prints the product reference data and current price information for Pyth on Solana devnet. +The example [eth_price](examples/eth_price.rs) program prints the product reference data and current price information for Pyth on pythnet. You can use the same example and replace the url with the relevant Solana cluster urls to get the same information for Solana clusters. Run the following commands to try this example program: ``` diff --git a/pyth-sdk-solana/examples/eth_price.rs b/pyth-sdk-solana/examples/eth_price.rs index bc08204..c2af89c 100644 --- a/pyth-sdk-solana/examples/eth_price.rs +++ b/pyth-sdk-solana/examples/eth_price.rs @@ -1,4 +1,4 @@ -// example usage of reading pyth price from solana price account +// example usage of reading pyth price from solana/pythnet price account use pyth_sdk_solana::load_price_feed_from_account; use solana_client::rpc_client::RpcClient; @@ -15,8 +15,8 @@ use std::{ fn main() { - let url = "http://api.mainnet-beta.solana.com"; - // Pyth eth/usd price account on mainnet. can be found from https://pyth.network + let url = "http:/pythnet.rpcpool.com"; + // Pyth ETH/USD price account on pythnet (can be found on https://pyth.network/developers/price-feed-ids#solana-mainnet-beta which has the same price feed IDs as pythnet) let key = "JBu1AL4obBcCMqKBBxhpWCNUt136ijcuMZLFvTP7iWdB"; let clnt = RpcClient::new(url.to_string()); let eth_price_key = Pubkey::from_str(key).unwrap();