Skip to content

fix(misc) Remove Depr resources #634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/price-feeds/api-instances-and-providers/hermes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Callout } from "nextra/components";
Hermes is an open-source service that listens to the Pythnet and the Wormhole Network for Pyth price updates, and
serves them via a convenient web API.

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

## Public Endpoints
Expand Down
4 changes: 2 additions & 2 deletions pages/price-feeds/create-your-first-pyth-app/evm/part-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This tutorial will cover the following topics:
- 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)
- Learn how to update Pyth prices to avoid Stale data.
- Deploy the contract to OP-sepolia testnet.
- Update and Fetch price using [pyth-evm-js](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js).
- Update and Fetch price using [hermes-client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js).

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

```

Check out [Part 2](./part-2) to learn how to deploy our contract to OP-sepolia testnet and fetch prices using pyth-evm-js.
Check out [Part 2](./part-2) to learn how to deploy our contract to OP-sepolia testnet and fetch prices using hermes-client.
18 changes: 7 additions & 11 deletions pages/price-feeds/create-your-first-pyth-app/evm/part-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This part of the tutorial will conver the following:

- Deploy the contract on OP Sepolia testnet.
- Interact with the contract from the command line.
- 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).
- Update and fetch the price from the contract using [hermes-client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js).

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

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

export const abi = [
Expand Down Expand Up @@ -236,13 +236,9 @@ async function run() {
client,
});

const connection = new EvmPriceServiceConnection(
"https://hermes.pyth.network"
);
const connection = new HermesClient("https://hermes.pyth.network");
const priceIds = [process.env["ETH_USD_ID"] as string];
const priceFeedUpdateData = await connection.getPriceFeedsUpdateData(
priceIds
);
const priceFeedUpdateData = await connection.getLatestPriceUpdates(priceIds);
console.log("Retrieved Pyth price update:");
console.log(priceFeedUpdateData);

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

- First, it instantiates an interface to our contract using the [`viem`](https://viem.sh/) library.
- 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
- Second, it uses `HermesClient` from [`@pythnetwork/hermes-client`](<(https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js)>) to retrieve

Run this script using:

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

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

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion pages/price-feeds/how-pyth-works/cross-chain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ then observe the Merkle root message and create a signed VAA for the Merkle root

[Hermes](./hermes) continually listens to Wormhole for Pyth Merkle roots at each slot. It also
listens to Pythnet to get all the price messages. It stores the latest price messages with their Merkle proof and signed
Merkle root in memory and exposes HTTP and websocket APIs for retrieving the latest update. (Anyone can run an instance
Merkle root in memory and exposes HTTP and server-side streaming APIs for retrieving the latest update. (Anyone can run an instance
of this webservice, but the Pyth Data Association runs a public instance for convenience.) When a user wants to use a
Pyth price in a transaction, they retrieve the latest update message from Hermes and submit it in their transaction. The
update message includes the signed Merkle tree root, along with the Merkle proofs of each included price update. To
Expand Down
4 changes: 2 additions & 2 deletions pages/price-feeds/how-pyth-works/hermes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
serves them via a convenient web API. It provides Pyth's latest price update data format that are more cost-effective
to verify and use on-chain.

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

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

Expand Down
2 changes: 1 addition & 1 deletion pages/price-feeds/sponsored-feeds/evm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Update Parameters: **1 hour heartbeat or 1% price deviation**

## Story Mainnet

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

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

Expand Down