@@ -85,6 +85,34 @@ mod benchmarking;
85
85
type BalanceOf < T > = <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance ;
86
86
type NegativeImbalanceOf < T > = <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: NegativeImbalance ;
87
87
88
+ pub trait WeightInfo {
89
+ fn add_registrar ( r : u32 , ) -> Weight ;
90
+ fn set_identity ( r : u32 , x : u32 , ) -> Weight ;
91
+ fn set_subs ( p : u32 , s : u32 , ) -> Weight ;
92
+ fn clear_identity ( r : u32 , s : u32 , x : u32 , ) -> Weight ;
93
+ fn request_judgement ( r : u32 , x : u32 , ) -> Weight ;
94
+ fn cancel_request ( r : u32 , x : u32 , ) -> Weight ;
95
+ fn set_fee ( r : u32 , ) -> Weight ;
96
+ fn set_account_id ( r : u32 , ) -> Weight ;
97
+ fn set_fields ( r : u32 , ) -> Weight ;
98
+ fn provide_judgement ( r : u32 , x : u32 , ) -> Weight ;
99
+ fn kill_identity ( r : u32 , s : u32 , x : u32 , ) -> Weight ;
100
+ }
101
+
102
+ impl WeightInfo for ( ) {
103
+ fn add_registrar ( _r : u32 , ) -> Weight { 1_000_000_000 }
104
+ fn set_identity ( _r : u32 , _x : u32 , ) -> Weight { 1_000_000_000 }
105
+ fn set_subs ( _p : u32 , _s : u32 , ) -> Weight { 1_000_000_000 }
106
+ fn clear_identity ( _r : u32 , _s : u32 , _x : u32 , ) -> Weight { 1_000_000_000 }
107
+ fn request_judgement ( _r : u32 , _x : u32 , ) -> Weight { 1_000_000_000 }
108
+ fn cancel_request ( _r : u32 , _x : u32 , ) -> Weight { 1_000_000_000 }
109
+ fn set_fee ( _r : u32 , ) -> Weight { 1_000_000_000 }
110
+ fn set_account_id ( _r : u32 , ) -> Weight { 1_000_000_000 }
111
+ fn set_fields ( _r : u32 , ) -> Weight { 1_000_000_000 }
112
+ fn provide_judgement ( _r : u32 , _x : u32 , ) -> Weight { 1_000_000_000 }
113
+ fn kill_identity ( _r : u32 , _s : u32 , _x : u32 , ) -> Weight { 1_000_000_000 }
114
+ }
115
+
88
116
pub trait Trait : frame_system:: Trait {
89
117
/// The overarching event type.
90
118
type Event : From < Event < Self > > + Into < <Self as frame_system:: Trait >:: Event > ;
@@ -122,6 +150,9 @@ pub trait Trait: frame_system::Trait {
122
150
123
151
/// The origin which may add or remove registrars. Root can always do this.
124
152
type RegistrarOrigin : EnsureOrigin < Self :: Origin > ;
153
+
154
+ /// Weight information for extrinsics in this pallet.
155
+ type WeightInfo : WeightInfo ;
125
156
}
126
157
127
158
/// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater
@@ -1198,6 +1229,7 @@ mod tests {
1198
1229
type AccountData = pallet_balances:: AccountData < u64 > ;
1199
1230
type OnNewAccount = ( ) ;
1200
1231
type OnKilledAccount = ( ) ;
1232
+ type SystemWeightInfo = ( ) ;
1201
1233
}
1202
1234
parameter_types ! {
1203
1235
pub const ExistentialDeposit : u64 = 1 ;
@@ -1208,6 +1240,7 @@ mod tests {
1208
1240
type DustRemoval = ( ) ;
1209
1241
type ExistentialDeposit = ExistentialDeposit ;
1210
1242
type AccountStore = System ;
1243
+ type WeightInfo = ( ) ;
1211
1244
}
1212
1245
parameter_types ! {
1213
1246
pub const BasicDeposit : u64 = 10 ;
@@ -1243,6 +1276,7 @@ mod tests {
1243
1276
type MaxRegistrars = MaxRegistrars ;
1244
1277
type RegistrarOrigin = EnsureOneOrRoot ;
1245
1278
type ForceOrigin = EnsureTwoOrRoot ;
1279
+ type WeightInfo = ( ) ;
1246
1280
}
1247
1281
type System = frame_system:: Module < Test > ;
1248
1282
type Balances = pallet_balances:: Module < Test > ;
0 commit comments