Newer
Older
xxwalletcheck is a tool to check the balance of accounts in a CSV file against a Substrate chain. We use it to check on the current status of all the wallets from the public block audit, which includes all the official xx network addresses, including any addresses carried over from either BetaNet or via private sales that existed on the launch of the network.
To install, start by creating a virtual environment and installing the dependencies:
```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
To run the script, use the following command:
```
python walletcheck/cli.py --rpc-url <substrate-rpc-url> --csv-file <path-to-csv-file> -o <path-to-output-file>
```
The script will read the CSV file, extract the account addresses, and check the balance of each account against the Substrate chain. The results will be written to the output file in CSV format with the following fields:
- `address`: the account address
- `starting_balance`: the balance from the CSV file
- `current_balance`: the balance from the Substrate chain
It makes a best effort attempt to keep the column names the same except that the balance columns are prefixed with "current_" or "starting_".
To run this script agains all the files in the data folder, you can use the following command:
```
ls -1 data | grep csv | while read -r i; do echo $i; walletcheck --rpc-url ws://finney:63007 -o "updated/$i" "data/$i"; done;
```
In this case, "ws://finney:63007" is the URL of the Substrate node that we are checking against. You can change this to the URL of any other Substrate node, like your local gateway node. You cannot do this against the public RPC endpoint because you will be rate limited and/or banned.