@@ -43,7 +43,7 @@ use frame_support::{
43
43
decl_module, decl_event, decl_error, decl_storage, Parameter , ensure, traits:: {
44
44
Get , ReservableCurrency , Currency , InstanceFilter ,
45
45
OriginTrait , IsType ,
46
- } , weights:: { GetDispatchInfo , constants:: { WEIGHT_PER_MICROS , WEIGHT_PER_NANOS } } ,
46
+ } , weights:: { Weight , GetDispatchInfo , constants:: { WEIGHT_PER_MICROS , WEIGHT_PER_NANOS } } ,
47
47
dispatch:: { PostDispatchInfo , IsSubType } ,
48
48
} ;
49
49
use frame_system:: { self as system, ensure_signed} ;
@@ -53,6 +53,24 @@ mod benchmarking;
53
53
54
54
type BalanceOf < T > = <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance ;
55
55
56
+ pub trait WeightInfo {
57
+ fn proxy ( p : u32 , ) -> Weight ;
58
+ fn add_proxy ( p : u32 , ) -> Weight ;
59
+ fn remove_proxy ( p : u32 , ) -> Weight ;
60
+ fn remove_proxies ( p : u32 , ) -> Weight ;
61
+ fn anonymous ( p : u32 , ) -> Weight ;
62
+ fn kill_anonymous ( p : u32 , ) -> Weight ;
63
+ }
64
+
65
+ impl WeightInfo for ( ) {
66
+ fn proxy ( _p : u32 , ) -> Weight { 1_000_000_000 }
67
+ fn add_proxy ( _p : u32 , ) -> Weight { 1_000_000_000 }
68
+ fn remove_proxy ( _p : u32 , ) -> Weight { 1_000_000_000 }
69
+ fn remove_proxies ( _p : u32 , ) -> Weight { 1_000_000_000 }
70
+ fn anonymous ( _p : u32 , ) -> Weight { 1_000_000_000 }
71
+ fn kill_anonymous ( _p : u32 , ) -> Weight { 1_000_000_000 }
72
+ }
73
+
56
74
/// Configuration trait.
57
75
pub trait Trait : frame_system:: Trait {
58
76
/// The overarching event type.
@@ -87,6 +105,9 @@ pub trait Trait: frame_system::Trait {
87
105
88
106
/// The maximum amount of proxies allowed for a single account.
89
107
type MaxProxies : Get < u16 > ;
108
+
109
+ /// Weight information for extrinsics in this pallet.
110
+ type WeightInfo : WeightInfo ;
90
111
}
91
112
92
113
decl_storage ! {
0 commit comments