This project implements a simple tool for parsing Ethereum blockchain data. It enables to store blocks and USDC transfer transactions inside SQLite database.
- Block parsing: Extract all important data from blocks
- USDC Transfer transaction parsing: Extract all transactions details
Make sure you have Go installed on your machine. You can download it from here.
- Clone the repository:
git clone https://github.com/MonikaCat/eth-parser.git
cd eth-parser
- Install dependencies:
make install
- Initialise working directory and
config.yaml
file
eth-parser init
- Update values inside config.yaml file
nano ~/.eth-parser/config.yaml
node:
rpc_url: http://localhost:8545 # Update RPC address to ETH mainnet address
database:
dns: /Users/test/test.db # Update value to your SQLite DNS
max_open_connections: 20
max_idle_connections: 10
Run the command below in your terminal to prepare database and create tables
eth-parser prepare-database
To parse given block details and txs run the command below
eth-parser parse 20361785
To test the code run:
cd eth-parser
make test-unit
help Help about any command
init Initialise config.yaml file
prepare-database Prepare database and create tables
parse Parse and indexing the block and USDC transfer transactions
version Display the version of the application