mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 01:11:04 +00:00
* `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:
@@ -677,14 +677,14 @@ impl<T: Config> Module<T> {
|
||||
/// This actually does computation. If you need to keep using it, then make sure you cache the
|
||||
/// value and only call this once.
|
||||
pub fn account_id() -> T::AccountId {
|
||||
T::ModuleId::get().into_account()
|
||||
T::PalletId::get().into_account()
|
||||
}
|
||||
|
||||
/// The account ID of a bounty account
|
||||
pub fn bounty_account_id(id: BountyIndex) -> T::AccountId {
|
||||
// only use two byte prefix to support 16 byte account id (used by test)
|
||||
// "modl" ++ "py/trsry" ++ "bt" is 14 bytes, and two bytes remaining for bounty index
|
||||
T::ModuleId::get().into_sub_account(("bt", id))
|
||||
T::PalletId::get().into_sub_account(("bt", id))
|
||||
}
|
||||
|
||||
fn create_bounty(
|
||||
|
||||
@@ -24,12 +24,13 @@ use super::*;
|
||||
use std::cell::RefCell;
|
||||
|
||||
use frame_support::{
|
||||
assert_noop, assert_ok, parameter_types, weights::Weight, traits::OnInitialize
|
||||
assert_noop, assert_ok, parameter_types, weights::Weight, traits::OnInitialize,
|
||||
PalletId
|
||||
};
|
||||
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
Perbill, ModuleId,
|
||||
Perbill,
|
||||
testing::Header,
|
||||
traits::{BlakeTwo256, IdentityLookup, BadOrigin},
|
||||
};
|
||||
@@ -103,11 +104,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");
|
||||
}
|
||||
// impl pallet_treasury::Config for Test {
|
||||
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>;
|
||||
|
||||
Reference in New Issue
Block a user