LogoLogo
  • Quex oracles
  • How it works?
    • Why another oracle?
    • Quex oracle security
    • Onchain verification
  • General information
    • Where to start
    • Quex approach and terminology
    • Quex data delivery modes
    • Smart contract addresses
  • Developers
    • Building with Quex
    • Getting started tutorial
    • Flow creation
    • Client callback format
    • Request oracle pool
      • Descriptive guide
      • Supported post-processing operations
      • Data encoding format
  • Data providers
    • Running your own oracle pool
    • TD oracle requirements
    • Registering your Trust Domain
    • Pool creation
    • Follow us!
Powered by GitBook
On this page
  1. Data providers

TD oracle requirements

PreviousRunning your own oracle poolNextRegistering your Trust Domain

Last updated 2 months ago

It is recommended that your TD accepts the actions as byte arrays (maybe encoded). And it is mandatory that your TD outputs the data signed with the key which public counterpart is registered in the corresponding TD Quote.

The output from your oracle must contain OracleMessage and signature over this ABI-encoded structure. Since it affects the delivery routine and signature verification, the OracleMessage is specified as a Solidity structure:

struct OracleMessage {
    uint256 actionId;
    DataItem dataItem;
}

Here actionId is the action Id assigned to the action by your pool. Note, that it is the responsibility of you as the TD provider to make sure that the actionId under signature corresponds to the actual action being performed. The action Id must correspond to the one defined in your . DataItem struct member is specified as

struct DataItem {
    uint256 timestamp;
    uint256 error;
    bytes value;
}

timestamp is the timestamp of the data retrieval. error is the error code (zero if no error occured), value is the actual data. We recommend value to be ABI-encoded struct convenient for the further use by your data consumers.

The signature over the OracleMessage is the struct representing usual Ethereum signature

struct ETHSignature {
    bytes32 r;
    bytes32 s;
    uint8 v;
}
oracle pool