New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

erc20-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

erc20-snapshot

ERC20 Token Snapshot

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Token Snapshot: Create ERC20 Token Snapshot

This command-line utility creates a snapshot of any ERC20 token in JSON or CSV format. Use your own fully synced Ethereum node or any Ethereum node as a service like Infura.

  • Works without a local Ethereum node.
  • Automatically resumes the next time upon failure.
  • Tested to work with Infura.

Getting Started

npm install erc20-snapshot -g

CLI Arguments

None. Prompts for user input and produces a configuration file on the first run.

How to Use Token Snapshot?

Navigate to a directory where you'd like to save the token snapshot to.

cd path/to/a/directory

Run the program:

erc20-snapshot

Configuration File / Prompt Parameters

{
  "provider": "https://mainnet.infura.io/v3/<key>",
  "contractAddress": "",
  "fromBlock": 0,
  "toBlock": "latest",
  "format": "json",
  "blocksPerBatch": 2500,
  "delay": 0,
  "checkIfContract": "yes"
}

provider

Enter your fully synced Ethereum node. Could be a local node or remote services like Infura.

contractAddress

Address of your ERC20 token.

fromBlock

The block height to scan from. To save time, enter the block number of the transaction your token was created on.

toBlock

The block height to end the scan at.

blocksPerBatch

The number of blocks to query per batch.

If you are using remote service like Infura, keep this number relative low (2000-5000) to avoid rate limits. If you are using a dedicated Ethereum node, you can increase this number to suit your needs.

delay

The delay (in ms) between each request in the loop. Tweak this if you are experiencing rate limit from your provider.

checkIfContract

Checks each address to determine whether it is a smart contract or an Ethereum wallet.

You May Also Like

  • Vyper ERC20 Contracts
  • Vyper Crowdsale Contracts
  • Solidoc: Solidity Documentation Generator
  • SolFlattener: Solidity Flattener
  • Vesting Schedule

Keywords

ethereum

FAQs

Package last updated on 03 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts