Skip to content

[FRAME] pallet using tasks should automatically bound frame_system::Config<RuntimeTask: From<Task>>. #6462

@gui1117

Description

@gui1117

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

Metadata

Metadata

Assignees

Labels

I5-enhancementAn additional feature request.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions