import { WsProvider, ApiPromise } from "@polkadot/api"; import { types } from "@joystream/types"; import { Vec } from "@polkadot/types"; import { EventRecord, Hash } from "@polkadot/types/interfaces"; import { getChangeAction } from "./functions"; async function main() { // Initialise the provider to connect to the local node const provider = new WsProvider('ws://127.0.0.1:9944'); const api = await ApiPromise.create({ provider, types }) const firstBlock = 1292265 // first block after the upgrade to the new Content Directory const lastBlock = 2332000 // note that with this blockheight, you will see a lot of jsgenesis initialization and uploads for (let blockHeight=firstBlock; blockHeight; const eventsArray: EventRecord[] = [] let eventIndex = 0 for (let i=0; i