Skip to main content

OracleGovernanceInterface

OracleGovernanceInterface#

Interface used by financial contracts to interact with the Oracle extending governance actions. Voters will use a different interface.

Functions#

requestGovernanceAction(bytes32 identifier, uint256 time) (public)

Enqueues a request (if a request isn't already present) for the given identifier, time pair.

Time must be in the past and the identifier must be supported.

Parameters:#

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.
  • time: unix timestamp for the price request.
requestPrice(bytes32 identifier, uint256 time) (public)

Enqueues a request (if a request isn't already present) for the given identifier, time pair.

Time must be in the past and the identifier must be supported.

Parameters:#

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.
  • time: unix timestamp for the price request.
hasPrice(bytes32 identifier, uint256 time) → bool (public)

Whether the price for identifier and time is available.

Time must be in the past and the identifier must be supported.

Parameters:#

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.
  • time: unix timestamp for the price request.
getPrice(bytes32 identifier, uint256 time) → int256 (public)

Gets the price for identifier and time if it has already been requested and resolved.

If the price is not available, the method reverts.

Parameters:#

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.
  • time: unix timestamp for the price request.