Code Monkey home page Code Monkey logo

eth2dgraph's Introduction

Ethereum data to Dgraph database

This is a tool for extracting data from the Ethereum blockchain (or any other EVM-compatible chain) and index it with Dgraph, a distributed graph database.

It uses the heimdall-rs decompiler to extract ABIs from EVM bytecodes.

Data is extracted and stored using the schema below:

Data schema

How to run

To run this software you first need to install heimdall-rs. To do so, follow the instructions in its README.

To briefly summarize how to install heimdall, you need to install Rust and Cargo. Then, you can install heimdall using bifrost, its update and install manager, by running:

curl -L http://get.heimdall.rs | bash

Once you have bifrost installed and after reloading your shell, you can install heimdall by running:

bifrost

This will download and compile heimdall.

Once you have heimdall-rs installed, you can check that it is working by running the following command:

heimdall --version

If you get the version of heimdall, you are ready to run eth2dgraph. Currently, it is tested with heimdall-rs version 0.4.6.

Then, after cloning this repository, you can build eth2dgraph in release mode by running:

cargo build -r

or install it running

cargo install --path .

You can then run the tool by running:

eth2dgraph --help

It has three commands:

  • extract: it extracts data from Ethereum endpoint to compressed JSON files, ready to be imported into Dgraph with the Bulk Import.
  • stream: it streams live data from Ethereum to Dgraph using websockets. It can also sync Dgraph and Ethereum in case they're not.
  • analyse: it can be used to calculate cosine or interface similarities between EVM skeletons. There's also the code to perform an analysis of the lifetimes of the contracts. It can be used as a reference to implement other analysis.

It's possible to run each of the command with --help to see the available options.

In case you want to index verified source code, you'll need to clone the smart-contract-sanctuary-ethereum repository and point eth2dgraph to it using the -s flag.

eth2dgraph's People

Contributors

davideaimar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.