mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Separate ParachainId injection to its own pallet (#183)
* Separate paraid injection to own pallet * Move token dealer to a crate * Move to rococo-parachains * Remove parameter_types hack * Fix chainspec * fix build * remove commented code * Update contracts runtime to match other runtime * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Alphebetize workspace members * Parachain info to own crate * prune system = frame_system Co-authored-by: Ricardo Rius <ricardo@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -36,8 +36,6 @@ use sp_std::prelude::*;
|
||||
use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
mod message_example;
|
||||
|
||||
// A few exports that help ease life for downstream crates.
|
||||
pub use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
@@ -244,20 +242,16 @@ impl cumulus_parachain_upgrade::Trait for Runtime {
|
||||
type OnValidationFunctionParams = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub storage ParachainId: cumulus_primitives::ParaId = 100.into();
|
||||
}
|
||||
|
||||
impl cumulus_message_broker::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type DownwardMessageHandlers = TokenDealer;
|
||||
type UpwardMessage = cumulus_upward_message::RococoUpwardMessage;
|
||||
type ParachainId = ParachainId;
|
||||
type XCMPMessage = XCMPMessage<AccountId, Balance>;
|
||||
type ParachainId = ParachainInfo;
|
||||
type XCMPMessage = cumulus_token_dealer::XCMPMessage<AccountId, Balance>;
|
||||
type XCMPMessageHandlers = TokenDealer;
|
||||
}
|
||||
|
||||
impl message_example::Trait for Runtime {
|
||||
impl cumulus_token_dealer::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type UpwardMessageSender = MessageBroker;
|
||||
type UpwardMessage = cumulus_upward_message::RococoUpwardMessage;
|
||||
@@ -265,6 +259,8 @@ impl message_example::Trait for Runtime {
|
||||
type XCMPMessageSender = MessageBroker;
|
||||
}
|
||||
|
||||
impl parachain_info::Trait for Runtime {}
|
||||
|
||||
// We disable the rent system for easier testing.
|
||||
parameter_types! {
|
||||
pub const TombstoneDeposit: Balance = 0;
|
||||
@@ -307,8 +303,9 @@ construct_runtime! {
|
||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
||||
ParachainUpgrade: cumulus_parachain_upgrade::{Module, Call, Storage, Inherent, Event},
|
||||
MessageBroker: cumulus_message_broker::{Module, Call, Inherent, Event<T>},
|
||||
TokenDealer: message_example::{Module, Call, Event<T>, Config},
|
||||
TokenDealer: cumulus_token_dealer::{Module, Call, Event<T>},
|
||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||
ParachainInfo: parachain_info::{Module, Storage, Config},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user