Generate complete wallet snapshots on the Rootstock blockchain, including ERC20 token balances and liquidity NFT metadata.
- ERC20 Balances: Retrieves balances and metadata of standard tokens
- Liquidity NFTs: Extracts detailed information from liquidity pools (WoodSwap)
- Block-based Snapshots: Query data at a specific block or the latest
- JSON Export: Option to save snapshots to files
- Node.js: v22.13.0 or higher
- npm: For installing dependencies
# Clone the repository
git clone <repository-url>
cd wallet-snapshots
# Install dependencies
npm installThe project requires a .env file with all necessary configuration. Copy .env.example to .env and customize:
# 1) Copy the example file
cp .env.example .env
# 2) Edit the .env file with your valuesRequired variables:
TARGET_ADDRESS: Wallet address to generate snapshot for (must be a valid address)BLOCK_NUMBER: Block number to query (or 'latest')NETWORK: Network to use (mainnet or testnet)MAINNET_RPC_URL: RPC provider for mainnetTESTNET_RPC_URL: RPC provider for testnet
Optional variables:
SAVE_BY_DEFAULT: Whether to save snapshots by default (true/false)OUTPUT_DIR: Directory for snapshot files
# Generate snapshot (console only)
node src/index.js# Save snapshot to file
node src/index.js --save
# Show help
node src/index.js --helpwallet-snapshots/
├── src/
│ ├── index.js # Main entry point
│ └── lib/
│ ├── config.js # Centralized configuration
│ ├── utils.js # Utility functions
│ └── abis/ # Contract ABIs
├── snapshots/ # Snapshot files (created automatically)
└── package.json
- @rsksmart/nod3: RPC client for RSK
- @rsksmart/rsk-contract-parser: RSK contract parser
- ethers: Library for Ethereum/RSK interaction
The snapshot includes:
- Basic wallet information
- ERC20 token balances
- Liquidity NFT metadata
- Pool information (tokens, fees, positions)
- Mainnet: Rootstock Mainnet
- Testnet: Rootstock Testnet