Push based oracles
Last updated
Last updated
The model enables contracts to receive real-time updates based on predefined criteria such as fixed intervals, specific price deviations, or a combination of both. This design provides flexibility and efficiency for decentralized applications needing accurate and timely data.
The Oracle maintains updates as a mapping, where each key maps to a Data struct containing the latest timestamp and value.
The updates
mapping is a key-value store where:
Key: A unique identifier, typically a string, representing the asset or data type (e.g., DIA/USD, BTC/USD).
Value: A Data struct containing:
key: The identifier of the data entry (redundant for reference but useful for integrity checks).
timestamp: The timestamp of the latest update.
value: The most recent value associated with the key.
E.g. PriceConsumer contract
You can find demo oracles . If you want to access the oracle on Ethereum Sepolia for example, you'll pass the Push Oracle address: to the constructor above.