Pyth (Oracle)
Last updated
Last updated
is one of the largest first-party Oracle network, delivering real-time data across . The network comprises some of the worldβs . These publish proprietary data on-chain for aggregation and distribution to smart contract applications.
The Pyth introduces an innovative low-latency , where users can pull price updates onchain when needed, enabling everyone in the onchain environment to access that data point most efficiently. Pyth network updates the prices every 400ms.
Developers Cronos zkEVM have permissionless access to any of for equities, ETFs, commodities, foreign exchange pairs, and cryptocurrencies.
Here is a working example of a contract that fetches the latest price of ETH/USD on the Cronos zkEVM. You have to pass for Cronos zkEVM mainnet/testnet and the desired to fetch the latest price.
Check out the following links to get started with Pyth.
Here you can fetch the updateData
from Pyth's , which listens to Pythnet and Wormhole for price updates; or you can use the SDK. Check to pull the latest data.
This provides utilities for consuming prices from the Pyth network oracle using Solidity. Also, it contains the that you can use in your libraries to communicate with the Pyth contract.
It is generally recommended to follow the when consuming Pyth data.
For more information, check out the official . There are details on the various functions available for interacting with the Pyth smart contract in the .
Cronos zkEVM Mainnet (Chain-id : 388
)
Mainnet deployment completed -
Cronos zkEVM Sepolia Testnet (Chain-id : 282
)
Testnet deployment completed -
Additionally, click to access the .
Pyth Oracle can be used as a Push oracle by running a scheduler which can update the prices in the backend. It will make sure that the your dapp will be updated with latest prices as per your configuration. Checkout the open source app to get started with the scheduler.
The Pyth network provides additional tools to developers, such as , or the .