Oracle Precompile
The oracle precompile provides access to real-time exchange rate data and time-weighted average prices (TWAPs) for different denominations.
Last updated
The oracle precompile provides access to real-time exchange rate data and time-weighted average prices (TWAPs) for different denominations.
getExchangeRate
denom: string (currency denomination)
rate: string
lastUpdate: string
lastUpdateTimestamp: int64
Gets the current exchange rate for a specific denomination with update metadata
getExchangeRates
None
denoms: string[]
rates: string[]
lastUpdate: string[]
lastUpdateTimestamps: uint256[]
Gets exchange rates for all available denominations with update metadata
getTwaps
lookbackSeconds: uint256 (time window in seconds)
denoms: string[]
twaps: string[]
Gets time-weighted average prices (TWAPs) for all denominations over the specified lookback period
Precompile Address
0x0000000000000000000000000000000000001003
Last updated