Skip to content

Commit

Permalink
update 1.0.0 again (#942)
Browse files Browse the repository at this point in the history
* update

* fix

* fmt
  • Loading branch information
xlc authored Aug 7, 2023
1 parent 73b4ee0 commit f7c8b38
Show file tree
Hide file tree
Showing 40 changed files with 371 additions and 512 deletions.
127 changes: 64 additions & 63 deletions Cargo.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,70 +37,71 @@ resolver = "2"
split-debuginfo = "unpacked"

[patch.'https://github.com/paritytech/substrate']
frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
frame-support = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
frame-system = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-session = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sc-executor = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sc-utils = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-api = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-core = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-io = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-session = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-staking = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-std = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-storage = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-trie = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-version = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
sp-weights = { git = "https://github.com/paritytech//substrate", rev = "6d28d2eb6fa1589105e970ff1b97555d91a1495b" }
frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
frame-support = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
frame-system = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-session = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sc-executor = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sc-utils = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-api = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-core = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-io = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-session = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-staking = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-std = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-storage = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-trie = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-version = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }
sp-weights = { git = "https://github.com/paritytech//substrate", rev = "948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" }

[patch.'https://github.com/paritytech/cumulus']
cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "a188eb95c522f3ca4c43ef7fed19a6107224217c" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "a188eb95c522f3ca4c43ef7fed19a6107224217c" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "a188eb95c522f3ca4c43ef7fed19a6107224217c" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "a188eb95c522f3ca4c43ef7fed19a6107224217c" }
parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "a188eb95c522f3ca4c43ef7fed19a6107224217c" }
cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" }
parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" }

[patch.'https://github.com/paritytech/polkadot']
pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
xcm = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "1ed6e2e50a4ce61f6cda46a730efc11a07b6ebb3" }
pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
xcm = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "c9ec8c5a15959ce711bb60aa79add58f560d61e9" }
5 changes: 1 addition & 4 deletions asset-registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub mod module {
}

#[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) {
self.assets.iter().for_each(|(asset_id, metadata_encoded)| {
let metadata = AssetMetadata::decode(&mut &metadata_encoded[..]).expect("Error decoding AssetMetadata");
Expand All @@ -139,9 +139,6 @@ pub mod module {
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
impl<T: Config> Hooks<T::BlockNumber> for Pallet<T> {}

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
Expand Down
16 changes: 8 additions & 8 deletions asset-registry/src/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use sp_core::bounded::BoundedVec;
use sp_io::TestExternalities;
use sp_runtime::{traits::Convert, AccountId32};
use sp_runtime::{traits::Convert, AccountId32, BuildStorage};
use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt};

pub mod para;
Expand Down Expand Up @@ -238,15 +238,15 @@ pub type ParaXTokens = orml_xtokens::Pallet<para::Runtime>;
pub fn para_ext(para_id: u32, asset_data: Option<(Vec<(u32, Vec<u8>)>, u32)>) -> TestExternalities {
use para::{Runtime, System};

let mut t = frame_system::GenesisConfig::default()
.build_storage::<Runtime>()
let mut t = frame_system::GenesisConfig::<Runtime>::default()
.build_storage()
.unwrap();

let parachain_info_config = parachain_info::GenesisConfig {
let parachain_info_config = parachain_info::GenesisConfig::<Runtime> {
_config: Default::default(),
parachain_id: para_id.into(),
};
<parachain_info::GenesisConfig as GenesisBuild<Runtime, _>>::assimilate_storage(&parachain_info_config, &mut t)
.unwrap();
parachain_info_config.assimilate_storage(&mut t).unwrap();

orml_tokens::GenesisConfig::<Runtime> {
balances: vec![(ALICE, CurrencyId::R, 1_000)],
Expand All @@ -268,8 +268,8 @@ pub fn para_ext(para_id: u32, asset_data: Option<(Vec<(u32, Vec<u8>)>, u32)>) ->
pub fn relay_ext() -> sp_io::TestExternalities {
use relay::{Runtime, System};

let mut t = frame_system::GenesisConfig::default()
.build_storage::<Runtime>()
let mut t = frame_system::GenesisConfig::<Runtime>::default()
.build_storage()
.unwrap();

pallet_balances::GenesisConfig::<Runtime> {
Expand Down
41 changes: 17 additions & 24 deletions asset-registry/src/mock/para.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use sp_core::H256;
use sp_runtime::{
testing::Header,
traits::{AccountIdConversion, Convert, IdentityLookup},
AccountId32,
};
Expand All @@ -39,13 +38,12 @@ pub type AccountId = AccountId32;
impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type BlockNumber = u64;
type Nonce = u64;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU64<250>;
type BlockWeights = ();
Expand Down Expand Up @@ -386,28 +384,23 @@ impl orml_xcm::Config for Runtime {
type SovereignOrigin = EnsureRoot<AccountId>;
}

type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;
type Block = frame_system::mocking::MockBlock<Runtime>;

construct_runtime!(
pub enum Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},

ParachainInfo: parachain_info::{Pallet, Storage, Config},
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>},
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>},
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin},

Tokens: orml_tokens::{Pallet, Storage, Event<T>, Config<T>},
XTokens: orml_xtokens::{Pallet, Storage, Call, Event<T>},
AssetRegistry: orml_asset_registry::{Pallet, Storage, Call, Event<T>},

PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin},
OrmlXcm: orml_xcm::{Pallet, Call, Event<T>},
pub enum Runtime {
System: frame_system,
Balances: pallet_balances,

ParachainInfo: parachain_info,
XcmpQueue: cumulus_pallet_xcmp_queue,
DmpQueue: cumulus_pallet_dmp_queue,
CumulusXcm: cumulus_pallet_xcm,

Tokens: orml_tokens,
XTokens: orml_xtokens,
AssetRegistry: orml_asset_registry,

PolkadotXcm: pallet_xcm,
OrmlXcm: orml_xcm,
}
);
Loading

0 comments on commit f7c8b38

Please sign in to comment.