@@ -84,7 +84,7 @@ pub use benchmarking::ArgumentsFactory;
8484
8585extern crate alloc;
8686
87- use codec:: { Decode , Encode , MaxEncodedLen } ;
87+ use codec:: { Decode , DecodeWithMemTracking , Encode , MaxEncodedLen } ;
8888use scale_info:: TypeInfo ;
8989
9090use alloc:: { boxed:: Box , collections:: btree_map:: BTreeMap } ;
@@ -151,21 +151,41 @@ pub type ProposalIndex = u32;
151151
152152/// A spending proposal.
153153#[ cfg_attr( feature = "std" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
154- #[ derive( Encode , Decode , Clone , PartialEq , Eq , MaxEncodedLen , RuntimeDebug , TypeInfo ) ]
154+ #[ derive(
155+ Encode ,
156+ Decode ,
157+ DecodeWithMemTracking ,
158+ Clone ,
159+ PartialEq ,
160+ Eq ,
161+ MaxEncodedLen ,
162+ RuntimeDebug ,
163+ TypeInfo ,
164+ ) ]
155165pub struct Proposal < AccountId , Balance > {
156166 /// The account proposing it.
157- proposer : AccountId ,
167+ pub proposer : AccountId ,
158168 /// The (total) amount that should be paid if the proposal is accepted.
159- value : Balance ,
169+ pub value : Balance ,
160170 /// The account to whom the payment should be made if the proposal is accepted.
161- beneficiary : AccountId ,
171+ pub beneficiary : AccountId ,
162172 /// The amount held on deposit (reserved) for making this proposal.
163- bond : Balance ,
173+ pub bond : Balance ,
164174}
165175
166176/// The state of the payment claim.
167177#[ cfg_attr( feature = "std" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
168- #[ derive( Encode , Decode , Clone , PartialEq , Eq , MaxEncodedLen , RuntimeDebug , TypeInfo ) ]
178+ #[ derive(
179+ Encode ,
180+ Decode ,
181+ DecodeWithMemTracking ,
182+ Clone ,
183+ PartialEq ,
184+ Eq ,
185+ MaxEncodedLen ,
186+ RuntimeDebug ,
187+ TypeInfo ,
188+ ) ]
169189pub enum PaymentState < Id > {
170190 /// Pending claim.
171191 Pending ,
@@ -177,20 +197,30 @@ pub enum PaymentState<Id> {
177197
178198/// Info regarding an approved treasury spend.
179199#[ cfg_attr( feature = "std" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
180- #[ derive( Encode , Decode , Clone , PartialEq , Eq , MaxEncodedLen , RuntimeDebug , TypeInfo ) ]
200+ #[ derive(
201+ Encode ,
202+ Decode ,
203+ DecodeWithMemTracking ,
204+ Clone ,
205+ PartialEq ,
206+ Eq ,
207+ MaxEncodedLen ,
208+ RuntimeDebug ,
209+ TypeInfo ,
210+ ) ]
181211pub struct SpendStatus < AssetKind , AssetBalance , Beneficiary , BlockNumber , PaymentId > {
182212 // The kind of asset to be spent.
183- asset_kind : AssetKind ,
213+ pub asset_kind : AssetKind ,
184214 /// The asset amount of the spend.
185- amount : AssetBalance ,
215+ pub amount : AssetBalance ,
186216 /// The beneficiary of the spend.
187- beneficiary : Beneficiary ,
217+ pub beneficiary : Beneficiary ,
188218 /// The block number from which the spend can be claimed.
189- valid_from : BlockNumber ,
219+ pub valid_from : BlockNumber ,
190220 /// The block number by which the spend has to be claimed.
191- expire_at : BlockNumber ,
221+ pub expire_at : BlockNumber ,
192222 /// The status of the payout/claim.
193- status : PaymentState < PaymentId > ,
223+ pub status : PaymentState < PaymentId > ,
194224}
195225
196226/// Index of an approved treasury spend.
0 commit comments