Skip to content

Commit 47f8bca

Browse files
authored
Merge pull request #86 from pyth-network/example-pythnet
use pythnet example
2 parents 8a78f2a + bb3ee87 commit 47f8bca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyth-sdk-solana/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ For more information on the different types of Pyth accounts, see the [account s
8989

9090
## Off-chain Example Programs
9191

92-
The example [eth_price](examples/eth_price.rs) program prints the product reference data and current price information for Pyth on Solana devnet.
92+
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.
9393
Run the following commands to try this example program:
9494

9595
```

pyth-sdk-solana/examples/eth_price.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// example usage of reading pyth price from solana price account
1+
// example usage of reading pyth price from solana/pythnet price account
22

33
use pyth_sdk_solana::load_price_feed_from_account;
44
use solana_client::rpc_client::RpcClient;
@@ -15,8 +15,8 @@ use std::{
1515

1616

1717
fn main() {
18-
let url = "http://api.mainnet-beta.solana.com";
19-
// Pyth eth/usd price account on mainnet. can be found from https://pyth.network
18+
let url = "http:/pythnet.rpcpool.com";
19+
// 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)
2020
let key = "JBu1AL4obBcCMqKBBxhpWCNUt136ijcuMZLFvTP7iWdB";
2121
let clnt = RpcClient::new(url.to_string());
2222
let eth_price_key = Pubkey::from_str(key).unwrap();

0 commit comments

Comments
 (0)