Rain subparser and extern word for DIA oracle V2.
Provides a dia-price word that fetches prices from the DIA oracle on-chain.
using-words-from <DiaWords address>
price updated-at: dia-price("BTC/USD" 3600);
- key — DIA price feed key as a string, e.g.
"BTC/USD","ETH/USD". Passed through directly to the DIA oracle contract. - staleAfter — Maximum age of the price in seconds. Reverts if the price is older than this.
- price — The asset price as a Float (8 decimal places).
- updatedAt — The timestamp of the last price update as a Float (unix seconds).
- Base (8453)
# Build
forge build
# Run tests (requires Base RPC)
forge test
# Regenerate pointers
forge script script/BuildPointers.sol