ConsenSys/bentobox

Name: bentobox

Owner: ConsenSys

Description: Asks an ethereum node for its contents (block, tx, logs, topics) dump them into a PSQL

Created: 2016-12-27 00:57:38.0

Updated: 2018-01-11 16:36:57.0

Pushed: 2017-01-04 05:57:57.0

Homepage: null

Size: 142

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Event Crawler

It reads the JSON RPC API of an ethereum node and dumps its results into a PSQL database.

Run a PSQL database using docker

Just use the command

 run-psql

Will mount the dir $HOME/.psql and have a DB for you.

You need to setup your database if it is the first time using it. Use the instructions below.

Setup the database

You can have your database already, or you can use docker as above. This script will set you up with your database.

Get in a console able to use psql and Run

 -U postgres

TIP: If you are running PSQL with docker, to access bash inside the container do

er exec -ti <psql-container> /bin/bash

Once inside you create your database with

TE DATABASE bentobox;

Now you need to restore the schema. Do from the comamnd line

 -U postgres bentobox < database.sql

You are good to go.

Retrieving program dependencies
 boostrap
Compiling the program
 crawler

Will put your program in ./build/bin/crawler. This is compiled for debian though. To run it…

Running the program
 run-crawler

Which will run the program inside the dev container.

Adding arguments to the executable inside the container

To add arguments, do, for example

="--help" make run-crawler
Herman, I want to compile and run the program without docker

Fine. Do,

e install # You need to have glide (https://github.com/Masterminds/glide)
uild -o build/bin/crawler main.go
ild/bin/crawler

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.