Companion for #7536 (Pallet Treasury Refactor) (#2025)

* wk2048 | D6 | issue-7143-treasury-refactor | integration

* wk2048 | D6 | issue-7143-treasury-refactor | integration | p2

* trait -> config

* fix weight files and import

* missed some

* fix import

* fix imports

* alphabetize

* fix config traits

* fix trait

* update traits

* update weights

* "Update Substrate"

* fix features

* Update runtime/kusama/src/lib.rs

* Update runtime/polkadot/src/lib.rs

* add bounties and tips in proxy filters

* remove unused

* remove unused

* remove unused

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
RK
2020-12-16 20:59:07 +05:30
committed by GitHub
parent 8b46fa64cd
commit 1ecc2e0389
16 changed files with 674 additions and 434 deletions
+2 -34
View File
@@ -573,13 +573,12 @@ mod tests {
impl_outer_origin, assert_ok, assert_noop, parameter_types,
traits::{OnInitialize, OnFinalize},
};
use frame_support::traits::{Contains, ContainsLengthBound};
use sp_core::H256;
use primitives::v1::{Id as ParaId, ValidationCode};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
use sp_runtime::{
Permill, Percent, testing::Header, DispatchResult,
Permill, testing::Header, DispatchResult,
traits::{BlakeTwo256, IdentityLookup},
};
use crate::slots::Registrar;
@@ -638,28 +637,7 @@ mod tests {
pub const ProposalBondMinimum: u64 = 1;
pub const SpendPeriod: u64 = 2;
pub const Burn: Permill = Permill::from_percent(50);
pub const TipCountdown: u64 = 1;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: u64 = 1;
pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
pub const DataDepositPerByte: u64 = 1;
pub const BountyDepositBase: u64 = 1;
pub const BountyDepositPayoutDelay: u64 = 1;
pub const BountyUpdatePeriod: u64 = 1;
pub const MaximumReasonLength: u32 = 16384;
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
pub const BountyValueMinimum: u64 = 1;
}
pub struct Nobody;
impl Contains<u64> for Nobody {
fn contains(_: &u64) -> bool { false }
fn sorted_members() -> Vec<u64> { vec![] }
#[cfg(feature = "runtime-benchmarks")]
fn add(_: &u64) { unimplemented!() }
}
impl ContainsLengthBound for Nobody {
fn min_len() -> usize { 0 }
fn max_len() -> usize { 0 }
}
impl pallet_treasury::Config for Test {
type Currency = pallet_balances::Module<Test>;
@@ -672,18 +650,8 @@ mod tests {
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type BurnDestination = ();
type Tippers = Nobody;
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type DataDepositPerByte = DataDepositPerByte;
type BountyDepositBase = BountyDepositBase;
type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
type BountyUpdatePeriod = BountyUpdatePeriod;
type MaximumReasonLength = MaximumReasonLength;
type BountyCuratorDeposit = BountyCuratorDeposit;
type BountyValueMinimum = BountyValueMinimum;
type ModuleId = TreasuryModuleId;
type SpendFunds = ();
type WeightInfo = ();
}