@@ -145,7 +145,7 @@ pub type OriginOf<E, C> = <CallOf<E, C> as Dispatchable>::Origin;
145
145
/// Main entry point for certain runtime actions as e.g. `execute_block`.
146
146
///
147
147
/// Generic parameters:
148
- /// - `System`: Something that implements `frame_system::Trait `
148
+ /// - `System`: Something that implements `frame_system::Config `
149
149
/// - `Block`: The block type of the runtime
150
150
/// - `Context`: The context that is used when checking an extrinsic.
151
151
/// - `UnsignedValidator`: The unsigned transaction validator of the runtime.
@@ -158,7 +158,7 @@ pub struct Executive<System, Block, Context, UnsignedValidator, AllModules, OnRu
158
158
) ;
159
159
160
160
impl <
161
- System : frame_system:: Trait ,
161
+ System : frame_system:: Config ,
162
162
Block : traits:: Block < Header =System :: Header , Hash =System :: Hash > ,
163
163
Context : Default ,
164
164
UnsignedValidator ,
@@ -185,7 +185,7 @@ where
185
185
}
186
186
187
187
impl <
188
- System : frame_system:: Trait ,
188
+ System : frame_system:: Config ,
189
189
Block : traits:: Block < Header =System :: Header , Hash =System :: Hash > ,
190
190
Context : Default ,
191
191
UnsignedValidator ,
@@ -505,10 +505,10 @@ mod tests {
505
505
UnknownTransaction , TransactionSource , TransactionValidity
506
506
} ;
507
507
508
- pub trait Trait : frame_system:: Trait { }
508
+ pub trait Config : frame_system:: Config { }
509
509
510
510
frame_support:: decl_module! {
511
- pub struct Module <T : Trait > for enum Call where origin: T :: Origin {
511
+ pub struct Module <T : Config > for enum Call where origin: T :: Origin {
512
512
#[ weight = 100 ]
513
513
fn some_function( origin) {
514
514
// NOTE: does not make any different.
@@ -555,7 +555,7 @@ mod tests {
555
555
}
556
556
}
557
557
558
- impl < T : Trait > sp_runtime:: traits:: ValidateUnsigned for Module < T > {
558
+ impl < T : Config > sp_runtime:: traits:: ValidateUnsigned for Module < T > {
559
559
type Call = Call < T > ;
560
560
561
561
fn validate_unsigned (
@@ -594,7 +594,7 @@ mod tests {
594
594
write: 100 ,
595
595
} ;
596
596
}
597
- impl frame_system:: Trait for Runtime {
597
+ impl frame_system:: Config for Runtime {
598
598
type BaseCallFilter = ( ) ;
599
599
type Origin = Origin ;
600
600
type Index = u64 ;
@@ -626,7 +626,7 @@ mod tests {
626
626
parameter_types ! {
627
627
pub const ExistentialDeposit : Balance = 1 ;
628
628
}
629
- impl pallet_balances:: Trait for Runtime {
629
+ impl pallet_balances:: Config for Runtime {
630
630
type Balance = Balance ;
631
631
type Event = Event ;
632
632
type DustRemoval = ( ) ;
@@ -639,13 +639,13 @@ mod tests {
639
639
parameter_types ! {
640
640
pub const TransactionByteFee : Balance = 0 ;
641
641
}
642
- impl pallet_transaction_payment:: Trait for Runtime {
642
+ impl pallet_transaction_payment:: Config for Runtime {
643
643
type OnChargeTransaction = CurrencyAdapter < Balances , ( ) > ;
644
644
type TransactionByteFee = TransactionByteFee ;
645
645
type WeightToFee = IdentityFee < Balance > ;
646
646
type FeeMultiplierUpdate = ( ) ;
647
647
}
648
- impl custom:: Trait for Runtime { }
648
+ impl custom:: Config for Runtime { }
649
649
650
650
pub struct RuntimeVersion ;
651
651
impl frame_support:: traits:: Get < sp_version:: RuntimeVersion > for RuntimeVersion {
@@ -668,8 +668,8 @@ mod tests {
668
668
type TestXt = sp_runtime:: testing:: TestXt < Call , SignedExtra > ;
669
669
type TestBlock = Block < TestXt > ;
670
670
type TestUncheckedExtrinsic = sp_runtime:: generic:: UncheckedExtrinsic <
671
- <Runtime as frame_system:: Trait >:: AccountId ,
672
- <Runtime as frame_system:: Trait >:: Call ,
671
+ <Runtime as frame_system:: Config >:: AccountId ,
672
+ <Runtime as frame_system:: Config >:: Call ,
673
673
( ) ,
674
674
SignedExtra ,
675
675
> ;
@@ -715,9 +715,9 @@ mod tests {
715
715
balances : vec ! [ ( 1 , 211 ) ] ,
716
716
} . assimilate_storage ( & mut t) . unwrap ( ) ;
717
717
let xt = TestXt :: new ( Call :: Balances ( BalancesCall :: transfer ( 2 , 69 ) ) , sign_extra ( 1 , 0 , 0 ) ) ;
718
- let weight = xt. get_dispatch_info ( ) . weight + <Runtime as frame_system:: Trait >:: ExtrinsicBaseWeight :: get ( ) ;
718
+ let weight = xt. get_dispatch_info ( ) . weight + <Runtime as frame_system:: Config >:: ExtrinsicBaseWeight :: get ( ) ;
719
719
let fee: Balance
720
- = <Runtime as pallet_transaction_payment:: Trait >:: WeightToFee :: calc ( & weight) ;
720
+ = <Runtime as pallet_transaction_payment:: Config >:: WeightToFee :: calc ( & weight) ;
721
721
let mut t = sp_io:: TestExternalities :: new ( t) ;
722
722
t. execute_with ( || {
723
723
Executive :: initialize_block ( & Header :: new (
@@ -818,7 +818,7 @@ mod tests {
818
818
let encoded = xt. encode ( ) ;
819
819
let encoded_len = encoded. len ( ) as Weight ;
820
820
// on_initialize weight + block execution weight
821
- let base_block_weight = 175 + <Runtime as frame_system:: Trait >:: BlockExecutionWeight :: get ( ) ;
821
+ let base_block_weight = 175 + <Runtime as frame_system:: Config >:: BlockExecutionWeight :: get ( ) ;
822
822
let limit = AvailableBlockRatio :: get ( ) * MaximumBlockWeight :: get ( ) - base_block_weight;
823
823
let num_to_exhaust_block = limit / ( encoded_len + 5 ) ;
824
824
t. execute_with ( || {
@@ -861,7 +861,7 @@ mod tests {
861
861
let mut t = new_test_ext ( 1 ) ;
862
862
t. execute_with ( || {
863
863
// Block execution weight + on_initialize weight from custom module
864
- let base_block_weight = 175 + <Runtime as frame_system:: Trait >:: BlockExecutionWeight :: get ( ) ;
864
+ let base_block_weight = 175 + <Runtime as frame_system:: Config >:: BlockExecutionWeight :: get ( ) ;
865
865
866
866
Executive :: initialize_block ( & Header :: new (
867
867
1 ,
@@ -879,7 +879,7 @@ mod tests {
879
879
assert ! ( Executive :: apply_extrinsic( x2. clone( ) ) . unwrap( ) . is_ok( ) ) ;
880
880
881
881
// default weight for `TestXt` == encoded length.
882
- let extrinsic_weight = len as Weight + <Runtime as frame_system:: Trait >:: ExtrinsicBaseWeight :: get ( ) ;
882
+ let extrinsic_weight = len as Weight + <Runtime as frame_system:: Config >:: ExtrinsicBaseWeight :: get ( ) ;
883
883
assert_eq ! (
884
884
<frame_system:: Module <Runtime >>:: block_weight( ) . total( ) ,
885
885
base_block_weight + 3 * extrinsic_weight,
@@ -946,9 +946,9 @@ mod tests {
946
946
sign_extra ( 1 , 0 , 0 ) ,
947
947
) ;
948
948
let weight = xt. get_dispatch_info ( ) . weight
949
- + <Runtime as frame_system:: Trait >:: ExtrinsicBaseWeight :: get ( ) ;
949
+ + <Runtime as frame_system:: Config >:: ExtrinsicBaseWeight :: get ( ) ;
950
950
let fee: Balance =
951
- <Runtime as pallet_transaction_payment:: Trait >:: WeightToFee :: calc ( & weight) ;
951
+ <Runtime as pallet_transaction_payment:: Config >:: WeightToFee :: calc ( & weight) ;
952
952
Executive :: initialize_block ( & Header :: new (
953
953
1 ,
954
954
H256 :: default ( ) ,
@@ -1106,7 +1106,7 @@ mod tests {
1106
1106
let runtime_upgrade_weight = <AllModules as OnRuntimeUpgrade >:: on_runtime_upgrade ( ) ;
1107
1107
let frame_system_on_initialize_weight = frame_system:: Module :: < Runtime > :: on_initialize ( block_number) ;
1108
1108
let on_initialize_weight = <AllModules as OnInitialize < u64 > >:: on_initialize ( block_number) ;
1109
- let base_block_weight = <Runtime as frame_system:: Trait >:: BlockExecutionWeight :: get ( ) ;
1109
+ let base_block_weight = <Runtime as frame_system:: Config >:: BlockExecutionWeight :: get ( ) ;
1110
1110
1111
1111
// Weights are recorded correctly
1112
1112
assert_eq ! (
0 commit comments