Skip to content

Add view functions for various dynamic parameters - #255

Merged
georgepisaltu merged 2 commits into
mainfrom
george-sss-view-fn
Nov 18, 2026
Merged

georgepisaltu merged 2 commits into
mainfrom
george-sss-view-fn

Conversation

@georgepisaltu

Copy link
Copy Markdown
Contributor

This PR adds view functions for values which are not #[pallet::constant] and so it's reasonable to assume clients need a way to read them.

NOTE: There are also some values which are still constants in the pallet but in reality it would make sense for them to be dynamic parameters. However, I did not include view functions for them or remove the constant attribute because this might break downstream consumers without prior warning.

Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
@georgepisaltu georgepisaltu self-assigned this Nov 18, 2026
@georgepisaltu
georgepisaltu requested a review from a team November 18, 2026 18:25
@georgepisaltu georgepisaltu added enhancement New feature or request D2-no audit No audit is needed C0-non-breaking This PR is not a breaking change for any runtime consuming it. labels Nov 18, 2026

@gui1117 gui1117 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about AccountsApiAllowance and NotificationAllowance in resources, and PrizeSource in people-airdrops?

@georgepisaltu

Copy link
Copy Markdown
Contributor Author

what about AccountsApiAllowance and NotificationAllowance in resources, and PrizeSource in people-airdrops?

The PrizeSource one I didn't include because I didn't think it's relevant for clients generally, I don't even know if it is a parameter or not. At this point, maybe it's just better to write the view function.

For the other 2 I just missed them, adding them now.

Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
@georgepisaltu
georgepisaltu enabled auto-merge (squash) November 18, 2026 21:52
@georgepisaltu
georgepisaltu merged commit 4dbcff0 into main Nov 18, 2026
21 checks passed
@georgepisaltu
georgepisaltu deleted the george-sss-view-fn branch November 18, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C0-non-breaking This PR is not a breaking change for any runtime consuming it. D2-no audit No audit is needed enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants