Open gupnik opened 1 month ago
As @kianenigma suggested in this comment, we should be able to provide custom default configs and use derive_impl to share those across runtimes.
derive_impl
The following could be possible way:
pub trait CustomDefaultConfigProvider { type RuntimeOrigin; type RuntimeCall; type RuntimeTask; } pub struct CustomDefaultConfig; #[crate::register_default_impl(CustomDefaultConfig)] impl CustomDefaultConfigProvider for CustomDefaultConfig { #[inject_runtime_type] type RuntimeOrigin = (); #[inject_runtime_type] type RuntimeCall = (); #[inject_runtime_type] type RuntimeTask = (); } struct Runtime; #[derive_impl(CustomDefaultConfig, no_aggregated_types) impl Config for Runtime {}
If this works, we should add some documentation (ideally using docify) on how to use it.
IMO What we foremost need is to be able to use these macros outside of the frame::pallet umbrella.
frame::pallet
As @kianenigma suggested in this comment, we should be able to provide custom default configs and use
derive_impl
to share those across runtimes.The following could be possible way:
If this works, we should add some documentation (ideally using docify) on how to use it.