The Relayer example for Stakewise v3-operator service
Relayer-Operator api communication is described in Operator docs.
In this example keystores and deposit-data file were not created in advance. Relayer generates validator credentials on the fly.
docker run --rm -ti \
-u $(id -u):$(id -g) \
europe-west4-docker.pkg.dev/stakewiselabs/public/relayer-example
- Install poetry
poetry install
cp .env.example .env
- Fill .env file with appropriate values
poetry shell
export PYTHONPATH=.
python src/app.py
Relayer-example is Python app made with FastAPI.
src/ # sources root
|-- common/ #
| |-- abi/ # contracts ABI
| |-- clients.py # execution client
| |-- contracts.py # validators registry contract
|-- config/
| |-- networks.py # network configs
| |-- settings.py # app settings
|-- validators/ #
| |-- credentials.py # Credential and CredentialManager used to generate keystores
| |-- endpoints.py # api endpoints
| |-- schema.py # api request/response schema
| |-- typings.py # dataclasses
| |-- validators.py # functions for creating validators and exit signatures
| |-- validators_manager.py # functions for working with validators manager