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 {
948948 /// (NTB) vote.
949949 type ExternalDefaultOrigin =
950950 pallet_collective:: EnsureProportionAtLeast < AccountId , CouncilCollective , 1 , 1 > ;
951+ type SubmitOrigin = EnsureSigned < AccountId > ;
951952 /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote
952953 /// be tabled immediately and with a shorter voting/enactment period.
953954 type FastTrackOrigin =
Original file line number Diff line number Diff line change @@ -308,6 +308,11 @@ pub mod pallet {
308308 /// of a negative-turnout-bias (default-carries) referendum.
309309 type ExternalDefaultOrigin : EnsureOrigin < Self :: RuntimeOrigin > ;
310310
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+
311316 /// Origin from which the next majority-carries (or more permissive) referendum may be
312317 /// tabled to vote according to the `FastTrackVotingPeriod` asynchronously in a similar
313318 /// manner to the emergency origin. It retains its threshold method.
@@ -590,7 +595,7 @@ pub mod pallet {
590595 proposal : BoundedCallOf < T > ,
591596 #[ pallet:: compact] value : BalanceOf < T > ,
592597 ) -> DispatchResult {
593- let who = ensure_signed ( origin) ?;
598+ let who = T :: SubmitOrigin :: ensure_origin ( origin) ?;
594599 ensure ! ( value >= T :: MinimumDeposit :: get( ) , Error :: <T >:: ValueLow ) ;
595600
596601 let index = Self :: public_prop_count ( ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ use frame_support::{
2727 } ,
2828 weights:: Weight ,
2929} ;
30- use frame_system:: { EnsureRoot , EnsureSignedBy } ;
30+ use frame_system:: { EnsureRoot , EnsureSigned , EnsureSignedBy } ;
3131use pallet_balances:: { BalanceLock , Error as BalancesError } ;
3232use sp_core:: H256 ;
3333use sp_runtime:: {
@@ -177,6 +177,7 @@ impl Config for Test {
177177 type MinimumDeposit = ConstU64 < 1 > ;
178178 type MaxDeposits = ConstU32 < 1000 > ;
179179 type MaxBlacklisted = ConstU32 < 5 > ;
180+ type SubmitOrigin = EnsureSigned < Self :: AccountId > ;
180181 type ExternalOrigin = EnsureSignedBy < Two , u64 > ;
181182 type ExternalMajorityOrigin = EnsureSignedBy < Three , u64 > ;
182183 type ExternalDefaultOrigin = EnsureSignedBy < One , u64 > ;
You can’t perform that action at this time.
0 commit comments