File tree 2 files changed +21
-0
lines changed
substrate/frame/treasury/src
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
2
+ # See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
3
+
4
+ title: "Add an extra_constant to pallet-treasury"
5
+
6
+ doc:
7
+ - audience: Runtime Dev
8
+ description: |
9
+ - Allows to query pallet-treasury's pot account via extra constant.
10
+
11
+ crates:
12
+ - name: pallet-treasury
13
+ bump: minor
Original file line number Diff line number Diff line change @@ -289,6 +289,14 @@ pub mod pallet {
289
289
type BlockNumberProvider : BlockNumberProvider ;
290
290
}
291
291
292
+ #[ pallet:: extra_constants]
293
+ impl < T : Config < I > , I : ' static > Pallet < T , I > {
294
+ /// Gets this pallet's derived pot account.
295
+ fn pot_account ( ) -> T :: AccountId {
296
+ Self :: account_id ( )
297
+ }
298
+ }
299
+
292
300
/// DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
293
301
/// Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
294
302
///
You can’t perform that action at this time.
0 commit comments