Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions Cargo.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,54 @@ members = [
resolver = "2"

[patch.'https://github.com/paritytech/substrate']
frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
frame-support = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
frame-system = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-session = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-offences = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-api = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-core = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-io = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-std = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-trie = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-version = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-staking = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-storage = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-npos-elections-compact = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-allocator = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sc-executor = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-session = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
sp-transaction-pool = { git = "https://github.com/paritytech//substrate", rev = "13a07b4b637b6e25397db7fcd62d8b93eeae76ac" }
frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
frame-support = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
frame-system = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-session = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-offences = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-api = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-core = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-io = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-std = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-trie = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-version = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-staking = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-storage = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-npos-elections-compact = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-allocator = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sc-executor = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-session = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }
sp-transaction-pool = { git = "https://github.com/paritytech//substrate", rev = "816ed3d4e77a2463c86e69ec5a26fc307ef452b9" }

[patch.'https://github.com/paritytech/cumulus']
cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "3db8a38cfad53c4fe742ca68d7b425b88c61813d" }
Expand Down
6 changes: 3 additions & 3 deletions currencies/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#![cfg(test)]

use super::*;
use frame_support::{construct_runtime, parameter_types};
use frame_support::{construct_runtime, parameter_types, PalletId};
use orml_traits::parameter_type_with_key;
use sp_core::H256;
use sp_runtime::{
testing::Header,
traits::{AccountIdConversion, IdentityLookup},
AccountId32, ModuleId,
AccountId32,
};

use crate as currencies;
Expand Down Expand Up @@ -69,7 +69,7 @@ parameter_type_with_key! {
}

parameter_types! {
pub DustAccount: AccountId = ModuleId(*b"orml/dst").into_account();
pub DustAccount: AccountId = PalletId(*b"orml/dst").into_account();
}

impl orml_tokens::Config for Runtime {
Expand Down
6 changes: 3 additions & 3 deletions tokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use frame_support::{
LockableCurrency as PalletLockableCurrency, ReservableCurrency as PalletReservableCurrency, SignedImbalance,
WithdrawReasons,
},
transactional,
transactional, PalletId,
};
use frame_system::{ensure_signed, pallet_prelude::*};
use orml_traits::{
Expand All @@ -61,7 +61,7 @@ use sp_runtime::{
AccountIdConversion, AtLeast32BitUnsigned, Bounded, CheckedAdd, CheckedSub, MaybeSerializeDeserialize, Member,
Saturating, StaticLookup, Zero,
},
DispatchError, DispatchResult, ModuleId, RuntimeDebug,
DispatchError, DispatchResult, RuntimeDebug,
};
use sp_std::{
convert::{Infallible, TryFrom, TryInto},
Expand Down Expand Up @@ -348,7 +348,7 @@ pub mod module {
impl<T: Config> Pallet<T> {
/// Check whether account_id is a module account
pub(crate) fn is_module_account_id(account_id: &T::AccountId) -> bool {
ModuleId::try_from_account(account_id).is_some()
PalletId::try_from_account(account_id).is_some()
}

pub(crate) fn try_mutate_account<R, E>(
Expand Down
10 changes: 5 additions & 5 deletions tokens/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ parameter_types! {
pub const ProposalBondMinimum: u64 = 1;
pub const SpendPeriod: u64 = 2;
pub const Burn: Permill = Permill::from_percent(50);
pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
pub const TreasuryModuleId: PalletId = PalletId(*b"py/trsry");
pub const GetTokenId: CurrencyId = DOT;
}

impl pallet_treasury::Config for Runtime {
type ModuleId = TreasuryModuleId;
type PalletId = TreasuryModuleId;
type Currency = CurrencyAdapter<Runtime, GetTokenId>;
type ApproveOrigin = frame_system::EnsureRoot<AccountId>;
type RejectOrigin = frame_system::EnsureRoot<AccountId>;
Expand Down Expand Up @@ -165,7 +165,7 @@ impl ChangeMembers<AccountId> for TestChangeMembers {
}

parameter_types! {
pub const ElectionsPhragmenModuleId: LockIdentifier = *b"phrelect";
pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect";
pub const CandidacyBond: u64 = 3;
pub const VotingBond: u64 = 2;
pub const DesiredMembers: u32 = 2;
Expand All @@ -176,7 +176,7 @@ parameter_types! {
}

impl pallet_elections_phragmen::Config for Runtime {
type ModuleId = ElectionsPhragmenModuleId;
type PalletId = ElectionsPhragmenPalletId;
type Event = Event;
type Currency = CurrencyAdapter<Runtime, GetTokenId>;
type CurrencyToVote = SaturatingCurrencyToVote;
Expand Down Expand Up @@ -204,7 +204,7 @@ parameter_type_with_key! {
}

parameter_types! {
pub DustAccount: AccountId = ModuleId(*b"orml/dst").into_account();
pub DustAccount: AccountId = PalletId(*b"orml/dst").into_account();
}

impl Config for Runtime {
Expand Down