This project indexes Ethereum transactions into a PostgreSQL database and provides a REST API to retrieve them.
The project uses alloy-rs, axum, sqlx, and docker-compose.
Uses Docker Compose to run the entire stack (API, Database, Nginx).
-
Requirements:
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/your_username/your_project_name.git cd your_project_name -
Create the .env file: Copy the env.example template and fill it with your data.
cp .env.example .env
You need to edit .env and insert your actual HTTP_INFURA_URL.
-
Start the service:
docker compose up --build
-
That's it! The service is now available at http://localhost.
- GET /transactions - Get a list of recent transactions
- GET /transactions?sender=0x... - Filter by sender
- GET /transactions?receiver=0x... - Filter by receiver
- GET /transactions?participant=0x... - Filter by participant (sender OR receiver)
- GET /transactions/:hash - Get a single transaction by its hash
- POST /send - Prepare testnet transaction