IDIAOracleV2
Title: IDIAOracleV2
Author: Vendored minimal subset of DIA (https://github.com/diadata-org).
Upstream license: GPL-3.0 (repository license; the upstream file has no SPDX tag).
Minimal interface for a DIA OracleV2 contract.
Vendored subset — do not add a DIA dependency. A single DIA oracle contract serves many
string-keyed feeds (e.g. "ETH/USD"); value is reported with 8 decimals and timestamp
is the off-chain update time the consumer validates for staleness.
Functions
getValue
Reads the current value and update timestamp for the given key.
function getValue(string memory key) external view returns (uint128 value, uint128 timestamp);Parameters
| Name | Type | Description |
|---|---|---|
| key | string | The DIA price key string (e.g. "ETH/USD"). |
Returns
| Name | Type | Description |
|---|---|---|
| value | uint128 | The price value, scaled to 1e8 (8 decimals). |
| timestamp | uint128 | The timestamp the value was last updated off-chain. |