This script queries two APIs:
- Sidecar from where it fetches the on-going referenda from the
on-going-referenda
endpoint. - Polkassembly from where it retrieves the corresponding titles for these referenda.
The script then checks if any of the titles include the word upgrade
. If so, it highlights them with an additional attention message.
Node.js
: Ensure you have Node.js installed.- Axios: install axios by running
npm install axios
. - Sidecar instance: Have a sidecar instance running locally (in a separate terminal).
- The sidecar instance should be connected to the chain you would like to check the referendas.
- Run the script with the command
node main.js
. - Optional argument: the block height at which to check the on-going referenda, e.g.
node main.js {BLOCK}
.