EVM
EVM-specific notes for the Pyth Core upgrade.
These notes complement the main upgrade guide for EVM consumers.
Hermes client (viem and ethers)
The Hermes client is the same shape regardless of which contract library you use. Instantiate HermesClient with the upgraded endpoint and your API key:
import { HermesClient } from "@pythnetwork/hermes-client";
const hermes = new HermesClient(
"https://pyth.dourolabs.app/hermes",
{ accessToken: process.env.PYTH_API_KEY },
);
// Pass the resulting payload to your viem contract:
// await pythContract.write.updatePriceFeeds([update.binary.data], { value: fee });import { HermesClient } from "@pythnetwork/hermes-client";
const hermes = new HermesClient(
"https://pyth.dourolabs.app/hermes",
{ accessToken: process.env.PYTH_API_KEY },
);
// Pass the resulting payload to your ethers contract:
// await pythContract.updatePriceFeeds([update.binary.data], { value: fee });The contract call itself follows your ABI library. Use pythContract.write.updatePriceFeeds(...) in viem, pythContract.updatePriceFeeds(...) in ethers.