Skip to content

Commit 61a2806

Browse files
authored
fix(misc) Remove Depr resources (#634)
* fix(misc) Remove Depr resources * fix
1 parent 389c4df commit 61a2806

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

pages/price-feeds/api-instances-and-providers/hermes.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Callout } from "nextra/components";
55
Hermes is an open-source service that listens to the Pythnet and the Wormhole Network for Pyth price updates, and
66
serves them via a convenient web API.
77

8-
Hermes allows users to easily [fetch price updates](../fetch-price-updates) via a REST API, or subscribe to a websocket for streaming
8+
Hermes allows users to easily [fetch price updates](../fetch-price-updates) via a REST API, or subscribe to server-side streaming
99
updates.
1010

1111
## Public Endpoints

pages/price-feeds/create-your-first-pyth-app/evm/part-1.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This tutorial will cover the following topics:
88
- Create a contract that reads the ETH/USD price from Pyth using [pyth-sdk-solidity](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/solidity)
99
- Learn how to update Pyth prices to avoid Stale data.
1010
- Deploy the contract to OP-sepolia testnet.
11-
- Update and Fetch price using [pyth-evm-js](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js).
11+
- Update and Fetch price using [hermes-client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js).
1212

1313
This tutorial is divided into two parts: \
1414
[Part 1:](./part-1) Create a contract and fetch prices from Pyth oracles. \
@@ -535,4 +535,4 @@ contract MyFirstPythContractTest is Test {
535535
536536
```
537537

538-
Check out [Part 2](./part-2) to learn how to deploy our contract to OP-sepolia testnet and fetch prices using pyth-evm-js.
538+
Check out [Part 2](./part-2) to learn how to deploy our contract to OP-sepolia testnet and fetch prices using hermes-client.

pages/price-feeds/create-your-first-pyth-app/evm/part-2.mdx

+7-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This part of the tutorial will conver the following:
88

99
- Deploy the contract on OP Sepolia testnet.
1010
- Interact with the contract from the command line.
11-
- Update and fetch the price from the contract using [pyth-evm-js](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js).
11+
- Update and fetch the price from the contract using [hermes-client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js).
1212

1313
<Callout type="info" emoji="ℹ️">
1414
This tutorial is continuation of the [Part 1: Create a Contract](./part-1). If
@@ -166,7 +166,7 @@ cd ..
166166
mkdir app
167167
cd app
168168
npm init -y
169-
npm install --save typescript ts-node viem @pythnetwork/pyth-evm-js
169+
npm install --save typescript ts-node viem @pythnetwork/hermes-client
170170
```
171171

172172
Then open `src/mintNft.ts` and paste in the following content:
@@ -175,7 +175,7 @@ Then open `src/mintNft.ts` and paste in the following content:
175175
import { createWalletClient, http, parseEther } from "viem";
176176
import { privateKeyToAccount } from "viem/accounts";
177177
import { optimismSepolia } from "viem/chains";
178-
import { EvmPriceServiceConnection } from "@pythnetwork/pyth-evm-js";
178+
import { EvmPriceServiceConnection } from "@pythnetwork/hermes-client";
179179
import { getContract } from "viem";
180180

181181
export const abi = [
@@ -236,13 +236,9 @@ async function run() {
236236
client,
237237
});
238238

239-
const connection = new EvmPriceServiceConnection(
240-
"https://hermes.pyth.network"
241-
);
239+
const connection = new HermesClient("https://hermes.pyth.network");
242240
const priceIds = [process.env["ETH_USD_ID"] as string];
243-
const priceFeedUpdateData = await connection.getPriceFeedsUpdateData(
244-
priceIds
245-
);
241+
const priceFeedUpdateData = await connection.getLatestPriceUpdates(priceIds);
246242
console.log("Retrieved Pyth price update:");
247243
console.log(priceFeedUpdateData);
248244

@@ -262,7 +258,7 @@ Notice: This `abi` variable which represents the interface of our contract and c
262258
The `run` function does two different things:
263259

264260
- First, it instantiates an interface to our contract using the [`viem`](https://viem.sh/) library.
265-
- Second, it uses `EvmPriceServiceConnection` from [`@pythnetwork/pyth-evm-js`](<(https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js)>) to retrieve
261+
- Second, it uses `HermesClient` from [`@pythnetwork/hermes-client`](<(https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js)>) to retrieve
266262

267263
Run this script using:
268264

@@ -287,7 +283,7 @@ Congratulations! You've built your first app using Pyth price feeds.
287283
## Conclusion
288284

289285
In this tutorial, we created a Solidity contract that updates and reads Pyth prices, tested the contract locally,
290-
then deployed the contract and interacted with it both via the command line and `pyth-evm-js` sdk.
286+
then deployed the contract and interacted with it both via the command line and `hermes-client` sdk.
291287

292288
## Next Steps
293289

pages/price-feeds/how-pyth-works/cross-chain.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ then observe the Merkle root message and create a signed VAA for the Merkle root
1212

1313
[Hermes](./hermes) continually listens to Wormhole for Pyth Merkle roots at each slot. It also
1414
listens to Pythnet to get all the price messages. It stores the latest price messages with their Merkle proof and signed
15-
Merkle root in memory and exposes HTTP and websocket APIs for retrieving the latest update. (Anyone can run an instance
15+
Merkle root in memory and exposes HTTP and server-side streaming APIs for retrieving the latest update. (Anyone can run an instance
1616
of this webservice, but the Pyth Data Association runs a public instance for convenience.) When a user wants to use a
1717
Pyth price in a transaction, they retrieve the latest update message from Hermes and submit it in their transaction. The
1818
update message includes the signed Merkle tree root, along with the Merkle proofs of each included price update. To

pages/price-feeds/how-pyth-works/hermes.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
serves them via a convenient web API. It provides Pyth's latest price update data format that are more cost-effective
55
to verify and use on-chain.
66

7-
Hermes allows users to easily query for recent price updates via a REST API, or subscribe to a websocket for streaming
8-
updates. The Pyth Network's Javascript SDKs connect to an instance of Hermes to fetch price updates.
7+
Hermes allows users to easily query for recent price updates via a REST API, or subscribe to a server-side events stream
8+
for streaming updates. The Pyth Network's Javascript SDKs connect to an instance of Hermes to fetch price updates.
99

1010
[hermes-repo]: https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes
1111

pages/price-feeds/sponsored-feeds/evm.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Update Parameters: **1 hour heartbeat or 1% price deviation**
179179

180180
## Story Mainnet
181181

182-
The price feeds listed in the table below are currently sponsored in **Kraken mainnet**.
182+
The price feeds listed in the table below are currently sponsored in **Story mainnet**.
183183

184184
Update Parameters: **1 hour heartbeat or 1% price deviation**
185185

0 commit comments

Comments
 (0)