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

Ideas #1

Open
4 tasks
shawntabrizi opened this issue Nov 30, 2023 · 1 comment
Open
4 tasks

Ideas #1

shawntabrizi opened this issue Nov 30, 2023 · 1 comment

Comments

@shawntabrizi
Copy link
Owner

shawntabrizi commented Nov 30, 2023

  • Have the user make the project no_std
  • Build a storage layer using kvdb
  • Check nonce with transactions
  • show how users can use Type = u32 or similar patterns to bypass all the generics within the context of a pallet
@kianenigma
Copy link

show how users can use Type = u32 or similar patterns to bypass all the generics within the context of a pallet

The broad idea that we want people to learn is how to "dumb-down" FRAME such that they can be free from all the genericity, if it is not relevant.

One way to achieve this is to rewrite FRAME or parts of it, what we called a major ravamp of the whole system.

But we should first try and see how far we can get by just leveraging Rust syntax, for example your suggestion for <type = u32> aka. what is known as constrained associated type in Rust.

AssetId is an example where this trick worked. BlockNumber is one where it didn't, but I am still trying to find the right combination of Rust syntax for it. I will keep dumping further ideas along this line here.

PS. https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/trait_based_programming/index.html is a relevant article in polkadot-sdk-docs.

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