The great refactor (#325)

* Move pallets to pallets folder and rename them

* Move genesis file to service

* Rename primitives to primitives-core

* Delete cumulus-runtime

* Move stuff to client folder and rename
This commit is contained in:
Bastian Köcher
2021-02-10 13:07:21 +01:00
committed by GitHub
parent e065c5776b
commit fbacfe7937
48 changed files with 436 additions and 547 deletions
+6 -8
View File
@@ -34,10 +34,9 @@ pallet-sudo = { git = "https://github.com/paritytech/substrate", default-feature
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
# Cumulus dependencies
cumulus-runtime = { path = "../../runtime", default-features = false }
cumulus-parachain-system = { path = "../../parachain-system", default-features = false }
cumulus-primitives = { path = "../../primitives", default-features = false }
xcm-handler = { path = "../../xcm-handler", default-features = false }
cumulus-pallet-parachain-system = { path = "../../pallets/parachain-system", default-features = false }
cumulus-primitives-core = { path = "../../primitives/core", default-features = false }
cumulus-pallet-xcm-handler = { path = "../../pallets/xcm-handler", default-features = false }
# Polkadot dependencies
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
@@ -74,11 +73,10 @@ std = [
"pallet-transaction-payment/std",
"parachain-info/std",
"rococo-parachain-primitives/std",
"cumulus-runtime/std",
"cumulus-parachain-system/std",
"cumulus-primitives/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcm-handler/std",
"cumulus-primitives-core/std",
"xcm/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm-handler/std",
]
+7 -7
View File
@@ -229,7 +229,7 @@ impl pallet_sudo::Config for Runtime {
type Event = Event;
}
impl cumulus_parachain_system::Config for Runtime {
impl cumulus_pallet_parachain_system::Config for Runtime {
type Event = Event;
type OnValidationData = ();
type SelfParaId = parachain_info::Module<Runtime>;
@@ -242,7 +242,7 @@ impl parachain_info::Config for Runtime {}
parameter_types! {
pub const RococoLocation: MultiLocation = MultiLocation::X1(Junction::Parent);
pub const RococoNetwork: NetworkId = NetworkId::Polkadot;
pub RelayChainOrigin: Origin = xcm_handler::Origin::Relay.into();
pub RelayChainOrigin: Origin = cumulus_pallet_xcm_handler::Origin::Relay.into();
pub Ancestry: MultiLocation = Junction::Parachain {
id: ParachainInfo::parachain_id().into()
}.into();
@@ -268,7 +268,7 @@ type LocalAssetTransactor = CurrencyAdapter<
type LocalOriginConverter = (
SovereignSignedViaLocation<LocationConverter, Origin>,
RelayChainAsNative<RelayChainOrigin, Origin>,
SiblingParachainAsNative<xcm_handler::Origin, Origin>,
SiblingParachainAsNative<cumulus_pallet_xcm_handler::Origin, Origin>,
SignedAccountId32AsNative<RococoNetwork, Origin>,
);
@@ -284,7 +284,7 @@ impl Config for XcmConfig {
type LocationInverter = LocationInverter<Ancestry>;
}
impl xcm_handler::Config for Runtime {
impl cumulus_pallet_xcm_handler::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type UpwardMessageSender = ParachainSystem;
@@ -302,10 +302,10 @@ construct_runtime! {
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
Sudo: pallet_sudo::{Module, Call, Storage, Config<T>, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
ParachainSystem: cumulus_parachain_system::{Module, Call, Storage, Inherent, Event},
ParachainSystem: cumulus_pallet_parachain_system::{Module, Call, Storage, Inherent, Event},
TransactionPayment: pallet_transaction_payment::{Module, Storage},
ParachainInfo: parachain_info::{Module, Storage, Config},
XcmHandler: xcm_handler::{Module, Call, Event<T>, Origin},
XcmHandler: cumulus_pallet_xcm_handler::{Module, Call, Event<T>, Origin},
}
}
@@ -414,4 +414,4 @@ impl_runtime_apis! {
}
}
cumulus_runtime::register_validate_block!(Block, Executive);
cumulus_pallet_parachain_system::register_validate_block!(Block, Executive);