1919
2020use sp_runtime:: { generic, BuildStorage , traits:: { BlakeTwo256 , Verify } } ;
2121use frame_support:: {
22- Parameter , traits:: Get , parameter_types,
22+ Parameter , traits:: Get , parameter_types, decl_construct_runtime_args ,
2323 metadata:: {
2424 DecodeDifferent , StorageMetadata , StorageEntryModifier , StorageEntryType , DefaultByteGetter ,
2525 StorageEntryMetadata , StorageHasher ,
@@ -118,6 +118,8 @@ mod module1 {
118118mod module2 {
119119 use super :: * ;
120120
121+ decl_construct_runtime_args ! ( Module , Call , Storage , Config <T >, Event <T >, Origin <T >, Inherent ) ;
122+
121123 pub trait Trait < I =DefaultInstance > : system:: Trait {
122124 type Amount : Parameter + Default ;
123125 type Event : From < Event < Self , I > > + Into < <Self as system:: Trait >:: Event > ;
@@ -243,7 +245,7 @@ impl system::Trait for Runtime {
243245 type Call = Call ;
244246}
245247
246- frame_support:: construct_runtime!(
248+ frame_support:: construct_runtime!( # [ local_macro ( module2 ) ]
247249 pub enum Runtime where
248250 Block = Block ,
249251 NodeBlock = Block ,
@@ -256,16 +258,10 @@ frame_support::construct_runtime!(
256258 Module1_2 : module1:: <Instance2 >:: {
257259 Module , Call , Storage , Event <T >, Config <T >, Origin <T >, Inherent
258260 } ,
259- Module2 : module2:: { Module , Call , Storage , Event <T >, Config <T >, Origin <T >, Inherent } ,
260- Module2_1 : module2:: <Instance1 >:: {
261- Module , Call , Storage , Event <T >, Config <T >, Origin <T >, Inherent
262- } ,
263- Module2_2 : module2:: <Instance2 >:: {
264- Module , Call , Storage , Event <T >, Config <T >, Origin <T >, Inherent
265- } ,
266- Module2_3 : module2:: <Instance3 >:: {
267- Module , Call , Storage , Event <T >, Config <T >, Origin <T >, Inherent
268- } ,
261+ Module2 : module2,
262+ Module2_1 : module2:: <Instance1 >,
263+ Module2_2 : module2:: <Instance2 >,
264+ Module2_3 : module2:: <Instance3 >,
269265 Module3 : module3:: { Module , Call } ,
270266 }
271267) ;
0 commit comments