Open
Description
There are common types defined within the config of different pallets, such as:
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
type Call: IsType<<Self as frame_system::Config>::Call>
+ Dispatchable<Origin = Self::Origin, PostInfo = PostDispatchInfo>
+ GetDispatchInfo
+ FullCodec
+ From<frame_system::Call<Self>>;
type Origin: From<RawOrigin<Self::AccountId, I>>;
etc...
All of these types have some complicated traits which are expected from the construct_runtime!
macro, and often the user struggles to define all those types when doing runtime development.
We could simply wrap all of these traits in a simple to understand trait exposed in frame_support like:
trait FrameCall: IsType<<Self as frame_system::Config>::Call>
+ Dispatchable<Origin = Self::Origin, PostInfo = PostDispatchInfo>
+ GetDispatchInfo
+ FullCodec
+ From<frame_system::Call<Self>>
{}
Then simply define:
type Call: frame_support::FrameCall
or something like that.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog