Reporting With Telliot
Learn how to automatically report data using the command line tool.
Reporting a Price
It's really simple to report data with Telliot.
First, make sure you're in python's virtual environment (venv):
Now, confirm you have at least the minimum current stake amount of FETCH in your reporter's wallet address and run the command below to report a median spot price for PLS/USD.
You can check the current minimum stake amount in Fetch Dashboard, top left of the page!
telliot report -a <yourAccName> -qt pls-usd-spotAfter running the above, Telliot will: Display some detailed info about contracts and where it is going to try to report, ask for your acc password, try to stake if you don't have the minimum stake amount and try to submit the report. That's it!
Congratulations you submitted your first report! 🎉
Below are the detailed information of what happens in the process:

Telliot will automatically calculate the current min stake amount and try to stake it by asking you to confirm your password again to submit a deposit transaction.
After that it will calculate the PLS/USD price using its sources and submit the median price.



After staking it calculates the PLS/USD price and submits it on chain. It will keep trying to report again after 7 seconds by default.
To stop it, press ctrl + c.
It will also display an approximate time for when you'll be able to submit a report again, based on the current min stake amount in the contract and your deposited stake amount.

Reporting a Random Number using RNG
Process Overview
1. User Input: The user provides a timestamp.
2. Fetching Blocks: Telliot retrieves the next Bitcoin (BTC) and PulseChain (PLS) blocks based on the given timestamp.
3. Random Number Generation: A random number is generated using data from the retrieved blocks.
4. Reporting: The generated number is encoded and submitted for reporting.
Detailed steps
To report a random number using Telliot RNG use the query tag tellor-rng-example
The process begins by prompting the user to input a timestamp: From this timestamp, it will fetch the next BTC and PLS block.
Telliot confirms the generation process:
Telliot retrieves the latest BTC block:
Next, it fetches the corresponding block from PulseChain (chain ID: 369):
The random number is derived from the two retrieved blocks and stored:
The random number is encoded for reporting:
RNG on Fetch Dashboard
Currently, the Fetch Dashboard does not display the query or the generated random number. However, the reported data can be seen in the Discord notifications. Below is an example RNG notification in Discord;
Last updated