ModuleId to PalletId - part of #8372 (#8477)

* `ModuleId` to `PalletId` - part of #8372

* fix doc

* move `PalletId` to `frame-support`

* fix compile

* fix tests

* `ModuleId` to `PalletId`

* subcommand `moduleid` to `palletid`
This commit is contained in:
Xavier Lau
2021-04-09 17:15:40 +08:00
committed by GitHub
parent c675310227
commit d6f0ce0551
20 changed files with 92 additions and 80 deletions
+8 -4
View File
@@ -22,11 +22,15 @@
use crate as tips;
use super::*;
use std::cell::RefCell;
use frame_support::{assert_noop, assert_ok, parameter_types, weights::Weight, traits::Contains};
use frame_support::{
assert_noop, assert_ok, parameter_types,
weights::Weight, traits::Contains,
PalletId
};
use sp_runtime::Permill;
use sp_core::H256;
use sp_runtime::{
Perbill, ModuleId,
Perbill,
testing::Header,
traits::{BlakeTwo256, IdentityLookup, BadOrigin},
};
@@ -121,11 +125,11 @@ parameter_types! {
pub const SpendPeriod: u64 = 2;
pub const Burn: Permill = Permill::from_percent(50);
pub const DataDepositPerByte: u64 = 1;
pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry");
pub const MaximumReasonLength: u32 = 16384;
}
impl pallet_treasury::Config for Test {
type ModuleId = TreasuryModuleId;
type PalletId = TreasuryPalletId;
type Currency = pallet_balances::Pallet<Test>;
type ApproveOrigin = frame_system::EnsureRoot<u128>;
type RejectOrigin = frame_system::EnsureRoot<u128>;