@@ -28,7 +28,7 @@ use sp_runtime::traits::{
28
28
use frame_support:: { Parameter , decl_module, decl_error, decl_event, decl_storage, ensure} ;
29
29
use frame_support:: dispatch:: DispatchResult ;
30
30
use frame_support:: traits:: { Currency , ReservableCurrency , Get , BalanceStatus :: Reserved } ;
31
- use frame_support:: weights:: constants:: WEIGHT_PER_MICROS ;
31
+ use frame_support:: weights:: { Weight , constants:: WEIGHT_PER_MICROS } ;
32
32
use frame_system:: { ensure_signed, ensure_root} ;
33
33
use self :: address:: Address as RawAddress ;
34
34
@@ -40,6 +40,22 @@ mod benchmarking;
40
40
pub type Address < T > = RawAddress < <T as frame_system:: Trait >:: AccountId , <T as Trait >:: AccountIndex > ;
41
41
type BalanceOf < T > = <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance ;
42
42
43
+ pub trait WeightInfo {
44
+ fn claim ( i : u32 , ) -> Weight ;
45
+ fn transfer ( i : u32 , ) -> Weight ;
46
+ fn free ( i : u32 , ) -> Weight ;
47
+ fn force_transfer ( i : u32 , ) -> Weight ;
48
+ fn freeze ( i : u32 , ) -> Weight ;
49
+ }
50
+
51
+ impl WeightInfo for ( ) {
52
+ fn claim ( _i : u32 , ) -> Weight { 1_000_000_000 }
53
+ fn transfer ( _i : u32 , ) -> Weight { 1_000_000_000 }
54
+ fn free ( _i : u32 , ) -> Weight { 1_000_000_000 }
55
+ fn force_transfer ( _i : u32 , ) -> Weight { 1_000_000_000 }
56
+ fn freeze ( _i : u32 , ) -> Weight { 1_000_000_000 }
57
+ }
58
+
43
59
/// The module's config trait.
44
60
pub trait Trait : frame_system:: Trait {
45
61
/// Type used for storing an account's index; implies the maximum number of accounts the system
@@ -54,6 +70,9 @@ pub trait Trait: frame_system::Trait {
54
70
55
71
/// The overarching event type.
56
72
type Event : From < Event < Self > > + Into < <Self as frame_system:: Trait >:: Event > ;
73
+
74
+ /// Weight information for extrinsics in this pallet.
75
+ type WeightInfo : WeightInfo ;
57
76
}
58
77
59
78
decl_storage ! {
0 commit comments