mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 00:01:03 +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:
@@ -254,13 +254,13 @@ mod tests;
|
||||
use rand_chacha::{rand_core::{RngCore, SeedableRng}, ChaChaRng};
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
use sp_runtime::{Percent, ModuleId, RuntimeDebug,
|
||||
use sp_runtime::{Percent, RuntimeDebug,
|
||||
traits::{
|
||||
StaticLookup, AccountIdConversion, Saturating, Zero, IntegerSquareRoot, Hash,
|
||||
TrailingZeroInput, CheckedSub
|
||||
}
|
||||
};
|
||||
use frame_support::{decl_error, decl_module, decl_storage, decl_event, ensure, dispatch::DispatchResult};
|
||||
use frame_support::{decl_error, decl_module, decl_storage, decl_event, ensure, dispatch::DispatchResult, PalletId};
|
||||
use frame_support::weights::Weight;
|
||||
use frame_support::traits::{
|
||||
Currency, ReservableCurrency, Randomness, Get, ChangeMembers, BalanceStatus,
|
||||
@@ -277,7 +277,7 @@ pub trait Config<I = DefaultInstance>: system::Config {
|
||||
type Event: From<Event<Self, I>> + Into<<Self as system::Config>::Event>;
|
||||
|
||||
/// The societies's module id
|
||||
type ModuleId: Get<ModuleId>;
|
||||
type PalletId: Get<PalletId>;
|
||||
|
||||
/// The currency type used for bidding.
|
||||
type Currency: ReservableCurrency<Self::AccountId>;
|
||||
@@ -498,7 +498,7 @@ decl_module! {
|
||||
const ChallengePeriod: T::BlockNumber = T::ChallengePeriod::get();
|
||||
|
||||
/// The societies's module id
|
||||
const ModuleId: ModuleId = T::ModuleId::get();
|
||||
const PalletId: PalletId = T::PalletId::get();
|
||||
|
||||
/// Maximum candidate intake per round.
|
||||
const MaxCandidateIntake: u32 = T::MaxCandidateIntake::get();
|
||||
@@ -1601,7 +1601,7 @@ impl<T: Config<I>, I: Instance> Module<T, I> {
|
||||
/// 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 the payouts pot. This is where payouts are made from.
|
||||
@@ -1609,7 +1609,7 @@ impl<T: Config<I>, I: Instance> Module<T, I> {
|
||||
/// 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 payouts() -> T::AccountId {
|
||||
T::ModuleId::get().into_sub_account(b"payouts")
|
||||
T::PalletId::get().into_sub_account(b"payouts")
|
||||
}
|
||||
|
||||
/// Return the duration of the lock, in blocks, with the given number of members.
|
||||
|
||||
@@ -58,7 +58,7 @@ parameter_types! {
|
||||
pub const BlockHashCount: u64 = 250;
|
||||
pub const ExistentialDeposit: u64 = 1;
|
||||
pub const MaxCandidateIntake: u32 = 10;
|
||||
pub const SocietyModuleId: ModuleId = ModuleId(*b"py/socie");
|
||||
pub const SocietyPalletId: PalletId = PalletId(*b"py/socie");
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(1024);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ impl Config for Test {
|
||||
type SuspensionJudgementOrigin = EnsureSignedBy<SuspensionJudgementSetAccount, u128>;
|
||||
type ChallengePeriod = ChallengePeriod;
|
||||
type MaxCandidateIntake = MaxCandidateIntake;
|
||||
type ModuleId = SocietyModuleId;
|
||||
type PalletId = SocietyPalletId;
|
||||
}
|
||||
|
||||
pub struct EnvBuilder {
|
||||
|
||||
Reference in New Issue
Block a user