pallet using tasks (#[pallet::tasks_experimental]) needs to bound From<Task> to system runtime tasks. The macro should automatically bound it in the pallet config supertrait.
In rust we can bound multiple time the same supertrait AFAIR, so we can just have the macro add: frame_system::Config<RuntimeTask: From<Task>> to the pallet Config trait.
This will not work for the system pallet. I think we can have a new attribute to notify the macro that a pallet is system pallet, and the macro would generate differently in this case. This new attribute can be: #[pallet::is_frame_system].
The same process can be used to get rid of the associated type RuntimeEvent in pallets.
cc @gupnik
pallet using tasks (
#[pallet::tasks_experimental]) needs to boundFrom<Task>to system runtime tasks. The macro should automatically bound it in the pallet config supertrait.In rust we can bound multiple time the same supertrait AFAIR, so we can just have the macro add:
frame_system::Config<RuntimeTask: From<Task>>to the palletConfigtrait.This will not work for the system pallet. I think we can have a new attribute to notify the macro that a pallet is system pallet, and the macro would generate differently in this case. This new attribute can be:
#[pallet::is_frame_system].The same process can be used to get rid of the associated type
RuntimeEventin pallets.cc @gupnik