Skip to content

stakewise/relayer-example

Repository files navigation

Relayer example

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.

Running with Docker

docker run --rm -ti \
-u $(id -u):$(id -g) \
europe-west4-docker.pkg.dev/stakewiselabs/public/relayer-example

Running from sources

Setup

  1. Install poetry
  2. poetry install
  3. cp .env.example .env
  4. Fill .env file with appropriate values

Run

  1. poetry shell
  2. export PYTHONPATH=.
  3. python src/app.py

App structure

Relayer-example is Python app made with FastAPI.

Folders structure

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published