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.
npm install erc20-snapshot -g
None. Prompts for user input and produces a configuration file on the first run.
Navigate to a directory where you'd like to save the token snapshot to.
cd path/to/a/directory
Run the program:
erc20-snapshot
{
"provider": "https://mainnet.infura.io/v3/<key>",
"contractAddress": "",
"fromBlock": 0,
"toBlock": "latest",
"format": "json",
"blocksPerBatch": 2500,
"delay": 0,
"checkIfContract": "yes"
}
Enter your fully synced Ethereum node. Could be a local node or remote services like Infura.
Address of your ERC20 token.
The block height to scan from. To save time, enter the block number of the transaction your token was created on.
The block height to end the scan at.
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.
The delay (in ms) between each request in the loop. Tweak this if you are experiencing rate limit from your provider.
Checks each address to determine whether it is a smart contract or an Ethereum wallet.
- Vyper ERC20 Contracts
- Vyper Crowdsale Contracts
- Solidoc: Solidity Documentation Generator
- SolFlattener: Solidity Flattener
- Vesting Schedule
Block 12150805 = (Apr-01-2021 02:03:35 AM +UTC)
{
"provider": "https://mainnet.infura.io/v3/3095c8c299264c50a2924fe75dbb1444",
"contractAddress": "0x515ba0a2e286af10115284f151cf398688a69170",
"fromBlock": 7756172,
"toBlock": 12150805,
"format": "csv",
"blocksPerBatch": 2500,
"delay": 0,
"checkIfContract": "no"
}
{
"provider": "https://mainnet.infura.io/v3/3095c8c299264c50a2924fe75dbb1444",
"contractAddress": "0xB97048628DB6B661D4C2aA833e95Dbe1A905B280",
"fromBlock": 3879982,
"toBlock": 12150805,
"format": "csv",
"blocksPerBatch": 2500,
"delay": 0,
"checkIfContract": "no"
}