Giter VIP home page Giter VIP logo

tokenholders's Introduction

tokenHolders.py

Get Ethereum ERC20 Transfer Event Logs with Infura, graph basic ownership stats.

graph

Installation

This project uses Python 3.6.6.

In order to clone the project and install required third-party packages please execute:

git clone https://github.com/devenoges/tokenHolders.git
pip3 install -r requirements.txt

Usage

To produce the graphs above:

$ export INFURA_API_KEY=<your-infura-api-key>
$ ./tokenHolders.py -t 0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2 > tx.MKR.json
$ ./tokenHolders.py -t 0xC66eA802717bFb9833400264Dd12c2bCeAa34a6d > tx.MKR_OLD.json
$ ./tokenGraphMKR.py -t tx.MKR.json -o tx.MKR_OLD.json MKR.png
tokenHolders.py [-h] [-d DECIMALS] [-t] contract

Requires the environment variable INFURA_API_KEY to be set.

positional arguments:
  contract              ERC20 contract address

optional arguments:
  -h, --help            show this help message and exit
  -d DECIMALS, --decimals DECIMALS
                        ERC20 contract decimals (default 18)
  -t, --transfers       Print transfer events (default print address balances)

e.g. INFURA_API_KEY=<Your-Infura-Key> ./tokenHolders.py 0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2 > MKR_bal.json
tokenGraphMKR.py [-h] [-v] [-d DAYS] -t TRANSFER_LOG -o TRANSFER_LOG_OLD
                        (-b | -l) output

positional arguments:
  output                Output_filename

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Show processing messages
  -d DAYS, --days DAYS  Number of days to plot, default all
  -t TRANSFER_LOG, --transfer-log TRANSFER_LOG
                        JSON log file of ERC20 transfer events
  -o TRANSFER_LOG_OLD, --transfer-log-old TRANSFER_LOG_OLD
                        JSON log file of old ERC20 transfer events
  -b, --gini-both       Graph Gini for both MKR and MKR_OLD (default MKR only)
  -l, --gini-old        Graph MKR_OLD only

tokenholders's People

Contributors

devenoges avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.