Code Monkey home page Code Monkey logo

web3cat's Introduction

Documentation Status

Welcome to Web3cat!

/docs/images/web3cat.png

Meow, fellow researcher!

Web3cat is a framework for fetching and analyzing blockchain data.

Currently, it supports only EVM chains: Ethereum, Polygon, BNB, etc.

Design philosophy

  1. Visualize the data with minimum code
  2. Free for downloading, saving, and analyzing the data however you want
  3. Cache the data to avoid re-fetching anything at all
  4. Fully decentralized, that is, depending only on the blockchain RPC

Quick demo

/docs/images/web3cat_demo.gif

Getting started

  1. Install python package
pip install web3cat
  1. Set up your archive node rpc. The easiest (and also free) way is to use Alchemy.
  2. Set initial configuration
import os
os.environ['WEB3_PROVIDER_URI'] = 'https://eth-mainnet.g.alchemy.com/v2/<YOUR_ALCHEMY_API_KEY>'
os.environ['WEB3_CACHE_PATH']="cache.sqlite3"
  1. (optional for Jupyter) Initialize bokeh for python notebooks
from bokeh.io import output_notebook

output_notebook()
  1. Run sample visualization
from web3cat.view import View
from datetime import datetime

v = View(token="DAI", start=datetime(2022, 6, 1), end = datetime(2022, 10, 30)) \
    .total_supply() \
    .balance(["0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643", "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7"])
v.show()

docs/images/view1.png

  1. Get underlying data

    v.get_data(0).transfers[["date", "block_number", "from", "to", "value"]]
    
    docs/images/view_getting_started1.png

Roadmap

Use framework base layers to add analytics for protocols like Uniswap, Liquity, Aave, Compound, Frax, etc.

Contributing

So far no bureaucracy here, open issues, make pull requests, and have fun!

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.