GithubHelp home page GithubHelp logo

erc20-transfer-analyzer's Introduction

ERC20 Token Transfer Analyzer

This Node.js script allows you to analyze ERC20 token transfers on the Ethereum blockchain based on specific criteria such as addresses and block range.

Features

  • Fetches ERC20 token transfer events from the Ethereum blockchain using JSON RPC.
  • Filters transfers based on specified addresses and a block range.
  • Handles timeout to prevent the function from hanging indefinitely.
  • Writes the filtered transfer data to a JSON file.

Usage

Prerequisites

  • Node.js installed on your machine.
  • Access to an Ethereum JSON RPC provider.

Installation

  1. Install dependencies:
npm install

Configuration

Before running the script, you need to configure the following options:

  • Provider URL (-p, --provider): The JSON RPC provider URL for the Ethereum network you want to connect to.
  • Contract Address (-c, --contract): The address of the ERC20 token contract you want to analyze.
  • Addresses List (-a, --addresses): A list of Ethereum addresses separated by commas. Transfers involving these addresses will be included in the analysis.
  • Blocks Count (-b, --blocks): The number of recent blocks to search for token transfers.

Running the Script

Run the script with the following command:

node index.js --provider <provider-url> --contract <contract-address> --addresses <addresses-list> --blocks <blocks-count>

Replace <provider-url>, <contract-address>, <addresses-list>, and <blocks-count> with your desired values. Example <contract-address> is 0x943498b40d90c1000ca36f06010d970ccc47197f

Tests

The project includes unit tests to ensure the functionality of the script. You can run the tests using the following command:

npm run test

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.