New endpoint to query ongoing referenda from root and whitelisted caller and their timeline.
IkerAlus opened this issue · 0 comments
A new endpoint, potentially added as GET /pallets/onGoingReferenda
to retrieve information of scheduled referenda of (potential) runtime upgrades and similar referenda created for root and whitelisted caller tracks of OpenGov. This information is currently served by referenda.referendumInfoFor: Option<PalletReferendaReferendumInfo>
of the PJS API. The idea is to filter by track (0
and 1
, for root and whitelisted caller respectively), and show clearly the relevant info regarding the timeline (in block numbers) of these ongoing referendas (enactment
, submitted
, deciding
). Other information about the referenda may be added too.
Alternatives
At the moment, this info can be retrieved by the generic /pallets/{palletId}/storage but it is not straightforward and requires of specific knowledge to retrieve the relevant data.
More details
Check the runtime upgrade wiki page, in particular the second bullet point, for relevant info.