-
Notifications
You must be signed in to change notification settings - Fork 699
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
#[disable_frame_system_supertrait_check]
doesn't seem to work as expected
#3535
Comments
I was initially tripped by this too, but I think it is all correct. My mistake was also to naively think that What For example, you can have things like:
You can then write Or, if you tightly couple to another a pallet, and the other pallet is already bounded by Can you post this in SE as well please, if no similar previous question exists? And I will asap write paritytech/polkadot-sdk-docs#76 |
OK this makes a tonne of sense, thanks! I've updated the documentation to address this in #2638. Not sure if a SE post is required if it's explained in the docs, but happy to create one if you think it would still be valuable :) |
We already do have a pallet in tests without
It exposes a prelude and adds a few items in the config. I imagine the similar changes would help here. If so, agreed that it would be good to get the docs updated. |
If this is possible, could |
substrate.io deprecation companion: polkadot-developers/substrate-docs#2139 pba-content companion: Polkadot-Blockchain-Academy/pba-content#978 partially inspired by: #3535 --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
substrate.io deprecation companion: polkadot-developers/substrate-docs#2139 pba-content companion: Polkadot-Blockchain-Academy/pba-content#978 partially inspired by: paritytech#3535 --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
As you already found out, this is not the purpose of this macro. The linked "pallet" is also a test and nothing that should be repeated in the real world. FRAME expects that every runtime has the system pallet and that the config is a super trait. This is backed deeply into the entire FRAME macro machinery etc and nothing we want/can change. |
I expect to be able to write a simple pallet where the config doesn't depend on frame_system::Config like this:
Instead, it fails to compile
See my branch to reproduce https://github.com/liamaharon/substrate-node-template/blob/liam-disable-supertrait-issue/pallets/template/src/lib.rs
Is there something wrong with my pallet, or is this a bug with the macro?
The text was updated successfully, but these errors were encountered: