IStdReference
Title: IStdReference
Author: Vendored minimal subset of Band Protocol (https://github.com/bandprotocol/contract-tools/blob/master/spec/StdReference.sol).
Upstream license: unknown (the linked upstream repository is not publicly reachable).
Minimal interface for the Band Protocol standard reference (StdReferenceProxy) oracle.
Vendored subset — do not add a Band contracts dependency. Band uses a SINGLE global reference
contract per chain; feeds are keyed by a (base, quote) symbol pair (e.g. ("ETH","USD")).
rate is already 18-decimals (WAD), and lastUpdatedBase / lastUpdatedQuote are the unix
timestamps the consumer validates for staleness.
Functions
getReferenceData
Returns the reference data for the base/quote symbol pair.
function getReferenceData(string memory base, string memory quote)
external
view
returns (ReferenceData memory referenceData);Parameters
| Name | Type | Description |
|---|---|---|
| base | string | The base symbol (e.g. "ETH"). |
| quote | string | The quote symbol (e.g. "USD"). |
Returns
| Name | Type | Description |
|---|---|---|
| referenceData | ReferenceData | The (rate, lastUpdatedBase, lastUpdatedQuote) result. |
Structs
ReferenceData
A Band reference-data result for a (base, quote) symbol pair.
struct ReferenceData {
uint256 rate;
uint256 lastUpdatedBase;
uint256 lastUpdatedQuote;
}Properties
| Name | Type | Description |
|---|---|---|
| rate | uint256 | The base/quote exchange rate, scaled to 1e18 (18 decimals). |
| lastUpdatedBase | uint256 | The unix timestamp the base symbol was last updated. |
| lastUpdatedQuote | uint256 | The unix timestamp the quote symbol was last updated. |