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

[Content] Adds docs about construct_runtime! #502

Closed
bkchr opened this issue Nov 8, 2021 · 1 comment · Fixed by #1367
Closed

[Content] Adds docs about construct_runtime! #502

bkchr opened this issue Nov 8, 2021 · 1 comment · Fixed by #1367
Labels
new content 💡✍️ New Devhub content required.

Comments

@bkchr
Copy link
Collaborator

bkchr commented Nov 8, 2021

Content request

We need better docs for the macro. This includes the syntax and especially what kind of types the macro generates.

Are you willing to help with this request?

Yes!

@sacha-l
Copy link

sacha-l commented Jan 13, 2022

Notes to self:

construct_runtime generates:

  • Call enum, used for libraries like subxt to submit extrinsics to the runtime.
  • Event, origin enums generated to
  • Pallet indices are generated
  • Pallet name: useful to ensure storage ValueQuery is unique
  • get_call_metadata
  • GenesisConfig is generated and used in the chainspec.
  • InherentDataExt: ensure that inherents are applied before the extrinsics
  • ValidateUnsigned
  • ...

(run subxt codegen | rustfmt --edition=2018 --emit=stdout and see. Or cargo expand to break it down).

@sacha-l sacha-l added the new content 💡✍️ New Devhub content required. label Jan 31, 2022
@lisa-parity lisa-parity linked a pull request Aug 5, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new content 💡✍️ New Devhub content required.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants