Skip to content

tellor-io/dataSpecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Tellor Data Specifications

This repository contains specifications of data requested from, reported to, and retrieved from Tellor oracles. Each specification is called a Query.

For Tellor Users:

Price data:

First check if the price data is already being reported here. If it is not, please fill this out.

Need a spot price from Tellor? Generate a unique identifier, or query ID, for the asset/currency pair using this tool. After, use that ID to pay reporters to put that data on-chain. Then retrieve the reported spot price from the oracle like this.

Custom data:

First, check in /types if there's already a query type that defines the data you need.

If not, create a new query type, pay reporters to put that data on-chain, and retrieve that data from a Tellor oracle like this.

For Tellor Reporters:

To find out what data to report, there's two options:

  • Use our reporter client to automatically report the expected response of queries that Tellor users are funding.
  • Check for newly funded queries, then refer to that query's expected response in /types for the required data to report. Be sure to read the dispute considerations section for that query.

Encoding Practices

When reporting data to the Tellor oracle, it is crucial to encode the values correctly as defined in the relevant data spec document. Proper encoding is critical for user contracts to correctly decode and use the data.

For example, with a query type response defined as:

  • abi_type: ufixed256x18 (18 decimals of precision)
  • packed: false

and a uint256 value of 12345000000000000000000, the reported value should be encoded as 0x00000000000000000000000000000000000000000000029d394a5d6305440000. This value can be encoded in solidity as abi.encode(uint256(12345000000000000000000)).

By following these encoding practices, you ensure that the data remains consistent and can be accurately decoded by user contracts.

Create New Query Type

To create a new Query, or specification, for custom data you need from Tellor oracles, there's two options:

  • Make an issue with this template and the Tellor team will help with the next steps.

After creating the new query type in this repo, here are some next steps for getting reporters to support your data.

Contribute

Join our discord, help us with issues here on Github, or feel free to reach out anytime [email protected].

Maintainers

This repository is maintained by the Tellor team.

Copyright

Tellor Inc. 2022

About

Data specifications for oracle queries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published