-
Notifications
You must be signed in to change notification settings - Fork 157
feat: add pallets/on-going-referenda endpoint #1471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Nice work!
One minor thing in the pallet service where I left the comment. I think once that is resolved it can get merged!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job overall looks good, just one little nit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looking good! Nice work, not sure if you want to integrate my last comment
- added block height in the error msg (Tarik's review) - added a Promise.all (Filippo's review)
* feat: add pallets/on-going-referenda endpoint * updated docs * error handling when call not available - added also a test for that case * added test that returns referenda (call available) * replaced unnecessary Promise.all * small but nice improvements - added block height in the error msg (Tarik's review) - added a Promise.all (Filippo's review)
Description
Closes #1431
This PR adds the
pallets/on-going-referenda
endpoint which returns a list of all on-going referenda and their associated info.Query Params
at
: Which block to query, it will default to the latest finalized block. Accepts a hash or blocknumberSample Response
Sidecar request while connected to Kusama chain :
returns
Then we can check the referendum id
373
in Polkassembly and can verify that it corresponds to a runtime upgrade: "#373 Upgrade Kusama v1.2.0". To streamline the process and avoid extra checks, we can directly run only this script. The script queries both Sidecar'son-going-referenda
endpoint and Polkassembly API and tells us which referendum is a runtime upgrade.Example Use
An example use of this endpoint can be found in this script runtime-upgrades-checker.
Todos
api.query.referenda
is not available and throws an errorapi.query.referenda
is available and returns a list of referenda