Relayers for Tellor Layer that:
- relay oracle values from Layer to EVM (
relay-threshold) - relay bridge withdrawals from Layer to EVM (
relay-bridge) - sync validator sets (
relay-valset) - manage bridge contract lifecycle (
init,reset)
This repo is config-driven via configs/ and is operated with telliot-feeds as the price source.
- Create and activate a Python virtual environment:
python3.12 -m venv venv3.12
source venv3.12/bin/activate- Install dependencies and the CLI:
pip install -r requirements.txt
pip install -e .- Copy
.env.exampleto.envand fill in required secrets:
cp .env.example .envCLI flags override config values, and config values override .env.
The commands currently used in operations are:
initparse-queryrelay-bridgerelay-thresholdrelay-valsetreset
The relayer relies heavily on the config system:
- Config files live in
configs/ - Inheritance uses
extends = [...] [env]sets environment variables[commands.<command>]sets per-command defaults
You can pass --config as:
- a config name (
sepolia-shared) - a nested config name (
sepolia/eth-usd) - or a path (
configs/sepolia/eth-usd.toml)
extends = ["sepolia-shared"]
[env]
FEED_NAME = "eth-usd"
PRICE_SOURCE = "telliot-feeds"
[commands.relay-threshold]
query_string = "SpotPrice(eth,usd)"
price_threshold = 0.02relayer --config sepolia/eth-usd relay-thresholdrelayer --config sepolia-shared relay-bridge --withdraw-id 1Primary oracle relayer (heartbeat + threshold logic), typically run with feed configs such as sepolia/eth-usd.
relayer --config sepolia/eth-usd relay-thresholdRelays a withdrawal from Layer to EVM.
relayer --config sepolia-shared relay-bridge --withdraw-id 1Relays validator set updates.
relayer --config sepolia-shared relay-valsetInitializes the data bridge contract (one-time deployer action).
relayer --config sepolia-shared initGuardian reset for stale validator set scenarios.
relayer --config sepolia-shared resetParses a query string and prints query metadata (queryId, queryData, parsed args).
relayer parse-query --query-string "SpotPrice(eth,usd)"price-serviceis not part of the active operational workflow.- Use
telliot-feedsvia config (PRICE_SOURCE=telliot-feeds) for threshold relaying. - See
configs/README.mdfor additional config examples.