substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Gov2 referenda - expose track information

Open jacogr opened this issue 3 years ago • 0 comments

The full track configuration would be quite beneficial to be exposed. Specifically this part - https://github.com/paritytech/substrate/blob/b27c470eaff379f512d1dec052aff5d551ed3b03/frame/referenda/src/lib.rs#L184-L190 where Tracks: TracksInfo is defined.

Without this info is is currently impossible (without duplicating all on a per-chain basis) for consumers such as API and UIs to determine some vital track-related information -

  • which tracks are available
  • what are the origins for the specific tracks (for submission from UIs)
  • the deposits required for the tracks (useful UI-wise to inform users)
  • the curve configuration (useful to keep track of elapsed information)

This is not quite as easy as slapping on #[pallet::constant] due to the way things are injected, so any solution either on constants or via runtime calls to expose these would be quite appreciated by the time we take the next steps with governance on a running chain.

jacogr avatar Aug 03 '22 10:08 jacogr