This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -948,6 +948,7 @@ impl pallet_democracy::Config for Runtime {
948
948
/// (NTB) vote.
949
949
type ExternalDefaultOrigin =
950
950
pallet_collective:: EnsureProportionAtLeast < AccountId , CouncilCollective , 1 , 1 > ;
951
+ type SubmitOrigin = EnsureSigned < AccountId > ;
951
952
/// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote
952
953
/// be tabled immediately and with a shorter voting/enactment period.
953
954
type FastTrackOrigin =
Original file line number Diff line number Diff line change @@ -308,6 +308,11 @@ pub mod pallet {
308
308
/// of a negative-turnout-bias (default-carries) referendum.
309
309
type ExternalDefaultOrigin : EnsureOrigin < Self :: RuntimeOrigin > ;
310
310
311
+ /// Origin from which the new proposal can be made.
312
+ ///
313
+ /// The success variant is the account id of the depositor.
314
+ type SubmitOrigin : EnsureOrigin < Self :: RuntimeOrigin , Success = Self :: AccountId > ;
315
+
311
316
/// Origin from which the next majority-carries (or more permissive) referendum may be
312
317
/// tabled to vote according to the `FastTrackVotingPeriod` asynchronously in a similar
313
318
/// manner to the emergency origin. It retains its threshold method.
@@ -590,7 +595,7 @@ pub mod pallet {
590
595
proposal : BoundedCallOf < T > ,
591
596
#[ pallet:: compact] value : BalanceOf < T > ,
592
597
) -> DispatchResult {
593
- let who = ensure_signed ( origin) ?;
598
+ let who = T :: SubmitOrigin :: ensure_origin ( origin) ?;
594
599
ensure ! ( value >= T :: MinimumDeposit :: get( ) , Error :: <T >:: ValueLow ) ;
595
600
596
601
let index = Self :: public_prop_count ( ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ use frame_support::{
27
27
} ,
28
28
weights:: Weight ,
29
29
} ;
30
- use frame_system:: { EnsureRoot , EnsureSignedBy } ;
30
+ use frame_system:: { EnsureRoot , EnsureSigned , EnsureSignedBy } ;
31
31
use pallet_balances:: { BalanceLock , Error as BalancesError } ;
32
32
use sp_core:: H256 ;
33
33
use sp_runtime:: {
@@ -177,6 +177,7 @@ impl Config for Test {
177
177
type MinimumDeposit = ConstU64 < 1 > ;
178
178
type MaxDeposits = ConstU32 < 1000 > ;
179
179
type MaxBlacklisted = ConstU32 < 5 > ;
180
+ type SubmitOrigin = EnsureSigned < Self :: AccountId > ;
180
181
type ExternalOrigin = EnsureSignedBy < Two , u64 > ;
181
182
type ExternalMajorityOrigin = EnsureSignedBy < Three , u64 > ;
182
183
type ExternalDefaultOrigin = EnsureSignedBy < One , u64 > ;
You can’t perform that action at this time.
0 commit comments