Skip to content

aniladanir/ethereum-blockchain-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Transaction Parser

A backend service in Go that tracks transactions for Ethereum addresses. It uses a RESTful API to subscribe to addresses and retrieve their transactions.

Setup

  1. Clone the repository:

    git clone <repository_url>
    cd <project_directory>
  2. Build and Run Docker Image:

    Navigate to the root of your project where the Dockerfile is located and run:

    docker build . -t ehtxparser
    docker run -d -p <port>:<container_port> ethtxparser

    You can configure container port in the config.json file.

API Usage

After starting the Docker environment, APIs should be accessible at http://localhost:<port>.

  • Example

    Send a POST request to /api/address to subscribe to an address.

    curl -X POST --location 'http://localhost:9600/api/subscribe?address=0x123'

    Send a GET request to /api/transactions to see incoming and outgoing transactions to an address.

    curl -X GET --location 'http://localhost:9600/api/transactions?address=0x123'

    Send a GET request to /api/block to get the last processed block number by the application.

    curl -X GET --location 'http://localhost:9600/api/block'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published