Skip to content

A simple script that uses hypersync to retrieve a summary of all the transactions on an address (erc20 + native asset)

Notifications You must be signed in to change notification settings

enviodev/evm-address-summary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Address-Transactions

This project provides tools to fetch token transfers, including native assets, ERC20, and ERC721 tokens from an EVM blockchain. Each script within this project focuses on a specific aspect of transaction analysis and is designed to be small, standalone, and easily adaptable for various needs.

The outputs of these scripts are primarily displayed on the terminal, but can also be extended to save results in a database or file, depending on the user's requirements.

Getting Started

Installation

Before running any scripts, ensure you have installed the required packages:

pnpm install

Usage

This project contains multiple scripts, each serving a different purpose. Here is how you can use each script:

  1. All Transfers: To analyze all token transfers for a specific Ethereum address (uses traces for native token balance calculations):

    pnpm run all-transfers <your address>

    For more details, see the All Transfers README.

  2. NFT Holders: To fetch information about holders of a specific NFT:

    pnpm run nft-holders <an NFT address>

    For more details, see the NFT Holders README.

  3. ERC20 Transfers and Approvals: To analyze ERC20 token transfers and approvals for a specific Ethereum address:

    pnpm run all-erc20-transfers-and-approvals <your address>

    For more details, see the ERC20 Transfers and Approvals README.

Replace <your address> with the Ethereum address you want to analyze.

Functionality

The scripts scan the Ethereum blockchain from the genesis block to the most recent one, retrieving all relevant transactions for the given address. They iterate through these transactions and calculate aggregates for each token type encountered.

Configuration

Each script includes a config.ts file which can be modified to adjust settings such as the blockchain endpoint. The hyperSyncEndpoint variable in config.ts is crucial for defining the blockchain source, and you can switch between different EVM-compatible networks by updating this variable with a new network endpoint.

About

A simple script that uses hypersync to retrieve a summary of all the transactions on an address (erc20 + native asset)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •