A Go-based service that monitors Ethereum transactions for subscribed addresses. This project provides a simple HTTP API to track transactions for specific Ethereum addresses.
- Real-time monitoring of Ethereum transactions
- Subscribe to specific Ethereum addresses
- Retrieve transaction history for subscribed addresses
- RESTful API endpoints
- In-memory storage for subscriptions and transactions
- Automatic polling of new blocks
The service exposes the following HTTP endpoints:
GET /v1/blocks/current
- Get the latest processed block numberPOST /v1/subscriptions
- Subscribe to an Ethereum addressGET /v1/transactions
- Get transactions for a subscribed address
- Go 1.23.5 or higher
- Clone the repository:
git clone https://github.com/thefabric-io/ethereum-transaction-monitor.git
- Navigate to the project directory:
cd ethereum-transaction-monitor
- Build the project:
go build -o bin/parser cmd/parser/main.go
Start the service:
./bin/parser
The service will start on port 8080.
- cmd/parser/ - Main application entry point
- domain/ - Domain models and interfaces
- internal/ - Internal packages
- application/ - Application logic and use cases
- eth/ - Ethereum client implementation
- http/ - HTTP server and handlers
- poller/ - Block polling implementation
- repository/ - Data storage in memory implementation
The project follows a clean architecture approach with the following layers:
- Domain Layer - Core business logic and interfaces
- Application Layer - Use case implementations
- Infrastructure Layer - External implementations (HTTP, Ethereum client, Repository)