This script:
- Subscribes to new blocks
- Fetch validator and nominator data on every session change (first block of the session, except for the first execution)
- Write CSV files
See example output CSVs inside example_csv
folder.
Nodejs is required.
git clone https://github.com/mariopino/substrate-data-csv.git
cd substrate-data-csv
npm install
mkdir /var/www/substrate-data-csv
node polkadot.js
node kusama.js