Demo Oracle Details
Oracle Contracts
Testnet
Contract | Address |
---|---|
Push Oracle | 0x9bb71344Ed950F9cFD85EE1C7258553B01d95FA0 |
Pull Oracle | 0x61D217a26D0Bff1D2b4c6f5880e621071326aadC |
Oracle Configuration
Pricing Methodology | Median |
Deviation (%) & Refresh Frequency | 2% and 120 seconds |
Heartbeat | 12h |
Available Asset Feeds
Asset Ticker | updates(key) | Asset Markets |
---|---|---|
ETH | ETH/USD | ETH Markets |
BTC | BTC/USD | BTC Markets |
DIA | DIA/USD | DIA Markets |
USDC | USDC/USD | USDC Markets |
How to Access Data
To consume price data, select the method required for your dapp. Theupdates
method is available for Push-based oracles and request
method for Pull-based oracles.
The price updates are stored in both methods in an updates
mapping. When accessing the updates
mapping through the key BTC/USD
, it will return the most recent price of BTC in USD with 8 decimal places (e.g. 9601458065403 is $96,014.58065403) along with the Unix timestamp of the last price update.
Below are sample contracts that consume the BTC/USD
price feed through both methods:
updates Method
request Method
Additional Details
You can find the contract addresses for the Unichain bridge’s components on testnet below: Learn more about DIA’s cross-chain messaging layer here.Request a Custom Oracle
DIA offers highly customizable oracles that are individually tailored to each dApp’s needs. Each oracle can be customized in the following ways, including:- Data Sources & Asset Feeds
- Pricing Methodologies
- Update Triggers (Frequency, Deviation, Heartbeat, …etc)