Skip to content
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

Generate API for pallet constants #396

Closed
gregdhill opened this issue Jan 17, 2022 · 2 comments · Fixed by #402
Closed

Generate API for pallet constants #396

gregdhill opened this issue Jan 17, 2022 · 2 comments · Fixed by #402

Comments

@gregdhill
Copy link
Contributor

#207 introduced a getter for PalletMetadata but as the strings are not validated at compile-time they may eventually fall out-of-sync. It would be better it add a ConstantsApi in the codegen crate.

@jsdw
Copy link
Collaborator

jsdw commented Jan 17, 2022

I wonder how much work it would be to avoid needing runtime metadata at all, since in theory everything metadata related should be doable at compile time. It's something that's crossed my mind a bit anyway, but I haven't yet looked into it!

@gregdhill
Copy link
Contributor Author

We'll likely still need runtime metadata to validate the current API (#398).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants