Skip to content

A Go-based service that monitors Ethereum transactions for subscribed addresses.

Notifications You must be signed in to change notification settings

thefabric-io/ethereum-transaction-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Transaction Monitor

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.

Features

  • 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

API Endpoints

The service exposes the following HTTP endpoints:

  • GET /v1/blocks/current - Get the latest processed block number
  • POST /v1/subscriptions - Subscribe to an Ethereum address
  • GET /v1/transactions - Get transactions for a subscribed address

Getting Started

Prerequisites

  • Go 1.23.5 or higher

Installation

  1. Clone the repository:
git clone https://github.com/thefabric-io/ethereum-transaction-monitor.git
  1. Navigate to the project directory:
cd ethereum-transaction-monitor
  1. Build the project:
go build -o bin/parser cmd/parser/main.go

Running the Service

Start the service:

./bin/parser

The service will start on port 8080.

Project Structure

  • 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

Architecture

The project follows a clean architecture approach with the following layers:

  1. Domain Layer - Core business logic and interfaces
  2. Application Layer - Use case implementations
  3. Infrastructure Layer - External implementations (HTTP, Ethereum client, Repository)

About

A Go-based service that monitors Ethereum transactions for subscribed addresses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published