LogoLogo
  • Introduction
  • Running Tellor Layer
    • Getting Started
    • Bridging Sepolia TRB
      • Bridge TRB back to Sepolia
      • Manual Generation of Bridge Query Data / IDs
    • Managing Accounts
    • Node Setup
      • Peers List & Public RPCs
      • Cosmovisor Sync
      • State Sync Troubleshooting / Resetting Chain Data
      • Example .service Files
    • Run a Layer Validator
      • Slashing Rules for Validators
    • Become a Data Reporter
      • Unjail Your Reporter
    • Command Line Usage
      • Query the Chain
      • Creating Transactions
      • Delegate to a Validator
      • Select a Reporter
  • Disputes and Reporter Governance
  • Using Tellor Data
    • Relay Data to EVM Chains
    • Integrating Tellor Data
    • Integrate Tellor on a New Chain
Powered by GitBook
On this page
  • Setup
  • Usage
  1. Using Tellor Data

Relay Data to EVM Chains

Relay oracle data, validator set, and bridge information updates back and forth between tellor layer and any EVM chain.

PreviousDisputes and Reporter GovernanceNextIntegrating Tellor Data

Last updated 2 days ago

The queries tellor for oracle data and their proofs and submits them to a user contract on other chains.

Setup

  1. Clone the repo:

git clone https://github.com/tellor-io/py-relayer.git
  1. Navigate to the repository directory:

cd py-relayer
  1. Create a virtual environment:

python3 -m venv venv
source venv/bin/activate
  1. Install the dependencies:

pip install -r requirements.txt
  1. Install the package:

pip install -e .
  1. Copy the .env.example file to .env and set the appropriate environment variables:

cp .env.example .env

The "email" section of the .env file is optional. If you want to receive emails when layer is down, input your gmail username and password. We recommend using an for your gmail account.

Other than the email section, all .env variables can alternatively be set through the CLI. We recommend setting your ethereum private key in the .env file for security reasons. For convenience, you should set any parameters which tend to remain constant across runs in the .env file. CLI arguments will override .env variables.

Additional Requirements for Ubuntu

If you are running the relayer on ubuntu, you may need to install additional tools:

sudo apt update
sudo apt install build-essential python3-dev

After installing these dependencies, proceed with the setup instructions above.

Usage

The relayer provides several commands through its CLI:

Start Relaying

relayer relay --layer-test-user-address 0x44941f399c4c009b01bE2D3b0A0852dC8FFD2C4a --data-bridge-address 0xC69f43741D379cE93bdaAC9b5135EA3e697df1F8 --layer-swagger https://node-palmito.tellorlayer.com/ --layer-rpc https://node-palmito.tellorlayer.com/rpc/ --contract-type TestPriceFeedUser --sleep-time 7200

Update Oracle Data Once

relayer update --query-id 0x83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992

Relay Token Bridge Withdraw

relayer relay-bridge --data-bridge-address 0xC69f43741D379cE93bdaAC9b5135EA3e697df1F8 --token-bridge-address 0x5acb5977f35b1A91C4fE0F4386eB669E046776F2 --withdraw-id 8

Initialize Data Bridge

This command initializes the TellorDataBridge contract after deployment. This must be run by the contract deployer address.

relayer init

Reset Data Bridge

This command resets the validator set in the TellorDataBridge contract in the event that the last relayed validator set is over 21 days old. This can only be run by the TellorDataBridge contract’s guardian address.

relayer reset

To see all available options for each command:

relayer --help
relayer relay --help

relayer
app password