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

Question: How can I generate "types.json" file in each pallets ? #446

Open
CocDap opened this issue Jun 18, 2021 · 2 comments
Open

Question: How can I generate "types.json" file in each pallets ? #446

CocDap opened this issue Jun 18, 2021 · 2 comments

Comments

@CocDap
Copy link

CocDap commented Jun 18, 2021

When I read recipes code or others substrate code. I saw that in every pallets has types.json. types.json contains information about storage when we declare in decl_module!. I dont know how to generate it (Although I find and know a file " aggrerate_types.json" that generate types.json, I dont how to execute that file )

Can anyone help me and explain why we generate that files and what we do? Thanks you so much

@JoshOrndorff
Copy link
Owner

JoshOrndorff commented Jun 18, 2021

In recipes they aren't generated; they are written by hand. I don't know of a general process to generate them. But here is some info about how to convert your own Rust types into the corresponding json type definitions.

https://polkadot.js.org/docs/api/start/types.basics
https://polkadot.js.org/docs/api/start/types.extend

https://github.com/polkadot-js/apps/blob/master/packages/page-settings/src/md/basics.md#developer

@CocDap
Copy link
Author

CocDap commented Jun 19, 2021

Thanks for replying soon. Thank you very much

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

No branches or pull requests

2 participants