circle-info
This is the first version of our Documentation, it will be improved and extended soon.
Page cover

Event Reference

The IFÁ Labs price oracle contract emits events whenever a price update is successfully pushed onchain. These events enable offchain monitoring, indexing, and real-time alerts for protocols relying on fresh data.

Emitted Events

PriceUpdated(bytes32 indexed assetId, int256 price, int8 decimal, uint64 timestamp)

Primary event emitted on every successful price update.

  • Parameters:

    • assetId (indexed): The bytes32 asset identifier (searchable in explorers).

    • price: The new scaled price value.

    • decimal: The scaling exponent (negative, e.g., -18).

    • timestamp: The block timestamp when the update was recorded (matches lastUpdateTime).

Use Cases:

  • Indexing services (e.g., The Graph, Subsquid) track price history.

  • Offchain monitors alert on updates or lack thereof.

  • Protocols log price changes for analytics.

Additional Internal Events (if present)

Some deployments may include:

  • RelayerUpdate(address relayer, uint256 roundId) — Tracks which decentralized relayer submitted the update.

  • SourceDataAdded(bytes32 assetId, address source) — For advanced transparency (future expansions).

Check the verified contract source on Basescan for the exact events in your target deployment.

Example: Listening in JavaScript (ethers.js)

Monitoring these events is a best practice for production systems to detect update frequency and potential delays.

Next: Download the ABI for seamless integration in your tools and contracts.

Last updated

Was this helpful?