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

Examples of how to use please #38

Open
gilescope opened this issue Apr 26, 2022 · 2 comments
Open

Examples of how to use please #38

gilescope opened this issue Apr 26, 2022 · 2 comments
Assignees

Comments

@gilescope
Copy link
Contributor

As a dev,
Given I want to make cool stuff in polkadot,
When I go to the repo,
Then I expect to see a good example of

  • how to decode bytes to a type statically ( storage, event, extrinsic )
  • how to decode bytes to some dynamic structure (or can we do rust amazing trick of visit the bytes without decoding / borrowing bits using lifetimes?)
  • how to encode something to bytes (I think people will have the least difficulty with this).

We have docs at many levels but some well placed examples here would go a long way. Either on the readme or in an examples dir would be where I would be looking for these.

@ascjones
Copy link
Contributor

This is a long standing issue assigned to me, see polkadot-developers/substrate-docs#385 and use-ink/ink#940.

I suppose I'd better get on it.

@ascjones ascjones self-assigned this Apr 26, 2022
@gilescope
Copy link
Contributor Author

Pointers to example use cases might be enough... for the dynamic decoding case https://docs.rs/desub-current/latest/desub_current/value/index.html is maybe a good example of using frame-metadata?

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